aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorEli Zaretskii2015-08-14 13:34:18 +0300
committerEli Zaretskii2015-08-14 13:34:18 +0300
commit9d053b34cb62afece1e14e7cdedeef0d160fb528 (patch)
tree8267fd537d5cbce1c0c49069318590f421590707 /src/alloc.c
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.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c15
1 files changed, 7 insertions, 8 deletions
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);