all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#18369: 24.4.50; interactive spec of `facemenu-add-face'
@ 2014-08-31  5:06 Drew Adams
  2016-04-30 13:52 ` Lars Ingebrigtsen
  2021-07-13 22:13 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: Drew Adams @ 2014-08-31  5:06 UTC (permalink / raw)
  To: 18369

The interactive use of this command is not as convenient as it could be.
Is there a good reason for this?

Why does the interactive spec use "*xFace: \nr" (reading a sexp, no
completion etc.)?  Why does it not use `read-face-name', as does
`facemenu-set-face' (which calls `facemenu-add-face')?

In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-08-15 on LEG570
Bzr revision: 117706 rgm@gnu.org-20140815043406-p5hbu97cbm7pulcn
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1'





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

* bug#18369: 24.4.50; interactive spec of `facemenu-add-face'
  2014-08-31  5:06 bug#18369: 24.4.50; interactive spec of `facemenu-add-face' Drew Adams
@ 2016-04-30 13:52 ` Lars Ingebrigtsen
  2016-04-30 16:47   ` Drew Adams
  2021-07-13 22:13 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-30 13:52 UTC (permalink / raw)
  To: Drew Adams; +Cc: 18369

Drew Adams <drew.adams@oracle.com> writes:

> The interactive use of this command is not as convenient as it could be.
> Is there a good reason for this?
>
> Why does the interactive spec use "*xFace: \nr" (reading a sexp, no
> completion etc.)?  Why does it not use `read-face-name', as does
> `facemenu-set-face' (which calls `facemenu-add-face')?

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

`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?

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.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#18369: 24.4.50; interactive spec of `facemenu-add-face'
  2016-04-30 13:52 ` Lars Ingebrigtsen
@ 2016-04-30 16:47   ` Drew Adams
  0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2016-04-30 16:47 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 18369

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

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

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





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

* bug#18369: 24.4.50; interactive spec of `facemenu-add-face'
  2014-08-31  5:06 bug#18369: 24.4.50; interactive spec of `facemenu-add-face' Drew Adams
  2016-04-30 13:52 ` Lars Ingebrigtsen
@ 2021-07-13 22:13 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-13 22:13 UTC (permalink / raw)
  To: Drew Adams; +Cc: 18369

Drew Adams <drew.adams@oracle.com> writes:

> The interactive use of this command is not as convenient as it could be.
> Is there a good reason for this?
>
> Why does the interactive spec use "*xFace: \nr" (reading a sexp, no
> completion etc.)?  Why does it not use `read-face-name', as does
> `facemenu-set-face' (which calls `facemenu-add-face')?

I've now fixed this in Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2021-07-13 22:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-31  5:06 bug#18369: 24.4.50; interactive spec of `facemenu-add-face' Drew Adams
2016-04-30 13:52 ` Lars Ingebrigtsen
2016-04-30 16:47   ` Drew Adams
2021-07-13 22:13 ` Lars Ingebrigtsen

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.