Browse Source

Merge branch 'maint'

Nicolas Goaziou 2 years ago
parent
commit
2dd548a4e0
1 changed files with 5 additions and 2 deletions
  1. 5 2
      lisp/org-src.el

+ 5 - 2
lisp/org-src.el

@@ -543,8 +543,11 @@ There is a mode hook, and keybindings for `org-edit-src-exit' and
 (defun org-src-mode-configure-edit-buffer ()
   (when (org-bound-and-true-p org-src--from-org-mode)
     (org-add-hook 'kill-buffer-hook
-		  (lambda () (delete-overlay org-src--overlay)) nil 'local)
-    (if (org-bound-and-true-p org-src--allow-write-back-p)
+		  (lambda ()
+		    (when (overlayp org-edit-src-overlay)
+		      (delete-overlay org-edit-src-overlay)))
+		  nil 'local)
+    (if (org-bound-and-true-p org-edit-src-allow-write-back-p)
 	(progn
 	  (setq buffer-offer-save t)
 	  (setq buffer-file-name