changeset 70091:4427f1e01f3e

(edit-abbrevs-redefine): Temporarily widen. (read-abbrev-file): Provide default when reading filename.
author Richard M. Stallman <rms@gnu.org>
date Tue, 18 Apr 2006 21:16:13 +0000
parents 67a078792729
children e08e964839f4
files lisp/abbrev.el
diffstat 1 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/abbrev.el	Tue Apr 18 21:10:14 2006 +0000
+++ b/lisp/abbrev.el	Tue Apr 18 21:16:13 2006 +0000
@@ -160,8 +160,10 @@
 (defun edit-abbrevs-redefine ()
   "Redefine abbrevs according to current buffer contents."
   (interactive)
-  (define-abbrevs t)
-  (set-buffer-modified-p nil))
+  (save-restriction
+    (widen)
+    (define-abbrevs t)
+    (set-buffer-modified-p nil)))
 
 (defun define-abbrevs (&optional arg)
   "Define abbrevs according to current visible buffer contents.
@@ -195,9 +197,12 @@
 Optional argument FILE is the name of the file to read;
 it defaults to the value of `abbrev-file-name'.
 Optional second argument QUIETLY non-nil means don't display a message."
-  (interactive "fRead abbrev file: ")
-  (load (if (and file (> (length file) 0)) file abbrev-file-name)
-	nil quietly)
+  (interactive
+   (list
+    (read-file-name (format "Read abbrev file (default %s): "
+			    abbrev-file-name)
+		    nil abbrev-file-name t)))
+  (load file nil quietly)
   (setq abbrevs-changed nil))
 
 (defun quietly-read-abbrev-file (&optional file)