mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-07-16 16:46:26 +00:00
Fix positioning bug when returning from source code editing
This commit is contained in:
parent
95a4be9088
commit
a6449c0324
|
@ -1,6 +1,8 @@
|
|||
2009-06-09 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-src.el (org-src-mode): Renamed from `org-exit-edit-mode'.
|
||||
(org-edit-src-exit): Better cursor positioning when returning from
|
||||
editing.
|
||||
|
||||
* org-latex.el (org-export-latex-use-verb): New variable.
|
||||
(org-export-latex-emph-format): Prefer \texttt over \verb when
|
||||
|
|
|
@ -407,18 +407,19 @@ the language, a switch telling of the content should be in a single line."
|
|||
(interactive)
|
||||
(unless (string-match "\\`*Org Edit " (buffer-name (current-buffer)))
|
||||
(error "This is not an sub-editing buffer, something is wrong..."))
|
||||
(let ((line (if (org-bound-and-true-p org-edit-src-force-single-line)
|
||||
1
|
||||
(org-current-line)))
|
||||
(beg org-edit-src-beg-marker)
|
||||
(let ((beg org-edit-src-beg-marker)
|
||||
(end org-edit-src-end-marker)
|
||||
(ovl org-edit-src-overlay)
|
||||
(buffer (current-buffer))
|
||||
(nindent org-edit-src-nindent)
|
||||
code)
|
||||
code line)
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(if (looking-at "[ \t\n]*\n") (replace-match ""))
|
||||
(if (re-search-forward "\n[ \t\n]*\\'" nil t) (replace-match ""))
|
||||
(if (re-search-forward "\n[ \t\n]*\\'" nil t) (replace-match "")))
|
||||
(setq line (if (org-bound-and-true-p org-edit-src-force-single-line)
|
||||
1
|
||||
(org-current-line)))
|
||||
(when (org-bound-and-true-p org-edit-src-force-single-line)
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "\n" nil t)
|
||||
|
|
Loading…
Reference in a new issue