Mercurial > emacs
changeset 49405:7c5f68b0dbd3
(write-abbrev-file): Simplify, and put a coding cookie
in the file.
author | Dave Love <fx@gnu.org> |
---|---|
date | Thu, 23 Jan 2003 20:37:39 +0000 |
parents | 9bdb294eeb40 |
children | 9cc8820a113e |
files | lisp/abbrev.el |
diffstat | 1 files changed, 5 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/abbrev.el Thu Jan 23 11:49:05 2003 +0000 +++ b/lisp/abbrev.el Thu Jan 23 20:37:39 2003 +0000 @@ -212,15 +212,11 @@ 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.