summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-01-27 12:07:49 +0000
committerGerd Moellmann <gerd@gnu.org>2001-01-27 12:07:49 +0000
commit8dc5c94d1dccd886636c8cb61ee93bb8ee6d6a6a (patch)
treee0e6bb7fd78fc4caa8b3f945bada54d34f8a4add /lisp
parentc4e39bddb4187cbf04b1e3221a555edd354267a8 (diff)
downloademacs-8dc5c94d1dccd886636c8cb61ee93bb8ee6d6a6a.tar.gz
(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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/dabbrev.el8
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 @@
+2001-01-27 Richard M. Stallman <rms@caffeine.ai.mit.edu>
+
+ * dabbrev.el (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.
+
2001-01-27 Eli Zaretskii <eliz@is.elta.co.il>
* 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 @@
;;; dabbrev.el --- dynamic abbreviation package
-;; Copyright (C) 1985, 86, 92, 94, 96, 1997, 2000
+;; Copyright (C) 1985, 86, 92, 94, 96, 1997, 2000, 2001
;; Free Software Foundation, Inc.
;; Author: Don Morrison
@@ -835,11 +835,15 @@ to record whether we upcased the expansion, downcased it, or did neither."
;; matches the start of the expansion,
;; copy the expansion's case
;; instead of downcasing all the rest.
+ ;; 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.
(let ((expansion-rest (substring expansion 1)))
(if (and (not (and (or (string= expansion-rest (downcase expansion-rest))
(string= expansion-rest (upcase expansion-rest)))
(or (string= abbrev (downcase abbrev))
- (string= abbrev (upcase abbrev)))))
+ (and (string= abbrev (upcase abbrev))
+ (> (length abbrev) 1)))))
(string= abbrev
(substring expansion 0 (length abbrev))))
(setq use-case-replace nil)))