diff options
| author | Richard M. Stallman | 1995-10-20 20:30:22 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-10-20 20:30:22 +0000 |
| commit | 3132e11599f4b3792f1a0dfebf91a1d52422160e (patch) | |
| tree | 168269f287536e04387f2c14a4961e91308b4cf1 | |
| parent | 6dfa1d83fd3c647784d41c7561848daec5ddb29a (diff) | |
| download | emacs-3132e11599f4b3792f1a0dfebf91a1d52422160e.tar.gz emacs-3132e11599f4b3792f1a0dfebf91a1d52422160e.zip | |
(dabbrev-expand): When no more expansions,
Put back the original abbrev with its original case pattern.
| -rw-r--r-- | lisp/dabbrev.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el index a28c9023571..8dbe0629239 100644 --- a/lisp/dabbrev.el +++ b/lisp/dabbrev.el | |||
| @@ -490,8 +490,10 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]." | |||
| 490 | (if old | 490 | (if old |
| 491 | (save-excursion | 491 | (save-excursion |
| 492 | (setq buffer-undo-list (cons orig-point buffer-undo-list)) | 492 | (setq buffer-undo-list (cons orig-point buffer-undo-list)) |
| 493 | (search-backward (substring old (length abbrev))) | 493 | ;; Put back the original abbrev with its original case pattern. |
| 494 | (delete-region (match-beginning 0) (match-end 0)))) | 494 | (search-backward old) |
| 495 | (insert abbrev) | ||
| 496 | (delete-region (point) (+ (point) (length old))))) | ||
| 495 | (error "No%s dynamic expansion for `%s' found" | 497 | (error "No%s dynamic expansion for `%s' found" |
| 496 | (if old " further" "") abbrev)) | 498 | (if old " further" "") abbrev)) |
| 497 | (t | 499 | (t |