emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lispref/modes.texi


From: Lute Kamstra
Subject: [Emacs-diffs] Changes to emacs/lispref/modes.texi
Date: Fri, 03 Oct 2003 07:48:57 -0400

Index: emacs/lispref/modes.texi
diff -c emacs/lispref/modes.texi:1.65 emacs/lispref/modes.texi:1.66
*** emacs/lispref/modes.texi:1.65       Mon Sep 29 06:19:05 2003
--- emacs/lispref/modes.texi    Fri Oct  3 07:48:55 2003
***************
*** 236,242 ****
  @item
  The mode should specify how Imenu should find the definitions or
  sections of a buffer, by setting up a buffer-local value for the
! variable @code{imenu-generic-expression} or
  @code{imenu-create-index-function} (@pxref{Imenu}).
  
  @item
--- 236,244 ----
  @item
  The mode should specify how Imenu should find the definitions or
  sections of a buffer, by setting up a buffer-local value for the
! variable @code{imenu-generic-expression}, for the pair of variables
! @code{imenu-prev-index-position-function} and
! @code{imenu-extract-index-name-function}, or for the variable
  @code{imenu-create-index-function} (@pxref{Imenu}).
  
  @item
***************
*** 1702,1713 ****
  @code{imenu-generic-expression}:
  
  @defvar imenu-generic-expression
! This variable, if address@hidden, specifies regular expressions for
! finding definitions for Imenu.  In the simplest case, elements should
! look like this:
  
  @example
! (@var{menu-title} @var{regexp} @var{subexp})
  @end example
  
  Here, if @var{menu-title} is address@hidden, it says that the matches
--- 1704,1715 ----
  @code{imenu-generic-expression}:
  
  @defvar imenu-generic-expression
! This variable, if address@hidden, is a list that specifies regular
! expressions for finding definitions for Imenu.  Simple elements of
! @code{imenu-generic-expression} look like this:
  
  @example
! (@var{menu-title} @var{regexp} @var{index})
  @end example
  
  Here, if @var{menu-title} is address@hidden, it says that the matches
***************
*** 1717,1726 ****
  in the top level of the buffer index.
  
  The second item in the list, @var{regexp}, is a regular expression
! (@pxref{Regular Expressions}); anything in the buffer that it matches is
! considered a definition, something to mention in the buffer index.  The
! third item, @var{subexp}, indicates which subexpression in @var{regexp}
! matches the definition's name.
  
  An element can also look like this:
  
--- 1719,1728 ----
  in the top level of the buffer index.
  
  The second item in the list, @var{regexp}, is a regular expression
! (@pxref{Regular Expressions}); anything in the buffer that it matches
! is considered a definition, something to mention in the buffer index.
! The third item, @var{index}, is a non-negative integer that indicates
! which subexpression in @var{regexp} matches the definition's name.
  
  An element can also look like this:
  
***************
*** 1728,1738 ****
  (@var{menu-title} @var{regexp} @var{index} @var{function} @address@hidden)
  @end example
  
! Each match for this element creates a special index item which, if
! selected by the user, calls @var{function} with arguments consisting of
! the item name, the buffer position, and @var{arguments}.
  
! For Emacs Lisp mode, @var{pattern} could look like this:
  
  @c should probably use imenu-syntax-alist and \\sw rather than [-A-Za-z0-9+]
  @example
--- 1730,1742 ----
  (@var{menu-title} @var{regexp} @var{index} @var{function} @address@hidden)
  @end example
  
! Like in the previous case, each match for this element creates an
! index item.  However, if this index item is selected by the user, it
! calls @var{function} with arguments consisting of the item name, the
! buffer position, and @var{arguments}.
  
! For Emacs Lisp mode, @code{imenu-generic-expression} could look like
! this:
  
  @c should probably use imenu-syntax-alist and \\sw rather than [-A-Za-z0-9+]
  @example
***************
*** 1756,1764 ****
  @end defvar
  
  @defvar imenu-case-fold-search
! This variable controls whether matching against
! @var{imenu-generic-expression} is case-sensitive: @code{t}, the default,
! means matching should ignore case.
  
  Setting this variable makes it buffer-local in the current buffer.
  @end defvar
