[ < ] [ > ]   [ << ] [ 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)
    (save-excursion
      (set-buffer "*Buffer List*")
      (highline-on)))


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

34.2 Hooks

highline has the following hook variables:

highline-hook
It is evaluated always when highline is turned on globally.

highline-local-hook
It is evaluated always when highline is turned on locally.

highline-view-hook
It is evaluated always when indirect highline is turned on.

highline-load-hook
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.

highline-face
Specify face used to highlight the current line.

highline-vertical-face
Specify face used to highlight other than current line.

highline-line
Specify which part of line should be highlighted.

highline-vertical
Specify how many vertical lines should be highlighted.

highline-verbose
Non-nil means generate messages.

highline-ignore-regexp
Specify regexp for buffers to ignore.

highline-priority
Specify highline overlay priority.

highline-selected-window
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 shared group account on December, 19 2009 using texi2html 1.65.