diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-02-18 01:59:51 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-02-18 01:59:51 +0100 |
commit | c41bbc577e81e9fa5bab2509a8141189e45fe6c7 (patch) | |
tree | 312df46ffaa069acb5cc2cbda7a24c1c499ad54e | |
parent | 880a2b4f9042e188462c7c6a8996500774c21884 (diff) | |
download | org-mode-c41bbc577e81e9fa5bab2509a8141189e45fe6c7.tar.gz |
Fix "Wrong type argument: overlayp"
* lisp/org-src.el (org-src-mode-configure-edit-buffer): Fix "Wrong
type argument: overlayp".
Changing major mode in a source edit buffer resets local variables
used to link it to source buffer. As a consequence, overlay in source
buffer can no longer be found nor deleted.
-rw-r--r-- | lisp/org-src.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/org-src.el b/lisp/org-src.el index 752fa30..618ed9f 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -816,7 +816,10 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"." (defun org-src-mode-configure-edit-buffer () (when (org-bound-and-true-p org-edit-src-from-org-mode) (org-add-hook 'kill-buffer-hook - #'(lambda () (delete-overlay org-edit-src-overlay)) nil 'local) + (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) |