mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-04 11:00:45 -08:00
Fix namespace problem in saveplace.el
* lisp/saveplace.el (save-place-load-alist-from-file): Rename from 'load-save-place-alist-from-file'. Retain old name as an obsolete alias. Update callers.
This commit is contained in:
parent
ab81080437
commit
0c106ce87c
2 changed files with 8 additions and 5 deletions
|
|
@ -191,7 +191,7 @@ file names."
|
||||||
;; First check to make sure alist has been loaded in from the master
|
;; First check to make sure alist has been loaded in from the master
|
||||||
;; file. If not, do so, then feel free to modify the alist. It
|
;; file. If not, do so, then feel free to modify the alist. It
|
||||||
;; will be saved again when Emacs is killed.
|
;; will be saved again when Emacs is killed.
|
||||||
(or save-place-loaded (load-save-place-alist-from-file))
|
(or save-place-loaded (save-place-load-alist-from-file))
|
||||||
(let* ((directory (and (derived-mode-p 'dired-mode)
|
(let* ((directory (and (derived-mode-p 'dired-mode)
|
||||||
(boundp 'dired-subdir-alist)
|
(boundp 'dired-subdir-alist)
|
||||||
dired-subdir-alist
|
dired-subdir-alist
|
||||||
|
|
@ -278,7 +278,7 @@ may have changed) back to `save-place-alist'."
|
||||||
(file-error (message "Saving places: can't write %s" file)))
|
(file-error (message "Saving places: can't write %s" file)))
|
||||||
(kill-buffer (current-buffer))))))
|
(kill-buffer (current-buffer))))))
|
||||||
|
|
||||||
(defun load-save-place-alist-from-file ()
|
(defun save-place-load-alist-from-file ()
|
||||||
(if (not save-place-loaded)
|
(if (not save-place-loaded)
|
||||||
(progn
|
(progn
|
||||||
(setq save-place-loaded t)
|
(setq save-place-loaded t)
|
||||||
|
|
@ -352,7 +352,7 @@ may have changed) back to `save-place-alist'."
|
||||||
(defun save-place-find-file-hook ()
|
(defun save-place-find-file-hook ()
|
||||||
"Function added to `find-file-hook' by `save-place-mode'.
|
"Function added to `find-file-hook' by `save-place-mode'.
|
||||||
It runs the hook `save-place-after-find-file-hook'."
|
It runs the hook `save-place-after-find-file-hook'."
|
||||||
(or save-place-loaded (load-save-place-alist-from-file))
|
(or save-place-loaded (save-place-load-alist-from-file))
|
||||||
(let ((cell (assoc buffer-file-name save-place-alist)))
|
(let ((cell (assoc buffer-file-name save-place-alist)))
|
||||||
(if cell
|
(if cell
|
||||||
(progn
|
(progn
|
||||||
|
|
@ -367,7 +367,7 @@ It runs the hook `save-place-after-find-file-hook'."
|
||||||
|
|
||||||
(defun save-place-dired-hook ()
|
(defun save-place-dired-hook ()
|
||||||
"Position the point in a Dired buffer."
|
"Position the point in a Dired buffer."
|
||||||
(or save-place-loaded (load-save-place-alist-from-file))
|
(or save-place-loaded (save-place-load-alist-from-file))
|
||||||
(let* ((directory (and (derived-mode-p 'dired-mode)
|
(let* ((directory (and (derived-mode-p 'dired-mode)
|
||||||
(boundp 'dired-subdir-alist)
|
(boundp 'dired-subdir-alist)
|
||||||
dired-subdir-alist
|
dired-subdir-alist
|
||||||
|
|
@ -396,5 +396,8 @@ It runs the hook `save-place-after-find-file-hook'."
|
||||||
(if save-place-loaded
|
(if save-place-loaded
|
||||||
(save-place-alist-to-file)))
|
(save-place-alist-to-file)))
|
||||||
|
|
||||||
|
(define-obsolete-function-alias 'load-save-place-alist-from-file
|
||||||
|
#'save-place-load-alist-from-file "29.1")
|
||||||
|
|
||||||
(provide 'saveplace)
|
(provide 'saveplace)
|
||||||
;;; saveplace.el ends here
|
;;; saveplace.el ends here
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@
|
||||||
(save-place-file
|
(save-place-file
|
||||||
(ert-resource-file "saveplace"))
|
(ert-resource-file "saveplace"))
|
||||||
(save-place-alist nil))
|
(save-place-alist nil))
|
||||||
(load-save-place-alist-from-file)
|
(save-place-load-alist-from-file)
|
||||||
(should (equal save-place-alist
|
(should (equal save-place-alist
|
||||||
'(("/home/skangas/.emacs.d/cache/recentf" . 1306)
|
'(("/home/skangas/.emacs.d/cache/recentf" . 1306)
|
||||||
("/home/skangas/wip/emacs/"
|
("/home/skangas/wip/emacs/"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue