Avoid failing to entirely overwrite abbrev file
This can happen when the current buffer is smaller than the existing content when a numerical APPEND argument to write-region.
This commit is contained in:
parent
9357cbb0fe
commit
44e3a693da
|
@ -4310,7 +4310,7 @@ Also set it as a parent of `global-abbrev-table'."
|
|||
(setq coding-system-for-write 'utf-8-emacs))
|
||||
(goto-char (point-min))
|
||||
(insert (format ";;-*-coding: %s;-*-\n\n" coding-system-for-write))
|
||||
(write-region nil nil autocorrect-abbrev-file 0)))
|
||||
(write-region nil nil autocorrect-abbrev-file)))
|
||||
(setq autocorrect-abbrev-table--saved-version
|
||||
(abbrev-table-get autocorrect-abbrev-table
|
||||
:abbrev-table-modiff))))
|
||||
|
|
Loading…
Reference in New Issue