emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/doc/lispref/abbrevs.texi,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/doc/lispref/abbrevs.texi,v
Date: Tue, 30 Oct 2007 01:39:20 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        07/10/30 01:39:19

Index: doc/lispref/abbrevs.texi
===================================================================
RCS file: /sources/emacs/emacs/doc/lispref/abbrevs.texi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- doc/lispref/abbrevs.texi    28 Oct 2007 02:40:55 -0000      1.3
+++ doc/lispref/abbrevs.texi    30 Oct 2007 01:39:19 -0000      1.4
@@ -23,13 +23,10 @@
 each abbreviation.  The symbol's name is the abbreviation; its value
 is the expansion; its function definition is the hook function to do
 the expansion (@pxref{Defining Abbrevs}); its property list cell
-typically contains the use count, the number of times the abbreviation
-has been expanded.  Alternatively, the use count is on the
address@hidden property and the system-abbrev flag is on the
address@hidden property.  Abbrevs with a address@hidden
address@hidden property are called ``system'' abbrevs.  They are
-usually defined by modes or packages, instead of by the user, and are
-treated specially in certain respects.
+typically contains various additional properties such as the use
+count, the number of times the abbreviation has been expanded, or
+whether the abbrev is a so-called ``system'' abbrev defined by a major
+mode rather than by the user (@pxref{Abbrev Properties}).
 
 Because the symbols used for abbrevs are not interned in the usual
 obarray, they will never appear as the result of reading a Lisp
@@ -82,7 +79,8 @@
 @defun make-abbrev-table &rest props
 This function creates and returns a new, empty abbrev table---an obarray
 containing no symbols.  It is a vector filled with zeros.  @var{props}
-is a property list that is applied to the new table.
+is a property list that is applied to the new table
+(@pxref{Abbrev Table Properties}).
 @end defun
 
 @defun abbrev-table-p table
@@ -145,7 +143,7 @@
   @code{define-abbrev} is the low-level basic function for defining an
 abbrev in a specified abbrev table.  When major modes predefine standard
 abbrevs, they should call @code{define-abbrev} and specify a @code{t} for
-the @code{system-flag} property.
+the @code{:system} property.
 Be aware that any saved non-``system'' abbrevs are 
 restored at startup, i.e. before some major modes are loaded.  Major modes
 should therefore not assume that when they are first loaded their abbrev
@@ -155,6 +153,9 @@
 This function defines an abbrev named @var{name}, in @var{table}, to
 expand to @var{expansion} and call @var{hook}, with properties
 @var{props} (@pxref{Abbrev Properties}).  The return value is @var{name}.
+The @code{:system} property in @var{props} is treated specially here:
+if it has the value @code{force}, then it will overwrite an existing
+definition even for a non-``system'' abbrev of the same name.
 
 The argument @var{name} should be a string.  The argument
 @var{expansion} is normally the desired expansion (a string), or
@@ -413,8 +414,8 @@
 @section Abbrev Properties
 
 Abbrevs have properties, some of which influence the way they work.
-They are usually set by providing the relevant arguments to
address@hidden and can be manipulated with the functions:
+You can provide them as arguments to @code{define-abbrev} and you can
+manipulate them with the functions:
 
 @defun abbrev-put abbrev prop val
 Set the property @var{prop} of abbrev @var{abbrev} to value @var{val}.
@@ -428,38 +429,34 @@
 The following properties have special meaning:
 
 @table @code
address@hidden count
address@hidden :count
 This property counts the number of times the abbrev has
 been expanded.  If not explicitly set, it is initialized to 0 by
 @code{define-abbrev}.
 
address@hidden system-flag
address@hidden :system
 If address@hidden, this property marks the abbrev as a ``system''
 abbrev.  Such abbrevs will not be saved to @var{abbrev-file-name}.
-Also, unless @code{system-flag} has the value @code{force},
-a ``system'' abbrev will not overwrite an existing definition for
-a non-``system'' abbrev of the same name.
 
 @item :enable-function
-If address@hidden, this property should be set to a function of no
+If address@hidden, this property should be a function of no
 arguments which returns @code{nil} if the abbrev should not be used
 and @code{t} otherwise.
 
 @item :case-fixed
 If address@hidden, this property indicates that the case of the
 abbrev's name is significant and should only match a text with the
-same capitalization.  It also disables the code that modifies the
-capitalization of the expansion.
-
+same pattern of capitalization.  It also disables the code that
+modifies the capitalization of the expansion.
 @end table
 
 @node Abbrev Table Properties,  , Abbrev Properties, Abbrevs
 @section Abbrev Table Properties
 
 Like abbrevs, abble tables have properties, some of which influence
-the way they work.  They are usually set by providing the relevant
-arguments to @code{define-abbrev-table} and can be manipulated with
-the functions:
+the way they work.  You can provide them as arguments to
address@hidden and you can manipulate them with the
+functions:
 
 @defun abbrev-table-put table prop val
 Set the property @var{prop} of abbrev table @var{table} to value @var{val}.
@@ -474,26 +471,21 @@
 
 @table @code
 @item :enable-function
-If address@hidden, this property should be set to a function of no
-arguments which returns @code{nil} if the abbrev table should not be
-used and @code{t} otherwise.  This is like the @code{:enable-function}
-abbrev property except that it applies to all abbrevs in the table and
-is used even before trying to find the abbrev before point.
+This is like the @code{:enable-function} abbrev property except that
+it applies to all abbrevs in the table and is used even before trying
+to find the abbrev before point so it can dynamically modify the
+abbrev table.
 
 @item :case-fixed
-If address@hidden, this property indicates that the case of the names
-is significant for all abbrevs in the table and should only match
-a text with the same capitalization.  It also disables the code that
-modifies the capitalization of the expansion.  This is like the
address@hidden:case-fixed} abbrev property except that it applies to all
-abbrevs in the table.
+This is like the @code{:case-fixed} abbrev property except that it
+applies to all abbrevs in the table.
 
 @item :regexp
 If address@hidden, this property is a regular expression that
 indicates how to extract the name of the abbrev before point before
 looking it up in the table.  When the regular expression matches
 before point, the abbrev name is expected to be in submatch 1.
-If this property is nil, @code{expand-function} defaults to
+If this property is @code{nil}, @code{expand-function} defaults to
 @code{"\\<\\(\\w+\\)\\W"}.  This property allows the use of abbrevs
 whose name contains characters of non-word syntax.
 




reply via email to

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