[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

34. Highlight the Current Line in the Buffer

This package is a minor mode to highlight the current line in buffer.

The mode supports the following modes of operation:

Both Local and Global minor modes may be in use at the same time.

Indirect highline (highline-view-on, highline-view-off and highline-view-mode) is useful when you wish to have various "visions" of the same buffer. Indirect highline uses an indirect buffer to get the "vision" of the buffer. So, if you kill an indirect buffer, the base buffer is not affected; if you kill the base buffer, all indirect buffer related with the base buffer is automagically killed. Also, any text insertion/deletion in any indirect or base buffer is updated in all related buffers.

34.1 Key Bindings and Example Usage  
34.2 Hooks  
34.3 Options  

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

34.1 Key Bindings and Example Usage

It might be useful to set up some global key bindings as follows:

  (global-set-key "\C-c\C-a"     'highline-on)
  (global-set-key "\C-c\C-b"     'highline-off)
  (global-set-key "\C-c\C-l"     'highline-local-mode)
  (global-set-key "\C-c\C-d"     'highline-mode-on)
  (global-set-key "\C-c\C-e"     'highline-mode-off)
  (global-set-key "\C-c\C-g"     'highline-mode)
  (global-set-key "\C-c\C-c"     'highline-customize)
  (global-set-key "\C-c\C-v\C-n" 'highline-view-on)
  (global-set-key "\C-c\C-v\C-f" 'highline-view-off)
  (global-set-key "\C-c\C-v\C-t" 'highline-view-mode)

As an example, try to insert this in your .emacs file:

  (require 'highline)
  ;; Turn on local highlighting for Dired (C-x d)
  (add-hook 'dired-after-readin-hook 'highline-on)
  ;; Turn on local highlighting for list-buffers (C-x C-b)
  (defadvice list-buffers (after highlight-line activate)
      (set-buffer "*Buffer List*")

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

34.2 Hooks

highline has the following hook variables:

It is evaluated always when highline is turned on globally.

It is evaluated always when highline is turned on locally.

It is evaluated always when indirect highline is turned on.

It is evaluated after highline package is loaded.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

34.3 Options

This is a brief description of highline options. Please see the options declarations in the code for more detail.

Specify face used to highlight the current line.

Specify face used to highlight other than current line.

Specify which part of line should be highlighted.

Specify how many vertical lines should be highlighted.

Non-nil means generate messages.

Specify regexp for buffers to ignore.

Specify highline overlay priority.

Non-nil means highlight current line on current window.

To configure this package, type:

  M-x highline-customize RET

[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by XEmacs Webmaster on October, 2 2007 using texi2html