From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Shmakov Newsgroups: gmane.emacs.bugs Subject: bug#19903: 24.4; wrong-type-argument symbolp "bold" during enriched-encode Date: Sat, 21 Feb 2015 11:12:44 +0000 Message-ID: <874mqf4ixf.fsf@violet.siamics.net> References: <87pp953q1j.fsf_-_@violet.siamics.net> <83lhjslwup.fsf@gnu.org> <87h9ug4dk1.fsf@violet.siamics.net> <87d25447e8.fsf@violet.siamics.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1424517210 9547 80.91.229.3 (21 Feb 2015 11:13:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Feb 2015 11:13:30 +0000 (UTC) To: 19903@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 21 12:13:20 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YP7zq-0005Ph-UI for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Feb 2015 12:13:19 +0100 Original-Received: from localhost ([::1]:35653 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YP7zq-0000Bo-1M for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Feb 2015 06:13:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YP7zi-000099-3d for bug-gnu-emacs@gnu.org; Sat, 21 Feb 2015 06:13:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YP7zd-0007Eh-KQ for bug-gnu-emacs@gnu.org; Sat, 21 Feb 2015 06:13:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YP7zb-0007ET-HQ for bug-gnu-emacs@gnu.org; Sat, 21 Feb 2015 06:13:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YP7za-0001Zv-Eb for bug-gnu-emacs@gnu.org; Sat, 21 Feb 2015 06:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Shmakov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Feb 2015 11:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19903 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19903-submit@debbugs.gnu.org id=B19903.14245171776057 (code B ref 19903); Sat, 21 Feb 2015 11:13:02 +0000 Original-Received: (at 19903) by debbugs.gnu.org; 21 Feb 2015 11:12:57 +0000 Original-Received: from localhost ([127.0.0.1]:49873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YP7zV-0001Zc-3p for submit@debbugs.gnu.org; Sat, 21 Feb 2015 06:12:57 -0500 Original-Received: from fely.am-1.org ([78.47.74.50]:45181) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YP7zS-0001ZT-8o for 19903@debbugs.gnu.org; Sat, 21 Feb 2015 06:12:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=DbhNj/tHxP9yTt7XKEKrvkkqh+RceHKYOvIcNVIcJwI=; b=evqchtz4JOVPtZUBqM6kS0J0Xc+DzgExyxJ6vQWK8cSG344Ec042/MFDkip2KuPpNqpUZM2isTHBlK+SZ24+a/Q5ZlNFlS5mMEpyh7gKt7C0bFMMPl8Ccs495nv03ZhPwfQMYgbALInYa2M4GHkJ6Wejaas2hWS7ZDiyUSmuzrw=; Original-Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YP7zR-0001ax-Gu for 19903@debbugs.gnu.org; Sat, 21 Feb 2015 11:12:53 +0000 Original-Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YP7zI-0003q3-K1 for 19903@debbugs.gnu.org; Sat, 21 Feb 2015 18:12:44 +0700 Mail-Followup-To: 19903@debbugs.gnu.org In-Reply-To: <87d25447e8.fsf@violet.siamics.net> (Ivan Shmakov's message of "Fri, 20 Feb 2015 21:09:35 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99669 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >>>>> Ivan Shmakov writes: >>>>> Stefan Monnier 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 =E2=80=98face-attribute=E2=80=99, the point a= t which the > sub-setandard string-named face was introduced is presumably long > gone, so there=E2=80=99s no good reason to use =E2=80=98warn=E2=80=99. =E2=80=A6 Or, on a second thought, =E2=80=98message=E2=80=99, either. Giv= en that =E2=80=98face-attribute=E2=80=99 has no idea of where the caller got this = face from, there=E2=80=99s simply no way for it to provide any helpful message at this point. (Say, =E2=80=9CFace "bold", as found at position 42 in #, is a string; interning=E2=80=9D.) Now, given that there=E2=80=99s a number of =E2=80=9Cinternal=E2=80=9D fun= ctions (such as =E2=80=98internal-lisp-face-p=E2=80=99, for instance) which accept stri= ng face names just fine, I wonder if it makes sense to just change =E2=80=98internal-get-lisp-face-attribute=E2=80=99 accordingly? An untest= ed patch is hereby MIMEd. [=E2=80=A6] --=20 FSF associate member #7257 np. Fear of the Dark =E2=80=94 Iron Maiden B6A0= 230E 334A --=-=-= Content-Type: text/diff Content-Disposition: inline --- 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); --=-=-=--