Highlight completion info

Highlight completion is a variant on completion in Emacs. Download the package here: highlight-completion.el.

Description:

This package modified how Emacs performs completions. Ordinarily, if you are typing a file name into the minibuffer (after hitting C-x C-f, say), if you type a few letters and hit the TAB key, then Emacs completes as far as possible. For example, suppose a directory contains only these files:
   filbert   filibuster   frank   grunge.tex
    
If you type g followed by TAB, then runge.tex is inserted. If you hit fi then TAB, an l is inserted. If you hit f then TAB, there is no unique continuation of the file name, so Emacs opens up a new window displaying the list of possible completions.

That's the old system. This package provides a variant: if you type g, then runge.tex is automatically inserted as highlighted text, to indicate that it's only provisional. The point remains immediately after the g. If you hit TAB, the point jumps to the end, and the added text is no longer highlighted. (So if you weren't looking at the screen, you wouldn't know that anything different had happened.) If after hitting g, you typed a (because you wanted to find a new file gaptooth.el) the highlighted text would disappear. The effects of various keys:

How to use:

  1. Put the file highlight-completion.el in your load-path.
  2. Put (require 'highlight-completion) in your .emacs file (or your .xemacs/init.el file).
  3. Turn on highlight completion by either
            M-x highlight-completion-mode
    	
    or customizing variables:
    	M-x customize-group highlight-completion
    	
    Then turn on "Highlight completion mode". You may want to modify some of the entries in "Highlight completion list".
  4. You can also run the functions
       hc-completing-insert-file-name       to complete file names
       hc-completing-insert-lisp-function          lisp functions
       hc-completing-insert-lisp-variable          lisp variables
       hc-completing-insert-kill                   contents of kill ring
       hc-completing-insert-buffer contents        buffer contents
       hc-ispell-complete-word                     words from a dictionary,
                                                       using ispell
    	
    These functions can be used anywhere, not just in the minibuffer.

Download:

Download the package here: highlight-completion.el.


Back to the Highlight completion home page.

Back to John Palmieri's Emacs lisp page.

Back to John Palmieri's home page.


You can contact me by e-mail if you have any questions or comments.

John H. Palmieri, Department of Mathematics, University of Washington, palmieri@math.washington.edu

Last modified: Thu Jun 21 20:29:36 PDT 2001