+2007-12-04 Karl Fogel <kfogel@red-bean.com>
+
+ * saveplace.el (save-place-alist-to-file): Save with 'emacs-mule'
+ coding system. This ports revisions 1.40 and 1.41 over to the
+ EMACS_22_BASE branch, but with the right coding system for Emacs
+ 22 to reliably record filenames. Suggested by Eli Zaretskii.
+
2007-12-01 Richard Stallman <rms@gnu.org>
* wid-edit.el (widget-type): Doc fix.
(setq save-place-alist (cdr save-place-alist)))))
(defun save-place-alist-to-file ()
- (let ((file (expand-file-name save-place-file)))
+ (let ((file (expand-file-name save-place-file))
+ (coding-system-for-write 'emacs-mule))
(save-excursion
(message "Saving places to %s..." file)
(set-buffer (get-buffer-create " *Saved Places*"))
(delete-region (point-min) (point-max))
(when save-place-forget-unreadable-files
(save-place-forget-unreadable-files))
+ (insert (format ";;; -*- coding: %s -*-\n"
+ (symbol-name coding-system-for-write)))
(let ((print-length nil)
(print-level nil))
(print save-place-alist (current-buffer)))
t))))
(condition-case nil
;; Don't use write-file; we don't want this buffer to visit it.
- (write-region (point-min) (point-max) file)
+ (write-region (point-min) (point-max) file)
(file-error (message "Can't write %s" file)))
(kill-buffer (current-buffer))
(message "Saving places to %s...done" file)))))