Specify encoding of the bookmark file
commite272032769178768cf970839a9c22aba1f5b572e
authorEli Zaretskii <eliz@gnu.org>
Sat, 7 Jan 2017 12:33:41 +0000 (7 14:33 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 7 Jan 2017 12:33:41 +0000 (7 14:33 +0200)
treecc7e24310c5a874cef5e6acb910fb46ae9272d9a
parent50fd04cd4b831a166db30292c4dc0c24be8e6e9d
Specify encoding of the bookmark file

* lisp/bookmark.el (bookmark-insert-file-format-version-stamp):
Accept an argument CODING and include a 'coding:' cookie in the
bookmark file preamble.
(bookmark-upgrade-file-format-from-0): Call
'bookmark-insert-file-format-version-stamp' with the file buffer's
encoding, as detected when it was read.
(bookmark-file-coding-system): New variable.
(bookmark-load): Set bookmark-file-coding-system to the encoding
of the loaded file.
(bookmark-write-file): Bind coding-system-for-write to either the
user setting via "C-x RET c" or to the existing file encoding,
defaulting to 'utf-8-emacs'.  Update the value of
bookmark-file-coding-system.  (Bug#25365)
lisp/bookmark.el