forked from mirrors/org-mode
org-src.el: Don't set `buffer-file-name'
* lisp/org-src.el (org-src-mode-configure-edit-buffer): Don't set `buffer-file-name'. Thanks to Clément Pit-Claudel for reporting this.
This commit is contained in:
parent
b64f31abd2
commit
25f99522ad
|
@ -667,14 +667,12 @@ See also `org-src-mode-hook'."
|
|||
(setq org-src--auto-save-timer nil)))))))))
|
||||
|
||||
(defun org-src-mode-configure-edit-buffer ()
|
||||
"Configure the src edit buffer."
|
||||
(when (bound-and-true-p org-src--from-org-mode)
|
||||
(add-hook 'kill-buffer-hook #'org-src--remove-overlay nil 'local)
|
||||
(if (bound-and-true-p org-src--allow-write-back)
|
||||
(progn
|
||||
(setq buffer-offer-save t)
|
||||
(setq buffer-file-name
|
||||
(concat (buffer-file-name (marker-buffer org-src--beg-marker))
|
||||
"[" (buffer-name) "]"))
|
||||
(setq-local write-contents-functions '(org-edit-src-save)))
|
||||
(setq buffer-read-only t))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue