diff options
| author | Mark A. Hershberger | 2018-09-15 12:49:49 -0400 |
|---|---|---|
| committer | Eli Zaretskii | 2018-09-22 10:41:22 +0300 |
| commit | ca208e83885db25569d1096a7925babb9940ecdd (patch) | |
| tree | 1757f684e1ae7ea622992141a0eda4442695acaa | |
| parent | d28d54c76754759e5f0fc8254541fbb4ef6a21d8 (diff) | |
| download | emacs-ca208e83885db25569d1096a7925babb9940ecdd.tar.gz emacs-ca208e83885db25569d1096a7925babb9940ecdd.zip | |
Use save-place-mode instead of save-place
* lisp/menu-bar.el (menu-bar-options-save, menu-bar-options-menu):
* lisp/saveplace.el (save-place-to-alist, save-places-to-alist)
(save-place-find-file-hook, save-place-dired-hook): Use
save-place-mode instead of the obsolete save-place.
| -rw-r--r-- | lisp/menu-bar.el | 6 | ||||
| -rw-r--r-- | lisp/saveplace.el | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index e2ebd981196..280fb9354d5 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -689,7 +689,7 @@ The selected font will be the default on both the existing and future frames." | |||
| 689 | debug-on-quit debug-on-error | 689 | debug-on-quit debug-on-error |
| 690 | ;; Somehow this works, when tool-bar and menu-bar don't. | 690 | ;; Somehow this works, when tool-bar and menu-bar don't. |
| 691 | tooltip-mode window-divider-mode | 691 | tooltip-mode window-divider-mode |
| 692 | save-place uniquify-buffer-name-style fringe-mode | 692 | save-place-mode uniquify-buffer-name-style fringe-mode |
| 693 | indicate-empty-lines indicate-buffer-boundaries | 693 | indicate-empty-lines indicate-buffer-boundaries |
| 694 | case-fold-search font-use-system-font | 694 | case-fold-search font-use-system-font |
| 695 | current-language-environment default-input-method | 695 | current-language-environment default-input-method |
| @@ -1413,7 +1413,7 @@ mail status in mode line")) | |||
| 1413 | 1413 | ||
| 1414 | (bindings--define-key menu [save-place] | 1414 | (bindings--define-key menu [save-place] |
| 1415 | (menu-bar-make-toggle | 1415 | (menu-bar-make-toggle |
| 1416 | toggle-save-place-globally save-place | 1416 | toggle-save-place-globally save-place-mode |
| 1417 | "Save Place in Files between Sessions" | 1417 | "Save Place in Files between Sessions" |
| 1418 | "Saving place in files %s" | 1418 | "Saving place in files %s" |
| 1419 | "Visit files of previous session when restarting Emacs" | 1419 | "Visit files of previous session when restarting Emacs" |
| @@ -1421,7 +1421,7 @@ mail status in mode line")) | |||
| 1421 | ;; Do it by name, to avoid a free-variable | 1421 | ;; Do it by name, to avoid a free-variable |
| 1422 | ;; warning during byte compilation. | 1422 | ;; warning during byte compilation. |
| 1423 | (set-default | 1423 | (set-default |
| 1424 | 'save-place (not (symbol-value 'save-place))))) | 1424 | 'save-place-mode (not (symbol-value 'save-place-mode))))) |
| 1425 | 1425 | ||
| 1426 | (bindings--define-key menu [uniquify] | 1426 | (bindings--define-key menu [uniquify] |
| 1427 | (menu-bar-make-toggle | 1427 | (menu-bar-make-toggle |
diff --git a/lisp/saveplace.el b/lisp/saveplace.el index aeb6cf1de7a..b6a71166ffd 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | ;; Automatically save place in files, so that visiting them later | 27 | ;; Automatically save place in files, so that visiting them later |
| 28 | ;; (even during a different Emacs session) automatically moves point | 28 | ;; (even during a different Emacs session) automatically moves point |
| 29 | ;; to the saved position, when the file is first found. Uses the | 29 | ;; to the saved position, when the file is first found. Uses the |
| 30 | ;; value of buffer-local variable save-place to determine whether to | 30 | ;; value of buffer-local variable save-place-mode to determine whether to |
| 31 | ;; save position or not. | 31 | ;; save position or not. |
| 32 | ;; | 32 | ;; |
| 33 | ;; Thanks to Stefan Schoef, who sent a patch with the | 33 | ;; Thanks to Stefan Schoef, who sent a patch with the |
| @@ -179,7 +179,7 @@ file: | |||
| 179 | 179 | ||
| 180 | (defun save-place-to-alist () | 180 | (defun save-place-to-alist () |
| 181 | ;; put filename and point in a cons box and then cons that onto the | 181 | ;; put filename and point in a cons box and then cons that onto the |
| 182 | ;; front of the save-place-alist, if save-place is non-nil. | 182 | ;; front of the save-place-alist, if save-place-mode is non-nil. |
| 183 | ;; Otherwise, just delete that file from the alist. | 183 | ;; Otherwise, just delete that file from the alist. |
| 184 | ;; first check to make sure alist has been loaded in from the master | 184 | ;; first check to make sure alist has been loaded in from the master |
| 185 | ;; file. If not, do so, then feel free to modify the alist. It | 185 | ;; file. If not, do so, then feel free to modify the alist. It |
| @@ -309,8 +309,8 @@ may have changed) back to `save-place-alist'." | |||
| 309 | nil)))) | 309 | nil)))) |
| 310 | 310 | ||
| 311 | (defun save-places-to-alist () | 311 | (defun save-places-to-alist () |
| 312 | ;; go through buffer-list, saving places to alist if save-place is | 312 | ;; go through buffer-list, saving places to alist if save-place-mode |
| 313 | ;; non-nil, deleting them from alist if it is nil. | 313 | ;; is non-nil, deleting them from alist if it is nil. |
| 314 | (let ((buf-list (buffer-list))) | 314 | (let ((buf-list (buffer-list))) |
| 315 | (while buf-list | 315 | (while buf-list |
| 316 | ;; put this into a save-excursion in case someone is counting on | 316 | ;; put this into a save-excursion in case someone is counting on |
| @@ -335,7 +335,7 @@ may have changed) back to `save-place-alist'." | |||
| 335 | (and (integerp (cdr cell)) | 335 | (and (integerp (cdr cell)) |
| 336 | (goto-char (cdr cell)))) | 336 | (goto-char (cdr cell)))) |
| 337 | ;; and make sure it will be saved again for later | 337 | ;; and make sure it will be saved again for later |
| 338 | (setq save-place t))))) | 338 | (setq save-place-mode t))))) |
| 339 | 339 | ||
| 340 | (declare-function dired-goto-file "dired" (file)) | 340 | (declare-function dired-goto-file "dired" (file)) |
| 341 | 341 | ||
| @@ -360,7 +360,7 @@ may have changed) back to `save-place-alist'." | |||
| 360 | ((and (listp (cdr cell)) (assq 'dired-filename (cdr cell))) | 360 | ((and (listp (cdr cell)) (assq 'dired-filename (cdr cell))) |
| 361 | (dired-goto-file (cdr (assq 'dired-filename (cdr cell))))))) | 361 | (dired-goto-file (cdr (assq 'dired-filename (cdr cell))))))) |
| 362 | ;; and make sure it will be saved again for later | 362 | ;; and make sure it will be saved again for later |
| 363 | (setq save-place t))))) | 363 | (setq save-place-mode t))))) |
| 364 | 364 | ||
| 365 | (defun save-place-kill-emacs-hook () | 365 | (defun save-place-kill-emacs-hook () |
| 366 | ;; First update the alist. This loads the old save-place-file if nec. | 366 | ;; First update the alist. This loads the old save-place-file if nec. |