1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-22 07:09:47 +00:00

Minor fixes

This commit is contained in:
Carsten Dominik 2009-06-09 19:23:59 +02:00
parent 7d20a088f5
commit 05438ec08f
3 changed files with 15 additions and 9 deletions

View File

@ -1,5 +1,7 @@
2009-06-09 Carsten Dominik <carsten.dominik@gmail.com>
* org-src.el (org-src-mode): Renamed from `org-exit-edit-mode'.
* org-latex.el (org-export-latex-use-verb): New variable.
(org-export-latex-emph-format): Prefer \texttt over \verb when
org-export-latex-use-verb is set.

View File

@ -2219,7 +2219,7 @@ INDENT was the original indentation of the block."
(funcall mode)
(fundamental-mode))
(font-lock-fontify-buffer)
(run-hooks 'org-src-mode-hook)
(org-src-mode)
(set-buffer-modified-p nil)
(org-export-htmlize-region-for-paste
(point-min) (point-max))))

View File

@ -116,9 +116,9 @@ This is needed for font-lock setup.")
;;; Editing source examples
(defvar org-exit-edit-mode-map (make-sparse-keymap))
(define-key org-exit-edit-mode-map "\C-c'" 'org-edit-src-exit)
(define-key org-exit-edit-mode-map "\C-x\C-s" 'org-edit-src-save)
(defvar org-src-mode-map (make-sparse-keymap))
(define-key org-src-mode-map "\C-c'" 'org-edit-src-exit)
(define-key org-src-mode-map "\C-x\C-s" 'org-edit-src-save)
(defvar org-edit-src-force-single-line nil)
(defvar org-edit-src-from-org-mode nil)
(defvar org-edit-src-picture nil)
@ -127,8 +127,13 @@ This is needed for font-lock setup.")
(defvar org-edit-src-overlay nil)
(defvar org-edit-src-nindent nil)
(define-minor-mode org-exit-edit-mode
"Minor mode installing a single key binding, \"C-c '\" to exit special edit.")
(define-minor-mode org-src-mode
"Minor mode for language major mode buffers generated by org.
This minor mode is turned on in two situations:
- when editing a source code snippet with \"C-c '\".
- When formatting a source code snippet for export with htmlize.
There is a mode hook, and keybindings for `org-edit-src-exit' and
`org-edit-src-save'")
(defun org-edit-src-code ()
"Edit the source code example at point.
@ -187,7 +192,7 @@ the edited version."
(org-do-remove-indentation)
(let ((org-inhibit-startup t))
(funcall lang-f)
(run-hooks 'org-src-mode-hook))
(org-src-mode))
(set (make-local-variable 'org-edit-src-force-single-line) single)
(set (make-local-variable 'org-edit-src-from-org-mode) org-mode-p)
(when lfmt
@ -197,7 +202,6 @@ the edited version."
(while (re-search-forward "^," nil t)
(replace-match "")))
(goto-line (1+ (- line begline)))
(org-exit-edit-mode)
(org-set-local 'org-edit-src-beg-marker beg)
(org-set-local 'org-edit-src-end-marker end)
(org-set-local 'org-edit-src-overlay ovl)
@ -301,7 +305,7 @@ the fragment in the Org-mode buffer."
(while (re-search-forward "^[ \t]*: ?" nil t)
(replace-match ""))
(goto-line (1+ (- line begline)))
(org-exit-edit-mode)
(org-src-mode)
(org-set-local 'org-edit-src-beg-marker beg)
(org-set-local 'org-edit-src-end-marker end)
(org-set-local 'org-edit-src-overlay ovl)