1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-18 10:17:03 +00:00

Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode

This commit is contained in:
Carsten Dominik 2009-11-04 18:47:08 +01:00
commit 49da78775f

View File

@ -171,6 +171,7 @@ For example, there is no ocaml-mode in Emacs, but the mode to use is
(defvar org-edit-src-end-marker nil) (defvar org-edit-src-end-marker nil)
(defvar org-edit-src-overlay nil) (defvar org-edit-src-overlay nil)
(defvar org-edit-src-block-indentation nil) (defvar org-edit-src-block-indentation nil)
(defvar org-edit-src-saved-temp-window-config nil)
(defvar org-src-ask-before-returning-to-edit-buffer t (defvar org-src-ask-before-returning-to-edit-buffer t
"If nil, when org-edit-src code is used on a block that already "If nil, when org-edit-src code is used on a block that already
@ -193,6 +194,7 @@ to the correct language mode. When done, exit with \\[org-edit-src-exit].
This will remove the original code in the Org buffer, and replace it with This will remove the original code in the Org buffer, and replace it with
the edited version." the edited version."
(interactive) (interactive)
(setq org-edit-src-saved-temp-window-config (current-window-configuration))
(let ((line (org-current-line)) (let ((line (org-current-line))
(col (current-column)) (col (current-column))
(case-fold-search t) (case-fold-search t)
@ -574,7 +576,10 @@ the language, a switch telling if the content should be in a single line."
(org-goto-line (1- (+ (org-current-line) line))) (org-goto-line (1- (+ (org-current-line) line)))
(org-move-to-column (if preserve-indentation col (+ col total-nindent delta))) (org-move-to-column (if preserve-indentation col (+ col total-nindent delta)))
(move-marker beg nil) (move-marker beg nil)
(move-marker end nil))) (move-marker end nil))
(when org-edit-src-saved-temp-window-config
(set-window-configuration org-edit-src-saved-temp-window-config)
(setq org-edit-src-saved-temp-window-config nil)))
(defun org-edit-src-save () (defun org-edit-src-save ()
"Save parent buffer with current state source-code buffer." "Save parent buffer with current state source-code buffer."