[COMMIT] Interpret @cyrillic as a locale modifier, pick up coding-sys aliases

Aidan Kehoe kehoea at parhasard.net
Mon Jul 23 10:22:58 EDT 2007


APPROVE COMMIT

NOTE: This patch has been committed.

lisp/ChangeLog addition:

2007-07-23  Aidan Kehoe  <kehoea at parhasard.net>

	* mule/general-late.el (posix-charset-to-coding-system-hash):
	Pick up coding system aliases as well as their canonical names
	when initialising this hash. 
	* mule/mule-cmds.el (parse-posix-locale-string):
	Interpret @cyrillic to mean that the coding system for a language
	environment is Windows-1251. 


src/ChangeLog addition:

2007-07-23  Aidan Kehoe  <kehoea at parhasard.net>

	* text.c:
	Backslash a parenthesis at the start of a line, for the sake of
	our font lock engine. 


XEmacs Trunk source patch:
Diff command:   cvs -q diff -u
Files affected: src/text.c
===================================================================
RCS lisp/mule/mule-cmds.el
===================================================================
RCS lisp/mule/general-late.el
===================================================================
RCS

Index: lisp/mule/general-late.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/mule/general-late.el,v
retrieving revision 1.2
diff -u -r1.2 general-late.el
--- lisp/mule/general-late.el	2006/12/29 18:09:46	1.2
+++ lisp/mule/general-late.el	2007/07/23 14:15:22
@@ -31,13 +31,16 @@
 (setq posix-charset-to-coding-system-hash
       (eval-when-compile
 	(let ((res (make-hash-table :test 'equal)))
-	  (dolist (coding-system (coding-system-list) res)
+	  ;; We want both normal and internal coding systems in order
+	  ;; to pick up coding system aliases.
+	  (dolist (coding-system (coding-system-list 'both-normal-and-internal) res)
 	    (setq coding-system
-		  (symbol-name (coding-system-name coding-system)))
-	    (unless (string-match #r"\(-unix\|-mac\|-dos\)$" coding-system)
+		  (symbol-name coding-system))
+	    (unless (or (string-match #r"\(-unix\|-mac\|-dos\)$" coding-system)
+			(string-match #r"^\(internal\|mswindows\)" coding-system))
 	      (puthash 
 	       (replace-in-string (downcase coding-system) "[^a-z0-9]" "")
-	       (intern coding-system) res)))))
+	       (coding-system-name (intern coding-system)) res)))))
 
       ;; In a thoughtless act of cultural imperialism, move English, German
       ;; and Japanese to the front of language-info-alist to make start-up a
Index: lisp/mule/mule-cmds.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/mule/mule-cmds.el,v
retrieving revision 1.32
diff -u -r1.32 mule-cmds.el
--- lisp/mule/mule-cmds.el	2007/06/03 17:32:38	1.32
+++ lisp/mule/mule-cmds.el	2007/07/23 14:15:23
@@ -1053,6 +1053,9 @@
 	     ;; where the @euro modifier doesn't mean ISO-8859-15 in the 956
 	     ;; I have.
 	     (setq charset "iso-8859-15"))
+	   (when (and modifiers (equal modifiers "cyrillic") (null charset))
+	     ;; Feedback wanted!
+	     (setq charset "windows-1251"))
 	   (values language region charset modifiers))
 	  ((and (string-match "^[a-z0-9]+$" locale-string)
 		(assoc-ignore-case locale-string language-info-alist))
Index: src/text.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/text.c,v
retrieving revision 1.30
diff -u -r1.30 text.c
--- src/text.c	2006/12/06 21:28:54	1.30
+++ src/text.c	2007/07/23 14:15:24
@@ -245,7 +245,7 @@
 @item
 The Eistring API
 
-(This API is currently under-used) When doing simple things with
+\(This API is currently under-used) When doing simple things with
 internal text, the basic internal-format API's are enough.  But to do
 things like delete or replace a substring, concatenate various strings,
 etc. is difficult to do cleanly because of the allocation issues.

-- 
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)



More information about the XEmacs-Patches mailing list