[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lispref/abbrevs.texi
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lispref/abbrevs.texi |
Date: |
Sun, 30 Dec 2001 15:07:27 -0500 |
Index: emacs/lispref/abbrevs.texi
diff -c emacs/lispref/abbrevs.texi:1.11 emacs/lispref/abbrevs.texi:1.12
*** emacs/lispref/abbrevs.texi:1.11 Thu Jan 20 22:17:37 2000
--- emacs/lispref/abbrevs.texi Sun Dec 30 15:07:27 2001
***************
*** 20,34 ****
abbrev table. Normally both are used.
An abbrev table is represented as an obarray containing a symbol for
! 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 contains
! the use count, the number of times the abbreviation has been expanded.
! Because these symbols are not interned in the usual obarray, they will
! never appear as the result of reading a Lisp expression; in fact,
! normally they are never used except by the code that handles abbrevs.
! Therefore, it is safe to use them in an extremely nonstandard way.
! @xref{Creating Symbols}.
For the user-level commands for abbrevs, see @ref{Abbrevs,, Abbrev
Mode, emacs, The GNU Emacs Manual}.
--- 20,36 ----
abbrev table. Normally both are used.
An abbrev table is represented as an obarray containing a symbol for
! 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
! @code{count} property and the system-abbrev flag is on the
! @code{system-type} property.) Because these symbols are not interned
! in the usual obarray, they will never appear as the result of reading
! a Lisp expression; in fact, normally they are never used except by the
! code that handles abbrevs. Therefore, it is safe to use them in an
! extremely nonstandard way. @xref{Creating Symbols}.
For the user-level commands for abbrevs, see @ref{Abbrevs,, Abbrev
Mode, emacs, The GNU Emacs Manual}.
***************
*** 79,89 ****
@end defun
@defun define-abbrev-table tabname definitions
! This function defines @var{tabname} (a symbol) as an abbrev table name,
! i.e., as a variable whose value is an abbrev table. It defines abbrevs
! in the table according to @var{definitions}, a list of elements of the
! form @code{(@var{abbrevname} @var{expansion} @var{hook}
! @var{usecount})}. The return value is always @code{nil}.
@end defun
@defvar abbrev-table-name-list
--- 81,92 ----
@end defun
@defun define-abbrev-table tabname definitions
! This function defines @var{tabname} (a symbol) as an abbrev table
! name, i.e., as a variable whose value is an abbrev table. It defines
! abbrevs in the table according to @var{definitions}, a list of
! elements of the form @code{(@var{abbrevname} @var{expansion}
! @var{hook} @var{usecount} @address@hidden@r{]})}. The return
! value is always @code{nil}.
@end defun
@defvar abbrev-table-name-list
***************
*** 124,136 ****
existing abbrev.
@end defun
! @defun define-abbrev table name expansion &optional hook count
This function defines an abbrev named @var{name}, in @var{table}, to
! expand to @var{expansion} and call @var{hook}. The value of
! @var{count}, if specified, initializes the abbrev's usage-count. If
! @var{count} is not specified or @code{nil}, the use count is initialized
! to zero. The return value is a symbol that represents the abbrev inside
! Emacs; its name is @var{name}.
The argument @var{name} should be a string. The argument
@var{expansion} is normally the desired expansion (a string), or
--- 127,141 ----
existing abbrev.
@end defun
! @defun define-abbrev table name expansion &optional hook count system-flag
This function defines an abbrev named @var{name}, in @var{table}, to
! expand to @var{expansion} and call @var{hook}. The return value is a
! symbol that represents the abbrev inside Emacs; its name is
! @var{name}.
!
! The value of @var{count}, if specified, initializes the abbrev's
! usage-count. If @var{count} is not specified or @code{nil}, the use
! count is initialized to zero.
The argument @var{name} should be a string. The argument
@var{expansion} is normally the desired expansion (a string), or
***************
*** 150,155 ****
--- 155,167 ----
of the character. By contrast, if @var{hook} returns @code{nil},
@code{expand-abbrev} also returns @code{nil}, as if expansion had not
really occurred.
+
+ Normally the function @code{define-abbrev} sets the variable
+ @code{abbrevs-changed} to @code{t}. But if @var{system-flag} is
+ address@hidden, that says the abbrev is a ``system'' abbrev. In that
+ case, @code{define-abbrev} does not alter @code{abbrevs-changed}.
+ Instead it marks the abbrev as a ``system'' abbrev with the
+ @code{system-type} property.
@end defun
@defopt only-global-abbrevs
***************
*** 195,210 ****
@end defopt
@defvar abbrevs-changed
! This variable is set address@hidden by defining or altering any
! abbrevs. This serves as a flag for various Emacs commands to offer to
! save your abbrevs.
@end defvar
@deffn Command write-abbrev-file &optional filename
! Save all abbrev definitions, in all abbrev tables, in the file
! @var{filename}, in the form of a Lisp program that when loaded will
! define the same abbrevs. If @var{filename} is @code{nil} or omitted,
! @code{abbrev-file-name} is used. This function returns @code{nil}.
@end deffn
@node Abbrev Expansion, Standard Abbrev Tables, Abbrev Files, Abbrevs
--- 207,223 ----
@end defopt
@defvar abbrevs-changed
! This variable is set address@hidden by defining or altering any
! abbrevs (except ``system'' abbrevs). This serves as a flag for
! various Emacs commands to offer to save your abbrevs.
@end defvar
@deffn Command write-abbrev-file &optional filename
! Save all abbrev definitions (except ``system'' abbrevs), in all abbrev
! tables, in the file @var{filename}, in the form of a Lisp program that
! when loaded will define the same abbrevs. If @var{filename} is
! @code{nil} or omitted, @code{abbrev-file-name} is used. This function
! returns @code{nil}.
@end deffn
@node Abbrev Expansion, Standard Abbrev Tables, Abbrev Files, Abbrevs
- [Emacs-diffs] Changes to emacs/lispref/abbrevs.texi,
Richard M. Stallman <=