From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Raffaele Ricciardi Newsgroups: gmane.emacs.bugs Subject: bug#12213: 24.1; Cannot customize help-argument-name face Date: Fri, 17 Aug 2012 09:09:55 +0100 Message-ID: <502DFC53.1050203@gmail.com> References: <502D434D.4020803@gmail.com> <3l7gsyyooo.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1345191024 11418 80.91.229.3 (17 Aug 2012 08:10:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Aug 2012 08:10:24 +0000 (UTC) Cc: 12213@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 17 10:10:24 2012 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 1T2HdM-0008Bz-6f for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Aug 2012 10:10:20 +0200 Original-Received: from localhost ([::1]:57842 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2HdK-0007TR-UI for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Aug 2012 04:10:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2HdF-0007Fi-32 for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2012 04:10:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T2HdB-0002je-Kz for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2012 04:10:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2HdB-0002i0-EV for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2012 04:10:09 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T2Hlm-0001iH-Ch for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2012 04:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Raffaele Ricciardi Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Aug 2012 08:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12213 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: unreproducible Original-Received: via spool by 12213-submit@debbugs.gnu.org id=B12213.13451915416577 (code B ref 12213); Fri, 17 Aug 2012 08:19:02 +0000 Original-Received: (at 12213) by debbugs.gnu.org; 17 Aug 2012 08:19:01 +0000 Original-Received: from localhost ([127.0.0.1]:34717 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T2Hlk-0001i2-Of for submit@debbugs.gnu.org; Fri, 17 Aug 2012 04:19:01 -0400 Original-Received: from mail-wg0-f46.google.com ([74.125.82.46]:46865) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T2Hli-0001hu-Vf for 12213@debbugs.gnu.org; Fri, 17 Aug 2012 04:19:00 -0400 Original-Received: by wgbdq10 with SMTP id dq10so2813057wgb.15 for <12213@debbugs.gnu.org>; Fri, 17 Aug 2012 01:10:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ngitlTtQWz2+zZDm+RnjtQM2Wg8Idvu5gPd97tbgm/M=; b=slMvljn84aWPs2ohod9yW+T8IQRbHUO31xc3qOcr3XEC0BsVur42VHxttnuxu2OXT/ 0FRMwnoho2q2XvyeS/8ptoHiaX3rFBG5gD5nqRydwxlN6rk5xHw2JMPaSgbvhI8r0O+f YAUgxG1t3WYs0FlYmMb03CLJk3Epje+CxVFN4oaem2BdhMxmLrnu5OXWiR+JLd7vSqHL Bb4Gy0p7XRTEGPf/Bvw9w7x5WpU64KIUiZBl9t7B69gcHJcYq+4O6lrZ6lTEUK1FKFR1 CtNZjXDcecjJR2Vel4rANwgOzQ6Ea3LPSJ8FQIrH8J/J6YfK/UA2VfLzjRuCqwO+DPP1 EMpg== Original-Received: by 10.216.132.25 with SMTP id n25mr1993886wei.25.1345191004170; Fri, 17 Aug 2012 01:10:04 -0700 (PDT) Original-Received: from [101.10.252.12] (5ac6330a.bb.sky.com. [90.198.51.10]) by mx.google.com with ESMTPS id o2sm12671760wiz.11.2012.08.17.01.10.01 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 17 Aug 2012 01:10:03 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: <3l7gsyyooo.fsf@fencepost.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:63241 On 08/17/2012 08:15 AM, Glenn Morris wrote: > Raffaele Ricciardi wrote: > >> - emacs -Q >> - M-x customize-face RET help-argument-name RET >> - set face foreground (i.e. "yellow") >> - click on "Set for this session" >> - M-x describe-face RET help-argument-name RET >> - all the fields in the face specification are "unspecified" > [...] >> In GNU Emacs 24.1.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1) >> of 2012-06-12 on debian > > Thanks for the report, but I cannot reproduce this on x86_64. > I tried on RHEL6 and Debian testing, GTK and Lucid toolkits, and it > works fine for me. I have isolated a contributory cause: the bug shows up only when I use a bitmap font. With a TrueType font, everything works. At first. No matter the kind of font used, my Emacs behaves weirdly in regard to the `help-argument-name' face. `describe-face' correctly describes the face, but if I use it in `font-lock-add-keywords', then the `default' face gets used instead. This is strange because Help mode does use the face as expected. How to reproduce: - emacs -Q - evaluate: (defun rr-Info-mode-highlight-argument-names () "Highlight argument names the way they are highlighted in Help mode." ;; To avoid highlighting uppercase single letters in the text, highlight ;; only symbols more than one character long. (font-lock-add-keywords nil '(("\\_<[A-Z][-A-Z[:digit:]]+\\_>" . help-argument-name)))) (add-hook 'Info-mode-hook #'rr-Info-mode-highlight-argument-names) - C-h S define-minor-mode RET Place the cursor over an uppercase argument name, and: M-x describe-face RET Emacs says the `default' face is being used. Now, replace the `help-argument-name' face with 'font-lock-comment-face' in the hook above and retry. The highlighting now works. Moreover, if I "recreate" the face as a copy of the `default' face - e.g. by using `copy-face' - beforehand, then customizations become persistent with a bitmap font as well, but `font-lock-add-keywords' keeps using the `default' face instead. Hope this helps. Incidentally, I think that the default `help-argument-name' face or any other face looking the same as the 'default' face is an undesirable feature. Every face should look different from `default', to let users know they can customize them. I understand that choosing a color for every face may be a lot of work, but then having a default foreground color that is different from `default' when defining a new face in the Emacs standard libraries would be enough. If you want to keep the default foreground color, then I suggest that you use other attributes like Underline, Weight, etc. > (There seems to be an implicit "click on Show All > Attributes" in the recipe.) Indeed there is. Sorry for the oversight. Cheers.