Changes committed gnus/lisp (ChangeLog parse-time.el)
"Katsumi Yamaoka" <[email protected]> Mon, 14 Sep 2009 01:31:56 +0200
| Newsgroups | gmane.emacs.gnus.commits |
|---|---|
| Message-ID | <[email protected]> |
Modified: ChangeLog parse-time.el (parse-time-syntax): Restore it to keep compatibility with XEmacs. (parse-time-string-chars): Use it. Index: ChangeLog diff -u gnus/lisp/ChangeLog:7.2017 gnus/lisp/ChangeLog:7.2018 --- ChangeLog:7.2017 Thu Sep 10 15:46:51 2009 +++ ChangeLog Mon Sep 14 01:31:56 2009 @@ -1,3 +1,9 @@ +2009-09-13 Katsumi Yamaoka <[email protected]> + + * parse-time.el (parse-time-syntax): Restore it to keep compatibility + with XEmacs. + (parse-time-string-chars): Use it. + 2009-09-10 Teodor Zlatanov <[email protected]> * imap.el (imap-interactive-login): Better messages. @@ -172,6 +178,11 @@ * nnrss.el (nnrss-request-article): Avoid default-fill-column. +2009-08-26 Glenn Morris <[email protected]> + + * parse-time.el (parse-time-rules): Autoload riskiness here, rather + than placing in files.el. + 2009-08-25 Glenn Morris <[email protected]> * nnir.el (top-level): Don't require cl at run-time. @@ -191,6 +202,15 @@ * gnus-art.el (gnus-button-patch): Use forward-line rather than goto-line. +2009-08-16 Chong Yidong <[email protected]> + + * parse-time.el (parse-time-string-chars): Save match data. + +2009-08-16 Jan Seeger <[email protected]> (tiny change) + + * parse-time.el (parse-time-string-chars): Compute using character + classes, to handle non-ascii characters (Bug#3190). + 2009-08-12 Katsumi Yamaoka <[email protected]> * gnus-group.el (gnus-safe-html-newsgroups): New user option. Index: parse-time.el diff -u gnus/lisp/parse-time.el:7.15 gnus/lisp/parse-time.el:7.16 --- parse-time.el:7.15 Wed Sep 9 11:31:35 2009 +++ parse-time.el Mon Sep 14 01:31:56 2009 @@ -37,6 +37,7 @@ (eval-when-compile (require 'cl)) ;and ah ain't kiddin' 'bout it +(defvar parse-time-syntax (make-vector 256 nil)) (defvar parse-time-digits (make-vector 256 nil)) ;; Byte-compiler warnings @@ -47,18 +48,25 @@ (loop for i from ?0 to ?9 do (aset parse-time-digits i (- i ?0)))) +(unless (aref parse-time-syntax ?0) + (loop for i from ?0 to ?9 + do (aset parse-time-syntax i ?0)) + (loop for i from ?A to ?Z + do (aset parse-time-syntax i ?A)) + (loop for i from ?a to ?z + do (aset parse-time-syntax i ?a)) + (aset parse-time-syntax ?+ 1) + (aset parse-time-syntax ?- -1) + (aset parse-time-syntax ?: ?d)) + (defsubst digit-char-p (char) (aref parse-time-digits char)) +;; Note: the function definition differs from the one in Emacs +;; in order to keep the compatibility with XEmacs. (defsubst parse-time-string-chars (char) - (save-match-data - (let (case-fold-search str) - (cond ((eq char ?+) 1) - ((eq char ?-) -1) - ((eq char ?:) ?d) - ((string-match "[[:upper:]]" (setq str (string char))) ?A) - ((string-match "[[:lower:]]" str) ?a) - ((string-match "[[:digit:]]" str) ?0))))) + (and (< char (length parse-time-syntax)) + (aref parse-time-syntax char))) (put 'parse-error 'error-conditions '(parse-error error)) (put 'parse-error 'error-message "Parsing error")