X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=wl%2Fwl-e21.el;h=efa14c66d0c2a36623f96cc6ef9fa66f088ad644;hb=3719a3d73eed04deaae46b08b752f94cce2ebaec;hp=4a40e12aa32f0beb6eba063a1183a7bf8108170d;hpb=822563936c5f818c1ab6f7ed9c26f52d7abc6bf5;p=elisp%2Fwanderlust.git diff --git a/wl/wl-e21.el b/wl/wl-e21.el index 4a40e12..efa14c6 100644 --- a/wl/wl-e21.el +++ b/wl/wl-e21.el @@ -1,4 +1,4 @@ -;;; wl-e21.el -- Wanderlust modules for Emacs 21. +;;; wl-e21.el --- Wanderlust modules for Emacs 21. ;; Copyright (C) 2000,2001 Katsumi Yamaoka ;; Copyright (C) 2000,2001 Yuuichi Teranishi @@ -33,7 +33,7 @@ ;;(let (image icon from to overlay) ;; ;; The function `find-image' will look for an image first on `load-path' ;; ;; and then in `data-directory'. -;; (let ((load-path (cons wl-icon-dir load-path))) +;; (let ((load-path (cons wl-icon-directory load-path))) ;; (setq image (find-image (list (list :type 'xpm :file wl-nntp-folder-icon ;; :ascent 'center))))) ;; ;; `propertize' is a convenient function in such a case. @@ -69,21 +69,8 @@ (require 'wl-draft) (require 'wl-message) (require 'wl-highlight) - (defvar-maybe wl-folder-mode-map (make-sparse-keymap)) (defvar-maybe wl-draft-mode-map (make-sparse-keymap))) -;; For Emacs 21.0.104 or earlier -(defun-maybe make-mode-line-mouse-map (mouse function) "\ -Return a keymap with single entry for mouse key MOUSE on the mode line. -MOUSE is defined to run function FUNCTION with no args in the buffer -corresponding to the mode line clicked." - (let ((map (make-sparse-keymap))) - (define-key map (vector 'mode-line mouse) function) - map)) - -;; `display-images-p' has not been available prior to Emacs 21.0.105. -(defalias-maybe 'display-images-p 'display-graphic-p) - (add-hook 'wl-folder-mode-hook 'wl-setup-folder) (add-hook 'wl-folder-mode-hook 'wl-folder-init-icons) @@ -109,12 +96,12 @@ corresponding to the mode line clicked." wl-folder-prev-entity t "Previous Folder"] [wl-folder-check-current-entity wl-folder-check-current-entity t "Check Current Folder"] - ;;[wl-draft - ;; wl-draft t "Write a New Message"] [wl-folder-sync-current-entity wl-folder-sync-current-entity t "Sync Current Folder"] [wl-draft wl-draft t "Write a New Message"] + [wl-folder-goto-draft-folder + wl-folder-goto-draft-folder t "Go to Draft Folder"] [wl-folder-empty-trash wl-folder-empty-trash t "Empty Trash"] [wl-exit @@ -138,7 +125,7 @@ corresponding to the mode line clicked." [wl-summary-mark-as-important wl-summary-mark-as-important t "Mark Current Message as Important"] [wl-draft - wl-draft t "Write a New Message"] + wl-summary-write-current-folder t "Write for Current Folder"] [wl-summary-reply wl-summary-reply t "Reply to Current Message" ] [wl-summary-reply-with-citation @@ -177,6 +164,8 @@ corresponding to the mode line clicked." wl-draft-insert-signature t "Insert Signature"] [wl-draft-kill wl-draft-kill t "Kill Current Draft"] + [wl-draft-save-and-exit + wl-draft-save-and-exit t "Save Draft and Exit"] ) "The Draft buffer toolbar.") @@ -188,7 +177,7 @@ corresponding to the mode line clicked." (defun wl-e21-setup-toolbar (bar) (when (and wl-use-toolbar (wl-e21-display-image-p)) - (let ((load-path (cons wl-icon-dir load-path)) + (let ((load-path (cons wl-icon-directory load-path)) (props '(:type xpm :ascent center :color-symbols (("backgroundToolBarColor" . "None")) :file)) @@ -210,10 +199,10 @@ corresponding to the mode line clicked." success))) (defvar wl-e21-toolbar-configurations - '((auto-resize-tool-bar . t) + '((auto-resize-tool-bars . t) (auto-raise-tool-bar-buttons . t) - (tool-bar-button-margin . 0) - (tool-bar-button-relief . 2))) + (tool-bar-button-margin . 2) + (tool-bar-button-relief . 1))) (defun wl-e21-make-toolbar-buttons (keymap defs) (let ((configs wl-e21-toolbar-configurations) @@ -272,7 +261,7 @@ corresponding to the mode line clicked." (unless image (let ((name (symbol-value (cdr (assq icon wl-folder-toggle-icon-list)))) - (load-path (cons wl-icon-dir load-path))) + (load-path (cons wl-icon-directory load-path))) (when (setq image (find-image `((:type xpm :file ,name :ascent center)))) (setq image (put icon 'image (propertize name @@ -456,7 +445,7 @@ corresponding to the mode line clicked." (defun wl-folder-init-icons () (when (wl-e21-display-image-p) - (let ((load-path (cons wl-icon-dir load-path)) + (let ((load-path (cons wl-icon-directory load-path)) (icons wl-folder-internal-icon-list) icon name image) (while (setq icon (pop icons)) @@ -474,7 +463,7 @@ corresponding to the mode line clicked." (if (wl-e21-display-image-p) (progn (unless wl-plugged-image - (let ((load-path (cons wl-icon-dir load-path))) + (let ((load-path (cons wl-icon-directory load-path))) (setq wl-plugged-image (find-image `((:type xpm :file ,wl-plugged-icon @@ -505,7 +494,7 @@ corresponding to the mode line clicked." (if (wl-e21-display-image-p) (progn (unless wl-biff-mail-image - (let ((load-path (cons wl-icon-dir load-path))) + (let ((load-path (cons wl-icon-directory load-path))) (setq wl-biff-mail-image (find-image `((:type xpm :file ,wl-biff-mail-icon @@ -538,6 +527,7 @@ corresponding to the mode line clicked." (defun wl-message-define-keymap () (let ((keymap (make-sparse-keymap))) + (define-key keymap "D" 'wl-message-delete-current-part) (define-key keymap "l" 'wl-message-toggle-disp-summary) (define-key keymap [mouse-4] 'wl-message-wheel-down) (define-key keymap [mouse-5] 'wl-message-wheel-up) @@ -552,7 +542,7 @@ corresponding to the mode line clicked." (defun wl-message-wheel-up (event) (interactive "e") - (if (string-match (regexp-quote wl-message-buffer-cache-name) + (if (string-match (regexp-quote wl-message-buffer-name) (regexp-quote (buffer-name))) (wl-message-next-page) (let ((cur-buf (current-buffer)) @@ -568,7 +558,7 @@ corresponding to the mode line clicked." (defun wl-message-wheel-down (event) (interactive "e") - (if (string-match (regexp-quote wl-message-buffer-cache-name) + (if (string-match (regexp-quote wl-message-buffer-name) (regexp-quote (buffer-name))) (wl-message-prev-page) (let ((cur-buf (current-buffer)) @@ -588,8 +578,20 @@ corresponding to the mode line clicked." '("Send Message" . wl-draft-send-and-exit)) (define-key keymap [menu-bar mail send-stay] '("Send, Keep Editing" . wl-draft-send)) + (define-key-after (lookup-key keymap [menu-bar mail]) + [mail-sep-send] '("--") + 'send-stay) (define-key keymap [menu-bar mail cancel] '("Kill Current Draft" . wl-draft-kill)) + (define-key-after (lookup-key keymap [menu-bar mail]) + [save] '("Save Draft and Exit" . wl-draft-save-and-exit) + 'cancel) + (define-key-after (lookup-key keymap [menu-bar mail]) + [mail-sep-exit] '("--") + 'save) + (define-key-after (lookup-key keymap [menu-bar mail]) + [preview] '("Preview Message" . wl-draft-preview-message) + 'mail-sep-exit) (define-key keymap [menu-bar mail yank] '("Cite Message" . wl-draft-yank-original)) (define-key keymap [menu-bar mail signature] @@ -621,8 +623,10 @@ Special commands: (define-key wl-draft-mode-map "\C-c\C-j" 'wl-template-select) (define-key wl-draft-mode-map "\C-c\C-p" 'wl-draft-preview-message) (define-key wl-draft-mode-map "\C-c\C-a" 'wl-addrmgr) - (define-key wl-draft-mode-map "\C-x\C-s" 'wl-draft-save) - (define-key wl-draft-mode-map "\C-xk" 'wl-draft-mimic-kill-buffer)) +;; (define-key wl-draft-mode-map "\C-x\C-s" 'wl-draft-save) + (define-key wl-draft-mode-map "\C-xk" 'wl-draft-mimic-kill-buffer) + (define-key wl-draft-mode-map "\C-c\C-d" 'wl-draft-elide-region) + (define-key wl-draft-mode-map "\C-a" 'wl-draft-beginning-of-line)) (defun wl-draft-overload-functions () (wl-mode-line-buffer-identification) @@ -637,6 +641,11 @@ Special commands: (let ((event (read-event))) (cons (and (numberp event) event) event))) +(put 'wl-modeline-biff-state-on 'risky-local-variable t) +(put 'wl-modeline-biff-state-off 'risky-local-variable t) +(put 'wl-modeline-plug-state-on 'risky-local-variable t) +(put 'wl-modeline-plug-state-off 'risky-local-variable t) + (require 'product) (product-provide (provide 'wl-e21) (require 'wl-version))