emacs-devel
[Top][All Lists]
Advanced

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

RE: facemenu-unlisted-faces


From: Drew Adams
Subject: RE: facemenu-unlisted-faces
Date: Sun, 6 Aug 2006 01:10:59 -0700

    From: Drew Adams Sent: Saturday, July 01, 2006 8:17 PM
    Subject: RE: facemenu-unlisted-faces

    We could enable use of `list-faces-display' to apply a chosen
    face to the region (what Faces > ... does today).

    Today, the `list-faces-display' list just gives you access to
    1) Customizing the face and 2) the *Faces* description of the
    face. those two could be combined in the same mouse click -
    they both give you info on the face. In fact, they already are
    combined, in the sense that *Faces* has a link to Customize the
    face.

    So, clicking the face name in `list-faces-display' could simply
    apply that face to the region (what Faces > ... does today).
    And clicking the face's alphabet would show the *Faces*
    description of the face, with a link to Customize it.

    IOW, my suggestion is to get rid of menu Faces, and let users
    obtain its functionality for any face, via a more active
    `list-faces-display'.

    The best interaction, BTW, is that provided by `M-o o': it lets
    you choose a face to apply using face-name completion. Like
    `list-faces-display', no faces are excluded from that list -
    if a user wants to apply face `mode-list' to text in a buffer,
    s?he can.

If anyone is interested to try it, to see what it would be like, I have an
implementation here: http://www.emacswiki.org/cgi-bin/wiki/facemenu%2b.el.
To try it, do this first:

1) (require 'facemenu)
2) (require 'help-mode)
3) Eval just the last sexp before the `provide':
   (when (>= emacs-major-version...)

Then, in a buffer with no font-locking:

1) Optionally select a region

2) `M-o o'

3) Click a face sample (alphabet) to apply that face to the region (or to
newly entered text, depending on whether the region is active and
non-empty).

Again, the advantage of this is that you can see what the face looks like
before you apply it: just choose the face by *appearance* (WYSIWYG) - you
can ignore the face name altogether.

If you use a prefix arg, then you are prompted for the face name, instead of
being shown the *Faces* display. So, `M-o o' lets you apply a face by name
(with completion) or by appearance.

Changes wrt what I suggested originally (above):

1. I switched the two links: clicking the face name gives you info on the
face (including the link to customize), and clicking the face sample applies
the face to the region (or to newly entered chars).

2. I didn't get rid of the Faces menu. You can access the new behavior using
either menu item Faces > Other... or `M-o o'.






reply via email to

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