aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorAllen Li2017-12-31 20:33:21 -0800
committerEli Zaretskii2018-09-29 10:27:11 +0300
commit3bbe9e609138ae88a4c98bcee0da8fcf8b4a3e80 (patch)
treedddace7db216a1ca095fc3ebfd19c5935818c16e /doc
parent48ff4c0b2f78f1812fa12e3a56ee5f2a0bc712f7 (diff)
downloademacs-3bbe9e609138ae88a4c98bcee0da8fcf8b4a3e80.tar.gz
emacs-3bbe9e609138ae88a4c98bcee0da8fcf8b4a3e80.zip
Avoid writing empty abbrev tables
Fixes bug#29923 'insert-abbrev-table-description' with a non-nil READABLE inserts Lisp forms suitable for evaluation to restore the defined abbrevs. We don't have to insert a form for tables that do not have any abbrevs. To implement this, we need to filter out system abbrevs before checking if a table is empty, because system abbrevs were previously skipped in the 'abbrev--write' call, at which point we would already have started inserting the beginning of a table definition form. * lisp/abbrev.el (insert-abbrev-table-description): Skip inserting empty tables when READABLE is non-nil. Clarify behavior in documentation string. (abbrev--write): Remove system abbrev check. * doc/lispref/abbrevs.texi (Abbrev Tables): Document behavior with empty tables. * etc/NEWS: Mention the change in behavior of 'insert-abbrev-table-description'.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/abbrevs.texi4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/lispref/abbrevs.texi b/doc/lispref/abbrevs.texi
index 087e6945203..4c9e653cb19 100644
--- a/doc/lispref/abbrevs.texi
+++ b/doc/lispref/abbrevs.texi
@@ -122,7 +122,9 @@ System abbrevs are listed and identified as such. Otherwise the
122description is a Lisp expression---a call to @code{define-abbrev-table} 122description is a Lisp expression---a call to @code{define-abbrev-table}
123that would define @var{name} as it is currently defined, but without 123that would define @var{name} as it is currently defined, but without
124the system abbrevs. (The mode or package using @var{name} is supposed 124the system abbrevs. (The mode or package using @var{name} is supposed
125to add these to @var{name} separately.) 125to add these to @var{name} separately.) If the Lisp expression would
126not define any abbrevs (i.e.@: it defines an empty abbrev table), this
127function inserts nothing.
126@end defun 128@end defun
127 129
128@node Defining Abbrevs 130@node Defining Abbrevs