From: Raffaele Ricciardi <rfflrccrd@gmail.com>
To: Glenn Morris <rgm@gnu.org>
Cc: 12213@debbugs.gnu.org
Subject: bug#12213: 24.1; Cannot customize help-argument-name face
Date: Fri, 17 Aug 2012 09:09:55 +0100 [thread overview]
Message-ID: <502DFC53.1050203@gmail.com> (raw)
In-Reply-To: <3l7gsyyooo.fsf@fencepost.gnu.org>
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.
next prev parent reply other threads:[~2012-08-17 8:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-16 19:00 bug#12213: 24.1; Cannot customize help-argument-name face Raffaele Ricciardi
2012-08-17 7:15 ` Glenn Morris
2012-08-17 7:40 ` Eli Zaretskii
2012-08-17 8:09 ` Raffaele Ricciardi [this message]
2012-08-17 18:01 ` Glenn Morris
2012-08-26 2:58 ` Chong Yidong
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=502DFC53.1050203@gmail.com \
--to=rfflrccrd@gmail.com \
--cc=12213@debbugs.gnu.org \
--cc=rgm@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.