]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug #14755 which prevented autoloads from being computed.
authorEli Zaretskii <eliz@gnu.org>
Sun, 30 Jun 2013 14:27:07 +0000 (17:27 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sun, 30 Jun 2013 14:27:07 +0000 (17:27 +0300)
 lisp/international/mule-cmds.el (select-safe-coding-system): Handle
 the case of FROM being a string correctly.

lisp/ChangeLog
lisp/international/mule-cmds.el

index 4aa4f37a323de80f795f409f8db8f1d4da0b6d98..283b948a2db20e829d0a4c4b81c5ec3124dfe417 100644 (file)
@@ -1,3 +1,8 @@
+2013-06-30  Eli Zaretskii  <eliz@gnu.org>
+
+       * international/mule-cmds.el (select-safe-coding-system): Handle
+       the case of FROM being a string correctly.  (Bug#14755)
+
 2013-06-30  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * net/shr.el (shr-make-table-1): Add a sanity check that allows
index 6ef7709e9306ce4a5022cefc2b3e512ab33ae4c1..62b96720771fbdbd5647ce525a8623f7fc333cec 100644 (file)
@@ -1031,7 +1031,10 @@ and try again)? " coding-system auto-cs))
        (error "Canceled because the buffer was modified"))
       (if (and (eq (coding-system-type coding-system) 'undecided)
               (coding-system-get coding-system :prefer-utf-8)
-              (< (- to from) (- (position-bytes to) (position-bytes from))))
+              (or (multibyte-string-p from)
+                  (and (number-or-marker-p from)
+                       (< (- to from)
+                          (- (position-bytes to) (position-bytes from))))))
          (setq coding-system
                (coding-system-change-text-conversion coding-system 'utf-8)))
       coding-system)))