This should avoid the query-coding-region trunk test failures on Unix. It
will also avoid "cl-macs" being loaded needlessly on every single start for
those with this package installed; check for this with (assoc "cl-macs"
load-history). It should give nil on a -vanilla start, at the moment you
need a -no-autoloads start for this.
APPROVE COMMIT
NOTE: This patch has been committed.
mule-packages/latin-euro-standards/ChangeLog addition:
2009-07-21 Aidan Kehoe <kehoea(a)parhasard.net>
* latin-euro-latin10.el (find-charset):
Stop pretending to support versions < 21.4.
Stop loading cl-macs from this file (and hence, from
auto-autoloads.elc), it's needed at compile time, not run time.
Move to loop syntax instead of mapc + lambda.
Avoid some needless version workarounds.
* latin-euro-latin7.el (latin-euro-recognize-safe-charsets):
New variable, describing whether this XEmacs supports the
`safe-charsets' #'make-coding-system parameter.
* latin-euro-latin7.el (find-charset):
Same approach as in -latin10.el, no support for < 21.4; no
explicit load of cl-macs, loop syntax instead of mapc + lambda,
avoid needless version workarounds.
* latin-euro-latin7.el (find-coding-system):
Specify the `safe-charsets' parameter if we can, avoiding test
`query-coding-region' test failures in the trunk.
Avoid some needless compatibility measures.
* latin-euro-latin8.el:
Same work as in `latin-euro-latin7.el'
XEmacs Packages (existing ChangeLogs) source patch:
Diff command: cvs -q diff -Nu
Files affected: mule-packages/latin-euro-standards/latin-euro-latin9.el
mule-packages/latin-euro-standards/latin-euro-latin8.el
mule-packages/latin-euro-standards/latin-euro-latin7.el
mule-packages/latin-euro-standards/latin-euro-latin10.el
Index: mule-packages/latin-euro-standards/latin-euro-latin10.el
===================================================================
RCS file:
/pack/xemacscvs/XEmacs/packages/mule-packages/latin-euro-standards/latin-euro-latin10.el,v
retrieving revision 1.1
diff -u -r1.1 latin-euro-latin10.el
--- mule-packages/latin-euro-standards/latin-euro-latin10.el 2005/02/14 23:37:54 1.1
+++ mule-packages/latin-euro-standards/latin-euro-latin10.el 2009/07/21 16:02:21
@@ -38,34 +38,26 @@
;; Create character set
(make-charset
'latin-iso8859-16 "ISO8859-16 (Latin 10)"
- ;; sheesh, what we do for backward compatibility
- ;; #### this test and the similar one below probably should be
- ;; reformulated to use condition-case
- (append (if (emacs-version>= 21 4)
- '(short-name "Latin-10"
- long-name "ISO8859-16 (Latin 10)")
- nil)
- '(registry "iso8859-16"
- dimension 1
- columns 1
- chars 96
- final ?f ; octet 06/06; cf ISO-IR 226
- graphic 1
- direction l2r)))
+ '(short-name "Latin-10"
+ long-name "ISO8859-16 (Latin 10)"
+ registry "iso8859-16"
+ dimension 1
+ columns 1
+ chars 96
+ final ?f ; octet 06/06; cf ISO-IR 226
+ graphic 1
+ direction l2r))
;; For syntax of Latin-10 characters.
- (require 'cl)
- (load "cl-macs" nil t)
(loop for c from 64 to 127
do (modify-syntax-entry (make-char 'latin-iso8859-16 c) "w"))
- (mapc (lambda (c)
- (modify-syntax-entry (make-char 'latin-iso8859-16 c) "w"))
- '(#xA1 #xA2 #xA3 #xA6 #xA8 #xAA #xAC #xAE #xAF
- #xB3 #xB4 #xB5 #xB8 #xB9 #xBA #xBC #xBD #xBE #xBF))
- )
+ (loop for c in '(#xA1 #xA2 #xA3 #xA6 #xA8 #xAA #xAC #xAE #xAF
+ #xB3 #xB4 #xB5 #xB8 #xB9 #xBA #xBC #xBD #xBE #xBF)
+ do (modify-syntax-entry (make-char 'latin-iso8859-16 c) "w")))
;;;###autoload
(unless (find-coding-system 'iso-8859-16)
- ;; Create coding system
+ ;; Create coding system. No need for a `safe-charsets' parameter, if an
+ ;; XEmacs can handle that, it has this coding system built in.
(make-coding-system
'iso-8859-16 'iso2022 "MIME ISO-8859-16"
'(charset-g0 ascii
@@ -82,26 +74,23 @@
(set-language-environment "Latin-10"))
;; sheesh, what we do for backward compatibility
- (apply #'set-language-info-alist
- (append `("Latin-10"
- ((charset ascii latin-iso8859-16)
- (coding-system iso-8859-16)
- (coding-priority iso-8859-16)
- (input-method . "latin-10-prefix")
- (sample-text
- .
- ;; #### OK, who knows some Romanian?
- ,(format "\
+ (set-language-info-alist
+ "Latin-10"
+ `((charset ascii latin-iso8859-16)
+ (coding-system iso-8859-16)
+ (coding-priority iso-8859-16)
+ (input-method . "latin-10-prefix")
+ (sample-text .
+ ;; #### OK, who knows some Romanian?
+ ,(format "\
Hey, if you know Romanian, send sample encoded text (eg, using \"comma-below\"
characters) to xemacs-beta(a)xemacs.org. Please use a MIME
application/octet-stream attachment if possible."
- ))
- (documentation . "\
+ ))
+ (documentation . "\
This is a generic language environment for Latin-10 (ISO-8859-16). It
-supports Romanian and most Western European languages.")))
- (if (emacs-version>= 21 1 15)
- '(("European"))
- nil))))
+supports Romanian and most Western European languages."))
+ '("European")))
(provide 'latin-euro-latin10)
Index: mule-packages/latin-euro-standards/latin-euro-latin7.el
===================================================================
RCS file:
/pack/xemacscvs/XEmacs/packages/mule-packages/latin-euro-standards/latin-euro-latin7.el,v
retrieving revision 1.1
diff -u -r1.1 latin-euro-latin7.el
--- mule-packages/latin-euro-standards/latin-euro-latin7.el 2005/02/14 23:37:54 1.1
+++ mule-packages/latin-euro-standards/latin-euro-latin7.el 2009/07/21 16:02:21
@@ -32,99 +32,93 @@
;;; Code:
+(defvar latin-euro-recognize-safe-charsets
+ (condition-case nil
+ (progn
+ (coding-system-property (find-coding-system 'iso-8859-1-unix)
+ 'safe-charsets)
+ t)
+ (error nil))
+ "t if this XEmacs understands the `safe-charsets' coding-system
property.")
+
;; define ISO-8859-13 for XEmacs 21.4 and earlier
-; don't ;;;###autoload
(unless (find-charset 'latin-iso8859-13)
;; Create character set
(make-charset
'latin-iso8859-13 "ISO8859-13 (Latin 7)"
- ;; sheesh, what we do for backward compatibility
- ;; #### this test and the similar one below probably should be
- ;; reformulated to use condition-case
- (append (if (emacs-version>= 21 4)
- '(short-name "Latin-7"
- long-name "ISO8859-13 (Latin 7)")
- nil)
- '(registry "iso8859-13"
- dimension 1
- columns 1
- chars 96
- final ?Y
- graphic 1
- direction l2r)))
+ '(short-name "Latin-7"
+ long-name "ISO8859-13 (Latin 7)"
+ registry "iso8859-13"
+ dimension 1
+ columns 1
+ chars 96
+ final ?Y
+ graphic 1
+ direction l2r))
+
;; For syntax of Latin-7 characters.
- (require 'cl)
- (load "cl-macs" nil t) ; howcum no #'provide?
- (loop for c from 64 to 127 ; from '%Gø%@' to '%Gø¿%@'
+ (loop for c from 64 to 127 ; from ',A@(B' to ',A(B'
+ do (modify-syntax-entry (make-char 'latin-iso8859-13 c) "w"))
+ (loop for c in '(#xA8 #xAA #xAF #xB8 #xBA #xBF)
do (modify-syntax-entry (make-char 'latin-iso8859-13 c) "w"))
- (mapc (lambda (c)
- (modify-syntax-entry (make-char 'latin-iso8859-13 c) "w"))
- '(#xA8 #xAA #xAF #xB8 #xBA #xBF))
-
(modify-syntax-entry (make-char 'latin-iso8859-13 32) "w") ; no-break
space
(modify-syntax-entry (make-char 'latin-iso8859-13 87) "_") ; multiply
(modify-syntax-entry (make-char 'latin-iso8859-13 119) "_") ; divide
- (modify-syntax-entry (make-char 'latin-iso8859-13 127) ".") ; right
squote
- )
+ (modify-syntax-entry (make-char 'latin-iso8859-13 127) ".")) ; right
squote
-(defvar iso8859/13-case-table
- (let ((table (copy-case-table (standard-case-table))))
- (mapc (lambda (pair)
- (put-case-table-pair (make-char 'latin-iso8859-13 (car pair))
- (make-char 'latin-iso8859-13 (cdr pair))
- table))
- '((#xA8 . #xB8) (#xAA . #xBA) (#xAF . #xBF)))
- (let ((i #xC0))
- (while (< i #xDF)
- (unless (= i #xD7)
- (put-case-table-pair (make-char 'latin-iso8859-13 i)
- (make-char 'latin-iso8859-13 (+ i #x20))
- table))
- (setq i (1+ i))))
- table)
- "Case table for Latin 7, right half of ISO 8859/13.")
+(let ((table (standard-case-table)))
+ (mapc (lambda (pair)
+ (put-case-table-pair (make-char 'latin-iso8859-13 (car pair))
+ (make-char 'latin-iso8859-13 (cdr pair))
+ table))
+ '((#xA8 . #xB8) (#xAA . #xBA) (#xAF . #xBF)))
+ (let ((i #xC0))
+ (while (< i #xDF)
+ (unless (= i #xD7)
+ (put-case-table-pair (make-char 'latin-iso8859-13 i)
+ (make-char 'latin-iso8859-13 (+ i #x20))
+ table))
+ (setq i (1+ i)))))
-; don't ;;;###autoload
(unless (find-coding-system 'iso-8859-13)
;; Create coding system
(make-coding-system
'iso-8859-13 'iso2022 "MIME ISO-8859-13"
- '(charset-g0 ascii
+ `(charset-g0 ascii
charset-g1 latin-iso8859-13
charset-g2 t ; grrr
charset-g3 t ; grrr
- mnemonic "MIME/Ltn-7")))
+ mnemonic "MIME/Ltn-7"
+ ,@(if latin-euro-recognize-safe-charsets
+ '(safe-charsets (ascii control-1 latin-iso8859-13))))))
-; don't ;;;###autoload
(unless (assoc "Latin-7" language-info-alist)
(defun setup-latin7-environment ()
"Set up multilingual environment (MULE) for Baltic Rim Latin-7 users."
(interactive)
(set-language-environment "Latin-7"))
- ;; sheesh, what we do for backward compatibility
- (apply #'set-language-info-alist
- (append `("Latin-7"
- ((charset ascii latin-iso8859-13)
- (coding-system iso-8859-13)
- (coding-priority iso-8859-13)
- (input-method . "latin-7-prefix")
- (sample-text
- .
- ,(format "\
+ (set-language-info-alist "Latin-7"
+ `((charset ascii latin-iso8859-13)
+ (coding-system iso-8859-13)
+ (coding-priority iso-8859-13)
+ (input-method . "latin-7-prefix")
+ (sample-text . ,(format "\
Hello, Hej, Tere, Hei, Bonjour, Gr%c%c Gott, Ciao, %cHola!"
- ;; SMALL U WITH UMLAUT
- (make-char 'latin-iso8859-13 #x7C)
- ;; GERMAN SHARP S
- (make-char 'latin-iso8859-13 #x5F)
- ;; INVERTED EXCLAMATION MARK
- (make-char 'latin-iso8859-13 #x21)))
- (documentation . "\
+ ;; SMALL U WITH UMLAUT
+ (make-char
+ 'latin-iso8859-13 #x7C)
+ ;; GERMAN SHARP S
+ (make-char
+ 'latin-iso8859-13 #x5F)
+ ;; INVERTED EXCLAMATION
+ ;; MARK
+ (make-char
+ 'latin-iso8859-13 #x21)))
+ (documentation . "\
This is a generic language environment for Latin-7 (ISO-8859-13). It
-supports the Baltic Rim languages.")))
- (if (emacs-version>= 21 1 15)
- '(("Baltic Rim"))
- nil))))
+supports the Baltic Rim languages."))
+ '("Baltic Rim")))
(provide 'latin-euro-latin7)
Index: mule-packages/latin-euro-standards/latin-euro-latin8.el
===================================================================
RCS file:
/pack/xemacscvs/XEmacs/packages/mule-packages/latin-euro-standards/latin-euro-latin8.el,v
retrieving revision 1.3
diff -u -r1.3 latin-euro-latin8.el
--- mule-packages/latin-euro-standards/latin-euro-latin8.el 2005/06/29 07:45:30 1.3
+++ mule-packages/latin-euro-standards/latin-euro-latin8.el 2009/07/21 16:02:21
@@ -32,46 +32,48 @@
;;; Code:
-;; define ISO-8859-14 for XEmacs 21.4 and earlier
;;;###autoload
+(defvar latin-euro-recognize-safe-charsets
+ (condition-case nil
+ (progn
+ (coding-system-property (find-coding-system 'iso-8859-1-unix)
+ 'safe-charsets)
+ t)
+ (error nil))
+ "t if this XEmacs understands the `safe-charsets' coding-system
property.")
+
+;;;###autoload
(unless (find-charset 'latin-iso8859-14)
;; Create character set
(make-charset
'latin-iso8859-14 "ISO8859-14 (Latin 8)"
;; sheesh, what we do for backward compatibility
- ;; #### this test and the similar one below probably should be
- ;; reformulated to use condition-case
- (append (if (emacs-version>= 21 4)
- '(short-name "Latin-8"
- long-name "ISO8859-16 (Latin 8)")
- nil)
- '(registry "iso8859-14"
- dimension 1
- columns 1
- chars 96
- final ?_ ; octet 05/15; cf ISO-IR 199
- graphic 1
- direction l2r)))
- ;; For syntax of Latin-8 characters.
- (require 'cl)
- (load "cl-macs" nil t)
+ '(short-name "Latin-8"
+ long-name "ISO8859-16 (Latin 8)"
+ registry "iso8859-14"
+ dimension 1
+ columns 1
+ chars 96
+ final ?_ ; octet 05/15; cf ISO-IR 199
+ graphic 1
+ direction l2r))
(loop for c from 32 to 127
do (modify-syntax-entry (make-char 'latin-iso8859-14 c) "w"))
- (mapc (lambda (c)
- (modify-syntax-entry (make-char 'latin-iso8859-14 c) "_"))
- '(#xA3 #xA7 #xA9 #xAD #xAE #xB6))
- )
+ (loop for c in '(#xA3 #xA7 #xA9 #xAD #xAE #xB6)
+ do (modify-syntax-entry (make-char 'latin-iso8859-14 c) "_")))
;;;###autoload
(unless (find-coding-system 'iso-8859-14)
;; Create coding system
(make-coding-system
'iso-8859-14 'iso2022 "MIME ISO-8859-14"
- '(charset-g0 ascii
+ `(charset-g0 ascii
charset-g1 latin-iso8859-14
charset-g2 t ; grrr
charset-g3 t ; grrr
- mnemonic "MIME/Ltn-8")))
+ mnemonic "MIME/Ltn-8"
+ ,@(if latin-euro-recognize-safe-charsets
+ '(safe-charsets (ascii control-1 latin-iso8859-14))))))
;;;###autoload
(unless (assoc "Latin-8" language-info-alist)
@@ -80,15 +82,13 @@
(interactive)
(set-language-environment "Latin-8"))
- ;; sheesh, what we do for backward compatibility
- (apply #'set-language-info-alist
- (append `("Latin-8"
- ((charset ascii latin-iso8859-14)
- (coding-system iso-8859-14)
- (coding-priority iso-8859-14)
- (input-method . "latin-8-prefix")
- (sample-text
- ,(apply 'format "\
+ (set-language-info-alist
+ "Latin-8"
+ `((charset ascii latin-iso8859-14)
+ (coding-system iso-8859-14)
+ (coding-priority iso-8859-14)
+ (input-method . "latin-8-prefix")
+ (sample-text . ,(apply 'format "\
Following is the first paragraph of Myles na gCopaleen's An B%cal Bocht, %c
Eibhl%cn N%c Nuall%cin, 1941, 1999. The first asterisked word is a rendering
of \"diversions\" in Irish orthography, and the second
\"adventures\":
@@ -102,16 +102,14 @@
nach mbeidh aon saol %Gøº%@d againne nach %cfuil anois ann. \"
* scl%cip
-** eachtra%c" (mapcar '(lambda (code) (make-char 'latin-iso8859-14 code))
- '(105 41 109 109 97 97 97 109 97 34 109 34 34 105 97
- 109 34 97 105 115 97 97 105 109 109 115 109 109 97
- 53 105 105 109 97 97 109 109 97 34 105 109))))
- (documentation . "\
+** eachtra%c" (mapcar #'(lambda (code) (make-char 'latin-iso8859-14 code))
+ '(105 41 109 109 97 97 97 109 97 34 109 34 34 105 97
+ 109 34 97 105 115 97 97 105 109 109 115 109 109 97
+ 53 105 105 109 97 97 109 109 97 34 105 109))))
+ (documentation . "\
This is a generic language environment for Latin-8 (ISO-8859-14). It
-supports Celtic and most Western European languages.")))
- (if (emacs-version>= 21 1 15)
- '(("European"))
- nil))))
+supports Celtic and most Western European languages."))
+ '("European")))
(provide 'latin-euro-latin8)
Index: mule-packages/latin-euro-standards/latin-euro-latin9.el
===================================================================
RCS file:
/pack/xemacscvs/XEmacs/packages/mule-packages/latin-euro-standards/latin-euro-latin9.el,v
retrieving revision 1.5
diff -u -r1.5 latin-euro-latin9.el
--- mule-packages/latin-euro-standards/latin-euro-latin9.el 2007/12/24 13:38:04 1.5
+++ mule-packages/latin-euro-standards/latin-euro-latin9.el 2009/07/21 16:02:21
@@ -33,42 +33,34 @@
;;; Code:
;; define ISO-8859-15 for XEmacs 21.4 and earlier
+
;;;###autoload
(unless (find-charset 'latin-iso8859-15)
;; Create character set
(make-charset
'latin-iso8859-15 "ISO8859-15 (Latin 9)"
- ;; sheesh, what we do for backward compatibility
- ;; #### this test and the similar one below probably should be
- ;; reformulated to use condition-case
- (append (if (emacs-version>= 21 4)
- '(short-name "Latin-9"
- long-name "ISO8859-15 (Latin 9)")
- nil)
- '(registry "iso8859-15"
- dimension 1
- columns 1
- chars 96
- final ?b
- graphic 1
- direction l2r)))
+ '(short-name "Latin-9"
+ long-name "ISO8859-15 (Latin 9)"
+ registry "iso8859-15"
+ dimension 1
+ columns 1
+ chars 96
+ final ?b
+ graphic 1
+ direction l2r))
;; For syntax of Latin-9 characters.
- (require 'cl)
- (load "cl-macs" nil t) ; howcum no #'provide?
(loop for c from 64 to 127 ; from '%Gø%@' to '%Gø¿%@'
+ do (modify-syntax-entry (make-char 'latin-iso8859-15 c) "w"))
+ (loop for c in '(#xA6 #xA8 #xB4 #xB8 #xBC #xBD #xBE)
do (modify-syntax-entry (make-char 'latin-iso8859-15 c) "w"))
- (mapc (lambda (c)
- (modify-syntax-entry (make-char 'latin-iso8859-15 c) "w"))
- '(#xA6 #xA8 #xB4 #xB8 #xBC #xBD #xBE))
-
(modify-syntax-entry (make-char 'latin-iso8859-15 32) "w") ; no-break
space
(modify-syntax-entry (make-char 'latin-iso8859-15 87) "_") ; multiply
- (modify-syntax-entry (make-char 'latin-iso8859-15 119) "_") ; divide
- )
+ (modify-syntax-entry (make-char 'latin-iso8859-15 119) "_")) ; divide
;;;###autoload
(unless (find-coding-system 'iso-8859-15)
- ;; Create coding system
+ ;; Create coding system. No need for a `safe-charsets' parameter, if an
+ ;; XEmacs can handle that, it has this coding system built in.
(make-coding-system
'iso-8859-15 'iso2022 "MIME ISO-8859-15"
'(charset-g0 ascii
@@ -84,34 +76,30 @@
(interactive)
(set-language-environment "Latin-9"))
- ;; sheesh, what we do for backward compatibility
- (apply #'set-language-info-alist
- (append `("Latin-9"
- ((charset ascii latin-iso8859-15)
- (coding-system iso-8859-15)
- (coding-priority iso-8859-15)
- (input-method . "latin-9-prefix")
- (sample-text
- .
- ,(format "\
+ (set-language-info-alist
+ "Latin-9"
+ `((charset ascii latin-iso8859-15)
+ (coding-system . iso-8859-15)
+ (coding-priority . iso-8859-15)
+ (input-method . "latin-9-prefix")
+ (sample-text . ,(format "\
Hello, Hej, Tere, Hei, Bonjour, Gr%c%c Gott, Ciao, %cHola!, my %c0.02"
- ;; SMALL U WITH UMLAUT
- (make-char 'latin-iso8859-15 #x7C)
- ;; GERMAN SHARP S
- (make-char 'latin-iso8859-15 #x5F)
- ;; INVERTED EXCLAMATION MARK
- (make-char 'latin-iso8859-15 #x21)
- ;; EURO SIGN
- (make-char 'latin-iso8859-15 #x24)))
- (documentation . "\
+ ;; SMALL U WITH UMLAUT
+ (make-char 'latin-iso8859-15 #x7C)
+ ;; GERMAN SHARP S
+ (make-char 'latin-iso8859-15 #x5F)
+ ;; INVERTED EXCLAMATION MARK
+ (make-char 'latin-iso8859-15 #x21)
+ ;; EURO SIGN
+ (make-char 'latin-iso8859-15 #x24)))
+ (documentation . "\
This is a generic language environment for Latin-9 (ISO-8859-15). It
supports the Euro and the following languages:
Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.
-We also have a German specific language environment \"German\".")))
- (if (emacs-version>= 21 1 15)
- '(("European"))
- nil))))
+We also have a German specific language environment \"German\"."))
+ '("European")))
+
;;;###autoload
(defun-when-void set-character-of-keysym (keysym character)
"Make CHARACTER be inserted when KEYSYM is pressed,
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghe, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches