summaryrefslogtreecommitdiff
path: root/lisp/savehist.el
diff options
context:
space:
mode:
authorLeo Liu <sdl.web@gmail.com>2012-03-10 02:09:46 +0800
committerLeo Liu <sdl.web@gmail.com>2012-03-10 02:09:46 +0800
commit95d5e396e280d96e4b1ba0fc222992b6661b0572 (patch)
tree18a0a33bb57b5d5e3d5e23857031c6ecc6a74cf6 /lisp/savehist.el
parentcae070000107848cd082496e14cf5851cc1f2c25 (diff)
downloademacs-95d5e396e280d96e4b1ba0fc222992b6661b0572.tar.gz
Stricter check for string value in savehist-printable
Fixes: debbugs:10937
Diffstat (limited to 'lisp/savehist.el')
-rw-r--r--lisp/savehist.el4
1 files changed, 3 insertions, 1 deletions
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