-
Allen Li authored
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.
f5896e2c