aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/net
diff options
context:
space:
mode:
authorThuna2022-11-23 04:14:36 +0100
committerPhilip Kaludercic2023-05-04 10:06:32 +0200
commit8eb6e33691d1c8e95e25e086e1b04669ea4fffdb (patch)
tree4d9f0afbb4eb814021de4095d7524d1ff996c838 /lisp/net
parent2901a3443c7daa15cbe01947ace3e0980e419028 (diff)
downloademacs-8eb6e33691d1c8e95e25e086e1b04669ea4fffdb.tar.gz
emacs-8eb6e33691d1c8e95e25e086e1b04669ea4fffdb.zip
Fix rcirc messages printing in the wrong place
* lisp/net/rcirc.el (rcirc-send-message): Print the message before sending it to the server. (rcirc-print): Get the time with subsecond precision. * lisp/calendar/parse-time.el (parse-time-string parse-iso8601-time-string): Accept optional second FORM arguments, with the same meaning as in `decode-time'. Mention as such in the docstring. (Bug#59501) Copyright-paperwork-exempt: yes
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/rcirc.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 97a314eb8ab..937f4046adb 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -1233,9 +1233,9 @@ If SILENT is non-nil, do not print the message in any irc buffer."
1233 (let ((response (if noticep "NOTICE" "PRIVMSG"))) 1233 (let ((response (if noticep "NOTICE" "PRIVMSG")))
1234 (rcirc-get-buffer-create process target) 1234 (rcirc-get-buffer-create process target)
1235 (dolist (msg (rcirc-split-message message)) 1235 (dolist (msg (rcirc-split-message message))
1236 (rcirc-send-string process response target : msg)
1237 (unless silent 1236 (unless silent
1238 (rcirc-print process (rcirc-nick process) response target msg))))) 1237 (rcirc-print process (rcirc-nick process) response target msg))
1238 (rcirc-send-string process response target : msg))))
1239 1239
1240(defvar-local rcirc-input-ring nil 1240(defvar-local rcirc-input-ring nil
1241 "Ring object for input.") 1241 "Ring object for input.")
@@ -2034,7 +2034,7 @@ connection."
2034 (not (string= sender (rcirc-nick process)))) 2034 (not (string= sender (rcirc-nick process))))
2035 (let* ((buffer (rcirc-target-buffer process sender response target text)) 2035 (let* ((buffer (rcirc-target-buffer process sender response target text))
2036 (time (if-let ((time (rcirc-get-tag "time"))) 2036 (time (if-let ((time (rcirc-get-tag "time")))
2037 (parse-iso8601-time-string time) 2037 (parse-iso8601-time-string time t)
2038 (current-time))) 2038 (current-time)))
2039 (inhibit-read-only t)) 2039 (inhibit-read-only t))
2040 (with-current-buffer buffer 2040 (with-current-buffer buffer
@@ -2204,7 +2204,7 @@ The message is logged in `rcirc-log', and is later written to
2204disk. PROCESS is the process object for the current connection." 2204disk. PROCESS is the process object for the current connection."
2205 (let ((filename (funcall rcirc-log-filename-function process target)) 2205 (let ((filename (funcall rcirc-log-filename-function process target))
2206 (time (and-let* ((time (rcirc-get-tag "time"))) 2206 (time (and-let* ((time (rcirc-get-tag "time")))
2207 (parse-iso8601-time-string time)))) 2207 (parse-iso8601-time-string time t))))
2208 (unless (null filename) 2208 (unless (null filename)
2209 (let ((cell (assoc-string filename rcirc-log-alist)) 2209 (let ((cell (assoc-string filename rcirc-log-alist))
2210 (line (concat (format-time-string rcirc-time-format time) 2210 (line (concat (format-time-string rcirc-time-format time)
@@ -2996,7 +2996,7 @@ If ARG is given, opens the URL in a new browser window."
2996 "Insert a timestamp." 2996 "Insert a timestamp."
2997 (goto-char (point-min)) 2997 (goto-char (point-min))
2998 (let ((time (and-let* ((time (rcirc-get-tag "time"))) 2998 (let ((time (and-let* ((time (rcirc-get-tag "time")))
2999 (parse-iso8601-time-string time)))) 2999 (parse-iso8601-time-string time t))))
3000 (insert (rcirc-facify (format-time-string rcirc-time-format time) 3000 (insert (rcirc-facify (format-time-string rcirc-time-format time)
3001 'rcirc-timestamp)))) 3001 'rcirc-timestamp))))
3002 3002