[gnus git] branch master updated: m0-13-11-gaf97f40 =1= format-spec.el: Work for XEmacs
Katsumi Yamaoka <[email protected]> Thu, 14 May 2015 06:39:20 +0200
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via af97f404faa7a7276ab61e97ca203cc373cc6014 (commit)
from 7f6d990bcb085e36e9dec80c9e7b830944a12c52 (commit)
- Log -----------------------------------------------------------------
commit af97f404faa7a7276ab61e97ca203cc373cc6014
Author: Katsumi Yamaoka <[email protected]>
Date: Thu May 14 04:38:28 2015 +0000
format-spec.el: Work for XEmacs
(format-spec, format-spec-make): Use (char-to-int c) instead
of (+ c 0) that the byte compiler optimizes into just c.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3bb6464..0d5d32d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2015-05-14 Katsumi Yamaoka <[email protected]>
+
+ * format-spec.el (format-spec, format-spec-make): Work for XEmacs.
+ Use (char-to-int c) instead of (+ c 0) that the byte compiler optimizes
+ into just c.
+
2015-05-11 Katsumi Yamaoka <[email protected]>
* format-spec.el (format-spec, format-spec-make): Work for XEmacs.
diff --git a/lisp/format-spec.el b/lisp/format-spec.el
index a275393..bf096bf 100644
--- a/lisp/format-spec.el
+++ b/lisp/format-spec.el
@@ -43,7 +43,9 @@ the text that it generates."
;; Valid format spec.
((looking-at "\\([-0-9.]*\\)\\([a-zA-Z]\\)")
(let* ((num (match-string 1))
- (spec (+ (string-to-char (match-string 2)) 0))
+ (spec (if (featurep 'xemacs)
+ (char-to-int (string-to-char (match-string 2)))
+ (string-to-char (match-string 2))))
(val (assq spec specification)))
(unless val
(error "Invalid format character: `%%%c'" spec))
@@ -70,7 +72,13 @@ starting with a character."
(while pairs
(unless (cdr pairs)
(error "Invalid list of pairs"))
- (push (cons (+ (car pairs) 0) (cadr pairs)) alist)
+ (push (cons (if (featurep 'xemacs)
+ (if (characterp (car pairs))
+ (char-to-int (car pairs))
+ (car pairs))
+ (car pairs))
+ (cadr pairs))
+ alist)
(setq pairs (cddr pairs)))
(nreverse alist)))
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 6 ++++++
lisp/format-spec.el | 12 ++++++++++--
2 files changed, 16 insertions(+), 2 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project