From: ueno Date: Tue, 29 Aug 2000 05:30:15 +0000 (+0000) Subject: * wl-folder.el (wl-folder-goto-top-of-current-folder):Simplified. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=76fbfca7dead1d07e583696b3598043827995e0a;p=elisp%2Fwanderlust.git * wl-folder.el (wl-folder-goto-top-of-current-folder):Simplified. Add interactive spec. (wl-folder-goto-bottom-of-current-folder): Ditto. (wl-folder-mode-map): Bind them. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 0621155..bad8e3e 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,10 @@ 2000-08-29 Daiki Ueno + * wl-folder.el (wl-folder-goto-top-of-current-folder):Simplified. + Add interactive spec. + (wl-folder-goto-bottom-of-current-folder): Ditto. + (wl-folder-mode-map): Bind them. + * wl-vars.el (wl-message-ignored-field-list): New variable. (wl-message-visible-field-list): New variable. diff --git a/wl/wl-folder.el b/wl/wl-folder.el index 8e51f40..f1d22e6 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -214,6 +214,11 @@ (define-key wl-folder-mode-map "\C-x\C-s" 'wl-save) (define-key wl-folder-mode-map "\M-s" 'wl-save) (define-key wl-folder-mode-map "\C-xk" 'wl-folder-mimic-kill-buffer) + (define-key wl-folder-mode-map "\M-\C-a" + 'wl-folder-goto-top-of-current-folder) + (define-key wl-folder-mode-map "\M-\C-e" + 'wl-folder-goto-bottom-of-current-folder) + (wl-folder-setup-mouse) (easy-menu-define wl-folder-mode-menu @@ -504,15 +509,28 @@ (and trash-buf (kill-buffer trash-buf))))) -(defun wl-folder-goto-top-of-current-folder () - (if (re-search-backward "^\\([ ]*\\)\\[\\([\\+-]\\)\\]\\(.+\\)\n" nil t) - (beginning-of-line) +(defun wl-folder-goto-top-of-current-folder (&optional arg) + "Move backward to the top of the current folder group. +Optional argument ARG is repeart count." + (interactive "P") + (if (re-search-backward + "^ *\\[[\\+-]\\]" nil t (if arg (prefix-numeric-value arg))) + (beginning-of-line) (goto-char (point-min)))) (defun wl-folder-goto-bottom-of-current-folder (indent) + "Move forward to the bottom of the current folder group." + (interactive + (let ((indent + (save-excursion + (beginning-of-line) + (if (looking-at "^ *") + (buffer-substring (match-beginning 0)(1- (match-end 0))) + "")))) + (list indent))) (if (catch 'done - (while (re-search-forward "^\\([ ]*\\)[^ ]" nil t) - (if (<= (length (wl-match-buffer 1)) + (while (re-search-forward "^ *" nil t) + (if (<= (length (match-string 0)) (length indent)) (throw 'done nil))) (throw 'done t))