unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* face-remap-add-relative versus set-face-attribute
@ 2022-02-12 23:43 goncholden via Users list for the GNU Emacs text editor
  2022-02-13  0:59 ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 24+ messages in thread
From: goncholden via Users list for the GNU Emacs text editor @ 2022-02-12 23:43 UTC (permalink / raw)
  To: goncholden via Users list for the GNU Emacs text editor

I intend to change the weight customisation for comments.

What is superior

Using (face-remap-add-relative 'default :weight 'bold)

or using

(set-face-attribute 'font-lock-comment-face nil :weight normal) ?

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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-12 23:43 face-remap-add-relative versus set-face-attribute goncholden via Users list for the GNU Emacs text editor
@ 2022-02-13  0:59 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-02-13  2:12   ` goncholden
  0 siblings, 1 reply; 24+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-02-13  0:59 UTC (permalink / raw)
  To: help-gnu-emacs

goncholden via Users list for the GNU Emacs text editor wrote:

> What is superior
>
> Using (face-remap-add-relative 'default :weight 'bold)
>
> or using
>
> (set-face-attribute 'font-lock-comment-face nil :weight normal) ?

They don't do the same thing ...

But the second is good, except I don't think one needs to
`quote' font-lock-comment-face.

It is however needed for font-lock-regexp-grouping-backslash
and font-lock-regexp-grouping-construct - I don't know why
this discrepancy is ...

Don't forget about font-lock-comment-delimiter-face BTW ...

And try this ...

(defun set-all-faces (fg &optional bg weight)
  (let ((backg (or bg     "black"))
        (wght  (or weight 'normal))
        (faces) )
    (mapatoms (lambda (s)
                (when (facep s)
                  (push (symbol-name s) faces) )))
    (dolist (f faces)
      (set-face-attribute (intern f) nil
                          :foreground fg)
                          :background backg
                          :weight     wght
                          :italic     nil) ))

(set-all-faces "red")

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  0:59 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-02-13  2:12   ` goncholden
  2022-02-13  2:23     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-02-13  2:26     ` goncholden
  0 siblings, 2 replies; 24+ messages in thread
From: goncholden @ 2022-02-13  2:12 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs


------- Original Message -------
On Sunday, February 13th, 2022 at 12:59 AM, Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
> goncholden via Users list for the GNU Emacs text editor wrote:
>
> > What is superior? Using (face-remap-add-relative 'default :weight 'bold)
> > or using (set-face-attribute 'font-lock-comment-face nil :weight normal) ?
>
> They don't do the same thing ...  But the second is good, except I don't
> think one needs to `quote' font-lock-comment-face.

face-remap-add-relative could be buffer local.  Would one prefer buffer local for customising
comments?

> It is however needed for font-lock-regexp-grouping-backslash
> and font-lock-regexp-grouping-construct - I don't know why
> this discrepancy is ...

> Don't forget about font-lock-comment-delimiter-face BTW ...

What is its use?

> And try this ...

> (defun set-all-faces (fg &optional bg weight)
> (let ((backg (or bg "black"))
> (wght (or weight 'normal))
> (faces) )
>
> (mapatoms (lambda (s)
> (when (facep s)
> (push (symbol-name s) faces) )))
> (dolist (f faces)
> (set-face-attribute (intern f) nil
> :foreground fg)
> :background backg
> :weight wght
> :italic nil) ))

> (set-all-faces "red")




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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  2:12   ` goncholden
@ 2022-02-13  2:23     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-02-13  2:30       ` goncholden
  2022-02-13  2:26     ` goncholden
  1 sibling, 1 reply; 24+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-02-13  2:23 UTC (permalink / raw)
  To: help-gnu-emacs

goncholden wrote:

> Would one prefer buffer local for customising comments?

In general, no, since comments are a wide concept ...

>> Don't forget about font-lock-comment-delimiter-face BTW ...
>
> What is its use?

M-x describe-face RET font-lock-comment-delimiter-face RET

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  2:12   ` goncholden
  2022-02-13  2:23     ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-02-13  2:26     ` goncholden
  2022-02-13  2:34       ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 1 reply; 24+ messages in thread
From: goncholden @ 2022-02-13  2:26 UTC (permalink / raw)
  To: goncholden; +Cc: Emanuel Berg, help-gnu-emacs

------- Original Message -------
On Sunday, February 13th, 2022 at 2:12 AM, goncholden <goncholden@protonmail.com> wrote:
> ------- Original Message -------
> On Sunday, February 13th, 2022 at 12:59 AM, Emanuel Berg via Users list for the GNU Emacs text editor help-gnu-emacs@gnu.org wrote:
> > goncholden via Users list for the GNU Emacs text editor wrote:
> >
> > > What is superior? Using (face-remap-add-relative 'default :weight 'bold)
> > > or using (set-face-attribute 'font-lock-comment-face nil :weight normal) ?
> > They don't do the same thing ... But the second is good, except I don't
> > think one needs to `quote' font-lock-comment-face.
>
> face-remap-add-relative could be buffer local. Would one prefer buffer local for customising
> comments?
>
> > Don't forget about font-lock-comment-delimiter-face BTW ...
>
> > And try this ...
>
> > (defun set-all-faces (fg &optional bg weight)
> > (let ((backg (or bg "black"))
> > (wght (or weight 'normal))
> > (faces) )
> > (mapatoms (lambda (s)
> > (when (facep s)
> > (push (symbol-name s) faces) )))
> > (dolist (f faces)
> > (set-face-attribute (intern f) nil
> > :foreground fg)
> > :background backg
> > :weight wght
> > :italic nil) ))
>
> > (set-all-faces "red")

What is the use of set-all-faces, getting perplexed with it.





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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  2:23     ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-02-13  2:30       ` goncholden
  0 siblings, 0 replies; 24+ messages in thread
From: goncholden @ 2022-02-13  2:30 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs

------- Original Message -------
On Sunday, February 13th, 2022 at 2:23 AM, Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
> goncholden wrote:
>
> > Would one prefer buffer local for customising comments?
>
> In general, no, since comments are a wide concept ...

Then with "(set-face-attribute" the comment customisation could be enough.  Ne need to go through the "(face-remap-add-relative" path.

> > > Don't forget about font-lock-comment-delimiter-face BTW ...
> >
> > What is its use?
>
> M-x describe-face RET font-lock-comment-delimiter-face RET
>
> -------------------------------------------------------------
>
> underground experts united
>
> https://dataswamp.org/~incal



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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  2:26     ` goncholden
@ 2022-02-13  2:34       ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-02-13  2:44         ` goncholden
  0 siblings, 1 reply; 24+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-02-13  2:34 UTC (permalink / raw)
  To: help-gnu-emacs

goncholden wrote:

>> (set-all-faces "red")
>
> What is the use of set-all-faces, getting perplexed with it.

Hey, only one way to find out :)

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  2:34       ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-02-13  2:44         ` goncholden
  2022-02-13  2:59           ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 24+ messages in thread
From: goncholden @ 2022-02-13  2:44 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs

------- Original Message -------
On Sunday, February 13th, 2022 at 2:34 AM, Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
> goncholden wrote:
>
> > > (set-all-faces "red")
> >
> > What is the use of set-all-faces, getting perplexed with it.
>
> Hey, only one way to find out :)

Was that to show that for elisp, font-lock-comment-delimiter-face corresponds to
the beginning ;; ?



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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  2:44         ` goncholden
@ 2022-02-13  2:59           ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-02-13  3:18             ` goncholden
  0 siblings, 1 reply; 24+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-02-13  2:59 UTC (permalink / raw)
  To: help-gnu-emacs

goncholden wrote:

>>>> (set-all-faces "red")
>>>
>>> What is the use of set-all-faces, getting perplexed
>>> with it.
>>
>> Hey, only one way to find out :)
>
> Was that to show [...]

You have to evaluate it to find out what it does ...

> for elisp, font-lock-comment-delimiter-face corresponds to
> the beginning ;; ?

C-h f comment-region RET

  The strings used as comment starts are built from
  `comment-start' and `comment-padding'; the strings used as
  comment ends are built from `comment-end' and
  `comment-padding'.

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  2:59           ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-02-13  3:18             ` goncholden
  2022-02-13  3:51               ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 24+ messages in thread
From: goncholden @ 2022-02-13  3:18 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs



Sent with ProtonMail Secure Email.

------- Original Message -------

On Sunday, February 13th, 2022 at 2:59 AM, Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:

> goncholden wrote:
>
> > > > > (set-all-faces "red")
> > > >
> > > > What is the use of set-all-faces, getting perplexed
> > > >
> > > > with it.
> > >
> > > Hey, only one way to find out :)
> >
> > Was that to show [...]
>
> You have to evaluate it to find out what it does ...

The beginning (characters ;; are red), the rest is another colour I had set up.
Should one also colourise the delimiters?


> > for elisp, font-lock-comment-delimiter-face corresponds to
> >
> > the beginning ;; ?
>
> C-h f comment-region RET
>
> The strings used as comment starts are built from
>
> `comment-start' and` comment-padding'; the strings used as
>
> comment ends are built from `comment-end' and` comment-padding'.
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> underground experts united
>
> https://dataswamp.org/~incal



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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  3:18             ` goncholden
@ 2022-02-13  3:51               ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-02-13  5:06                 ` goncholden
  2022-02-13  9:12                 ` goncholden
  0 siblings, 2 replies; 24+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-02-13  3:51 UTC (permalink / raw)
  To: help-gnu-emacs

goncholden wrote:

>> You have to evaluate it to find out what it does ...
>
> The beginning (characters ;; are red), the rest is another
> colour I had set up. Should one also colourise
> the delimiters?

I want them the same color, so I copy the color of
font-lock-comment-face to font-lock-comment-delimiter-face.

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  3:51               ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-02-13  5:06                 ` goncholden
  2022-02-13  5:59                   ` goncholden
  2022-02-13  6:35                   ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-02-13  9:12                 ` goncholden
  1 sibling, 2 replies; 24+ messages in thread
From: goncholden @ 2022-02-13  5:06 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs

------- Original Message -------
On Sunday, February 13th, 2022 at 3:51 AM, Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
> goncholden wrote:

> > > You have to evaluate it to find out what it does ...

> > The beginning (characters ;; are red), the rest is another
> > colour I had set up. Should one also colourise
> > the delimiters?

> I want them the same color, so I copy the color of
> font-lock-comment-face to font-lock-comment-delimiter-face.

I am a little stuck here

(defvar richkov-annotation-contrast 2
  "Sets the colour contrast (against background) for comments.")

(defvar richkov-annotation-chroma
  '( (dark .  ((low  . "#8300E0") (mid  . "#AA33FF") (high . "#C370FF")))
     (light . ((low  . "#C16BFF") (mid  . "#AA33FF") (high . "#8000DB"))) )
  "Colour contrast for comments, indigo on dark and light background.")

(defun richkov-annotation-typeface (chroma)
  "Set the foreground colour for comments.

CHROMA  Intensity Key used for setting colour of comments ."

  (message "richkov-annotation-typeface ")
  (let* ( (colors richkov-annotation-chroma)
          (levels
           (alist-get (frame-parameter nil 'background-mode) colors)) )

    (face-remap-add-relative 'font-lock-comment-face
       `(:foreground ,(alist-get chroma levels)))

    (message "richkov-annotation: %s contrast" chroma)) )

(defun richkov-annotation-low-contrast ()
  (when richkov-minor-mode
    (richkov-annotation-typeface 'low)))

;;;###autoload
(define-minor-mode richkov-minor-mode
  "Colour Brace Marks according to their depth."
  :lighter "richkov"  ; indicator in mode-line

  (font-lock-remove-keywords nil richkov-font-lock)
  (set-face-attribute 'font-lock-comment-face nil
     :weight (face-attribute 'default :weight))

  (when richkov-minor-mode
    (set-face-attribute 'default :weight 'bold)
    (set-face-attribute 'font-lock-comment-face nil :weight 'normal)
    (font-lock-add-keywords nil richkov-font-lock 'append)
    (set (make-local-variable 'jit-lock-contextually) t)
    (richkov-annotation-tools))

  (when font-lock-mode
    (if (fboundp 'font-lock-flush)
        (font-lock-flush)
      (with-no-warnings (font-lock-fontify-buffer)) )) )



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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  5:06                 ` goncholden
@ 2022-02-13  5:59                   ` goncholden
  2022-02-13  6:32                     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-02-13  6:35                   ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 1 reply; 24+ messages in thread
From: goncholden @ 2022-02-13  5:59 UTC (permalink / raw)
  To: goncholden; +Cc: Emanuel Berg, help-gnu-emacs

On Sunday, February 13th, 2022 at 5:06 AM, goncholden <goncholden@protonmail.com> wrote:
> ------- Original Message -------
> On Sunday, February 13th, 2022 at 3:51 AM, Emanuel Berg via Users list for the GNU Emacs text editor help-gnu-emacs@gnu.org wrote:
> > goncholden wrote:
>
> > > > You have to evaluate it to find out what it does ...
>
> > > The beginning (characters ;; are red), the rest is another
> > > colour I had set up. Should one also colourise
> > > the delimiters?

> > I want them the same color, so I copy the color of
> > font-lock-comment-face to font-lock-comment-delimiter-face.

Is this the way to change all buffer text to look bold?

 (set-face-attribute 'default nil :weight 'bold)






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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  5:59                   ` goncholden
@ 2022-02-13  6:32                     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-02-13  6:37                       ` goncholden
  0 siblings, 1 reply; 24+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-02-13  6:32 UTC (permalink / raw)
  To: help-gnu-emacs

goncholden wrote:

> Is this the way to change all buffer text to look bold?
> 
> (set-face-attribute 'default nil :weight 'bold)

C-h f set-face-attribute RET

  ‘:weight’

  VALUE specifies the weight of the font to use. It must be
  one of the symbols ‘ultra-heavy’, ‘heavy’, ‘ultra-bold’,
  ‘extra-bold’, ‘bold’, ‘semi-bold’, ‘medium’, ‘normal’,
  ‘book’, ‘semi-light’, ‘light’, ‘extra-light’, ‘ultra-light’,
  or ‘thin’.

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  5:06                 ` goncholden
  2022-02-13  5:59                   ` goncholden
@ 2022-02-13  6:35                   ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-02-13  6:59                     ` goncholden
  1 sibling, 1 reply; 24+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-02-13  6:35 UTC (permalink / raw)
  To: help-gnu-emacs

goncholden wrote:

> I am a little stuck here
>
> (defvar richkov-annotation-chroma
>   '( (dark .  ((low  . "#8300E0") (mid  . "#AA33FF") (high . "#C370FF")))
>      (light . ((low  . "#C16BFF") (mid  . "#AA33FF") (high . "#8000DB"))) )
>   "Colour contrast for comments, indigo on dark and light background.")

Add function(s) to operate, maybe change, these in clever ways ...

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  6:32                     ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-02-13  6:37                       ` goncholden
  2022-02-13  6:50                         ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 24+ messages in thread
From: goncholden @ 2022-02-13  6:37 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs



Sent with ProtonMail Secure Email.

------- Original Message -------

On Sunday, February 13th, 2022 at 6:32 AM, Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:

> goncholden wrote:
>
> > Is this the way to change all buffer text to look bold?
> > (set-face-attribute 'default nil :weight 'bold)
>
> C-h f set-face-attribute RET
>
> ‘:weight’
>
> VALUE specifies the weight of the font to use. It must be
> one of the symbols ‘ultra-heavy’, ‘heavy’, ‘ultra-bold’,
> ‘extra-bold’, ‘bold’, ‘semi-bold’, ‘medium’, ‘normal’,
> ‘book’, ‘semi-light’, ‘light’, ‘extra-light’, ‘ultra-light’,
> or ‘thin’.

I am ok with the weight part.  My inquiry is really about the "'default nil" part.
Should I just use bold or 'bold ?





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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  6:37                       ` goncholden
@ 2022-02-13  6:50                         ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-02-13  8:41                           ` Jean Louis
  0 siblings, 1 reply; 24+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-02-13  6:50 UTC (permalink / raw)
  To: help-gnu-emacs

goncholden wrote:

>>> Is this the way to change all buffer text to look bold?
>>> (set-face-attribute 'default nil :weight 'bold)
>>
>> C-h f set-face-attribute RET
>>
>> ‘:weight’
>>
>> VALUE specifies the weight of the font to use. It must be
>> one of the symbols ‘ultra-heavy’, ‘heavy’, ‘ultra-bold’,
>> ‘extra-bold’, ‘bold’, ‘semi-bold’, ‘medium’, ‘normal’,
>> ‘book’, ‘semi-light’, ‘light’, ‘extra-light’,
>> ‘ultra-light’, or ‘thin’.
>
> I am ok with the weight part. My inquiry is really about the
> "'default nil" part. Should I just use bold or 'bold ?

1. Think
2. Test
3. Ask at gmane.emacs.help

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  6:35                   ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-02-13  6:59                     ` goncholden
  0 siblings, 0 replies; 24+ messages in thread
From: goncholden @ 2022-02-13  6:59 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs


On Sunday, February 13th, 2022 at 6:35 AM, Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
> goncholden wrote:
>
> > I am a little stuck here
> >
> > (defvar richkov-annotation-chroma
> >
> > '( (dark . ((low . "#8300E0") (mid . "#AA33FF") (high . "#C370FF")))
> >
> > (light . ((low . "#C16BFF") (mid . "#AA33FF") (high . "#8000DB"))) )
> >
> > "Colour contrast for comments, indigo on dark and light background.")

> Add function(s) to operate, maybe change, these in clever ways ...

I fixed things now, there was a problem with set-face-attribute, I did not have "'default nil" but just "'default".



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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  6:50                         ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-02-13  8:41                           ` Jean Louis
  2022-02-13  8:58                             ` goncholden
  0 siblings, 1 reply; 24+ messages in thread
From: Jean Louis @ 2022-02-13  8:41 UTC (permalink / raw)
  To: help-gnu-emacs

* Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2022-02-13 10:47]:
> 1. Think
> 2. Test
> 3. Ask at gmane.emacs.help

Isn't it here the best place to ask?

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  8:41                           ` Jean Louis
@ 2022-02-13  8:58                             ` goncholden
  0 siblings, 0 replies; 24+ messages in thread
From: goncholden @ 2022-02-13  8:58 UTC (permalink / raw)
  To: Jean Louis; +Cc: help-gnu-emacs


------- Original Message -------
On Sunday, February 13th, 2022 at 8:41 AM, Jean Louis <bugs@gnu.support> wrote:

> Jean

> Take action in Free Software Foundation campaigns:
> https://www.fsf.org/campaigns
>
> In support of Richard M. Stallman
> https://stallmansupport.org/

I have got it.



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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  3:51               ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-02-13  5:06                 ` goncholden
@ 2022-02-13  9:12                 ` goncholden
  2022-02-13  9:19                   ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 1 reply; 24+ messages in thread
From: goncholden @ 2022-02-13  9:12 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs

------- Original Message -------
On Sunday, February 13th, 2022 at 3:51 AM, Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
> goncholden wrote:

> > > You have to evaluate it to find out what it does ...
> >
> > The beginning (characters ;; are red), the rest is another
> >
> > colour I had set up. Should one also colourise
> >
> > the delimiters?
>
> I want them the same color, so I copy the color of
> font-lock-comment-face to font-lock-comment-delimiter-face.

I have done as follows, but the face-attribute is not correct because I get Wrong type argument: frame-live-p, :weight

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





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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  9:12                 ` goncholden
@ 2022-02-13  9:19                   ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-02-13  9:22                     ` goncholden
  0 siblings, 1 reply; 24+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-02-13  9:19 UTC (permalink / raw)
  To: help-gnu-emacs

goncholden wrote:

>> I want them the same color, so I copy the color of
>> font-lock-comment-face to font-lock-comment-delimiter-face.
>
> I have done as follows, but the face-attribute is not
> correct because I get Wrong type argument: frame-live-p,
> :weight
>
> (defun richkov-annotation-font-weight ()
>   "Use normal weight typeface for comments."
>   (set-face-attribute 'font-lock-comment-face nil :weight 'normal)
>   (set-face-attribute 'font-lock-comment-delimiter-face
> 		      :weight (face-attribute 'font-lock-comment-face :weight) ))

It is the second `set-face-attribute' ...

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  9:19                   ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-02-13  9:22                     ` goncholden
  2022-02-13  9:27                       ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 24+ messages in thread
From: goncholden @ 2022-02-13  9:22 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs



Sent with ProtonMail Secure Email.

------- Original Message -------

On Sunday, February 13th, 2022 at 9:19 AM, Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:

> goncholden wrote:
>
> > > I want them the same color, so I copy the color of
> > >
> > > font-lock-comment-face to font-lock-comment-delimiter-face.
> >
> > I have done as follows, but the face-attribute is not
> > correct because I get Wrong type argument: frame-live-p,
> > :weight
> >
> > (defun richkov-annotation-font-weight ()
> > "Use normal weight typeface for comments."
> > (set-face-attribute 'font-lock-comment-face nil :weight 'normal)
> > (set-face-attribute 'font-lock-comment-delimiter-face
> > :weight (face-attribute 'font-lock-comment-face :weight) ))
>
> It is the second `set-face-attribute' ...

(set-face-attribute 'font-lock-comment-delimiter-face nil
   :weight (face-attribute 'font-lock-comment-face :weight) ))

Is this the way you would inherit same weight from font-lock-comment ?




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

* Re: face-remap-add-relative versus set-face-attribute
  2022-02-13  9:22                     ` goncholden
@ 2022-02-13  9:27                       ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 24+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-02-13  9:27 UTC (permalink / raw)
  To: help-gnu-emacs

goncholden wrote:

>> It is the second `set-face-attribute' ...
>
> (set-face-attribute 'font-lock-comment-delimiter-face nil
>    :weight (face-attribute 'font-lock-comment-face :weight) ))
>
> Is this the way you would inherit same weight from
> font-lock-comment ?

I think I would `copy-face' first, then change whatever (if
anything) that sets one apart from the other ...

-- 
underground experts united
https://dataswamp.org/~incal




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

end of thread, other threads:[~2022-02-13  9:27 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-12 23:43 face-remap-add-relative versus set-face-attribute goncholden via Users list for the GNU Emacs text editor
2022-02-13  0:59 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-13  2:12   ` goncholden
2022-02-13  2:23     ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-13  2:30       ` goncholden
2022-02-13  2:26     ` goncholden
2022-02-13  2:34       ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-13  2:44         ` goncholden
2022-02-13  2:59           ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-13  3:18             ` goncholden
2022-02-13  3:51               ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-13  5:06                 ` goncholden
2022-02-13  5:59                   ` goncholden
2022-02-13  6:32                     ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-13  6:37                       ` goncholden
2022-02-13  6:50                         ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-13  8:41                           ` Jean Louis
2022-02-13  8:58                             ` goncholden
2022-02-13  6:35                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-13  6:59                     ` goncholden
2022-02-13  9:12                 ` goncholden
2022-02-13  9:19                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-13  9:22                     ` goncholden
2022-02-13  9:27                       ` Emanuel Berg via Users list for the GNU Emacs text editor

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