From e6cad9f720d36751feb3489eabbf4d4a66992080 Mon Sep 17 00:00:00 2001 From: kaoru Date: Mon, 25 Aug 2008 06:57:01 +0000 Subject: [PATCH] * riece-commands.el (riece-command-enter-message): Fix behavior at last line of buffer. (riece-command-enter-message-to-user): Ditto. (riece-command-enter-message-as-notice): Ditto. --- lisp/ChangeLog | 7 +++++++ lisp/riece-commands.el | 16 ++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 617d755..c683f50 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2008-08-25 TAKAHASHI Kaoru + + * riece-commands.el (riece-command-enter-message): Fix behavior at + last line of buffer. + (riece-command-enter-message-to-user): Ditto. + (riece-command-enter-message-as-notice): Ditto. + 2008-06-11 Daiki Ueno * riece-options.el (riece-use-full-window): Abolish unused option. diff --git a/lisp/riece-commands.el b/lisp/riece-commands.el index ddb353d..1f47339 100644 --- a/lisp/riece-commands.el +++ b/lisp/riece-commands.el @@ -443,8 +443,10 @@ the layout to the selected layout-name." (riece-line-beginning-position) (riece-line-end-position)) nil) - (if (> (forward-line) 0) - (insert "\n"))) + (forward-line 1) + (when (eobp) + (insert "\n"))) + (defun riece-command-enter-message-as-notice () "Send the current line to the current channel as NOTICE." @@ -453,8 +455,9 @@ the layout to the selected layout-name." (riece-line-beginning-position) (riece-line-end-position)) t) - (if (> (forward-line) 0) - (insert "\n"))) + (forward-line 1) + (when (eobp) + (insert "\n"))) (defun riece-command-enter-message-to-user (user) "Send the current line to USER." @@ -474,8 +477,9 @@ the layout to the selected layout-name." user) (riece-display-message (riece-make-message (riece-current-nickname) user text nil t))) - (if (> (forward-line) 0) - (insert "\n"))) + (forward-line 1) + (when (eobp) + (insert "\n"))) (defun riece-command-join-channel (target key) (unless (riece-server-opened (riece-identity-server target)) -- 1.7.10.4