From: Leo Liu Date: Fri, 9 Mar 2012 18:09:46 +0000 (+0800) Subject: Stricter check for string value in savehist-printable X-Git-Tag: emacs-pretest-24.0.05~131 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=95d5e396e280d96e4b1ba0fc222992b6661b0572;p=emacs.git Stricter check for string value in savehist-printable Fixes: debbugs:10937 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e21cf0b6bba..3edff65044a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-03-09 Leo Liu + + * savehist.el (savehist-printable): Stricter check for string + value (Bug#10937). + 2012-03-09 Eli Zaretskii * mail/smtpmail.el (smtpmail-send-it): Bind diff --git a/lisp/savehist.el b/lisp/savehist.el index c1515fa48ce..a65906a1676 100644 --- a/lisp/savehist.el +++ b/lisp/savehist.el @@ -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