summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-04-07 20:43:02 (GMT)
committer Bastien Guerry <bzg@altern.org>2013-04-07 20:43:02 (GMT)
commit8c7e46b6a95e0ab46bfb612c82717f5a123a59aa (patch)
tree46e48f95f6df20169768e09f6b1f141762102f61
parentd6d7bc55b87ea819404a92e74a05310e31600122 (diff)
downloadorg-mode-8c7e46b6a95e0ab46bfb612c82717f5a123a59aa.zip
org-mode-8c7e46b6a95e0ab46bfb612c82717f5a123a59aa.tar.gz
org-src.el (org-edit-src-code): Don't set `buffer-auto-save-file-name' unless `auto-save-default' is non-nil
* org-src.el (org-edit-src-code): Don't set `buffer-auto-save-file-name' unless `auto-save-default' is non-nil. Thanks to Charles Berry for reporting this.
-rw-r--r--lisp/org-src.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/org-src.el b/lisp/org-src.el
index e59021d..d294796 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -350,10 +350,11 @@ the display of windows containing the Org buffer and the code buffer."
(if org-src-preserve-indentation col (max 0 (- col total-nindent))))
(org-src-mode)
(set-buffer-modified-p nil)
- (setq buffer-file-name nil
- buffer-auto-save-file-name
- (concat (make-temp-name "org-src-")
- (format-time-string "-%Y-%d-%m") ".txt"))
+ (setq buffer-file-name nil)
+ (when auto-save-default
+ (setq buffer-auto-save-file-name
+ (concat (make-temp-name "org-src-")
+ (format-time-string "-%Y-%d-%m") ".txt")))
(and org-edit-src-persistent-message
(org-set-local 'header-line-format msg))
(let ((edit-prep-func (intern (concat "org-babel-edit-prep:" lang))))