[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111718: * files.el (basic-save-buffe
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111718: * files.el (basic-save-buffer-1): Don't set buffer-file-coding-system-explicit. |
Date: |
Sun, 10 Feb 2013 11:08:21 +0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111718
fixes bug: http://debbugs.gnu.org/4533
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2013-02-10 11:08:21 +0800
message:
* files.el (basic-save-buffer-1): Don't set
buffer-file-coding-system-explicit.
modified:
lisp/ChangeLog
lisp/files.el
lisp/international/mule.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-02-10 01:56:25 +0000
+++ b/lisp/ChangeLog 2013-02-10 03:08:21 +0000
@@ -1,5 +1,8 @@
2013-02-10 Chong Yidong <address@hidden>
+ * files.el (basic-save-buffer-1): Do not set
+ buffer-file-coding-system-explicit (Bug#4533).
+
* mail/emacsbug.el (report-emacs-bug): Change binding of
report-emacs-bug-insert-to-mailer to C-c M-i (Bug#13510).
=== modified file 'lisp/files.el'
--- a/lisp/files.el 2013-02-09 12:52:01 +0000
+++ b/lisp/files.el 2013-02-10 03:08:21 +0000
@@ -4646,9 +4646,7 @@
(basic-save-buffer-2))
(basic-save-buffer-2))
(if buffer-file-coding-system-explicit
- (setcar buffer-file-coding-system-explicit last-coding-system-used)
- (setq buffer-file-coding-system-explicit
- (cons last-coding-system-used nil)))))
+ (setcar buffer-file-coding-system-explicit last-coding-system-used))))
;; This returns a value (MODES EXTENDED-ATTRIBUTES BACKUPNAME), like
;; backup-buffer.
=== modified file 'lisp/international/mule.el'
--- a/lisp/international/mule.el 2013-01-11 23:08:55 +0000
+++ b/lisp/international/mule.el 2013-02-10 03:08:21 +0000
@@ -1132,17 +1132,20 @@
(put (intern name) 'coding-system-define-form form)
(setq coding-system-alist (cons (list name) coding-system-alist)))))
-;; This variable is set in these three cases:
+;; This variable is set in these two cases:
;; (1) A file is read by a coding system specified explicitly.
-;; after-insert-file-set-coding sets the car of this value to
-;; coding-system-for-read, and sets the cdr to nil.
-;; (2) A buffer is saved.
-;; After writing, basic-save-buffer-1 sets the car of this value
-;; to last-coding-system-used.
-;; (3) set-buffer-file-coding-system is called.
+;; `after-insert-file-set-coding' sets the car of this value to
+;; `coding-system-for-read', and sets the cdr to nil.
+;; (2) `set-buffer-file-coding-system' is called.
;; The cdr of this value is set to the specified coding system.
-;; This variable is used for decoding in revert-buffer and encoding in
-;; select-safe-coding-system.
+;; This variable is used for decoding in `revert-buffer' and encoding
+;; in `select-safe-coding-system'.
+;;
+;; When saving a buffer, if `buffer-file-coding-system-explicit' is
+;; already non-nil, `basic-save-buffer-1' sets its CAR to the value of
+;; `last-coding-system-used'. (It used to set it unconditionally, but
+;; that seems unnecessary; see Bug#4533.)
+
(defvar buffer-file-coding-system-explicit nil
"The file coding system explicitly specified for the current buffer.
The value is a cons of coding systems for reading (decoding) and
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111718: * files.el (basic-save-buffer-1): Don't set buffer-file-coding-system-explicit.,
Chong Yidong <=