1 ;;; wl-e21.el --- Wanderlust modules for Emacs 21.
3 ;; Copyright (C) 2000,2001 Katsumi Yamaoka <yamaoka@jpl.org>
4 ;; Copyright (C) 2000,2001 Yuuichi Teranishi <teranisi@gohome.org>
6 ;; Author: Katsumi Yamaoka <yamaoka@jpl.org>
7 ;; Keywords: mail, net news
9 ;; This file is part of Wanderlust (Yet Another Message Interface on Emacsen).
11 ;; This program is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
16 ;; This program is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
29 ;; This module uses `before-string' overlay property to show icon
30 ;; images instead of `insert-image', so don't delete such overlays
31 ;; sloppily. Here is a sample code to show icons in the buffer.
33 ;;(let (image icon from to overlay)
34 ;; ;; The function `find-image' will look for an image first on `load-path'
35 ;; ;; and then in `data-directory'.
36 ;; (let ((load-path (cons wl-icon-directory load-path)))
37 ;; (setq image (find-image (list (list :type 'xpm :file wl-nntp-folder-icon
38 ;; :ascent 'center)))))
39 ;; ;; `propertize' is a convenient function in such a case.
40 ;; ;; String must have one or more length to wear an image.
41 ;; (setq icon (propertize "any string" 'display image))
42 ;; (pop-to-buffer (get-buffer-create "*wl-e21-demo*"))
45 ;; (setq from (point))
46 ;; (insert "-fj.wanderlust:0/0/0")
49 ;; (setq overlay (make-overlay from to))
51 ;; (overlay-put overlay 'before-string icon)
52 ;; ;; Put a mark to indicate that this overlay is made by `wl-e21'.
53 ;; ;; It is not always necessarily.
54 ;; (overlay-put overlay 'wl-e21-icon t)
55 ;; ;; Make it to be removable.
56 ;; (overlay-put overlay 'evaporate t))
58 ;; Note that a port of Emacs to some platforms (e.g. MS-Windoze) does
59 ;; not yet support images. It is a pity that neither icons nor tool-
60 ;; bars will not be displayed in such systems.
71 (require 'wl-highlight)
72 (defvar-maybe wl-folder-mode-map (make-sparse-keymap))
73 (defvar-maybe wl-draft-mode-map (make-sparse-keymap)))
75 (add-hook 'wl-folder-mode-hook 'wl-setup-folder)
76 (add-hook 'wl-folder-mode-hook 'wl-folder-init-icons)
78 (add-hook 'wl-init-hook 'wl-biff-init-icons)
79 (add-hook 'wl-init-hook 'wl-plugged-init-icons)
81 (add-hook 'wl-summary-mode-hook 'wl-setup-summary)
83 (add-hook 'wl-message-display-internal-hook 'wl-setup-message)
85 (defvar wl-use-toolbar (image-type-available-p 'xpm))
86 (defvar wl-plugged-image nil)
87 (defvar wl-unplugged-image nil)
88 (defvar wl-biff-mail-image nil)
89 (defvar wl-biff-nomail-image nil)
91 (defvar wl-folder-toolbar
92 '([wl-folder-jump-to-current-entity
93 wl-folder-jump-to-current-entity t "Enter Current Folder"]
94 [wl-folder-next-entity
95 wl-folder-next-entity t "Next Folder"]
96 [wl-folder-prev-entity
97 wl-folder-prev-entity t "Previous Folder"]
98 [wl-folder-check-current-entity
99 wl-folder-check-current-entity t "Check Current Folder"]
100 [wl-folder-sync-current-entity
101 wl-folder-sync-current-entity t "Sync Current Folder"]
103 wl-draft t "Write a New Message"]
104 [wl-folder-goto-draft-folder
105 wl-folder-goto-draft-folder t "Go to Draft Folder"]
106 [wl-folder-empty-trash
107 wl-folder-empty-trash t "Empty Trash"]
109 wl-exit t "Quit Wanderlust"]
111 "The Folder buffer toolbar.")
113 (defvar wl-summary-toolbar
115 wl-summary-read t "Read Messages"]
117 wl-summary-next t "Next Message"]
119 wl-summary-prev t "Previous Message"]
120 [wl-summary-jump-to-current-message
121 wl-summary-jump-to-current-message t "Jump to Current Message"]
122 [wl-summary-sync-force-update
123 wl-summary-sync-force-update t "Sync Current Folder"]
125 wl-summary-delete t "Delete Current Message"]
126 [wl-summary-mark-as-important
127 wl-summary-mark-as-important t "Mark Current Message as Important"]
129 wl-summary-write-current-folder t "Write for Current Folder"]
131 wl-summary-reply t "Reply to Current Message" ]
132 [wl-summary-reply-with-citation
133 wl-summary-reply-with-citation t "Reply to Current Message with Citation"]
135 wl-summary-forward t "Forward Current Message"]
137 wl-summary-exit t "Exit Current Summary"]
139 "The Summary buffer toolbar.")
141 (defvar wl-message-toolbar
143 wl-message-read t "Read Contents"]
144 [wl-message-next-content
145 wl-message-next-content t "Next Content"]
146 [wl-message-prev-content
147 wl-message-prev-content t "Previous Content"]
149 wl-message-quit t "Back to Summary"]
150 [wl-message-play-content
151 wl-message-play-content t "Play Content"]
152 [wl-message-extract-content
153 wl-message-extract-content t "Extract Content"]
155 "The Message buffer toolbar.")
157 (defalias 'wl-draft-insert-signature 'insert-signature);; for draft toolbar.
159 (defvar wl-draft-toolbar
160 '([wl-draft-send-from-toolbar
161 wl-draft-send-from-toolbar t "Send Current Draft"]
162 [wl-draft-yank-original
163 wl-draft-yank-original t "Yank Displaying Message"]
164 [wl-draft-insert-signature
165 wl-draft-insert-signature t "Insert Signature"]
167 wl-draft-kill t "Kill Current Draft"]
168 [wl-draft-save-and-exit
169 wl-draft-save-and-exit t "Save Draft and Exit"]
171 "The Draft buffer toolbar.")
174 (defmacro wl-e21-display-image-p ()
175 '(and (display-images-p)
176 (image-type-available-p 'xpm))))
178 (defun wl-e21-setup-toolbar (bar)
179 (when (and wl-use-toolbar
180 (wl-e21-display-image-p))
181 (let ((load-path (cons wl-icon-directory load-path))
182 (props '(:type xpm :ascent center
183 :color-symbols (("backgroundToolBarColor" . "None"))
186 icon up down disabled name)
188 (setq icon (aref (pop bar) 0))
189 (unless (boundp icon)
190 (setq name (symbol-name icon)
191 up (find-image `((,@props ,(concat name "-up.xpm")))))
194 (setq down (find-image `((,@props ,(concat name "-down.xpm"))))
196 `((,@props ,(concat name "-disabled.xpm")))))
197 (set icon (vector down up disabled disabled)))
202 (defvar wl-e21-toolbar-configurations
203 '((auto-resize-tool-bars . t)
204 (auto-raise-tool-bar-buttons . t)
205 (tool-bar-button-margin . 2)
206 (tool-bar-button-relief . 1)))
208 (defun wl-e21-make-toolbar-buttons (keymap defs)
209 (let ((configs wl-e21-toolbar-configurations)
211 (while (setq config (pop configs))
212 (set (make-local-variable (car config)) (cdr config))))
213 ;; Invalidate the default bindings.
214 (let ((keys (cdr (key-binding [tool-bar] t)))
216 (while (setq item (pop keys))
217 (when (setq item (car-safe item))
218 (define-key keymap (vector 'tool-bar item) 'undefined))))
219 (let ((n (length defs))
224 (define-key keymap (vector 'tool-bar (aref def 1))
225 (list 'menu-item (aref def 3) (aref def 1)
227 :image (symbol-value (aref def 0)))))))
229 (defun wl-e21-setup-folder-toolbar ()
230 (when (wl-e21-setup-toolbar wl-folder-toolbar)
231 (wl-e21-make-toolbar-buttons wl-folder-mode-map wl-folder-toolbar)))
233 (defun wl-e21-setup-summary-toolbar ()
234 (when (wl-e21-setup-toolbar wl-summary-toolbar)
235 (wl-e21-make-toolbar-buttons wl-summary-mode-map wl-summary-toolbar)))
238 (defsubst wl-e21-setup-draft-toolbar ()
239 (when (wl-e21-setup-toolbar wl-draft-toolbar)
240 (wl-e21-make-toolbar-buttons wl-draft-mode-map wl-draft-toolbar))))
242 (defun wl-e21-setup-message-toolbar ()
243 (when (wl-e21-setup-toolbar wl-message-toolbar)
244 (wl-e21-make-toolbar-buttons (current-local-map) wl-message-toolbar)))
246 (defvar wl-folder-toggle-icon-list
247 '((wl-folder-opened-image . wl-opened-group-folder-icon)
248 (wl-folder-closed-image . wl-closed-group-folder-icon)))
251 (defsubst wl-e21-highlight-folder-group-line (start end icon numbers)
252 (when (wl-e21-display-image-p)
254 (let ((overlays (overlays-in start end)))
255 (while (and (setq overlay (pop overlays))
256 (not (overlay-get overlay 'wl-e21-icon)))))
258 (setq overlay (make-overlay start end))
259 (overlay-put overlay 'wl-e21-icon t)
260 (overlay-put overlay 'evaporate t))
261 (let ((image (get icon 'image)))
263 (let ((name (symbol-value
264 (cdr (assq icon wl-folder-toggle-icon-list))))
265 (load-path (cons wl-icon-directory load-path)))
266 (when (setq image (find-image `((:type xpm :file ,name
268 (setq image (put icon 'image (propertize name
270 (overlay-put overlay 'before-string image)
271 (overlay-put overlay 'invisible (and image t))
272 (when (and wl-use-highlight-mouse-line (display-mouse-p))
273 (let ((inhibit-read-only t))
274 (put-text-property (if image
275 (max (1- start) (line-beginning-position))
278 'mouse-face 'highlight)))))))
280 (defsubst wl-e21-highlight-folder-by-numbers (start end text-face numbers)
281 (when (display-color-p)
282 (let ((inhibit-read-only t))
283 (if (and wl-highlight-folder-by-numbers
284 numbers (nth 0 numbers) (nth 1 numbers)
285 (re-search-forward "[-[:digit:]]+/[-[:digit:]]+/[-[:digit:]]+"
286 (line-end-position) t))
287 (let* ((unsync (nth 0 numbers))
288 (unread (nth 1 numbers))
289 (face (cond ((and unsync (zerop unsync))
290 (if (and unread (zerop unread))
291 'wl-highlight-folder-zero-face
292 'wl-highlight-folder-unread-face))
295 wl-folder-many-unsync-threshold))
296 'wl-highlight-folder-many-face)
298 'wl-highlight-folder-few-face))))
299 (if (numberp wl-highlight-folder-by-numbers)
301 (put-text-property start (match-beginning 0)
303 (put-text-property (match-beginning 0) (match-end 0)
305 (put-text-property start (match-end 0) 'face face)))
306 (put-text-property start (line-end-position) 'face text-face))))))
308 (defun wl-highlight-folder-current-line (&optional numbers)
312 (let (fld-name start end)
314 (;; opened folder group
315 (looking-at wl-highlight-folder-opened-regexp)
316 (setq start (match-beginning 1)
318 (wl-e21-highlight-folder-group-line start end
319 'wl-folder-opened-image
321 (wl-e21-highlight-folder-by-numbers start end
322 'wl-highlight-folder-opened-face
324 (;; closed folder group
325 (looking-at wl-highlight-folder-closed-regexp)
326 (setq start (match-beginning 1)
328 (wl-e21-highlight-folder-group-line start end
329 'wl-folder-closed-image
331 (wl-e21-highlight-folder-by-numbers start end
332 'wl-highlight-folder-closed-face
335 (and (setq fld-name (wl-folder-get-folder-name-by-id
336 (get-text-property (point) 'wl-folder-entity-id)))
337 (looking-at "[[:blank:]]+\\([^[:blank:]\n]+\\)"))
338 (setq start (match-beginning 1)
341 (when (wl-e21-display-image-p)
343 (let ((overlays (overlays-in start end)))
344 (while (and (setq overlay (pop overlays))
345 (not (overlay-get overlay 'wl-e21-icon)))))
347 (setq overlay (make-overlay start end))
348 (overlay-put overlay 'wl-e21-icon t)
349 (overlay-put overlay 'evaporate t))
351 (unless (get (caar wl-folder-internal-icon-list) 'image)
352 (wl-folder-init-icons))
354 (cond ((string= fld-name wl-trash-folder);; trash folder
355 (let ((num (nth 2 numbers)));; number of messages
356 (get (if (or (not num) (zerop num))
357 'wl-folder-trash-empty-image
358 'wl-folder-trash-image)
360 ((string= fld-name wl-draft-folder);; draft folder
361 (get 'wl-folder-draft-image 'image))
362 ((string= fld-name wl-queue-folder);; queue folder
363 (get 'wl-folder-queue-image 'image))
364 (;; and one of many other folders
365 (setq type (elmo-folder-type fld-name))
366 (get (intern (format "wl-folder-%s-image" type))
368 (overlay-put overlay 'before-string image)))
369 (when (and wl-use-highlight-mouse-line (display-mouse-p))
370 (let ((inhibit-read-only t))
371 (put-text-property (if image
373 (line-beginning-position))
376 'mouse-face 'highlight))))
377 (when (display-color-p)
378 (wl-e21-highlight-folder-by-numbers
380 (if (looking-at (format "^[[:blank:]]*\\(?:%s\\|%s\\)"
381 wl-folder-unsubscribe-mark
382 wl-folder-removed-mark))
383 'wl-highlight-folder-killed-face
384 'wl-highlight-folder-unknown-face)
387 (defun wl-highlight-plugged-current-line ()
389 (when (wl-e21-display-image-p)
392 (when (looking-at "[[:blank:]]*\\(\\[\\([^]]+\\)\\]\\)")
393 (let* ((start (match-beginning 1))
395 (status (match-string-no-properties 2))
396 (image (if (string-equal wl-plugged-plug-on status)
398 wl-unplugged-image)))
401 (let ((overlays (overlays-in start end)))
402 (while (and (setq overlay (pop overlays))
403 (not (overlay-get overlay 'wl-e21-icon)))))
405 (setq overlay (make-overlay start end))
406 (overlay-put overlay 'wl-e21-icon t)
407 (overlay-put overlay 'evaporate t))
408 (put-text-property 0 (length status) 'display image status)
409 (overlay-put overlay 'before-string status)
410 (overlay-put overlay 'invisible t))))))))
412 (defun wl-plugged-set-folder-icon (folder string)
413 (if (wl-e21-display-image-p)
415 (cond ((string= folder wl-queue-folder)
416 (concat (get 'wl-folder-queue-image 'image)
418 ((setq type (elmo-folder-type folder))
419 (concat (get (intern (format "wl-folder-%s-image"
427 (defvar wl-folder-internal-icon-list
428 ;; alist of (image . icon-file)
429 '((wl-folder-nntp-image . wl-nntp-folder-icon)
430 (wl-folder-imap4-image . wl-imap-folder-icon)
431 (wl-folder-pop3-image . wl-pop-folder-icon)
432 (wl-folder-localdir-image . wl-localdir-folder-icon)
433 (wl-folder-localnews-image . wl-localnews-folder-icon)
434 (wl-folder-internal-image . wl-internal-folder-icon)
435 (wl-folder-multi-image . wl-multi-folder-icon)
436 (wl-folder-filter-image . wl-filter-folder-icon)
437 (wl-folder-archive-image . wl-archive-folder-icon)
438 (wl-folder-pipe-image . wl-pipe-folder-icon)
439 (wl-folder-maildir-image . wl-maildir-folder-icon)
440 (wl-folder-nmz-image . wl-nmz-folder-icon)
441 (wl-folder-shimbun-image . wl-shimbun-folder-icon)
442 (wl-folder-trash-empty-image . wl-empty-trash-folder-icon)
443 (wl-folder-draft-image . wl-draft-folder-icon)
444 (wl-folder-queue-image . wl-queue-folder-icon)
445 (wl-folder-trash-image . wl-trash-folder-icon)))
447 (defun wl-folder-init-icons ()
448 (when (wl-e21-display-image-p)
449 (let ((load-path (cons wl-icon-directory load-path))
450 (icons wl-folder-internal-icon-list)
452 (while (setq icon (pop icons))
453 (unless (get (car icon) 'image)
454 (setq name (symbol-value (cdr icon))
455 image (find-image `((:type xpm :file ,name :ascent center))))
457 (put (car icon) 'image (propertize name 'display image))))))))
459 (defun wl-plugged-init-icons ()
460 (let ((props (when (display-mouse-p)
461 (list 'local-map (purecopy (make-mode-line-mouse-map
462 'mouse-2 #'wl-toggle-plugged))
463 'help-echo "mouse-2 toggles plugged status"))))
464 (if (wl-e21-display-image-p)
466 (unless wl-plugged-image
467 (let ((load-path (cons wl-icon-directory load-path)))
468 (setq wl-plugged-image (find-image
470 :file ,wl-plugged-icon
472 wl-unplugged-image (find-image
474 :file ,wl-unplugged-icon
476 (setq wl-modeline-plug-state-on
477 (apply 'propertize wl-plug-state-indicator-on
478 `(display ,wl-plugged-image ,@props))
479 wl-modeline-plug-state-off
480 (apply 'propertize wl-plug-state-indicator-off
481 `(display ,wl-unplugged-image ,@props))))
483 (setq wl-modeline-plug-state-on
484 (apply 'propertize wl-plug-state-indicator-on props)
485 wl-modeline-plug-state-off
486 (apply 'propertize wl-plug-state-indicator-off props))
487 (setq wl-modeline-plug-state-on wl-plug-state-indicator-on
488 wl-modeline-plug-state-off wl-plug-state-indicator-off)))))
490 (defun wl-biff-init-icons ()
491 (let ((props (when (display-mouse-p)
492 (list 'local-map (purecopy (make-mode-line-mouse-map
493 'mouse-2 #'wl-biff-check-folders))
494 'help-echo "mouse-2 checks new mails"))))
495 (if (wl-e21-display-image-p)
497 (unless wl-biff-mail-image
498 (let ((load-path (cons wl-icon-directory load-path)))
499 (setq wl-biff-mail-image (find-image
501 :file ,wl-biff-mail-icon
503 wl-biff-nomail-image (find-image
505 :file ,wl-biff-nomail-icon
507 (setq wl-modeline-biff-state-on
508 (apply 'propertize wl-biff-state-indicator-on
509 `(display ,wl-biff-mail-image ,@props))
510 wl-modeline-biff-state-off
511 (apply 'propertize wl-biff-state-indicator-off
512 `(display ,wl-biff-nomail-image ,@props))))
514 (setq wl-modeline-biff-state-on
515 (apply 'propertize wl-biff-state-indicator-on props)
516 wl-modeline-biff-state-off
517 (apply 'propertize wl-biff-state-indicator-off props))
518 (setq wl-modeline-biff-state-on wl-biff-state-indicator-on
519 wl-modeline-biff-state-off wl-biff-state-indicator-off)))))
521 (defun wl-make-date-string ()
522 (let ((system-time-locale "C"))
523 (format-time-string "%a, %d %b %Y %T %z")))
525 (defalias 'wl-setup-folder 'wl-e21-setup-folder-toolbar)
527 (defalias 'wl-setup-summary 'wl-e21-setup-summary-toolbar)
529 (defun wl-message-define-keymap ()
530 (let ((keymap (make-sparse-keymap)))
531 (define-key keymap "l" 'wl-message-toggle-disp-summary)
532 (define-key keymap [mouse-4] 'wl-message-wheel-down)
533 (define-key keymap [mouse-5] 'wl-message-wheel-up)
534 (define-key keymap [S-mouse-4] 'wl-message-wheel-down)
535 (define-key keymap [S-mouse-5] 'wl-message-wheel-up)
536 (set-keymap-parent wl-message-button-map keymap)
537 (define-key wl-message-button-map
538 [mouse-2] 'wl-message-button-dispatcher)
541 (defalias 'wl-setup-message 'wl-e21-setup-message-toolbar)
543 (defun wl-message-wheel-up (event)
545 (if (string-match (regexp-quote wl-message-buffer-cache-name)
546 (regexp-quote (buffer-name)))
547 (wl-message-next-page)
548 (let ((cur-buf (current-buffer))
550 (save-selected-window
551 (select-window (posn-window (event-start event)))
553 (setq proceed (wl-message-next-page)))
555 (if (memq 'shift (event-modifiers event))
557 (wl-summary-next t))))))
559 (defun wl-message-wheel-down (event)
561 (if (string-match (regexp-quote wl-message-buffer-cache-name)
562 (regexp-quote (buffer-name)))
563 (wl-message-prev-page)
564 (let ((cur-buf (current-buffer))
566 (save-selected-window
567 (select-window (posn-window (event-start event)))
569 (setq proceed (wl-message-prev-page)))
571 (if (memq 'shift (event-modifiers event))
573 (wl-summary-prev t))))))
575 (defun wl-draft-overload-menubar ()
576 (let ((keymap (current-local-map)))
577 (define-key keymap [menu-bar mail send]
578 '("Send Message" . wl-draft-send-and-exit))
579 (define-key keymap [menu-bar mail send-stay]
580 '("Send, Keep Editing" . wl-draft-send))
581 (define-key-after (lookup-key keymap [menu-bar mail])
582 [mail-sep-send] '("--")
584 (define-key keymap [menu-bar mail cancel]
585 '("Kill Current Draft" . wl-draft-kill))
586 (define-key-after (lookup-key keymap [menu-bar mail])
587 [save] '("Save Draft and Exit" . wl-draft-save-and-exit)
589 (define-key-after (lookup-key keymap [menu-bar mail])
590 [mail-sep-exit] '("--")
592 (define-key-after (lookup-key keymap [menu-bar mail])
593 [preview] '("Preview Message" . wl-draft-preview-message)
595 (define-key keymap [menu-bar mail yank]
596 '("Cite Message" . wl-draft-yank-original))
597 (define-key keymap [menu-bar mail signature]
598 '("Insert Signature" . insert-signature))
599 (define-key keymap [menu-bar headers fcc]
600 '("Fcc" . wl-draft-fcc))))
602 (defun wl-draft-mode-setup ()
604 (define-derived-mode wl-draft-mode mail-mode "Draft"
605 "draft mode for Wanderlust derived from mail mode.
606 See info under Wanderlust for full documentation.
609 \\{wl-draft-mode-map}"))
611 (defun wl-draft-key-setup ()
612 (define-key wl-draft-mode-map "\C-c\C-y" 'wl-draft-yank-original)
613 (define-key wl-draft-mode-map "\C-c\C-s" 'wl-draft-send)
614 (define-key wl-draft-mode-map "\C-c\C-c" 'wl-draft-send-and-exit)
615 (define-key wl-draft-mode-map "\C-c\C-z" 'wl-draft-save-and-exit)
616 (define-key wl-draft-mode-map "\C-c\C-k" 'wl-draft-kill)
617 (define-key wl-draft-mode-map "\C-l" 'wl-draft-highlight-and-recenter)
618 (define-key wl-draft-mode-map "\C-i" 'wl-complete-field-body-or-tab)
619 (define-key wl-draft-mode-map "\C-c\C-r" 'wl-draft-caesar-region)
620 (define-key wl-draft-mode-map "\M-t" 'wl-toggle-plugged)
621 (define-key wl-draft-mode-map "\C-c\C-o" 'wl-jump-to-draft-buffer)
622 (define-key wl-draft-mode-map "\C-c\C-e" 'wl-draft-config-exec)
623 (define-key wl-draft-mode-map "\C-c\C-j" 'wl-template-select)
624 (define-key wl-draft-mode-map "\C-c\C-p" 'wl-draft-preview-message)
625 (define-key wl-draft-mode-map "\C-c\C-a" 'wl-addrmgr)
626 ;; (define-key wl-draft-mode-map "\C-x\C-s" 'wl-draft-save)
627 (define-key wl-draft-mode-map "\C-xk" 'wl-draft-mimic-kill-buffer)
628 (define-key wl-draft-mode-map "\C-c\C-d" 'wl-draft-elide-region))
630 (defun wl-draft-overload-functions ()
631 (wl-mode-line-buffer-identification)
632 ;; (local-set-key "\C-c\C-s" 'wl-draft-send);; override
633 (wl-e21-setup-draft-toolbar)
634 (wl-draft-overload-menubar))
636 (defalias 'wl-defface 'defface)
638 (defun wl-read-event-char ()
639 "Get the next event."
640 (let ((event (read-event)))
641 (cons (and (numberp event) event) event)))
643 (put 'wl-modeline-biff-state-on 'risky-local-variable t)
644 (put 'wl-modeline-biff-state-off 'risky-local-variable t)
645 (put 'wl-modeline-plug-state-on 'risky-local-variable t)
646 (put 'wl-modeline-plug-state-off 'risky-local-variable t)
649 (product-provide (provide 'wl-e21) (require 'wl-version))
651 ;;; wl-e21.el ends here