unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Inheriting form font-lock-comment-delimiter-face
@ 2022-02-13 18:51 goncholden via Users list for the GNU Emacs text editor
  2022-02-14 19:54 ` goncholden
  0 siblings, 1 reply; 3+ messages in thread
From: goncholden via Users list for the GNU Emacs text editor @ 2022-02-13 18:51 UTC (permalink / raw)
  To: goncholden via Users list for the GNU Emacs text editor

I want to use normal weight for comments, because by default I use bold.
I set the weight for font-lock-comment-delimiter-face to normal, then I copy to
font-lock-comment-face. Is this good way to do it?

(defun richkov-annotation-font-weight ()
"Use normal weight typeface for comments."
(set-face-attribute 'font-lock-comment-delimiter-face nil :weight 'normal)
(copy-face 'font-lock-comment-delimiter-face 'font-lock-comment-face) )

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Inheriting form font-lock-comment-delimiter-face
  2022-02-13 18:51 Inheriting form font-lock-comment-delimiter-face goncholden via Users list for the GNU Emacs text editor
@ 2022-02-14 19:54 ` goncholden
  2022-02-14 23:59   ` goncholden
  0 siblings, 1 reply; 3+ messages in thread
From: goncholden @ 2022-02-14 19:54 UTC (permalink / raw)
  To: goncholden; +Cc: goncholden via Users list for the GNU Emacs text editor

Because I use bold font by default, I want to have normal weight for comments.  I start with setting
the weight for font-lock-comment-delimiter-face to normal, then copying to font-lock-comment-face.

Here is the function I have constructed.  Does it make sense approaching the task in this way?

(defun richkov-annotation-font-weight ()
  "Use normal weight typeface for comments."
  (set-face-attribute 'font-lock-comment-delimiter-face nil :weight 'normal)
  (copy-face 'font-lock-comment-delimiter-face 'font-lock-comment-face) )



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Inheriting form font-lock-comment-delimiter-face
  2022-02-14 19:54 ` goncholden
@ 2022-02-14 23:59   ` goncholden
  0 siblings, 0 replies; 3+ messages in thread
From: goncholden @ 2022-02-14 23:59 UTC (permalink / raw)
  To: goncholden; +Cc: goncholden via Users list for the GNU Emacs text editor

Sent with ProtonMail Secure Email.
------- Original Message -------
On Monday, February 14th, 2022 at 7:54 PM, goncholden <goncholden@protonmail.com> wrote:

> Because I use bold font by default, I want to have normal weight for comments. I start with setting
> the weight for font-lock-comment-delimiter-face to normal, then copying to font-lock-comment-face.
> Here is the function I have constructed. Does it make sense approaching the task in this way?

> (defun richkov-annotation-font-weight ()
> "Use normal weight typeface for comments."
> (set-face-attribute 'font-lock-comment-delimiter-face nil :weight 'normal)
> (copy-face 'font-lock-comment-delimiter-face 'font-lock-comment-face) )

I think that my use of copy-face follows the setting of the attribute, so the setting of that attribute is lost by overwrite copying.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-14 23:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-13 18:51 Inheriting form font-lock-comment-delimiter-face goncholden via Users list for the GNU Emacs text editor
2022-02-14 19:54 ` goncholden
2022-02-14 23:59   ` goncholden

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