[COMMIT] Specify safe-charsets when possible and needed, latin-euro-standards
15 years, 5 months
Aidan Kehoe
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
[COMMIT] savehist-autosave errors if print-readably is globally t
15 years, 5 months
Aidan Kehoe
APPROVE COMMIT
NOTE: This patch has been committed.
xemacs-packages/edit-utils/ChangeLog addition:
2009-05-22 Aidan Kehoe <kehoea(a)parhasard.net>
* savehist.el (savehist-save):
Use (format "%s" (coding-system-name savehist-coding-system))
instead of writing the (unreadable) coding system object itself to
the file.
XEmacs Packages (existing ChangeLogs) source patch:
Diff command: cvs -q diff -Nu
Files affected: xemacs-packages/edit-utils/savehist.el
Index: xemacs-packages/edit-utils/savehist.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/edit-utils/savehist.el,v
retrieving revision 1.7
diff -u -r1.7 savehist.el
--- xemacs-packages/edit-utils/savehist.el 2007/09/03 13:05:09 1.7
+++ xemacs-packages/edit-utils/savehist.el 2009/07/21 11:43:15
@@ -288,7 +288,8 @@
(interactive)
(with-temp-buffer
(insert
- (format ";; -*- mode: emacs-lisp; coding: %s -*-\n" savehist-coding-system)
+ (format ";; -*- mode: emacs-lisp; coding: %s -*-\n"
+ (coding-system-name savehist-coding-system))
";; Minibuffer history file, automatically generated by `savehist'.\n\n")
(run-hooks 'savehist-save-hook)
(let ((print-length nil)
--
¿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
Taking over maintainership of the ruby-modes package
15 years, 5 months
Hans de Graaff
I've just committed the following patch to the ruby-modes package
indicating that I'm taking up its maintainership. Next up will be the
large patch I emailed a few days earlier.
Kind regards,
Hans
Index: Makefile
===================================================================
RCS
file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ruby-modes/Makefile,v
retrieving revision 1.8
diff -u -B -r1.8 Makefile
--- Makefile 31 Oct 2003 17:05:54 -0000 1.8
+++ Makefile 19 Jul 2009 07:51:42 -0000
@@ -19,7 +19,7 @@
VERSION = 1.02
AUTHOR_VERSION = 1.6.8
-MAINTAINER = XEmacs Development Team <xemacs-beta(a)xemacs.org>
+MAINTAINER = Hans de Graaff <hans(a)degraaff.org>
PACKAGE = ruby-modes
PKG_TYPE = regular
REQUIRES = xemacs-base debug
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[COMMIT] Avoid errors in Dired when opening directories.
15 years, 5 months
Aidan Kehoe
Change set http://hg.debian.org/hg/xemacs/xemacs/rev/907697569a49 provoked
errors in dired on opening directories. Mats just reported them to me in
IRC, and this changes addresses them; Michael, can you see any other issues
with the above changeset that strike you as impacting dired?
APPROVE COMMIT
NOTE: This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1247957481 -3600
# Node ID 13273cffca2abd0280bd79d8c1fb8e11db1dbefd
# Parent cdc51540fed7bfbef5b51add4f9950e97d65cea0
Avoid errors in Dired when opening directories.
lisp/ChangeLog addition:
2009-07-18 Aidan Kehoe <kehoea(a)parhasard.net>
* files.el (find-file-create-switch-thunk):
Check that #'buffer-file-name gives non-nil before trying to
determine whether that file exists; avoids problems in
dired. Thank you Mats Lidell!
diff -r cdc51540fed7 -r 13273cffca2a lisp/ChangeLog
--- a/lisp/ChangeLog Wed Jul 15 00:21:01 2009 +0100
+++ b/lisp/ChangeLog Sat Jul 18 23:51:21 2009 +0100
@@ -1,3 +1,10 @@
+2009-07-18 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * files.el (find-file-create-switch-thunk):
+ Check that #'buffer-file-name gives non-nil before trying to
+ determine whether that file exists; avoids problems in
+ dired. Thank you Mats Lidell!
+
2009-07-13 Aidan Kehoe <kehoea(a)parhasard.net>
* code-files.el (insert-file-contents):
diff -r cdc51540fed7 -r 13273cffca2a lisp/files.el
--- a/lisp/files.el Wed Jul 15 00:21:01 2009 +0100
+++ b/lisp/files.el Sat Jul 18 23:51:21 2009 +0100
@@ -897,7 +897,8 @@
as `find-file' itself."
`(function
(lambda (buffer)
- (unless (file-exists-p (buffer-file-name buffer))
+ (unless (and (buffer-file-name buffer)
+ (file-exists-p (buffer-file-name buffer)))
;; XEmacs: nonexistent file--qualifies as a modification to the
;; buffer.
(set-buffer-modified-p t buffer))
--
¿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
commit: Avoid errors in Dired when opening directories.
15 years, 5 months
Aidan Kehoe
changeset: 4655:13273cffca2a
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sat Jul 18 23:51:21 2009 +0100
files: lisp/ChangeLog lisp/files.el
description:
Avoid errors in Dired when opening directories.
lisp/ChangeLog addition:
2009-07-18 Aidan Kehoe <kehoea(a)parhasard.net>
* files.el (find-file-create-switch-thunk):
Check that #'buffer-file-name gives non-nil before trying to
determine whether that file exists; avoids problems in
dired. Thank you Mats Lidell!
diff -r cdc51540fed7 -r 13273cffca2a lisp/ChangeLog
--- a/lisp/ChangeLog Wed Jul 15 00:21:01 2009 +0100
+++ b/lisp/ChangeLog Sat Jul 18 23:51:21 2009 +0100
@@ -1,3 +1,10 @@
+2009-07-18 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * files.el (find-file-create-switch-thunk):
+ Check that #'buffer-file-name gives non-nil before trying to
+ determine whether that file exists; avoids problems in
+ dired. Thank you Mats Lidell!
+
2009-07-13 Aidan Kehoe <kehoea(a)parhasard.net>
* code-files.el (insert-file-contents):
diff -r cdc51540fed7 -r 13273cffca2a lisp/files.el
--- a/lisp/files.el Wed Jul 15 00:21:01 2009 +0100
+++ b/lisp/files.el Sat Jul 18 23:51:21 2009 +0100
@@ -897,7 +897,8 @@
as `find-file' itself."
`(function
(lambda (buffer)
- (unless (file-exists-p (buffer-file-name buffer))
+ (unless (and (buffer-file-name buffer)
+ (file-exists-p (buffer-file-name buffer)))
;; XEmacs: nonexistent file--qualifies as a modification to the
;; buffer.
(set-buffer-modified-p t buffer))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Re: commit: Prevent integer overflow and subsequent crashes when attempting to load large
15 years, 5 months
Aidan Kehoe
Ar an cúigiú lá déag de mí Iúil, scríobh Vin Shelton:
> > It is something that needs to be fixed, I get the same problem with
> > Visual Studio 2005 Express edition, which was the free Microsoft C++
> > compiler available for download when I got this machine, in September
> > last year.
> >
> > I don’t think that change is general enough, I think we need code like
> > this: http://short.ie/7n8680
>
>
> Can you please elaborate? I don't understand what's more general about:
>
> #elif (defined(__VISUALC__) && defined(__WIN32__)) || defined( __VMS__ )
> #define wxLongLong_t __int64
> #define wxLongLongSuffix i64
> #define wxLongLongFmtSpec _T("I64")
>
> than
>
> #elif SIZEOF_LONG_LONG == 0
> #define INT_64_BIT __int64
> #define UINT_64_BIT unsigned __int64
>
> Is it just that you want to test a different condition than
> SIZEOF_LONG_LONG == 0?
No--well, yes, that too, but the wxPython code checks for Borland compilers
too, and defines a constant to allow platform-specific construction of these
constants. That would be helpful to support.
> Jerry wrote:
> > I guess that 'long' is a 32-bit quantity in this environment?
> > Does the system malloc take a long, or something else?
>
> malloc takes a size_t. Here are the sizes of the respective types:
>
> sizeof(int) = 4
> sizeof(long) = 4
> sizeof(size_t) = 4
>
> - Vin
--
¿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
ruby-modes update
15 years, 5 months
Hans de Graaff
Hi,
Attached to this mail are a patch for the ruby-modes package and two new
files. This is basically a sync to the upstream version distributed with
ruby 1.8.5_pre4. The patch is rather large because there have been many
changes upstream.
I've been using this for at least a year, probably more, without any
problems.
Kind regards,
Hans
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Prevent integer overflow and subsequent crashes when attempting to load large
15 years, 5 months
Jerry James
changeset: 4646:6c6bfdb80a0c
tag: tip
user: Jerry James <james(a)xemacs.org>
date: Wed Jul 01 16:42:11 2009 -0600
files: src/ChangeLog src/glyphs-eimage.c
description:
Prevent integer overflow and subsequent crashes when attempting to load large
images. See <870180fe0907011540m7509f371h97d336477145166a(a)mail.gmail.com> in
xemacs-patches.
diff -r f2a991ff6db0 -r 6c6bfdb80a0c src/ChangeLog
--- a/src/ChangeLog Mon Jun 29 08:20:47 2009 -0600
+++ b/src/ChangeLog Wed Jul 01 16:42:11 2009 -0600
@@ -1,3 +1,11 @@
+2009-06-09 Jerry James <james(a)xemacs.org>
+
+ * glyphs-eimage.c (jpeg_instantiate):
+ (gif_instantiate):
+ (png_instantiate):
+ (tiff_instantiate): Check for integer overflow before allocating
+ memory for an image.
+
2009-06-20 Stephen Turnbull <stephen(a)xemacs.org>
* callint.c (Finteractive): Document that (interactive) must
diff -r f2a991ff6db0 -r 6c6bfdb80a0c src/glyphs-eimage.c
--- a/src/glyphs-eimage.c Mon Jun 29 08:20:47 2009 -0600
+++ b/src/glyphs-eimage.c Wed Jul 01 16:42:11 2009 -0600
@@ -409,6 +409,7 @@
*/
{
+ UINT_64_BIT pixels_sq;
int jpeg_gray = 0; /* if we're dealing with a grayscale */
/* Step 4: set parameters for decompression. */
@@ -431,7 +432,10 @@
jpeg_start_decompress (&cinfo);
/* Step 6: Read in the data and put into EImage format (8bit RGB triples)*/
-
+ pixels_sq =
+ (UINT_64_BIT) cinfo.output_width * (UINT_64_BIT) cinfo.output_height;
+ if (pixels_sq > ((size_t) -1) / 3)
+ signal_image_error ("JPEG image too large to instantiate", instantiator);
unwind.eimage =
xnew_binbytes (cinfo.output_width * cinfo.output_height * 3);
if (!unwind.eimage)
@@ -677,6 +681,7 @@
{
ColorMapObject *cmo = unwind.giffile->SColorMap;
int i, j, row, pass, interlace, slice;
+ UINT_64_BIT pixels_sq;
Binbyte *eip;
/* interlaced gifs have rows in this order:
0, 8, 16, ..., 4, 12, 20, ..., 2, 6, 10, ..., 1, 3, 5, ... */
@@ -685,6 +690,9 @@
height = unwind.giffile->SHeight;
width = unwind.giffile->SWidth;
+ pixels_sq = (UINT_64_BIT) width * (UINT_64_BIT) height;
+ if (pixels_sq > ((size_t) -1) / (3 * unwind.giffile->ImageCount))
+ signal_image_error ("GIF image too large to instantiate", instantiator);
unwind.eimage =
xnew_binbytes (width * height * 3 * unwind.giffile->ImageCount);
if (!unwind.eimage)
@@ -948,11 +956,15 @@
{
int y;
Binbyte **row_pointers;
+ UINT_64_BIT pixels_sq;
height = info_ptr->height;
width = info_ptr->width;
+ pixels_sq = (UINT_64_BIT) width * (UINT_64_BIT) height;
+ if (pixels_sq > ((size_t) -1) / 3)
+ signal_image_error ("PNG image too large to instantiate", instantiator);
/* Wow, allocate all the memory. Truly, exciting. */
- unwind.eimage = xnew_array_and_zero (Binbyte, width * height * 3);
+ unwind.eimage = xnew_array_and_zero (Binbyte, (size_t) (pixels_sq * 3));
/* libpng expects that the image buffer passed in contains a
picture to draw on top of if the png has any transparencies.
This could be a good place to pass that in... */
@@ -1299,6 +1311,7 @@
uint32 *raster;
Binbyte *ep;
+ UINT_64_BIT pixels_sq;
assert (!NILP (data));
@@ -1321,12 +1334,15 @@
TIFFGetField (unwind.tiff, TIFFTAG_IMAGEWIDTH, &width);
TIFFGetField (unwind.tiff, TIFFTAG_IMAGELENGTH, &height);
- unwind.eimage = xnew_binbytes (width * height * 3);
+ pixels_sq = (UINT_64_BIT) width * (UINT_64_BIT) height;
+ if (pixels_sq >= 1 << 29)
+ signal_image_error ("TIFF image too large to instantiate", instantiator);
+ unwind.eimage = xnew_binbytes (pixels_sq * 3);
/* #### This is little more than proof-of-concept/function testing.
It needs to be reimplemented via scanline reads for both memory
compactness. */
- raster = (uint32*) _TIFFmalloc (width * height * sizeof (uint32));
+ raster = (uint32*) _TIFFmalloc ((tsize_t) (pixels_sq * sizeof (uint32)));
if (raster != NULL)
{
int i, j;
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[COMMIT] ?\012 is whitespace, as it always should have been, thank you Karl Kleinpaste.
15 years, 5 months
Aidan Kehoe
APPROVE COMMIT
NOTE: This patch has been committed
Thank you Karl Kleinpaste and the Gnus team!
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1247613585 -3600
# Node ID 25e5e5346d31242ca9a50e4c89ec80859943c106
# Parent 8905163c49c532b6eea7710619569fed7f826d52
?\012 is whitespace, as it always should have been, thank you Karl Kleinpaste.
src/ChangeLog addition:
2009-07-15 Aidan Kehoe <kehoea(a)parhasard.net>
* syntax.c (complex_vars_of_syntax):
?\012 is whitespace, as it always should have been, thank you Karl
Kleinpaste and the Gnus team!
diff -r 8905163c49c5 -r 25e5e5346d31 src/ChangeLog
--- a/src/ChangeLog Mon Jul 13 20:45:26 2009 +0100
+++ b/src/ChangeLog Wed Jul 15 00:19:45 2009 +0100
@@ -1,3 +1,9 @@
+2009-07-15 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * syntax.c (complex_vars_of_syntax):
+ ?\012 is whitespace, as it always should have been, thank you Karl
+ Kleinpaste and the Gnus team!
+
2009-07-11 Aidan Kehoe <kehoea(a)parhasard.net>
* file-coding.c (undecided_canonicalize_after_coding):
diff -r 8905163c49c5 -r 25e5e5346d31 src/syntax.c
--- a/src/syntax.c Mon Jul 13 20:45:26 2009 +0100
+++ b/src/syntax.c Wed Jul 15 00:19:45 2009 +0100
@@ -2491,7 +2491,7 @@
/* The whitespace--overwriting some of the above changes.
String literals are const char *s, not const unsigned char *s. */
- define_standard_syntax((const UExtbyte *)" \t\015\014", Swhitespace);
+ define_standard_syntax((const UExtbyte *)" \t\015\014\012", Swhitespace);
/* DEL plus Control 1 */
SET_RANGE_SYNTAX(127, 159, Spunct);
--
¿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
commit: ?\012 is whitespace, as it always should have been, thank you Karl Kleinpaste.
15 years, 5 months
Aidan Kehoe
changeset: 4653:25e5e5346d31
tag: tip
parent: 4650:8905163c49c5
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Wed Jul 15 00:19:45 2009 +0100
files: src/ChangeLog src/syntax.c
description:
?\012 is whitespace, as it always should have been, thank you Karl Kleinpaste.
src/ChangeLog addition:
2009-07-15 Aidan Kehoe <kehoea(a)parhasard.net>
* syntax.c (complex_vars_of_syntax):
?\012 is whitespace, as it always should have been, thank you Karl
Kleinpaste and the Gnus team!
diff -r 8905163c49c5 -r 25e5e5346d31 src/ChangeLog
--- a/src/ChangeLog Mon Jul 13 20:45:26 2009 +0100
+++ b/src/ChangeLog Wed Jul 15 00:19:45 2009 +0100
@@ -1,3 +1,9 @@
+2009-07-15 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * syntax.c (complex_vars_of_syntax):
+ ?\012 is whitespace, as it always should have been, thank you Karl
+ Kleinpaste and the Gnus team!
+
2009-07-11 Aidan Kehoe <kehoea(a)parhasard.net>
* file-coding.c (undecided_canonicalize_after_coding):
diff -r 8905163c49c5 -r 25e5e5346d31 src/syntax.c
--- a/src/syntax.c Mon Jul 13 20:45:26 2009 +0100
+++ b/src/syntax.c Wed Jul 15 00:19:45 2009 +0100
@@ -2491,7 +2491,7 @@
/* The whitespace--overwriting some of the above changes.
String literals are const char *s, not const unsigned char *s. */
- define_standard_syntax((const UExtbyte *)" \t\015\014", Swhitespace);
+ define_standard_syntax((const UExtbyte *)" \t\015\014\012", Swhitespace);
/* DEL plus Control 1 */
SET_RANGE_SYNTAX(127, 159, Spunct);
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches