;;; wl-message.el -- Message displaying modules for Wanderlust.
-;; Copyright 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
+;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
;; Keywords: mail, net news
(make-variable-buffer-local 'wl-message-buffer-cur-folder)
(make-variable-buffer-local 'wl-message-buffer-cur-number)
-(require 'product)
-(product-provide (provide 'wl-message) (require 'wl-version))
-
(defvar wl-fixed-window-configuration nil)
(defun wl-message-buffer-window ()
(setq gbw nil))
(if gbw
(select-window gbw)
-; (if (or (null mes)
-; wl-stay-folder-window)
-; (delete-other-windows))
+;;; (if (or (null mes)
+;;; wl-stay-folder-window)
+;;; (delete-other-windows))
(when wl-fixed-window-configuration
(delete-other-windows)
(and wl-stay-folder-window
(widen)
(forward-page 1)
(if (pos-visible-in-window-p (point))
- (wl-message-narrow-to-page 1)))) ;Go to next page.
+ (wl-message-narrow-to-page 1)))) ; Go to next page.
(if (eobp)
()
(scroll-up))
(select-window (get-buffer-window cur-buf))))
(defun wl-message-follow-current-entity (buffer)
- "Follow to current message"
+ "Follow to current message."
(wl-draft-reply (wl-message-get-original-buffer)
- 'to-all wl-message-buffer-cur-summary-buffer)
+ nil wl-message-buffer-cur-summary-buffer) ; reply to all
(let ((mail-reply-buffer buffer))
(wl-draft-yank-from-mail-reply-buffer nil)))
(select-window (get-buffer-window summary-buf))))
(run-hooks 'wl-message-exit-hook)))
+(defvar wl-message-mode-map nil)
+(if wl-message-mode-map
+ ()
+ (setq wl-message-mode-map (make-sparse-keymap))
+ (define-key wl-message-mode-map "q" 'wl-message-exit)
+ (define-key wl-message-mode-map "n" 'wl-message-exit)
+ (define-key wl-message-mode-map "p" 'wl-message-exit))
+
(defun wl-message-decode (outbuf inbuf flag)
(cond
((eq flag 'all-header)
(elmo-set-buffer-multibyte nil))
(copy-to-buffer outbuf (point-min) (point-max))
(set-buffer outbuf)
- (local-set-key "q" 'wl-message-exit)
- (local-set-key "p" 'wl-message-exit)
- (local-set-key "n" 'wl-message-exit)
+ (use-local-map wl-message-mode-map)
(elmo-set-buffer-multibyte default-enable-multibyte-characters)
- ;;(decode-mime-charset-region (point-min) (point-max) wl-mime-charset)
+;;; (decode-mime-charset-region (point-min) (point-max) wl-mime-charset)
;; we can call decode-coding-region() directly, because multibyte flag is t.
(decode-coding-region (point-min) (point-max) wl-cs-autoconv)
(wl-highlight-message (point-min)
(wl-message-decode-mode outbuf inbuf))))
(defun wl-message-prev-page (&optional lines)
- "Scroll down this message. Returns non-nil if top of message"
+ "Scroll down this message. Returns non-nil if top of message."
(interactive)
(let ((cur-buf (current-buffer))
(view-message-buffer (get-buffer-create wl-message-buf-name))
(mime-open-entity backend (list folder number msgdb nil))))
(defun wl-message-next-page (&optional lines)
- "Scroll up this message. Returns non-nil if bottom of message"
+ "Scroll up this message. Returns non-nil if bottom of message."
(interactive)
(let ((cur-buf (current-buffer))
(view-message-buffer (get-buffer-create wl-message-buf-name))
(wl-message-narrow-to-page 1)
(setq ret-val nil))
(condition-case ()
- (scroll-up lines)
+ (static-if (boundp 'window-pixel-scroll-increment)
+ ;; XEmacs 21.2.20 and later.
+ (let (window-pixel-scroll-increment)
+ (scroll-up lines))
+ (scroll-up lines))
(end-of-buffer
(goto-char (point-max))))
(setq ret-val nil))
folder)
msgdb))
(setq mmelmo-imap4-skipped-parts nil)
- ;;; mime-display-message sets buffer-read-only variable as t.
- ;;; which makes buffer read-only status confused...
- (wl-mime-display-message cur-entity view-message-buffer
- nil nil 'mmelmo-original-mode)
+ ;; mime-display-message sets buffer-read-only variable as t.
+ ;; which makes buffer read-only status confused...
+ (mime-display-message cur-entity view-message-buffer
+ nil nil 'mmelmo-original-mode)
(if mmelmo-imap4-skipped-parts
(progn
(message "Skipped fetching of %s."
(wl-summary-redisplay)))
(defun wl-message-refer-article-or-url (e)
- "Read article specified by message-id around point. If failed,
- attempt to execute button-dispatcher."
+ "Read article specified by message-id around point.
+If failed, attempt to execute button-dispatcher."
(interactive "e")
(let ((window (get-buffer-window (current-buffer)))
mouse-window point beg end msg-id)
(set-buffer buf)
filename))))
-;;; wl-message.el ends here
-
+(require 'product)
+(product-provide (provide 'wl-message) (require 'wl-version))
+;;; wl-message.el ends here