Stricter check for string value in savehist-printable
authorLeo Liu <sdl.web@gmail.com>
Fri, 9 Mar 2012 18:09:46 +0000 (02:09 +0800)
committerLeo Liu <sdl.web@gmail.com>
Fri, 9 Mar 2012 18:09:46 +0000 (02:09 +0800)
Fixes: debbugs:10937

lisp/ChangeLog
lisp/savehist.el

index e21cf0b..3edff65 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-09  Leo Liu  <sdl.web@gmail.com>
+
+       * savehist.el (savehist-printable): Stricter check for string
+       value (Bug#10937).
+
 2012-03-09  Eli Zaretskii  <eliz@gnu.org>
 
        * mail/smtpmail.el (smtpmail-send-it): Bind
index c1515fa..a65906a 100644 (file)
@@ -369,9 +369,11 @@ trimming of history lists to `history-length' items."
   "Return non-nil if VALUE is printable."
   (cond
    ;; Quick response for oft-encountered types known to be printable.
-   ((stringp value))
    ((numberp value))
    ((symbolp value))
+   ;; String without properties
+   ((and (stringp value)
+        (equal-including-properties value (substring-no-properties value))))
    (t
     ;; For others, check explicitly.
     (with-temp-buffer