Parcourir la source

Merge branch 'maint'

Nicolas Goaziou il y a 10 ans
Parent
commit
2dd548a4e0
1 fichiers modifiés avec 5 ajouts et 2 suppressions
  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