From 0d1abdde1e4096f85c1d97eb8b003db6606af085 Mon Sep 17 00:00:00 2001 From: hmurata Date: Sat, 4 Sep 2004 05:54:02 +0000 Subject: [PATCH] (wl-summary-enter-handler): If argument is not a number, call `wl-summary-prev-line-content'. Show message when the message is not found. --- wl/ChangeLog | 6 ++++++ wl/wl-summary.el | 16 +++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index fca71f2..75a505e 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,9 @@ +2004-09-04 Hiroya Murata + + * wl-summary.el (wl-summary-enter-handler): If argument is not a + number, call `wl-summary-prev-line-content'. Show message when the + message is not found. + 2004-09-04 Yuuichi Teranishi * wl-summary.el (wl-summary-mode-map): Bind enter key to the diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 5a47692..ac32be5 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -3767,14 +3767,20 @@ Return non-nil if the mark is updated" ))) (run-hooks 'wl-summary-buffer-window-scroll-functions))) -(defun wl-summary-enter-handler (&optional number) +(defun wl-summary-enter-handler (&optional arg) "A command for `enter' key in the summary. Basically, it shows next line of the message. -If optional argument NUMBER is specified, jump to the message." +If optional argument ARG is specified, behave as followed. +If ARG is number, jump to the message. +Otherwise it shows previous line of th message." (interactive "P") - (if number - (wl-summary-jump-to-msg number) - (wl-summary-next-line-content))) + (cond ((numberp arg) + (unless (wl-summary-jump-to-msg arg) + (message "Message (#%d) was not found." arg))) + (arg + (wl-summary-prev-line-content)) + (t + (wl-summary-next-line-content)))) (defun wl-summary-next-line-content () "Show next line of the message." -- 1.7.10.4