From a166f62348a238784ee49b6a1ce51094553178da Mon Sep 17 00:00:00 2001 From: Dave Love Date: Thu, 23 Jan 2003 20:37:49 +0000 Subject: (write-abbrev-file): Simplify, and put a coding cookie in the file. --- lisp/ChangeLog | 5 +++++ lisp/abbrev.el | 14 +++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c052e0806b..6dd1382975 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2003-01-23 Dave Love + + * abbrev.el (write-abbrev-file): Simplify, and put a coding cookie + in the file. + 2003-01-23 Masatake YAMATO * progmodes/asm-mode.el (asm-mode): Added syntax table entries for diff --git a/lisp/abbrev.el b/lisp/abbrev.el index a73c8e0fe8..8d9b762512 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. -- cgit v1.2.3