aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-03-05 04:22:25 +0000
committerRichard M. Stallman1996-03-05 04:22:25 +0000
commit52b9a93170c1540d45c60ceeaff468fcfc5a1744 (patch)
tree25d201d9db5fe29ff09caae66fab09513f7febbf
parentc01e66e11b903592f268a4ffc52b2c2e5343d0ad (diff)
downloademacs-52b9a93170c1540d45c60ceeaff468fcfc5a1744.tar.gz
emacs-52b9a93170c1540d45c60ceeaff468fcfc5a1744.zip
(save-place-kill-emacs-hook): Don't save
if we never loaded the save-place-file.
-rw-r--r--lisp/saveplace.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/saveplace.el b/lisp/saveplace.el
index f86c48a6f7c..a33ccbcd7f5 100644
--- a/lisp/saveplace.el
+++ b/lisp/saveplace.el
@@ -211,8 +211,10 @@ To save places automatically in all files, put this in your `.emacs' file:
211 (setq save-place t))))) 211 (setq save-place t)))))
212 212
213(defun save-place-kill-emacs-hook () 213(defun save-place-kill-emacs-hook ()
214 (save-places-to-alist) 214 (if save-place-loaded
215 (save-place-alist-to-file)) 215 (progn
216 (save-places-to-alist)
217 (save-place-alist-to-file))))
216 218
217(add-hook 'find-file-hooks 'save-place-find-file-hook t) 219(add-hook 'find-file-hooks 'save-place-find-file-hook t)
218 220