]> git.eshelyaron.com Git - emacs.git/commit
(save-place-abbreviate-file-names): Don't eagerly load alist (bug#75730)
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 3 Feb 2025 21:33:39 +0000 (16:33 -0500)
committerEshel Yaron <me@eshelyaron.com>
Sun, 9 Feb 2025 08:02:25 +0000 (09:02 +0100)
commit4d4ab5a0af9cdbe733be9883162e23a30d7bea76
tree042ca0fa2faec290256be9d88f48a6fb4dc83f36
parent1dd2bd6a4a93bb5fc857edb4496807823a19f65d
(save-place-abbreviate-file-names): Don't eagerly load alist (bug#75730)

Change the way we handle `save-place-abbreviate-file-names` such that
this preference is applied lazily when we load the alist, rather than
eagerly when we define it (which forced the alist to be loaded before we
needed it).

* lisp/saveplace.el (save-place-load-alist-from-file): Use `unless`,
`when`, and `with-temp-buffer` to hopefully help readability.
Call `save-place--normalize-alist`.
(save-place--normalize-alist): New function extracted from the setter
of `save-place-abbreviate-file-names`.
(save-place-abbreviate-file-names): Use it.
(save-place-alist-to-file): Use `with-temp-buffer`.

(cherry picked from commit f3ac16b3cc5778041332bb46f819a51e8b697099)
lisp/saveplace.el