GNU bug report logs -
#5937
23.1.95; why saving empty abbrev tables
Previous Next
Reported by: Leo <sdl.web <at> gmail.com>
Date: Mon, 12 Apr 2010 15:24:02 UTC
Severity: minor
Fixed in version 24.1
Done: Leo <sdl.web <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> +(defun abbrev-save-buffer ()
>> + "Save all user-level abbrev definitions in current buffer.
>> +The saved abbrevs are written to the file specified by
>> +`abbrev-file-name'."
>> + (interactive)
>> + (and (derived-mode-p 'edit-abbrevs-mode)
>> + (edit-abbrevs-redefine))
No need for the derived-mode-p check. But this reminds me: the name
should include "edit" (e.g. abbrev-edit-save-buffer) to make it clear
that it's about edit-abbrevs.
>> +(defun abbrev-save-to-file (file)
Same here.
>> + "Save all user-level abbrev definitions in current buffer to FILE."
>> + (interactive
>> + (list (read-file-name "Save abbrevs to file: "
>> + (file-name-directory
>> + (expand-file-name abbrev-file-name))
>> + abbrev-file-name)))
>> + (and (derived-mode-p 'edit-abbrevs-mode)
>> + (edit-abbrevs-redefine))
>> + (write-abbrev-file file t))
> Should define abbrev-save-buffer as:
> (defun abbrev-save-buffer ()
> "Save all user-level abbrev definitions in current buffer.
> The saved abbrevs are written to the file specified by
> `abbrev-file-name'."
> (interactive)
> (abbrev-save-to-file abbrev-file-name))
Yes, that sounds like a good idea.
Stefan
This bug report was last modified 14 years and 116 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.