diff options
| author | Allen Li | 2017-12-31 20:33:21 -0800 |
|---|---|---|
| committer | Eli Zaretskii | 2018-09-29 10:27:11 +0300 |
| commit | 3bbe9e609138ae88a4c98bcee0da8fcf8b4a3e80 (patch) | |
| tree | dddace7db216a1ca095fc3ebfd19c5935818c16e /etc | |
| parent | 48ff4c0b2f78f1812fa12e3a56ee5f2a0bc712f7 (diff) | |
| download | emacs-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 'etc')
| -rw-r--r-- | etc/NEWS | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -247,6 +247,12 @@ case does not match. | |||
| 247 | for abbrevs that have them. | 247 | for abbrevs that have them. |
| 248 | 248 | ||
| 249 | +++ | 249 | +++ |
| 250 | ** 'insert-abbrev-table-description' skips empty tables. | ||
| 251 | 'insert-abbrev-table-description' skips inserting empty tables when | ||
| 252 | inserting non-readable tables. By extension, this makes | ||
| 253 | 'write-abbrev-file' skip writing empty tables. | ||
| 254 | |||
| 255 | +++ | ||
| 250 | ** The new functions and commands 'text-property-search-forward' and | 256 | ** The new functions and commands 'text-property-search-forward' and |
| 251 | 'text-property-search-backward' have been added. These provide an | 257 | 'text-property-search-backward' have been added. These provide an |
| 252 | interface that's more like functions like @code{search-forward}. | 258 | interface that's more like functions like @code{search-forward}. |