[gnus git] branch master updated: m0-7-22-ge5733c5 =1= format-spec.el (format-spec): Allow spec chars with nil (Bug#14420)

Katsumi Yamaoka <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  e5733c5fe8b0e66155eb7016d20f7b2e290b7df8 (commit)
      from  3a7d9b62cd1d70391338e1d833141a184599b017 (commit)


- Log -----------------------------------------------------------------
commit e5733c5fe8b0e66155eb7016d20f7b2e290b7df8
Author: Glenn Morris <[email protected]>
Date:   Mon May 20 22:37:05 2013 +0000

    format-spec.el (format-spec): Allow spec chars with nil (Bug#14420)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 499da76..4212f43 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -3,6 +3,10 @@
 	* gnus-spec.el (gnus-parse-complex-format): Use unicode escape for left
 	double angle quotation mark.
 
+2013-05-20  Glenn Morris  <[email protected]>
+
+	* format-spec.el (format-spec): Allow spec chars with nil.  (Bug#14420)
+
 2013-05-19  Adam Sjøgren  <[email protected]>
 
 	* message.el (message-insert-formatted-citation-line): handle finding
diff --git a/lisp/format-spec.el b/lisp/format-spec.el
index 1280966..6bb0fe9 100644
--- a/lisp/format-spec.el
+++ b/lisp/format-spec.el
@@ -44,9 +44,10 @@ the text that it generates."
        ((looking-at "\\([-0-9.]*\\)\\([a-zA-Z]\\)")
 	(let* ((num (match-string 1))
 	       (spec (string-to-char (match-string 2)))
-	       (val (cdr (assq spec specification))))
+	       (val (assq spec specification)))
 	  (unless val
 	    (error "Invalid format character: `%%%c'" spec))
+	  (setq val (cdr val))
 	  ;; Pad result to desired length.
           (let ((text (format (concat "%" num "s") val)))
 	    ;; Insert first, to preserve text properties.

-----------------------------------------------------------------------
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      |    4 ++++
 lisp/format-spec.el |    9 +++++----
 2 files changed, 9 insertions(+), 4 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.