diff options
author | Eli Zaretskii <eliz@gnu.org> | 2022-05-23 16:32:47 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2022-05-23 16:32:47 +0300 |
commit | aab560f0c1955bae57cc35a71be95b5bfa2ab525 (patch) | |
tree | d2bf692ea4c3816cbf22e3bad2550a84d0b0d2ff /lisp/saveplace.el | |
parent | 6ac6919f74c2de91b2eb03de3aab326dcd3c5273 (diff) | |
download | emacs-aab560f0c1955bae57cc35a71be95b5bfa2ab525.tar.gz emacs-aab560f0c1955bae57cc35a71be95b5bfa2ab525.tar.bz2 emacs-aab560f0c1955bae57cc35a71be95b5bfa2ab525.zip |
Fix saveplace.el when desktop.el restores non-ASCII buffers
* lisp/saveplace.el (load-save-place-alist-from-file): Bind
'coding-system-for-read' to nil, so that the 'coding:' cookie in
the save-place file takes effect. (Bug#55592)
Diffstat (limited to 'lisp/saveplace.el')
-rw-r--r-- | lisp/saveplace.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/saveplace.el b/lisp/saveplace.el index 4d13ad3959c..a23454b0bb4 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el @@ -290,7 +290,11 @@ may have changed) back to `save-place-alist'." ;; adding hooks to it. (with-current-buffer (get-buffer-create " *Saved Places*") (delete-region (point-min) (point-max)) - (insert-file-contents file) + ;; Make sure our 'coding:' cookie in the save-place + ;; file will take effect, in case the caller binds + ;; coding-system-for-read. + (let (coding-system-for-read) + (insert-file-contents file)) (goto-char (point-min)) (setq save-place-alist (with-demoted-errors "Error reading save-place-file: %S" |