emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp ChangeLog international/mule-cmds.el


From: Stefan Monnier
Subject: [Emacs-diffs] emacs/lisp ChangeLog international/mule-cmds.el
Date: Sat, 17 Oct 2009 03:59:49 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        09/10/17 03:59:48

Modified files:
        lisp           : ChangeLog 
        lisp/international: mule-cmds.el 

Log message:
        (select-safe-coding-system): If the file
        has a coding cookie, use it regardless of any other setting (bug#4712).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16446&r2=1.16447
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/international/mule-cmds.el?cvsroot=emacs&r1=1.375&r2=1.376

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16446
retrieving revision 1.16447
diff -u -b -r1.16446 -r1.16447
--- ChangeLog   17 Oct 2009 03:16:38 -0000      1.16446
+++ ChangeLog   17 Oct 2009 03:59:45 -0000      1.16447
@@ -1,3 +1,8 @@
+2009-10-17  Stefan Monnier  <address@hidden>
+
+       * international/mule-cmds.el (select-safe-coding-system): If the file
+       has a coding cookie, use it regardless of any other setting (bug#4712).
+
 2009-10-17  Glenn Morris  <address@hidden>
 
        * cedet/semantic/grammar.el (semantic-grammar--lex-delim-spec):

Index: international/mule-cmds.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/international/mule-cmds.el,v
retrieving revision 1.375
retrieving revision 1.376
diff -u -b -r1.375 -r1.376
--- international/mule-cmds.el  15 Oct 2009 06:18:02 -0000      1.375
+++ international/mule-cmds.el  17 Oct 2009 03:59:48 -0000      1.376
@@ -889,13 +889,12 @@
                  default-coding-system))
 
     (if (and auto-cs (not no-other-defaults))
-       ;; If the file has a coding cookie, try to use it before anything
-       ;; else (i.e. before default-coding-system which will typically come
-       ;; from file-coding-system-alist).
+       ;; If the file has a coding cookie, use it regardless of any
+       ;; other setting.
        (let ((base (coding-system-base auto-cs)))
-         (or (memq base '(nil undecided))
-             (rassq base default-coding-system)
-             (push (cons auto-cs base) default-coding-system))))
+         (unless (memq base '(nil undecided))
+            (setq default-coding-system (list (cons auto-cs base)))
+            (setq no-other-defaults t))))
 
     (unless no-other-defaults
       ;; If buffer-file-coding-system is not nil nor undecided, append it




reply via email to

[Prev in Thread] Current Thread [Next in Thread]