aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2003-01-23 20:37:49 +0000
committerDave Love2003-01-23 20:37:49 +0000
commita166f62348a238784ee49b6a1ce51094553178da (patch)
tree1a7453ccda272ed5e660f6bac1a222df08265184
parentceb39a179821a83e099f8b8d9c1421dc96a7bc53 (diff)
downloademacs-a166f62348a238784ee49b6a1ce51094553178da.tar.gz
emacs-a166f62348a238784ee49b6a1ce51094553178da.zip
(write-abbrev-file): Simplify, and put a coding cookie
in the file.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/abbrev.el14
2 files changed, 10 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c052e0806b6..6dd1382975c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12003-01-23 Dave Love <fx@gnu.org>
2
3 * abbrev.el (write-abbrev-file): Simplify, and put a coding cookie
4 in the file.
5
12003-01-23 Masatake YAMATO <jet@gyve.org> 62003-01-23 Masatake YAMATO <jet@gyve.org>
2 7
3 * progmodes/asm-mode.el (asm-mode): Added syntax table entries for 8 * progmodes/asm-mode.el (asm-mode): Added syntax table entries for
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."
212 abbrev-file-name))) 212 abbrev-file-name)))
213 (or (and file (> (length file) 0)) 213 (or (and file (> (length file) 0))
214 (setq file abbrev-file-name)) 214 (setq file abbrev-file-name))
215 (save-excursion 215 (let ((coding-system-for-write 'emacs-mule))
216 (set-buffer (get-buffer-create " write-abbrev-file")) 216 (with-temp-file file
217 (erase-buffer) 217 (insert ";;-*-coding: emacs-mule;-*-\n")
218 (let ((tables abbrev-table-name-list)) 218 (dolist (table abbrev-table-name-list)
219 (while tables 219 (insert-abbrev-table-description table nil)))))
220 (insert-abbrev-table-description (car tables) nil)
221 (setq tables (cdr tables))))
222 (write-region (point-min) (point-max) file)
223 (erase-buffer)))
224 220
225(defun add-mode-abbrev (arg) 221(defun add-mode-abbrev (arg)
226 "Define mode-specific abbrev for last word(s) before point. 222 "Define mode-specific abbrev for last word(s) before point.