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

This commit is contained in:
Carsten Dominik 2010-09-30 13:12:17 +02:00
commit f77e5716a8
1 changed files with 6 additions and 5 deletions

View File

@ -211,9 +211,7 @@ buffer."
(interactive) (interactive)
(unless (eq context 'save) (unless (eq context 'save)
(setq org-edit-src-saved-temp-window-config (current-window-configuration))) (setq org-edit-src-saved-temp-window-config (current-window-configuration)))
(let ((line (org-current-line)) (let ((mark (and (use-region-p) (mark)))
(col (current-column))
(mark (and (use-region-p) (mark)))
(case-fold-search t) (case-fold-search t)
(info (org-edit-src-find-region-and-lang)) (info (org-edit-src-find-region-and-lang))
(babel-info (org-babel-get-src-block-info)) (babel-info (org-babel-get-src-block-info))
@ -223,7 +221,7 @@ buffer."
(preserve-indentation org-src-preserve-indentation) (preserve-indentation org-src-preserve-indentation)
(allow-write-back-p (null code)) (allow-write-back-p (null code))
block-nindent total-nindent ovl lang lang-f single lfmt buffer msg block-nindent total-nindent ovl lang lang-f single lfmt buffer msg
begline markline markcol) begline markline markcol line col)
(if (not info) (if (not info)
nil nil
(setq beg (move-marker beg (nth 0 info)) (setq beg (move-marker beg (nth 0 info))
@ -254,7 +252,10 @@ buffer."
(org-set-local 'org-edit-src-content-indentation 0)))) (org-set-local 'org-edit-src-content-indentation 0))))
(unless (functionp lang-f) (unless (functionp lang-f)
(error "No such language mode: %s" lang-f)) (error "No such language mode: %s" lang-f))
(org-goto-line line) (save-excursion
(if (> (point) end) (goto-char end))
(setq line (org-current-line)
col (current-column)))
(if (and (setq buffer (org-edit-src-find-buffer beg end)) (if (and (setq buffer (org-edit-src-find-buffer beg end))
(if org-src-ask-before-returning-to-edit-buffer (if org-src-ask-before-returning-to-edit-buffer
(y-or-n-p "Return to existing edit buffer? [n] will revert changes: ") t)) (y-or-n-p "Return to existing edit buffer? [n] will revert changes: ") t))