mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-12-28 10:56:57 +00:00
org-src.el (org-edit-src-exit): Fix bug when saving an empty source buffer
* org-src.el (org-edit-src-exit): Fix bug when saving an empty source buffer. Thanks to Hsiu-Khuern Tang for reporting this.
This commit is contained in:
parent
c3390982cb
commit
aba9e2b94d
@ -689,9 +689,10 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"."
|
||||
(kill-buffer buffer))
|
||||
(goto-char beg)
|
||||
(when allow-write-back-p
|
||||
(delete-region beg (1- end))
|
||||
(insert code)
|
||||
(delete-char 1)
|
||||
(delete-region beg (max beg (1- end)))
|
||||
(unless (string-match "^[ \t]*$" code)
|
||||
(insert code)
|
||||
(delete-char 1))
|
||||
(goto-char beg)
|
||||
(if single (just-one-space)))
|
||||
(if (memq t (mapcar (lambda (overlay)
|
||||
|
Loading…
Reference in New Issue
Block a user