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: Sat, 21 Feb 2015 11:12:44 +0000 [thread overview]
Message-ID: <874mqf4ixf.fsf@violet.siamics.net> (raw)
In-Reply-To: <87d25447e8.fsf@violet.siamics.net> (Ivan Shmakov's message of "Fri, 20 Feb 2015 21:09:35 +0000")
[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]
>>>>> Ivan Shmakov <ivan@siamics.net> writes:
>>>>> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> + (warn "Face %S is a string; interning" face)
>>> + (message "Face %S is a string; interning" face)
>> Why `warn' in one and `message' in the other?
> By the time we hit this in ‘face-attribute’, the point at which the
> sub-setandard string-named face was introduced is presumably long
> gone, so there’s no good reason to use ‘warn’.
… Or, on a second thought, ‘message’, either. Given that
‘face-attribute’ has no idea of where the caller got this face
from, there’s simply no way for it to provide any helpful
message at this point. (Say, “Face "bold", as found at position
42 in #<buffer foo>, is a string; interning”.)
Now, given that there’s a number of “internal” functions (such
as ‘internal-lisp-face-p’, for instance) which accept string
face names just fine, I wonder if it makes sense to just change
‘internal-get-lisp-face-attribute’ accordingly? An untested
patch is hereby MIMEd.
[…]
--
FSF associate member #7257 np. Fear of the Dark — Iron Maiden B6A0 230E 334A
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/diff, Size: 1333 bytes --]
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -3570,15 +3570,18 @@ the result will be absolute, otherwise it will be relative. */)
DEFUN ("internal-get-lisp-face-attribute", Finternal_get_lisp_face_attribute,
Sinternal_get_lisp_face_attribute,
2, 3, 0,
- doc: /* Return face attribute KEYWORD of face SYMBOL.
-If SYMBOL does not name a valid Lisp face or KEYWORD isn't a valid
+ doc: /* Return face attribute KEYWORD of face FACE.
+FACE should be a symbol or string.
+If FACE does not name a valid Lisp face or KEYWORD isn't a valid
face attribute name, signal an error.
-If the optional argument FRAME is given, report on face SYMBOL in that
-frame. If FRAME is t, report on the defaults for face SYMBOL (for new
+If the optional argument FRAME is given, report on face FACE in that
+frame. If FRAME is t, report on the defaults for face FACE (for new
frames). If FRAME is omitted or nil, use the selected frame. */)
- (Lisp_Object symbol, Lisp_Object keyword, Lisp_Object frame)
+ (Lisp_Object face, Lisp_Object keyword, Lisp_Object frame)
{
struct frame *f = EQ (frame, Qt) ? NULL : decode_live_frame (frame);
+ Lisp_Object symbol = (STRINGP (face) ? intern (SSDATA (face))
+ : face);
Lisp_Object lface = lface_from_face_name (f, symbol, true), value = Qnil;
CHECK_SYMBOL (symbol);
next prev parent reply other threads:[~2015-02-21 11:12 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
2015-02-20 19:55 ` Stefan Monnier
2015-02-20 21:09 ` Ivan Shmakov
2015-02-21 11:12 ` Ivan Shmakov [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874mqf4ixf.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).