aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2015-08-14 13:34:18 +0300
committerEli Zaretskii2015-08-14 13:34:18 +0300
commit9d053b34cb62afece1e14e7cdedeef0d160fb528 (patch)
tree8267fd537d5cbce1c0c49069318590f421590707
parentacac9f4d727072b31914c9224957ff8dfec97df1 (diff)
downloademacs-9d053b34cb62afece1e14e7cdedeef0d160fb528.tar.gz
emacs-9d053b34cb62afece1e14e7cdedeef0d160fb528.zip
Don't miss warnings about removing string text properties while dumping
* src/alloc.c (purecopy): Warn about removing a string's text properties even when the same string was already pure-copied earlier. * lisp/progmodes/elisp-mode.el (elisp--xref-format) (elisp--xref-format-extra): Fix the commentary.
-rw-r--r--lisp/progmodes/elisp-mode.el4
-rw-r--r--src/alloc.c15
2 files changed, 9 insertions, 10 deletions
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 81314574672..8392df2a6b9 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -605,7 +605,7 @@ It can be quoted, or be inside a quoted form."
605 (elisp--xref-find-apropos id)))) 605 (elisp--xref-find-apropos id))))
606 606
607;; WORKAROUND: This is nominally a constant, but the text properities 607;; WORKAROUND: This is nominally a constant, but the text properities
608;; are not preserved thru dump if use defconst. See bug#21237 608;; are not preserved thru dump if use defconst. See bug#21237.
609(defvar elisp--xref-format 609(defvar elisp--xref-format
610 (let ((str "(%s %s)")) 610 (let ((str "(%s %s)"))
611 (put-text-property 1 3 'face 'font-lock-keyword-face str) 611 (put-text-property 1 3 'face 'font-lock-keyword-face str)
@@ -613,7 +613,7 @@ It can be quoted, or be inside a quoted form."
613 str)) 613 str))
614 614
615;; WORKAROUND: This is nominally a constant, but the text properities 615;; WORKAROUND: This is nominally a constant, but the text properities
616;; are not preserved thru dump if use defconst. See bug#21237 616;; are not preserved thru dump if use defconst. See bug#21237.
617(defvar elisp--xref-format-extra 617(defvar elisp--xref-format-extra
618 (let ((str "(%s %s %s)")) 618 (let ((str "(%s %s %s)"))
619 (put-text-property 1 3 'face 'font-lock-keyword-face str) 619 (put-text-property 1 3 'face 'font-lock-keyword-face str)
diff --git a/src/alloc.c b/src/alloc.c
index 66e62daf136..91b4c6e1515 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -5339,6 +5339,10 @@ purecopy (Lisp_Object obj)
5339 if (PURE_POINTER_P (XPNTR (obj)) || INTEGERP (obj) || SUBRP (obj)) 5339 if (PURE_POINTER_P (XPNTR (obj)) || INTEGERP (obj) || SUBRP (obj))
5340 return obj; /* Already pure. */ 5340 return obj; /* Already pure. */
5341 5341
5342 if (STRINGP (obj) && XSTRING (obj)->intervals)
5343 message_with_string ("Dropping text-properties while making string `%s' pure",
5344 obj, true);
5345
5342 if (HASH_TABLE_P (Vpurify_flag)) /* Hash consing. */ 5346 if (HASH_TABLE_P (Vpurify_flag)) /* Hash consing. */
5343 { 5347 {
5344 Lisp_Object tmp = Fgethash (obj, Vpurify_flag, Qnil); 5348 Lisp_Object tmp = Fgethash (obj, Vpurify_flag, Qnil);
@@ -5351,14 +5355,9 @@ purecopy (Lisp_Object obj)
5351 else if (FLOATP (obj)) 5355 else if (FLOATP (obj))
5352 obj = make_pure_float (XFLOAT_DATA (obj)); 5356 obj = make_pure_float (XFLOAT_DATA (obj));
5353 else if (STRINGP (obj)) 5357 else if (STRINGP (obj))
5354 { 5358 obj = make_pure_string (SSDATA (obj), SCHARS (obj),
5355 if (XSTRING (obj)->intervals) 5359 SBYTES (obj),
5356 message_with_string ("Dropping text-properties while making string `%s' pure", 5360 STRING_MULTIBYTE (obj));
5357 obj, true);
5358 obj = make_pure_string (SSDATA (obj), SCHARS (obj),
5359 SBYTES (obj),
5360 STRING_MULTIBYTE (obj));
5361 }
5362 else if (COMPILEDP (obj) || VECTORP (obj) || HASH_TABLE_P (obj)) 5361 else if (COMPILEDP (obj) || VECTORP (obj) || HASH_TABLE_P (obj))
5363 { 5362 {
5364 struct Lisp_Vector *objp = XVECTOR (obj); 5363 struct Lisp_Vector *objp = XVECTOR (obj);