# HG changeset patch # User Dave Love # Date 1043354259 0 # Node ID 7c5f68b0dbd30c6564e800dcbf795725aafc8fab # Parent 9bdb294eeb4076dc2645c26082abd8b6982ce685 (write-abbrev-file): Simplify, and put a coding cookie in the file. diff -r 9bdb294eeb40 -r 7c5f68b0dbd3 lisp/abbrev.el --- 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.