[Top][All Lists]

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

RE: How do I highlight word at point?

From: Drew Adams
Subject: RE: How do I highlight word at point?
Date: Sun, 19 Oct 2008 16:35:38 -0700

> The title pretty much said it. :)

Not really. What do you mean by "highlight"? Most replies so far have assumed
that you mean just select the word (region highlighting).

If you mean instead that you want to change the foreground or background color
or something else about the appearance of the word using a text property or an
overlay, then there are many ways to do that. These alternatives might help:

1. Select the current word (or whatever you want to highlight). For example,
command `select-thing-near-point' in `thing-cmds.el' will do that. (I bind that
command to `M-@'.) 

Then hit `C-mouse-2' to get the `Text Properties' menu. Then do one of the

a. Choose anything in the `Face', `Foreground', or `Background' submenus.
   Example: `Other' (or `M-o o') lets you specify a face to use.

b. If you use libraries `facemenu+.el' and `highlight.el', then choose anything
in the `Highlight' submenu. Example: `Highlight Region/Buffer'. (I bind that
command to `C-x C-y'.)

2. If you use `facemenu+.el' and `highlight.el', then you can alternatively use
command `hlt-highlighter' (or `Text Properties > Highlight > Highlighter Pen')
and then drag the mouse like a highlighter pen. (I bind that command to `C-x

There are other commands in these libraries that will also let you highlight a
word (or whatever).

* - facemenu+.el
* - highlight.el
* - thing-cmds.el

See also nodes `Editing Format Info' and `Format Faces' in the Emacs menu - it
describes the vanilla `Text Properties' menu (e.g. 1a, above, but not 1b or 2).

See also for related

HTH. Next time, please try to be more specific in your request - "highlight word
at point" can mean several different things in Emacs. The more specific you are,
the better the help you will get and the less likely the thread will wander off

reply via email to

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