[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108219: Allow specifying the erc tim
From: |
Lars Magne Ingebrigtsen |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108219: Allow specifying the erc timestamp format |
Date: |
Sun, 13 May 2012 20:51:14 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 108219
fixes bug(s): http://debbugs.gnu.org/10779
author: Teemu Likonen <address@hidden>
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Sun 2012-05-13 20:51:14 +0200
message:
Allow specifying the erc timestamp format
* erc-backend.el (erc-server-timestamp-format): New variable to
allow specifying the timestamp format.
modified:
lisp/erc/ChangeLog
lisp/erc/erc-backend.el
=== modified file 'lisp/erc/ChangeLog'
--- a/lisp/erc/ChangeLog 2012-04-11 13:43:03 +0000
+++ b/lisp/erc/ChangeLog 2012-05-13 18:51:14 +0000
@@ -1,3 +1,8 @@
+2012-05-13 Teemu Likonen <address@hidden>
+
+ * erc-backend.el (erc-server-timestamp-format): New variable to
+ allow specifying the timestamp format (bug#10779).
+
2012-04-11 Vivek Dasmohapatra <address@hidden>
* erc-services.el (erc-nickserv-passwords): Don't display the
=== modified file 'lisp/erc/erc-backend.el'
--- a/lisp/erc/erc-backend.el 2012-04-09 13:05:48 +0000
+++ b/lisp/erc/erc-backend.el 2012-05-13 18:51:14 +0000
@@ -393,6 +393,12 @@
:type 'integer
:group 'erc-server)
+(defcustom erc-server-timestamp-format "%Y-%m-%d %T"
+ "*Timestamp format used with server response messages.
+This string is processed using `format-time-string'."
+ :type 'string
+ :group 'erc-server)
+
;;; Flood-related
;; Most of this is courtesy of Jorgen Schaefer and Circe
@@ -1454,7 +1460,8 @@
"The channel topic has changed." nil
(let* ((ch (first (erc-response.command-args parsed)))
(topic (erc-trim-string (erc-response.contents parsed)))
- (time (format-time-string "%T %m/%d/%y" (current-time))))
+ (time (format-time-string erc-server-timestamp-format
+ (current-time))))
(multiple-value-bind (nick login host)
(values-list (erc-parse-user (erc-response.sender parsed)))
(erc-update-channel-member ch nick nick nil nil nil host login)
@@ -1647,7 +1654,7 @@
(multiple-value-bind (nick seconds-idle on-since time)
(values-list (cdr (erc-response.command-args parsed)))
(setq time (when on-since
- (format-time-string "%T %Y/%m/%d"
+ (format-time-string erc-server-timestamp-format
(erc-string-to-emacs-time on-since))))
(erc-update-user-nick nick nick nil nil nil
(and time (format "on since %s" time)))
@@ -1724,7 +1731,8 @@
(third (erc-response.command-args parsed)))))
(erc-display-message
parsed 'notice (erc-get-buffer channel proc)
- 's329 ?c channel ?t (format-time-string "%A %Y/%m/%d %X" time))))
+ 's329 ?c channel ?t (format-time-string erc-server-timestamp-format
+ time))))
(define-erc-response-handler (330)
"Nick is authed as (on Quakenet network)." nil
@@ -1761,7 +1769,7 @@
"Who set the topic, and when." nil
(multiple-value-bind (channel nick time)
(values-list (cdr (erc-response.command-args parsed)))
- (setq time (format-time-string "%T %Y/%m/%d"
+ (setq time (format-time-string erc-server-timestamp-format
(erc-string-to-emacs-time time)))
(erc-update-channel-topic channel
(format "\C-o (%s, %s)" nick time)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108219: Allow specifying the erc timestamp format,
Lars Magne Ingebrigtsen <=