From: ueno Date: Fri, 24 Oct 2003 02:41:57 +0000 (+0000) Subject: * riece-ctcp.el (riece-command-ctcp-action): If the current X-Git-Tag: riece-0_1_5~2 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a60bc8dd10768aec1f79c03db55af5b006fbd9d7;p=elisp%2Friece.git * 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. ] --- 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"