1 ;;; wl.el -- Wanderlust bootstrap.
3 ;; Copyright 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
4 ;; Masahiro MURATA <muse@ba2.so-net.ne.jp>
6 ;; Author: Yuuichi Teranishi <teranisi@gohome.org>
7 ;; Masahiro MURATA <muse@ba2.so-net.ne.jp>
8 ;; Keywords: mail, net news
10 ;; This file is part of Wanderlust (Yet Another Message Interface on Emacsen).
12 ;; This program is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
17 ;; This program is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 ;; Boston, MA 02111-1307, USA.
36 (unless (and (fboundp 'defgroup)
39 (defmacro defgroup (&rest args))
40 (defmacro defcustom (symbol value &optional doc &rest args)
41 (let ((doc (concat "*" (or doc ""))))
42 (` (defvar (, symbol) (, value) (, doc))))))
57 (provide 'wl) ; circular dependency
68 (require 'wl-highlight)
79 (defun wl-plugged-init (&optional make-alist)
80 (setq elmo-plugged wl-plugged)
81 (if wl-reset-plugged-alist
82 (elmo-set-plugged elmo-plugged))
84 (wl-make-plugged-alist))
86 (setq elmo-plugged (setq wl-plugged (elmo-plugged-p))
87 wl-modeline-plug-status wl-plugged)
89 (wl-toggle-plugged t 'flush)))
91 (defun wl-toggle-plugged (&optional arg queue-flush-only)
93 (elmo-quit) ; Disconnect current connection.
94 (unless queue-flush-only
99 (setq wl-plugged nil))
100 (t (setq wl-plugged (null wl-plugged))))
101 (elmo-set-plugged wl-plugged))
102 (setq elmo-plugged wl-plugged
103 wl-modeline-plug-status wl-plugged)
105 (let ((summaries (wl-collect-summary)))
107 (set-buffer (pop summaries))
108 (wl-summary-msgdb-save)
109 ;; msgdb is saved, but cache is not saved yet.
110 (wl-summary-set-message-modified))))
111 (setq wl-biff-check-folders-running nil)
115 (elmo-dop-queue-flush)
117 (if (and wl-draft-enable-queuing
119 (wl-draft-queue-flush))
120 (when (and (eq major-mode 'wl-summary-mode)
121 (elmo-folder-plugged-p wl-summary-buffer-folder-name))
122 (let* ((msgdb-dir (elmo-msgdb-expand-path
123 wl-summary-buffer-folder-name))
124 (seen-list (elmo-msgdb-seen-load msgdb-dir)))
126 (wl-summary-flush-pending-append-operations seen-list))
127 (elmo-msgdb-seen-save msgdb-dir seen-list)))
128 (run-hooks 'wl-plugged-hook))
130 (run-hooks 'wl-unplugged-hook))
131 (force-mode-line-update t))
135 (defvar wl-plugged-port-label-alist
136 (list (cons elmo-default-nntp-port "nntp")
137 (cons elmo-default-imap4-port "imap4")
138 (cons elmo-default-pop3-port "pop3")))
139 ;;(cons elmo-pop-before-smtp-port "pop3")
141 (defconst wl-plugged-switch-variables
142 '(("Queuing" . wl-draft-enable-queuing)
143 ("AutoFlushQueue" . wl-auto-flush-queue)
144 ("DisconnectedOperation" . elmo-enable-disconnected-operation)))
146 (defvar wl-plugged-buf-name "Plugged")
147 (defvar wl-plugged-mode-map nil)
148 (defvar wl-plugged-alist nil)
149 (defvar wl-plugged-switch nil)
150 (defvar wl-plugged-winconf nil)
151 (defvar wl-plugged-sending-queue-alist nil)
152 (defvar wl-plugged-dop-queue-alist nil)
153 (defvar wl-plugged-alist-modified nil)
155 (defvar wl-plugged-mode-menu-spec
157 ["Toggle plugged" wl-plugged-toggle t]
158 ["Toggle All plugged" wl-plugged-toggle-all t]
159 ["Prev Port" wl-plugged-move-to-previous t]
160 ["Next Port" wl-plugged-move-to-next t]
161 ["Prev Server" wl-plugged-move-to-previous-server t]
162 ["Next Server" wl-plugged-move-to-next-server t]
163 ["Flush queue" wl-plugged-flush-queue t]
165 ["Exit" wl-plugged-exit t]))
169 (defun wl-plugged-setup-mouse ()
170 (define-key wl-plugged-mode-map 'button2 'wl-plugged-click))
172 (defun wl-plugged-setup-mouse ())
173 (defun wl-plugged-setup-mouse ()
174 (define-key wl-plugged-mode-map [mouse-2] 'wl-plugged-click)))))
176 (unless wl-plugged-mode-map
177 (setq wl-plugged-mode-map (make-sparse-keymap))
178 (define-key wl-plugged-mode-map " " 'wl-plugged-toggle)
179 (define-key wl-plugged-mode-map "\C-m" 'wl-plugged-toggle)
180 (define-key wl-plugged-mode-map "\M-t" 'wl-plugged-toggle-all)
181 (define-key wl-plugged-mode-map "q" 'wl-plugged-exit)
182 (define-key wl-plugged-mode-map "\C-t" 'wl-plugged-exit)
183 (define-key wl-plugged-mode-map "F" 'wl-plugged-flush-queue)
184 (define-key wl-plugged-mode-map "P" 'wl-plugged-move-to-previous-server)
185 (define-key wl-plugged-mode-map "N" 'wl-plugged-move-to-next-server)
186 (define-key wl-plugged-mode-map "p" 'wl-plugged-move-to-previous)
187 (define-key wl-plugged-mode-map "n" 'wl-plugged-move-to-next)
188 (define-key wl-plugged-mode-map "\e\t" 'wl-plugged-move-to-previous)
189 (define-key wl-plugged-mode-map "\t" 'wl-plugged-move-to-next)
190 (wl-plugged-setup-mouse)
194 "Menu used in Plugged mode."
195 wl-plugged-mode-menu-spec))
197 (defun wl-plugged-mode ()
198 "Mode for setting Wanderlust plugged.
199 See info under Wanderlust for full documentation.
202 \\{wl-plugged-mode-map}
204 Entering Plugged mode calls the value of `wl-plugged-mode-hook'."
206 (kill-all-local-variables)
207 (use-local-map wl-plugged-mode-map)
208 (setq major-mode 'wl-plugged-mode)
209 (setq mode-name "Plugged")
210 (easy-menu-add wl-plugged-mode-menu)
211 (wl-mode-line-buffer-identification)
212 (setq wl-plugged-switch wl-plugged)
213 (setq wl-plugged-alist-modified nil)
214 (setq buffer-read-only t)
215 (run-hooks 'wl-plugged-mode-hook))
217 (defmacro wl-plugged-string (plugged &optional time)
218 (` (if (, time) wl-plugged-auto-off
219 (if (, plugged) wl-plugged-plug-on wl-plugged-plug-off))))
221 (defmacro wl-plugged-server-indent ()
222 (` (make-string wl-plugged-server-indent ? )))
224 (defun wl-plugged-set-variables ()
225 (setq wl-plugged-sending-queue-alist
226 (wl-plugged-sending-queue-info))
227 (setq wl-plugged-dop-queue-alist
228 (wl-plugged-dop-queue-info))
229 (setq wl-plugged-alist
230 (sort (copy-sequence elmo-plugged-alist)
232 (string< (caar a) (caar b))))))
234 (defun wl-plugged-sending-queue-info ()
235 ;; sending queue status
236 (let (alist msgs sent-via server port)
237 (setq msgs (elmo-list-folder wl-queue-folder))
239 (setq sent-via (wl-draft-queue-info-operation (car msgs) 'get-sent-via))
241 (when (eq (nth 1 (car sent-via)) 'unplugged)
242 (setq server (car (nth 2 (car sent-via)))
243 port (cdr (nth 2 (car sent-via))))
244 (elmo-plugged-p server port) ;; add elmo-plugged-alist if nothing.
246 (wl-append-assoc-list
250 (setq sent-via (cdr sent-via)))
251 (setq msgs (cdr msgs)))
254 (defun wl-plugged-sending-queue-status (qinfo)
255 ;; sending queue status
256 (let ((len (length (cdr qinfo))))
257 (concat (wl-plugged-set-folder-icon
259 (wl-folder-get-petname wl-queue-folder))
261 (format ": %d msgs (" len)
262 (format ": %d msg (" len))
263 (mapconcat (function int-to-string) (cdr qinfo) ",")
266 (defun wl-plugged-dop-queue-info ()
269 elmo-dop-queue dop-queue last alist server-info
271 (elmo-dop-queue-load)
272 (elmo-dop-queue-merge)
273 (setq dop-queue (sort elmo-dop-queue '(lambda (a b)
274 (string< (car a) (car b)))))
275 (wl-append dop-queue (list nil)) ;; terminate(dummy)
276 (setq last (caar dop-queue)) ;; first
278 (setq ope (cons (nth 1 (car dop-queue))
279 (length (nth 2 (car dop-queue)))))
280 (if (string= last (caar dop-queue))
281 (wl-append operation (list ope))
282 ;;(setq count (1+ count))
283 (when (and last (setq server-info (elmo-folder-portinfo last)))
285 (wl-append-assoc-list
286 (cons (car server-info) (nth 1 server-info)) ;; server port
287 (cons last operation)
289 (setq last (caar dop-queue)
290 operation (list ope)))
291 (setq dop-queue (cdr dop-queue)))
294 (defun wl-plugged-dop-queue-status (qinfo &optional column)
296 (let ((operations (cdr qinfo))
297 (column (or column wl-plugged-queue-status-column)))
299 '(lambda (folder-ope)
300 (concat (wl-plugged-set-folder-icon
302 (wl-folder-get-petname (car folder-ope)))
307 (format "%s:%d" (car ope) (cdr ope))
308 (format "%s" (car ope))))
309 (cdr folder-ope) ",")
312 (concat "\n" (wl-set-string-width column "")))))
314 (defun wl-plugged-drawing (plugged-alist)
315 (let ((buffer-read-only nil)
316 (alist plugged-alist)
317 (vars wl-plugged-switch-variables)
318 last server port label plugged time
319 line len qinfo column)
322 (insert (format "%s:[%s]%s"
324 (wl-plugged-string (symbol-value (cdar vars)))
325 (if (cdr vars) " " "")))
326 (setq vars (cdr vars)))
328 (let ((elmo-plugged wl-plugged-switch))
329 (setq line (format "[%s](wl-plugged)"
330 (wl-plugged-string (elmo-plugged-p))))
331 ;; sending queue status
332 (when (setq qinfo (assoc (cons nil nil) wl-plugged-sending-queue-alist))
334 (wl-set-string-width wl-plugged-queue-status-column line)
335 (wl-plugged-sending-queue-status qinfo))))
338 (setq server (caaar alist)
340 label (nth 1 (car alist))
341 plugged (nth 2 (car alist))
342 time (nth 3 (car alist)))
343 (unless (string= last server)
345 (insert (format "%s[%s]%s\n"
346 (wl-plugged-server-indent)
348 (elmo-plugged-p server nil plugged-alist))
354 (make-string wl-plugged-port-indent ? )
355 (wl-plugged-string plugged time)
362 (cdr (assq port wl-plugged-port-label-alist))
365 (setq column (max (if line (1+ (string-width line)) 0)
366 wl-plugged-queue-status-column))
368 ;; sending queue status
369 ((setq qinfo (assoc (cons server port) wl-plugged-sending-queue-alist))
372 (wl-set-string-width column line)
373 (wl-plugged-sending-queue-status qinfo))))
375 ((setq qinfo (assoc (cons server port) wl-plugged-dop-queue-alist))
378 (wl-set-string-width column line)
379 (wl-plugged-dop-queue-status qinfo column)))))
381 (setq alist (cdr alist)))
382 (delete-region (1- (point-max)) (point-max)) ;; delete line at the end.
383 (goto-char (point-min))
385 (wl-highlight-plugged-current-line)
387 (set-buffer-modified-p nil)
388 (count-lines (point-min) (point-max)))
390 (defun wl-plugged-redrawing-switch (indent switch &optional time)
392 (when (re-search-forward
393 (format "^%s\\[\\([^]]+\\)\\]" (make-string indent ? )))
394 (goto-char (match-beginning 1))
395 (delete-region (match-beginning 1) (match-end 1))
396 (insert (wl-plugged-string switch time))
397 (wl-highlight-plugged-current-line)
400 (defun wl-plugged-redrawing (plugged-alist)
401 (let ((buffer-read-only nil)
402 (alist plugged-alist)
403 last server port plugged time)
404 (goto-char (point-min))
405 (wl-plugged-redrawing-switch 0 (elmo-plugged-p))
407 (setq server (caaar alist)
409 plugged (nth 2 (car alist))
410 time (nth 3 (car alist)))
411 (unless (string= last server)
413 (wl-plugged-redrawing-switch
414 wl-plugged-server-indent
415 (elmo-plugged-p server nil plugged-alist))
418 (wl-plugged-redrawing-switch
419 wl-plugged-port-indent plugged time)
420 (setq alist (cdr alist))))
421 (set-buffer-modified-p nil))
423 (defun wl-plugged-change ()
425 (if (not elmo-plugged-alist)
426 (message "No plugged info")
427 (setq wl-plugged-winconf (current-window-configuration))
428 (let* ((cur-win (selected-window))
429 (max-lines (if (eq major-mode 'wl-summary-mode)
434 (set-buffer (get-buffer-create wl-plugged-buf-name))
436 (buffer-disable-undo (current-buffer))
437 (delete-windows-on (current-buffer))
438 (wl-plugged-set-variables)
439 (setq lines (wl-plugged-drawing wl-plugged-alist)))
440 (select-window cur-win)
441 (setq window-lines (min max-lines (max lines window-min-height)))
442 (when (> (- (window-height) window-lines) window-min-height)
443 (split-window cur-win (- (window-height) window-lines)))
444 (switch-to-buffer wl-plugged-buf-name)
447 (enlarge-window (- window-lines (window-height)))
448 (when (fboundp 'pos-visible-in-window-p)
449 (goto-char (point-min))
450 (while (and (<= (window-height) max-lines)
451 (not (pos-visible-in-window-p (1- (point-max)))))
452 (enlarge-window 2))))
454 (goto-char (point-min))
456 (wl-plugged-move-to-next)))) ;; goto first entry
458 (defsubst wl-plugged-get-server ()
461 (wl-plugged-move-to-previous-server)
463 (when (looking-at (format "^%s\\[[^]]+\\]\\(.*\\)"
464 (wl-plugged-server-indent)))
465 (elmo-match-buffer 1))))
467 (defun wl-plugged-toggle ()
469 (let ((cur-point (point)))
475 (let (variable switch name)
476 (goto-char cur-point)
477 (when (and (not (bobp))
478 (not (eq (char-before) ? )))
479 (if (re-search-backward " [^ ]+" nil t)
481 (re-search-backward "^[^ ]+" nil t)))
482 (when (looking-at "\\([^ :[]+\\):?\\[\\([^]]+\\)\\]")
483 (setq name (elmo-match-buffer 1))
484 (setq switch (not (string= (elmo-match-buffer 2) wl-plugged-plug-on)))
485 (when (setq variable (cdr (assoc name wl-plugged-switch-variables)))
486 (set variable switch))
487 (goto-char (match-beginning 2))
488 (let ((buffer-read-only nil))
489 (delete-region (match-beginning 2) (match-end 2))
490 (insert (wl-plugged-string switch))
491 (set-buffer-modified-p nil)))))
493 ((looking-at "^\\( *\\)\\[\\([^]]+\\)\\]\\([^ \n]*\\)")
494 (let* ((indent (length (elmo-match-buffer 1)))
495 (switch (elmo-match-buffer 2))
496 (name (elmo-match-buffer 3))
497 (plugged (not (string= switch wl-plugged-plug-on)))
498 (alist wl-plugged-alist)
501 ((eq indent wl-plugged-port-indent) ;; toggle port plug
503 ((string-match "\\([^([]*\\)(\\([^)[]+\\))" name)
504 (setq port (string-to-int (elmo-match-string 2 name))))
507 (setq server (wl-plugged-get-server))
508 (elmo-set-plugged plugged server port nil alist))
509 ((eq indent wl-plugged-server-indent) ;; toggle server plug
510 (elmo-set-plugged plugged name nil nil alist))
511 ((eq indent 0) ;; toggle all plug
512 (elmo-set-plugged plugged nil nil nil alist)))
514 (wl-plugged-redrawing wl-plugged-alist)
515 ;; show plugged status in modeline
516 (let ((elmo-plugged wl-plugged-switch))
517 (setq wl-plugged-switch (elmo-plugged-p)
518 wl-modeline-plug-status wl-plugged-switch)
519 (force-mode-line-update t))))))
520 (setq wl-plugged-alist-modified t)
521 (goto-char cur-point)))
523 (defun wl-plugged-click (e)
528 (defun wl-plugged-toggle-all ()
530 (let ((cur-point (point)))
531 (setq wl-plugged-switch (not wl-plugged-switch))
532 (elmo-set-plugged wl-plugged-switch nil nil nil wl-plugged-alist)
533 (wl-plugged-redrawing wl-plugged-alist)
534 (goto-char cur-point)
535 (setq wl-plugged-alist-modified t)
536 ;; show plugged status in modeline
537 (setq wl-modeline-plug-status wl-plugged-switch)
538 (force-mode-line-update t)))
540 (defun wl-plugged-exit ()
542 (setq ;;elmo-plugged-alist wl-plugged-alist
543 wl-plugged wl-plugged-switch
545 wl-plugged-sending-queue-alist nil
546 wl-plugged-dop-queue-alist nil)
547 (run-hooks 'wl-plugged-exit-hook)
548 (when wl-plugged-alist-modified
549 (wl-toggle-plugged (if wl-plugged 'on 'off) t))
550 (kill-buffer (current-buffer))
551 (if wl-plugged-winconf
552 (set-window-configuration wl-plugged-winconf)))
554 (defun wl-plugged-flush-queue ()
556 (let ((cur-point (point))
557 (dop-status (elmo-dop-queue-flush))
558 (send-status (wl-draft-queue-flush)))
559 (unless (or dop-status send-status)
560 (message "No processing queue."))
561 (wl-plugged-set-variables)
562 (wl-plugged-drawing wl-plugged-alist)
563 (goto-char cur-point)))
565 (defun wl-plugged-move-to-next ()
567 (when (re-search-forward "\\[\\([^]]+\\)\\]" nil t)
568 (let ((pos (match-beginning 1)))
569 (if (invisible-p pos)
570 (goto-char (next-visible-point pos))
573 (defun wl-plugged-move-to-previous ()
575 (if (eq (char-before) ?\]) (forward-char -1))
576 (when (re-search-backward "\\[\\([^]]+\\)\\]" nil t)
577 (let ((pos (match-beginning 1)))
578 (if (invisible-p pos)
579 (goto-char (next-visible-point pos))
582 (defun wl-plugged-move-to-next-server ()
585 (format "^%s\\[\\([^]]+\\)\\]" (wl-plugged-server-indent)))
589 (if (re-search-forward regexp nil t)
590 (setq point (match-beginning 1))))
591 (if point (goto-char point))))
593 (defun wl-plugged-move-to-previous-server ()
596 (format "^%s\\[\\([^]]+\\)\\]" (wl-plugged-server-indent))))
597 (if (re-search-backward regexp nil t)
598 (goto-char (match-beginning 1)))))
600 ;;; end of wl-plugged-mode
603 "Save summary and folder status."
605 (wl-save-status 'keep-summary))
607 (defun wl-save-status (&optional keep-summary)
608 (message "Saving summary and folder status...")
611 (let ((summaries (wl-collect-summary)))
613 (set-buffer (car summaries))
615 (wl-summary-cleanup-temp-marks))
616 (wl-summary-save-status keep-summary)
618 (kill-buffer (car summaries)))
619 (setq summaries (cdr summaries))))))
620 (wl-refile-alist-save)
621 (wl-folder-info-save)
622 (and (featurep 'wl-fldmgr) (wl-fldmgr-exit))
623 (wl-crosspost-alist-save)
624 (message "Saving summary and folder status...done"))
628 (when (or (not wl-interactive-exit)
629 (y-or-n-p "Quit Wanderlust?"))
632 (run-hooks 'wl-exit-hook)
634 (wl-folder-cleanup-variables)
635 (elmo-cleanup-variables)
639 (list (format "%s\\(:.*\\)?"
640 (default-value 'wl-message-buf-name))
642 wl-folder-buffer-name
645 (elmo-buffer-cache-clean-up)
646 (if (fboundp 'mmelmo-cleanup-entity-buffers)
647 (mmelmo-cleanup-entity-buffers))
650 (remove-hook 'kill-emacs-hook 'wl-save-status))
652 (message "") ;; empty minibuffer.
655 (defun wl-init (&optional arg)
657 (setq elmo-plugged wl-plugged)
658 (let (succeed demo-buf)
660 (setq demo-buf (wl-demo)))
662 (add-hook 'kill-emacs-hook 'wl-save-status))
667 (wl-refile-alist-setup)
668 (wl-crosspost-alist-load)
672 (setq elmo-use-semi t))
674 (setq elmo-use-semi nil))
677 (fset 'wl-summary-from-func-internal
678 (symbol-value 'wl-summary-from-func))
679 (fset 'wl-summary-subject-func-internal
680 (symbol-value 'wl-summary-subject-func))
681 (fset 'wl-summary-subject-filter-func-internal
682 (symbol-value 'wl-summary-subject-filter-func))
683 (setq elmo-no-from wl-summary-no-from-message)
684 (setq elmo-no-subject wl-summary-no-subject-message)
687 (message "Checking environment...")
688 (wl-check-environment arg)
689 (message "Checking environment...done")))
691 (kill-buffer demo-buf))
694 ;; This hook may contain the functions `wl-plugged-init-icons' and
695 ;; `wl-biff-init-icons' for reasons of system internal to accord
696 ;; facilities for the Emacs variants.
697 (run-hooks 'wl-init-hook)))))
699 (defun wl-check-environment (no-check-folder)
700 (unless (featurep 'mime-setup)
701 (require 'mime-setup))
703 (error "Please set `wl-from'"))
704 (unless (string-match "[^.]\\.[^.]" (or wl-message-id-domain
706 (concat (system-name)
709 (error "Please set `wl-local-domain' to get valid FQDN"))
710 (if (string-match "@" (or wl-message-id-domain
712 (concat (system-name)
715 (error "Please remove `@' from `wl-message-id-domain'"))
716 (when (not no-check-folder)
717 (if (not (eq (elmo-folder-get-type wl-draft-folder) 'localdir))
718 (error "%s is not allowed for draft folder" wl-draft-folder))
719 (unless (elmo-folder-exists-p wl-draft-folder)
721 (format "Draft Folder %s does not exist, create it?"
723 (elmo-create-folder wl-draft-folder)
724 (error "Draft Folder is not created")))
725 (if (and wl-draft-enable-queuing
726 (not (elmo-folder-exists-p wl-queue-folder)))
728 (format "Queue Folder %s does not exist, create it?"
730 (elmo-create-folder wl-queue-folder)
731 (error "Queue Folder is not created"))))
732 (when (not (eq no-check-folder 'wl-draft))
733 (unless (elmo-folder-exists-p wl-trash-folder)
735 (format "Trash Folder %s does not exist, create it?"
737 (elmo-create-folder wl-trash-folder)
738 (error "Trash Folder is not created")))
739 (unless (elmo-folder-exists-p elmo-lost+found-folder)
740 (elmo-create-folder elmo-lost+found-folder)))
741 (unless (file-exists-p wl-tmp-dir)
743 (format "Temp directory (to save multipart) %s does not exist, create it now?"
745 (make-directory wl-tmp-dir)
746 (error "Temp directory is not created"))))
749 (defun wl (&optional arg)
750 "Start Wanderlust -- Yet Another Message Interface On Emacsen.
751 If prefix argument is specified, folder checkings are skipped."
753 (or wl-init (wl-load-profile))
756 (wl-plugged-init (wl-folder arg))
760 (run-hooks 'wl-auto-check-folder-pre-hook)
761 (wl-folder-auto-check)
762 (run-hooks 'wl-auto-check-folder-hook))
763 (unless arg (wl-biff-start))
764 (run-hooks 'wl-hook)))
766 ;; Define some autoload functions WL might use.
768 ;; This little mapcar goes through the list below and marks the
769 ;; symbols in question as autoloaded functions.
773 (let ((interactive (nth 1 (memq ':interactive package))))
778 (when (consp function)
779 (setq keymap (car (memq 'keymap function)))
780 (setq function (car function)))
781 (autoload function (car package) nil interactive keymap))))
782 (if (eq (nth 1 package) ':interactive)
785 '(("wl-fldmgr" :interactive t
786 wl-fldmgr-access-display-all wl-fldmgr-access-display-normal
787 wl-fldmgr-add wl-fldmgr-clear-cut-entity-list wl-fldmgr-copy
788 wl-fldmgr-copy-region wl-fldmgr-cut wl-fldmgr-cut-region
789 wl-fldmgr-make-access-group wl-fldmgr-make-filter
790 wl-fldmgr-make-group wl-fldmgr-make-multi
791 wl-fldmgr-reconst-entity-hashtb wl-fldmgr-rename wl-fldmgr-delete
792 wl-fldmgr-save-folders wl-fldmgr-set-petname wl-fldmgr-sort
793 wl-fldmgr-subscribe wl-fldmgr-subscribe-region
794 wl-fldmgr-unsubscribe wl-fldmgr-unsubscribe-region wl-fldmgr-yank )
796 (wl-fldmgr-mode-map keymap)
797 wl-fldmgr-add-entity-hashtb)
798 ("wl-expire" :interactive t
799 wl-folder-archive-current-entity
800 wl-folder-expire-current-entity wl-summary-archive
803 wl-score-save wl-summary-rescore-msgs wl-summary-score-headers
804 wl-summary-score-update-all-lines )
805 ("wl-score" :interactive t
806 wl-score-change-score-file wl-score-edit-current-scores
807 wl-score-edit-file wl-score-flush-cache wl-summary-rescore
808 wl-score-set-mark-below wl-score-set-expunge-below
809 wl-summary-increase-score wl-summary-lower-score ))))
811 ;; for backward compatibility
812 (defalias 'wl-summary-from-func-petname 'wl-summary-default-from)
815 (product-provide (provide 'wl) (require 'wl-version))