diff options
| author | Gerd Moellmann | 2001-01-27 12:07:49 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-01-27 12:07:49 +0000 |
| commit | 8dc5c94d1dccd886636c8cb61ee93bb8ee6d6a6a (patch) | |
| tree | e0e6bb7fd78fc4caa8b3f945bada54d34f8a4add | |
| parent | c4e39bddb4187cbf04b1e3221a555edd354267a8 (diff) | |
| download | emacs-8dc5c94d1dccd886636c8cb61ee93bb8ee6d6a6a.tar.gz emacs-8dc5c94d1dccd886636c8cb61ee93bb8ee6d6a6a.zip | |
(dabbrev--substitute-expansion):
Treat a one-capital-letter abbrev as "not all upper case",
so as to force preservation of the expansion's pattern
if the expansion starts with a capital letter.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/dabbrev.el | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 076b10bbec0..e14eeea3f8d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2001-01-27 Richard M. Stallman <rms@caffeine.ai.mit.edu> | ||
| 2 | |||
| 3 | * dabbrev.el (dabbrev--substitute-expansion): | ||
| 4 | Treat a one-capital-letter abbrev as "not all upper case", | ||
| 5 | so as to force preservation of the expansion's pattern | ||
| 6 | if the expansion starts with a capital letter. | ||
| 7 | |||
| 1 | 2001-01-27 Eli Zaretskii <eliz@is.elta.co.il> | 8 | 2001-01-27 Eli Zaretskii <eliz@is.elta.co.il> |
| 2 | 9 | ||
| 3 | * facemenu.el (facemenu-set-face, facemenu-set-face-from-menu): | 10 | * facemenu.el (facemenu-set-face, facemenu-set-face-from-menu): |
diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el index 42e370a7b87..cfcc1fa365c 100644 --- a/lisp/dabbrev.el +++ b/lisp/dabbrev.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; dabbrev.el --- dynamic abbreviation package | 1 | ;;; dabbrev.el --- dynamic abbreviation package |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 86, 92, 94, 96, 1997, 2000 | 3 | ;; Copyright (C) 1985, 86, 92, 94, 96, 1997, 2000, 2001 |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Don Morrison | 6 | ;; Author: Don Morrison |
| @@ -835,11 +835,15 @@ to record whether we upcased the expansion, downcased it, or did neither." | |||
| 835 | ;; matches the start of the expansion, | 835 | ;; matches the start of the expansion, |
| 836 | ;; copy the expansion's case | 836 | ;; copy the expansion's case |
| 837 | ;; instead of downcasing all the rest. | 837 | ;; instead of downcasing all the rest. |
| 838 | ;; Treat a one-capital-letter abbrev as "not all upper case", | ||
| 839 | ;; so as to force preservation of the expansion's pattern | ||
| 840 | ;; if the expansion starts with a capital letter. | ||
| 838 | (let ((expansion-rest (substring expansion 1))) | 841 | (let ((expansion-rest (substring expansion 1))) |
| 839 | (if (and (not (and (or (string= expansion-rest (downcase expansion-rest)) | 842 | (if (and (not (and (or (string= expansion-rest (downcase expansion-rest)) |
| 840 | (string= expansion-rest (upcase expansion-rest))) | 843 | (string= expansion-rest (upcase expansion-rest))) |
| 841 | (or (string= abbrev (downcase abbrev)) | 844 | (or (string= abbrev (downcase abbrev)) |
| 842 | (string= abbrev (upcase abbrev))))) | 845 | (and (string= abbrev (upcase abbrev)) |
| 846 | (> (length abbrev) 1))))) | ||
| 843 | (string= abbrev | 847 | (string= abbrev |
| 844 | (substring expansion 0 (length abbrev)))) | 848 | (substring expansion 0 (length abbrev)))) |
| 845 | (setq use-case-replace nil))) | 849 | (setq use-case-replace nil))) |