(wl-news-mode-map): Bind commands of outline-mode
authorhmurata <hmurata>
Mon, 14 Feb 2005 04:59:20 +0000 (04:59 +0000)
committerhmurata <hmurata>
Mon, 14 Feb 2005 04:59:20 +0000 (04:59 +0000)
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.

wl/ChangeLog
wl/wl-news.el.in

index 0adace0..1f33d91 100644 (file)
@@ -1,3 +1,10 @@
+2005-02-14  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * 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  <lapis-lazuli@pop06.odn.ne.jp>
 
        * wl-summary.el (wl-summary-save): Use `write-region-as-binary'
index b968340..d3803cb 100644 (file)
   (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)
   (interactive)
   (scroll-up))
 
+(defun wl-news-previous-page ()
+  (interactive)
+  (scroll-down))
+
 (defun wl-news-show-all ()
   (interactive)
   (when (eq major-mode 'wl-news-mode)