From 6c59a42bb6922cb3781b449f3f554d7df1a0434d Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 24 Oct 2003 02:41:57 +0000 Subject: [PATCH] * riece-ctcp.el (riece-command-ctcp-action): If the current command line is not empty, insert it into the minibuffer before reading input. Thanks to Akinori MUSHA [cf. ] --- lisp/ChangeLog | 7 +++++++ lisp/riece-ctcp.el | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5590284..e531463 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2003-10-24 Daiki Ueno + + * riece-ctcp.el (riece-command-ctcp-action): If the current + command line is not empty, insert it into the minibuffer before + reading input. Thanks to Akinori MUSHA + [cf. ] + 2003-10-23 Daiki Ueno * riece-naming.el (riece-naming-assert-rename): Follow the diff --git a/lisp/riece-ctcp.el b/lisp/riece-ctcp.el index dfde187..5ea2e8d 100644 --- a/lisp/riece-ctcp.el +++ b/lisp/riece-ctcp.el @@ -324,7 +324,15 @@ (riece-get-identities-on-server (car entry))) riece-server-process-alist))) riece-current-channel) - (read-string "Action: "))) + (let (message) + (beginning-of-line) + (setq message (buffer-substring (point) + (progn (end-of-line) (point)))) + (if (equal message "") + (read-string "Action: ") + (prog1 (read-from-minibuffer "Action: " (cons message 0)) + (let ((next-line-add-newlines t)) + (next-line 1))))))) (if (equal action "") (error "No action")) (riece-send-string (format "PRIVMSG %s :\1ACTION %s\1\r\n" -- 2.25.1