diff options
author | Dave Love <fx@gnu.org> | 2003-01-23 20:37:39 +0000 |
---|---|---|
committer | Dave Love <fx@gnu.org> | 2003-01-23 20:37:39 +0000 |
commit | 2089d187f11d9d82ded2587436058ec5a22e9b4b (patch) | |
tree | e1293dfb6feb9c28f58cff709eba1c5f6209aa61 /lisp/abbrev.el | |
parent | eaa803715fb48a9168c2578fee0a1ac2d92b56cf (diff) | |
download | emacs-2089d187f11d9d82ded2587436058ec5a22e9b4b.tar.gz |
(write-abbrev-file): Simplify, and put a coding cookie
in the file.
Diffstat (limited to 'lisp/abbrev.el')
-rw-r--r-- | lisp/abbrev.el | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lisp/abbrev.el b/lisp/abbrev.el index a73c8e0fe8d..8d9b7625128 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -212,15 +212,11 @@ The argument FILE is the file name to write." abbrev-file-name))) (or (and file (> (length file) 0)) (setq file abbrev-file-name)) - (save-excursion - (set-buffer (get-buffer-create " write-abbrev-file")) - (erase-buffer) - (let ((tables abbrev-table-name-list)) - (while tables - (insert-abbrev-table-description (car tables) nil) - (setq tables (cdr tables)))) - (write-region (point-min) (point-max) file) - (erase-buffer))) + (let ((coding-system-for-write 'emacs-mule)) + (with-temp-file file + (insert ";;-*-coding: emacs-mule;-*-\n") + (dolist (table abbrev-table-name-list) + (insert-abbrev-table-description table nil))))) (defun add-mode-abbrev (arg) "Define mode-specific abbrev for last word(s) before point. |