diff options
| author | Richard M. Stallman | 2006-04-18 21:16:13 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-04-18 21:16:13 +0000 |
| commit | 4cabf12bbc89a8f7370ca4c670a73de4cef61687 (patch) | |
| tree | a0bfcba79bdb4cc9ecb790b5c8c12493723c13f1 | |
| parent | 8a1aafd01a88cda0df0873d3772487e2b0123769 (diff) | |
| download | emacs-4cabf12bbc89a8f7370ca4c670a73de4cef61687.tar.gz emacs-4cabf12bbc89a8f7370ca4c670a73de4cef61687.zip | |
(edit-abbrevs-redefine): Temporarily widen.
(read-abbrev-file): Provide default when reading filename.
| -rw-r--r-- | lisp/abbrev.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/abbrev.el b/lisp/abbrev.el index d7bce2b313a..0c9cdfa2228 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el | |||
| @@ -160,8 +160,10 @@ or may be omitted (it is usually omitted)." | |||
| 160 | (defun edit-abbrevs-redefine () | 160 | (defun edit-abbrevs-redefine () |
| 161 | "Redefine abbrevs according to current buffer contents." | 161 | "Redefine abbrevs according to current buffer contents." |
| 162 | (interactive) | 162 | (interactive) |
| 163 | (define-abbrevs t) | 163 | (save-restriction |
| 164 | (set-buffer-modified-p nil)) | 164 | (widen) |
| 165 | (define-abbrevs t) | ||
| 166 | (set-buffer-modified-p nil))) | ||
| 165 | 167 | ||
| 166 | (defun define-abbrevs (&optional arg) | 168 | (defun define-abbrevs (&optional arg) |
| 167 | "Define abbrevs according to current visible buffer contents. | 169 | "Define abbrevs according to current visible buffer contents. |
| @@ -195,9 +197,12 @@ the ones defined from the buffer now." | |||
| 195 | Optional argument FILE is the name of the file to read; | 197 | Optional argument FILE is the name of the file to read; |
| 196 | it defaults to the value of `abbrev-file-name'. | 198 | it defaults to the value of `abbrev-file-name'. |
| 197 | Optional second argument QUIETLY non-nil means don't display a message." | 199 | Optional second argument QUIETLY non-nil means don't display a message." |
| 198 | (interactive "fRead abbrev file: ") | 200 | (interactive |
| 199 | (load (if (and file (> (length file) 0)) file abbrev-file-name) | 201 | (list |
| 200 | nil quietly) | 202 | (read-file-name (format "Read abbrev file (default %s): " |
| 203 | abbrev-file-name) | ||
| 204 | nil abbrev-file-name t))) | ||
| 205 | (load file nil quietly) | ||
| 201 | (setq abbrevs-changed nil)) | 206 | (setq abbrevs-changed nil)) |
| 202 | 207 | ||
| 203 | (defun quietly-read-abbrev-file (&optional file) | 208 | (defun quietly-read-abbrev-file (&optional file) |