@@ -87,6 +87,11 @@ this happens automatically before saving `save-place-alist' to
87
87
`save-place-file' ."
88
88
:type 'boolean )
89
89
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
+
90
95
(defcustom save-place-save-skipped t
91
96
" If non-nil, remember files matching `save-place-skip-check-regexp' .
92
97
@@ -177,7 +182,10 @@ file:
177
182
" Add current buffer filename and position to `save-place-alist' .
178
183
Put filename and point in a cons box and then cons that onto the
179
184
front 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."
181
189
; ; First check to make sure alist has been loaded in from the master
182
190
; ; file. If not, do so, then feel free to modify the alist. It
183
191
; ; will be saved again when Emacs is killed.
@@ -195,6 +203,8 @@ Otherwise, just delete that file from the alist."
195
203
(or (not save-place-ignore-files-regexp)
196
204
(not (string-match save-place-ignore-files-regexp
197
205
item))))
206
+ (when save-place-abbreviate-file-names
207
+ (setq item (abbreviate-file-name item)))
198
208
(let ((cell (assoc item save-place-alist))
199
209
(position (cond ((eq major-mode 'hexl-mode )
200
210
(with-no-warnings
0 commit comments