--- 1760,1769 ----
  @end defvar
  
  @defvar imenu-case-fold-search
! This variable controls whether matching against the regular
! expressions in the value of @code{imenu-generic-expression} is
! case-sensitive: @code{t}, the default, means matching should ignore
! case.
  
  Setting this variable makes it buffer-local in the current buffer.
  @end defvar
***************
*** 1786,1796 ****
  (setq imenu-syntax-alist '(("_$" . "w")))
  @end example
  
! The @code{imenu-generic-expression} patterns can then use @samp{\\sw+}
! instead of @samp{\\(\\sw\\|\\s_\\)+}.  Note that this technique may be
! inconvenient when the mode needs to limit the initial character
! of a name to a smaller set of characters than are allowed in the rest
! of a name.
  
  Setting this variable makes it buffer-local in the current buffer.
  @end defvar
--- 1791,1801 ----
  (setq imenu-syntax-alist '(("_$" . "w")))
  @end example
  
! The @code{imenu-generic-expression} regular expressions can then use
! @samp{\\sw+} instead of @samp{\\(\\sw\\|\\s_\\)+}.  Note that this
! technique may be inconvenient when the mode needs to limit the initial
! character of a name to a smaller set of characters than are allowed in
! the rest of a name.
  
  Setting this variable makes it buffer-local in the current buffer.
  @end defvar
***************
*** 1823,1859 ****
  variable @code{imenu-create-index-function}:
  
  @defvar imenu-create-index-function
! This variable specifies the function to use for creating a buffer index.
! The function should take no arguments, and return an index for the
! current buffer.  It is called within @code{save-excursion}, so where it
! leaves point makes no difference.
! 
! The default value is a function that uses
! @code{imenu-generic-expression} to produce the index alist.  If you
! specify a different function, then @code{imenu-generic-expression} is
! not used.
  
! Setting this variable makes it buffer-local in the current buffer.
! @end defvar
  
! @defvar imenu-index-alist
! This variable holds the index alist for the current buffer.
! Setting it makes it buffer-local in the current buffer.
! 
! Simple elements in the alist look like @code{(@var{index-name}
! . @var{index-position})}.  Selecting a simple element has the effect of
! moving to position @var{index-position} in the buffer.
! 
! Special elements look like @code{(@var{index-name} @var{position}
! @var{function} @address@hidden)}.  Selecting a special element
! performs
  
  @example
! (funcall @var{function} @var{index-name} @var{position} @address@hidden)
  @end example
  
! A nested sub-alist element looks like @code{(@var{index-name}
! @var{sub-alist})}.
  @end defvar
  
  @node Font Lock Mode
--- 1828,1874 ----
  variable @code{imenu-create-index-function}:
  
  @defvar imenu-create-index-function
! This variable specifies the function to use for creating a buffer
! index.  The function should take no arguments, and return an index
! alist for the current buffer.  It is called within
! @code{save-excursion}, so where it leaves point makes no difference.
  
! The index alist can have three types of elements.  Simple elements
! look like this:
! 
! @example
! (@var{index-name} . @var{index-position})
! @end example
! 
! Selecting a simple element has the effect of moving to position
! @var{index-position} in the buffer.  Special elements look like this:
! 
! @example
! (@var{index-name} @var{index-position} @var{function} @address@hidden)
! @end example
  
! Selecting a special element performs:
  
  @example
! (funcall @var{function} 
!          @var{index-name} @var{index-position} @address@hidden)
  @end example
  
! A nested sub-alist element looks like this:
! 
! @example
! (@var{index-name} @var{sub-alist})
! @end example
! 
! It creates a submenu specified by @var{sub-alist}.
! 
! The default value of @code{imenu-create-index-function} is a function
! that uses @code{imenu-prev-index-position-function} and
! @code{imenu-extract-index-name-function} to produce the index alist.
! However, if either of these two variables is @code{nil}, the default
! function uses @code{imenu-generic-expression} instead.
! 
! Setting this variable makes it buffer-local in the current buffer.
  @end defvar
  
  @node Font Lock Mode




reply via email to

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