GNU bug report logs - #19903
24.4; Emacs fails to save enriched buffer with error message `wrong-type-argument symbolp "bold"'

Previous Next

Package: emacs;

Reported by: Jorge <jorge13515 <at> gmail.com>

Date: Thu, 19 Feb 2015 17:53:01 UTC

Severity: normal

Found in version 24.4

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ivan Shmakov <ivan <at> siamics.net>
To: 19903 <at> debbugs.gnu.org
Subject: bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode 
Date: Fri, 20 Feb 2015 18:56:30 +0000
[Message part 1 (text/plain, inline)]
>>>>> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

 >> If string faces are rendered just the same as symbol ones,

 > I think that's a misfeature.

	I’m not familiar with the Emacs display code, so I have no
	opinion on this.

 >> I’d rather wonder if either facemenu-add-face should silently
 >> ‘intern’ all the strings it gets before use, /or/ face-attribute
 >> should do that.  (Or perhaps both.)

 > I think interning would be good, indeed, tho I would prefer if it
 > emitted some kind of warning instead of doing it silently, to try and
 > stop this bad habit.

	Please consider the patch MIMEd.

-- 
FSF associate member #7257  np. Night Prowler — AC/DC   … 3013 B6A0 230E 334A
[Message part 2 (text/diff, inline)]
--- a/lisp/facemenu.el
+++ b/lisp/facemenu.el
@@ -702,6 +702,9 @@ defun facemenu-add-face (face &optional start end)
 text property.  Otherwise, selecting the default face would not have any
 effect.  See `facemenu-remove-face-function'."
   (interactive "*xFace: \nr")
+  (when (stringp face)
+    (warn "Face %S is a string; interning" face)
+    (setq face (intern face)))
   (cond
    ((and (eq face 'default)
          (not (eq facemenu-remove-face-function t)))
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -402,6 +402,9 @@ defun face-attribute (face attribute &optional frame inherit)
 value of `default' for INHERIT; this will resolve any unspecified or
 relative values by merging with the `default' face (which is always
 completely specified)."
+  (when (stringp face)
+    (message "Face %S is a string; interning" face)
+    (setq face (intern face)))
   (let ((value (internal-get-lisp-face-attribute face attribute frame)))
     (when (and inherit (face-attribute-relative-p attribute value))
       ;; VALUE is relative, so merge with inherited faces

This bug report was last modified 10 years and 85 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.