@@ -87,6 +87,11 @@ this happens automatically before saving `save-place-alist' to
8787`save-place-file' ."
8888 :type 'boolean )
8989
90+ (defcustom save-place-abbreviate-file-names nil
91+ " If non-nil, abbreviate file names before saving them."
92+ :type 'boolean
93+ :version " 28.1" )
94+
9095(defcustom save-place-save-skipped t
9196 " If non-nil, remember files matching `save-place-skip-check-regexp' .
9297
@@ -177,7 +182,10 @@ file:
177182 " Add current buffer filename and position to `save-place-alist' .
178183Put filename and point in a cons box and then cons that onto the
179184front of the `save-place-alist' , if `save-place-mode' is non-nil.
180- Otherwise, just delete that file from the alist."
185+ Otherwise, just delete that file from the alist.
186+
187+ If `save-place-abbreviate-file-names' is non-nil, abbreviate the
188+ file names."
181189 ; ; First check to make sure alist has been loaded in from the master
182190 ; ; file. If not, do so, then feel free to modify the alist. It
183191 ; ; will be saved again when Emacs is killed.
@@ -195,6 +203,8 @@ Otherwise, just delete that file from the alist."
195203 (or (not save-place-ignore-files-regexp)
196204 (not (string-match save-place-ignore-files-regexp
197205 item))))
206+ (when save-place-abbreviate-file-names
207+ (setq item (abbreviate-file-name item)))
198208 (let ((cell (assoc item save-place-alist))
199209 (position (cond ((eq major-mode 'hexl-mode )
200210 (with-no-warnings
0 commit comments