diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-19 16:48:59 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-19 16:48:59 -0700 |
commit | 07fcbb558d797272b9f43547da60beda485873a3 (patch) | |
tree | 77d5da14e9f9d9d8b1d877c70c01296fd3893796 /lisp/saveplace.el | |
parent | c9bdeff3e45a7ac84a74a81bb048046f82dddc91 (diff) | |
parent | fb81c8c3adf8633f2f617c82f6019aef630860c7 (diff) | |
download | emacs-07fcbb558d797272b9f43547da60beda485873a3.tar.gz |
Merge remote-tracking branch 'origin/master' into athena/unstable
Diffstat (limited to 'lisp/saveplace.el')
-rw-r--r-- | lisp/saveplace.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/saveplace.el b/lisp/saveplace.el index f654702def4..2a95b39da87 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el @@ -87,6 +87,11 @@ this happens automatically before saving `save-place-alist' to `save-place-file'." :type 'boolean) +(defcustom save-place-abbreviate-file-names nil + "If non-nil, abbreviate file names before saving them." + :type 'boolean + :version "28.1") + (defcustom save-place-save-skipped t "If non-nil, remember files matching `save-place-skip-check-regexp'. @@ -177,7 +182,10 @@ file: "Add current buffer filename and position to `save-place-alist'. Put filename and point in a cons box and then cons that onto the front of the `save-place-alist', if `save-place-mode' is non-nil. -Otherwise, just delete that file from the alist." +Otherwise, just delete that file from the alist. + +If `save-place-abbreviate-file-names' is non-nil, abbreviate the +file names." ;; 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 ;; will be saved again when Emacs is killed. @@ -195,6 +203,8 @@ Otherwise, just delete that file from the alist." (or (not save-place-ignore-files-regexp) (not (string-match save-place-ignore-files-regexp item)))) + (when save-place-abbreviate-file-names + (setq item (abbreviate-file-name item))) (let ((cell (assoc item save-place-alist)) (position (cond ((eq major-mode 'hexl-mode) (with-no-warnings |