From: hmurata Date: Mon, 14 Feb 2005 04:59:20 +0000 (+0000) Subject: (wl-news-mode-map): Bind commands of outline-mode X-Git-Tag: wl-2_14-root~45 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=33b2f7d8ed2c4fccf7eec03da1b030963642c972;p=elisp%2Fwanderlust.git (wl-news-mode-map): Bind commands of outline-mode and "\177" to the `wl-news-previous-page'. (wl-news-mode): Defined by `define-derived-mode' instead of `defun'. (wl-news-previous-page): New function. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 0adace0..1f33d91 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,10 @@ +2005-02-14 Hiroya Murata + + * wl-news.el.in (wl-news-mode-map): Bind commands of outline-mode + and "\177" to the `wl-news-previous-page'. + (wl-news-mode): Defined by `define-derived-mode' instead of `defun'. + (wl-news-previous-page): New function. + 2005-02-11 Hiroya Murata * wl-summary.el (wl-summary-save): Use `write-region-as-binary' diff --git a/wl/wl-news.el.in b/wl/wl-news.el.in index b968340..d3803cb 100644 --- a/wl/wl-news.el.in +++ b/wl/wl-news.el.in @@ -185,15 +185,18 @@ (define-key wl-news-mode-map "a" 'wl-news-show-all) (define-key wl-news-mode-map "m" 'wl-news-append-to-folder) (define-key wl-news-mode-map "\C-m" 'wl-news-next-line) - (define-key wl-news-mode-map " " 'wl-news-next-page)) - -(defun wl-news-mode () + (define-key wl-news-mode-map " " 'wl-news-next-page) + (define-key wl-news-mode-map "\177" 'wl-news-previous-page) + ;; re-bind commands of outline-mode + (define-key wl-news-mode-map "n" 'outline-next-visible-heading) + (define-key wl-news-mode-map "p" 'outline-previous-visible-heading) + (define-key wl-news-mode-map "u" 'outline-up-heading) + (define-key wl-news-mode-map "N" 'outline-forward-same-level) + (define-key wl-news-mode-map "P" 'outline-backward-same-level)) + +(require 'derived) +(define-derived-mode wl-news-mode outline-mode "NEWS" "Mode for Wanderlust NEWS(.ja)." - (interactive) - (kill-all-local-variables) - (use-local-map wl-news-mode-map) - (setq major-mode 'wl-news-mode) - (setq mode-name "NEWS") (setq buffer-read-only t)) (defun wl-news (&optional arg) @@ -237,6 +240,10 @@ (interactive) (scroll-up)) +(defun wl-news-previous-page () + (interactive) + (scroll-down)) + (defun wl-news-show-all () (interactive) (when (eq major-mode 'wl-news-mode)