bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10937: 24.0.94; fix savehist-printable


From: Leo
Subject: bug#10937: 24.0.94; fix savehist-printable
Date: Sun, 04 Mar 2012 17:15:44 +0800

In savehist-printable, strings are not necessary printable. They can
contain anything in their properties. Because of this I have kill-ring
emptied for almost every restart of emacs.

I propose:

diff --git a/lisp/savehist.el b/lisp/savehist.el
index c1515fa4..a3ba9f1a 100644
--- a/lisp/savehist.el
+++ b/lisp/savehist.el
@@ -369,7 +369,7 @@ (defun savehist-printable (value)
   "Return non-nil if VALUE is printable."
   (cond
    ;; Quick response for oft-encountered types known to be printable.
-   ((stringp value))
+   ((equal-including-properties value (substring-no-properties value)))
    ((numberp value))
    ((symbolp value))
    (t

or just remove (stringp value) and let the default handle it.

Leo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]