aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Liu2012-03-10 02:09:46 +0800
committerLeo Liu2012-03-10 02:09:46 +0800
commit95d5e396e280d96e4b1ba0fc222992b6661b0572 (patch)
tree18a0a33bb57b5d5e3d5e23857031c6ecc6a74cf6
parentcae070000107848cd082496e14cf5851cc1f2c25 (diff)
downloademacs-95d5e396e280d96e4b1ba0fc222992b6661b0572.tar.gz
emacs-95d5e396e280d96e4b1ba0fc222992b6661b0572.zip
Stricter check for string value in savehist-printable
Fixes: debbugs:10937
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/savehist.el4
2 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e21cf0b6bba..3edff65044a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-03-09 Leo Liu <sdl.web@gmail.com>
2
3 * savehist.el (savehist-printable): Stricter check for string
4 value (Bug#10937).
5
12012-03-09 Eli Zaretskii <eliz@gnu.org> 62012-03-09 Eli Zaretskii <eliz@gnu.org>
2 7
3 * mail/smtpmail.el (smtpmail-send-it): Bind 8 * 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."
369 "Return non-nil if VALUE is printable." 369 "Return non-nil if VALUE is printable."
370 (cond 370 (cond
371 ;; Quick response for oft-encountered types known to be printable. 371 ;; Quick response for oft-encountered types known to be printable.
372 ((stringp value))
373 ((numberp value)) 372 ((numberp value))
374 ((symbolp value)) 373 ((symbolp value))
374 ;; String without properties
375 ((and (stringp value)
376 (equal-including-properties value (substring-no-properties value))))
375 (t 377 (t
376 ;; For others, check explicitly. 378 ;; For others, check explicitly.
377 (with-temp-buffer 379 (with-temp-buffer