[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18369: 24.4.50; interactive spec of `facemenu-add-face'

From: Drew Adams
Subject: bug#18369: 24.4.50; interactive spec of `facemenu-add-face'
Date: Sat, 30 Apr 2016 08:47:15 -0800 (GMT-08:00)

> I find these functions odd.
> `facemenu-set-face' just does this:
>   (facemenu-add-new-face face)
>   (facemenu-add-face face start end)
> after reading a face name with `read-face-name'.  So it's a very thin
> shim over `facemenu-add-face'.

It adds the face to the Face menu (first sexp).
`facemenu-add-face' does not do that - it just applies
a face to buffer text.  These are two very different uses
of the word "add".

> `M-x facemenu-add-face RET foo RET' and nothing happened.
> Then I did `M-x facemenu-add-face RET bold RET', and it
> errored out saying Invalid face reference: foo
> Huh?

Read the doc.  If the region is empty then `facemenu-add-face'
applies a face to the text you type.  Else it applies it to
the text in the region.  Works fine.  `foo' is not a defined

> I have no idea what these two functions are supposed to be doing, but I
> don't think...  they are doing...  whatever they should be doing.

They are doing exactly what they are supposed to do, and
what they are documented as doing.

This bug report (enhancement request, if you prefer) is a
request to have `facemenu-add-face' use `read-face-name'
(which might not have existed when it was defined originally;

[Note: To use these commands you had better turn off font-lock
in your buffer.  Since font-lock has now taken over all `face'
highlighting (see other bugs, which you've closed), you will
see no effect from any functions that add text property `face'.

Font lock should NOT be monopolizing the use of property `face'
(even Stefan agrees with that).  But it does (now), so turn it
off if you want to be able to make use of Facemenu (and other
`face' highlighting).]

reply via email to

[Prev in Thread] Current Thread [Next in Thread]