diff options
author | Dan Davison <davison@stats.ox.ac.uk> | 2010-09-30 10:39:49 +0100 |
---|---|---|
committer | Dan Davison <davison@stats.ox.ac.uk> | 2010-09-30 11:43:55 +0100 |
commit | 9c211df6ae2d31f70444cc9573f17707129d700f (patch) | |
tree | 1ad8d116d83f058593ee62cea6acb44c1f56fdf1 | |
parent | 940ab32aa8c5cd07539580525b196372097ebf59 (diff) | |
download | org-mode-9c211df6ae2d31f70444cc9573f17707129d700f.tar.gz |
Don't move point when generating org-src edit buffer
* org-src.el (org-edit-src-code): Don't move point when
generating edit buffer
-rw-r--r-- | lisp/org-src.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/org-src.el b/lisp/org-src.el index 05580d9..c1d579c 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -252,10 +252,10 @@ buffer." (org-set-local 'org-edit-src-content-indentation 0)))) (unless (functionp lang-f) (error "No such language mode: %s" lang-f)) - (if (> (point) end) (goto-char end)) - (setq line (org-current-line) - col (current-column)) - (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 org-src-ask-before-returning-to-edit-buffer (y-or-n-p "Return to existing edit buffer? [n] will revert changes: ") t)) |