[PATCH] xemacs-21.5-clean: Downcase words in `expand-region-abbrevs' before lookup, like other functions do

Adrian Aichner adrian at xemacs.org
Mon May 28 18:58:06 EDT 2007


I'd like to suggest following harmonizing change.

It still leaves the issue of making expansion case depend on case of
abbreviation expanded.

Might be worth the bring abbrev case handling in line with the
seemingly superior handling of case in dabbrev.

Suggestions from heavy d?abbreviation users?

Adrian

xemacs-21.5-clean ChangeLog patch:
Diff command:   cvs -q diff -U 0
Files affected: lisp/ChangeLog

Index: lisp/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/ChangeLog,v
retrieving revision 1.802
diff -u -U0 -r1.802 ChangeLog
--- lisp/ChangeLog	25 May 2007 15:47:55 -0000	1.802
+++ lisp/ChangeLog	28 May 2007 22:57:12 -0000
@@ -0,0 +1,7 @@
+2007-05-29  Adrian Aichner  <adrian at xemacs.org>
+
+	* abbrev.el (expand-region-abbrevs): Downcase word before
+	abbreviation lookup, since `inverse-add-abbrev', `add-abbrev',
+	`define-mode-abbrev', and `define-global-abbrev' also downcase to
+	normalize abbreviations.
+

xemacs-21.5-clean source patch:
Diff command:   cvs -f -z3 -q diff -u -w -N
Files affected: lisp/abbrev.el
===================================================================
RCS

Index: lisp/abbrev.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/abbrev.el,v
retrieving revision 1.7
diff -u -w -r1.7 abbrev.el
--- lisp/abbrev.el	19 May 2007 18:41:59 -0000	1.7
+++ lisp/abbrev.el	28 May 2007 22:49:18 -0000
@@ -582,9 +582,9 @@
 			 (<= (setq pnt (point)) (- (point-max) lim))))
 	(if (abbrev-expansion
 	     (setq string
-		   (buffer-substring
+		   (downcase (buffer-substring
 		    (save-excursion (backward-word) (point))
-		    pnt)))
+			      pnt))))
 	    (if (or noquery (y-or-n-p (format "Expand `%s'? " string)))
 		(expand-abbrev)))))))
 

-- 
Adrian Aichner
 mailto:adrian at xemacs.org
 http://www.xemacs.org/



More information about the XEmacs-Patches mailing list