unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 18369@debbugs.gnu.org
Subject: bug#18369: 24.4.50; interactive spec of `facemenu-add-face'
Date: Sat, 30 Apr 2016 08:47:15 -0800 (GMT-08:00)	[thread overview]
Message-ID: <597bd140-2dd3-4ffa-8b59-2289a3dc6dc0@default> (raw)
In-Reply-To: <87twijqk54.fsf@gnus.org>

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





  reply	other threads:[~2016-04-30 16:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-07-13 22:13 ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=597bd140-2dd3-4ffa-8b59-2289a3dc6dc0@default \
    --to=drew.adams@oracle.com \
    --cc=18369@debbugs.gnu.org \
    --cc=larsi@gnus.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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