aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorAllen Li2018-09-29 15:19:04 -0700
committerEli Zaretskii2018-10-12 11:44:15 +0300
commitf5896e2cbf0e537ec6b79ba139220239f934c840 (patch)
tree51604349e1190449caf75043d689694a84212441 /etc
parent5bd8cfc14d4b0c78c07e65a583f42a10c4cbc06d (diff)
downloademacs-f5896e2cbf0e537ec6b79ba139220239f934c840.tar.gz
emacs-f5896e2cbf0e537ec6b79ba139220239f934c840.zip
Rework empty abbrev table omitting
There were two problems with the original implementation: 1. It changed the behavior of insert-abbrev-table-description when READABLE is nil to sometimes insert one Emacs Lisp expression and sometimes insert nothing. 2. It broke the tests. This commit reworks this so that insert-abbrev-table-description always inserts an expressions even if no abbrevs need to be saved and making only write-abbrev-file check that a table has any abbrevs to save before calling insert-abbrev-table-description. This duplicates the work of filtering the table for savable abbrevs, but the benefit of keeping the API is worth it. * doc/lispref/abbrevs.texi (Abbrev Tables): Update documentation. * lisp/abbrev.el (write-abbrev-file): Skip tables without user abbrevs (insert-abbrev-table-description): Always insert the define expression. (abbrev--table-symbols): New function. * test/lisp/abbrev-tests.el (abbrev--table-symbols-test): Add test for abbrev--table-symbols.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS7
1 files changed, 3 insertions, 4 deletions
diff --git a/etc/NEWS b/etc/NEWS
index ee74e86f40f..946a823173a 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -258,10 +258,9 @@ case does not match.
258for abbrevs that have them. 258for abbrevs that have them.
259 259
260+++ 260+++
261** 'insert-abbrev-table-description' skips empty tables. 261** 'write-abbrev-file' skips empty tables.
262'insert-abbrev-table-description' skips inserting empty tables when 262'write-abbrev-file' now skips inserting a 'define-abbrev-table' form for
263inserting non-readable tables. By extension, this makes 263tables which do not have any non-system abbrevs to save.
264'write-abbrev-file' skip writing empty tables.
265 264
266+++ 265+++
267** The new functions and commands 'text-property-search-forward' and 266** The new functions and commands 'text-property-search-forward' and