diff options
author | Philip Kaludercic <philipk@posteo.net> | 2022-01-06 14:55:59 +0100 |
---|---|---|
committer | Philip Kaludercic <philipk@posteo.net> | 2022-01-06 14:56:23 +0100 |
commit | 0d46683202e2bf4d7ae88efa0fc65ddd26a5e5fd (patch) | |
tree | b077b337f8cf3c386b18f8290300a912deea9ec3 | |
parent | daedbb2f5bb25e102624dd4694b3d3b64d5e5bca (diff) | |
download | emacs-0d46683202e2bf4d7ae88efa0fc65ddd26a5e5fd.tar.gz |
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.texi | 5 | ||||
-rw-r--r-- | etc/NEWS | 7 | ||||
-rw-r--r-- | lisp/net/rcirc.el | 7 |
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: (setq rcirc-time-format "%Y-%m-%d %H:%M ") @end example +@findex rcirc-when +If you don't wish to use verbose time formatting all the time, you can +use the @code{rcirc-when} command to printing a complete timestamp for +the message at point. + @node Defining a new command @section Defining a new command @cindex defining commands @@ -210,7 +210,7 @@ inserted. +++ *** New command 'emoji-describe' (bound to 'C-x 8 e d'). -This command will tell you the name of the Emoji at point. (This +nThis command will tell you the name of the Emoji at point. (This command also works for non-Emoji characters.) ** Help @@ -259,6 +259,11 @@ For example, a 'display-buffer-alist' entry of will make the body of the chosen window 40 columns wide. For the height use 'window-height' in combination with 'body-lines'. +** Rcirc + ++++ +*** New command 'rcirc-when'. + ** Tab Bars and Tab Lines --- 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." (run-hook-with-args 'rcirc-print-functions process sender response target text))))) +(defun rcirc-when () + "Print a message when the message at point was received." + (interactive) + (if-let (time (get-text-property (point) 'rcirc-time)) + (message (format-time-string "%c" time)) + (message "No time information at point."))) + (defun rcirc-generate-log-filename (process target) "Return filename for log file based on PROCESS and TARGET." (if target |