[gnus git] branch master updated: n0-17-126-g7be3fb6 =1= nntp.el (nntp-record-command): gnus-util.el (gnus-message-with-timestamp-1): Use format-time-string rather than decoding time stamps by hand. This is simpler and insulates the code from potential changes to current-time format.
Katsumi Yamaoka <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 7be3fb62838ee5fcf8e692760b69640fcbb54a72 (commit)
from b28d3268af979b7dbc15318793330085996c53a3 (commit)
- Log -----------------------------------------------------------------
commit 7be3fb62838ee5fcf8e692760b69640fcbb54a72
Author: Paul Eggert <[email protected]>
Date: Fri Jul 1 07:21:17 2011 +0000
nntp.el (nntp-record-command):
gnus-util.el (gnus-message-with-timestamp-1): Use format-time-string rather than decoding time stamps by hand. This is simpler and insulates the code from potential changes to current-time format.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f11e342..8c629be 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
+2011-07-01 Paul Eggert <[email protected]>
+
+ * nntp.el (nntp-record-command):
+ * gnus-util.el (gnus-message-with-timestamp-1):
+ Use format-time-string rather than decoding time stamps by hand.
+ This is simpler and insulates the code from potential changes to
+ current-time format.
+
2011-07-01 Katsumi Yamaoka <[email protected]>
* gnus-draft.el (gnus-draft-clear-marks): Mark deleted articles as read.
diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el
index 3f66b45..7155c7f 100644
--- a/lisp/gnus-util.el
+++ b/lisp/gnus-util.el
@@ -540,8 +540,7 @@ but also to the ones displayed in the echo area."
(eval-when-compile
(defmacro gnus-message-with-timestamp-1 (format-string args)
- (let ((timestamp '((format-time-string "%Y%m%dT%H%M%S" time)
- "." (format "%03d" (/ (nth 2 time) 1000)) "> ")))
+ (let ((timestamp '(format-time-string "%Y%m%dT%H%M%S.%3N> " time)))
(if (featurep 'xemacs)
`(let (str time)
(if (or (and (null ,format-string) (null ,args))
@@ -554,10 +553,10 @@ but also to the ones displayed in the echo area."
(cond ((eq gnus-add-timestamp-to-message 'log)
(setq time (current-time))
(display-message 'no-log str)
- (log-message 'message (concat ,@timestamp str)))
+ (log-message 'message (concat ,timestamp str)))
(gnus-add-timestamp-to-message
(setq time (current-time))
- (display-message 'message (concat ,@timestamp str)))
+ (display-message 'message (concat ,timestamp str)))
(t
(display-message 'message str))))
str)
@@ -571,7 +570,7 @@ but also to the ones displayed in the echo area."
(setq time (current-time))
(with-current-buffer (get-buffer-create "*Messages*")
(goto-char (point-max))
- (insert ,@timestamp str "\n")
+ (insert ,timestamp str "\n")
(forward-line (- message-log-max))
(delete-region (point-min) (point))
(goto-char (point-max))))
@@ -585,7 +584,7 @@ but also to the ones displayed in the echo area."
(and ,format-string str)
(message nil))
(setq time (current-time))
- (message "%s" (concat ,@timestamp str))
+ (message "%s" (concat ,timestamp str))
str))
(t
(apply 'message ,format-string ,args))))))))
diff --git a/lisp/nntp.el b/lisp/nntp.el
index a8ffc65..986fd51 100644
--- a/lisp/nntp.el
+++ b/lisp/nntp.el
@@ -338,10 +338,8 @@ backend doesn't catch this error.")
"Record the command STRING."
(with-current-buffer (get-buffer-create "*nntp-log*")
(goto-char (point-max))
- (let ((time (current-time)))
- (insert (format-time-string "%Y%m%dT%H%M%S" time)
- "." (format "%03d" (/ (nth 2 time) 1000))
- " " nntp-address " " string "\n"))))
+ (insert (format-time-string "%Y%m%dT%H%M%S.%3N")
+ " " nntp-address " " string "\n")))
(defun nntp-report (&rest args)
"Report an error from the nntp backend. The first string in ARGS
-----------------------------------------------------------------------
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 | 8 ++++++++
lisp/gnus-util.el | 11 +++++------
lisp/nntp.el | 6 ++----
3 files changed, 15 insertions(+), 10 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