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:
Bastien 2018-04-27 00:25:15 +02:00
parent b64f31abd2
commit 25f99522ad
1 changed files with 1 additions and 3 deletions

View File

@ -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))))