all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ivan Shmakov <ivan@siamics.net>
To: 19903@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	[thread overview]
Message-ID: <87h9ug4dk1.fsf@violet.siamics.net> (raw)
In-Reply-To: <jwvy4nslczc.fsf-monnier+emacsbugs@gnu.org> (Stefan Monnier's message of "Fri, 20 Feb 2015 12:18:38 -0500")

[-- Attachment #1: Type: text/plain, Size: 726 bytes --]

>>>>> Stefan Monnier <monnier@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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/diff, Size: 1065 bytes --]

--- 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

  reply	other threads:[~2015-02-20 18:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-19 17:15 bug#19903: 24.4; Emacs fails to save enriched buffer with error message `wrong-type-argument symbolp "bold"' Jorge
2015-02-19 18:48 ` bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode Ivan Shmakov
2015-02-20  8:27 ` bug#19903: 24.4; Emacs fails to save enriched buffer with error message `wrong-type-argument symbolp "bold"' Eli Zaretskii
2015-02-20  8:51 ` Jorge
2015-02-20  9:12   ` bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode Ivan Shmakov
2015-02-20 10:07     ` Eli Zaretskii
2015-02-20 17:18       ` Stefan Monnier
2015-02-20 18:56         ` Ivan Shmakov [this message]
2015-02-20 19:55           ` Stefan Monnier
2015-02-20 21:09             ` Ivan Shmakov
2015-02-21 11:12               ` Ivan Shmakov
2015-02-21 11:42                 ` Eli Zaretskii
2015-02-25  6:20                   ` Ivan Shmakov
2015-02-25 16:06                     ` Eli Zaretskii
2015-02-25 17:10                       ` Ivan Shmakov
2015-02-25 17:43                         ` Eli Zaretskii
2015-02-25 17:55                           ` Ivan Shmakov
2015-02-21 12:12         ` bug#19912: facemenu-add-face: does not handle 'face being set to a property list Ivan Shmakov
2015-02-25  7:05           ` Ivan Shmakov
2015-02-25 17:24             ` Ivan Shmakov
2015-02-26 18:12               ` Ivan Shmakov
2015-02-20 10:03   ` bug#19903: 24.4; Emacs fails to save enriched buffer with error message `wrong-type-argument symbolp "bold"' Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h9ug4dk1.fsf@violet.siamics.net \
    --to=ivan@siamics.net \
    --cc=19903@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.