aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Kaludercic2022-01-06 14:55:59 +0100
committerPhilip Kaludercic2022-01-06 14:56:23 +0100
commit0d46683202e2bf4d7ae88efa0fc65ddd26a5e5fd (patch)
treeb077b337f8cf3c386b18f8290300a912deea9ec3
parentdaedbb2f5bb25e102624dd4694b3d3b64d5e5bca (diff)
downloademacs-0d46683202e2bf4d7ae88efa0fc65ddd26a5e5fd.tar.gz
emacs-0d46683202e2bf4d7ae88efa0fc65ddd26a5e5fd.zip
Add rcirc-when command
* doc/misc/rcirc.texi: Document rcirc-when. * etc/NEWS: Document rcirc-when. * lisp/net/rcirc.el (rcirc-when): Add command.
-rw-r--r--doc/misc/rcirc.texi5
-rw-r--r--etc/NEWS7
-rw-r--r--lisp/net/rcirc.el7
3 files changed, 18 insertions, 1 deletions
diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi
index f13ecc7d28d..6217781e2bd 100644
--- a/doc/misc/rcirc.texi
+++ b/doc/misc/rcirc.texi
@@ -933,6 +933,11 @@ how to include the date in the time stamp:
933(setq rcirc-time-format "%Y-%m-%d %H:%M ") 933(setq rcirc-time-format "%Y-%m-%d %H:%M ")
934@end example 934@end example
935 935
936@findex rcirc-when
937If you don't wish to use verbose time formatting all the time, you can
938use the @code{rcirc-when} command to printing a complete timestamp for
939the message at point.
940
936@node Defining a new command 941@node Defining a new command
937@section Defining a new command 942@section Defining a new command
938@cindex defining commands 943@cindex defining commands
diff --git a/etc/NEWS b/etc/NEWS
index 9c892b285d1..463c39315d4 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -210,7 +210,7 @@ inserted.
210 210
211+++ 211+++
212*** New command 'emoji-describe' (bound to 'C-x 8 e d'). 212*** New command 'emoji-describe' (bound to 'C-x 8 e d').
213This command will tell you the name of the Emoji at point. (This 213nThis command will tell you the name of the Emoji at point. (This
214command also works for non-Emoji characters.) 214command also works for non-Emoji characters.)
215 215
216** Help 216** Help
@@ -259,6 +259,11 @@ For example, a 'display-buffer-alist' entry of
259will make the body of the chosen window 40 columns wide. For the 259will make the body of the chosen window 40 columns wide. For the
260height use 'window-height' in combination with 'body-lines'. 260height use 'window-height' in combination with 'body-lines'.
261 261
262** Rcirc
263
264+++
265*** New command 'rcirc-when'.
266
262** Tab Bars and Tab Lines 267** Tab Bars and Tab Lines
263 268
264--- 269---
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 62e6281e035..dda72a2a7f2 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -2047,6 +2047,13 @@ connection."
2047 (run-hook-with-args 'rcirc-print-functions 2047 (run-hook-with-args 'rcirc-print-functions
2048 process sender response target text))))) 2048 process sender response target text)))))
2049 2049
2050(defun rcirc-when ()
2051 "Print a message when the message at point was received."
2052 (interactive)
2053 (if-let (time (get-text-property (point) 'rcirc-time))
2054 (message (format-time-string "%c" time))
2055 (message "No time information at point.")))
2056
2050(defun rcirc-generate-log-filename (process target) 2057(defun rcirc-generate-log-filename (process target)
2051 "Return filename for log file based on PROCESS and TARGET." 2058 "Return filename for log file based on PROCESS and TARGET."
2052 (if target 2059 (if target