1 ;;; wl.el -- Wanderlust bootstrap.
3 ;; Copyright 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
5 ;; Author: Yuuichi Teranishi <teranisi@gohome.org>
6 ;; Keywords: mail, net news
8 ;; This file is part of Wanderlust (Yet Another Message Interface on Emacsen).
10 ;; This program is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; This program is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
34 (unless (and (fboundp 'defgroup)
37 (defmacro defgroup (&rest args))
38 (defmacro defcustom (symbol value &optional doc &rest args)
39 (let ((doc (concat "*" (or doc ""))))
40 (` (defvar (, symbol) (, value) (, doc))))))
51 (provide 'wl) ; circular dependency
62 (require 'wl-highlight)
73 (defun wl-plugged-init (&optional make-alist)
74 (setq elmo-plugged wl-plugged)
75 (if wl-reset-plugged-alist
76 (elmo-set-plugged elmo-plugged))
78 (wl-make-plugged-alist))
80 (setq elmo-plugged (setq wl-plugged (elmo-plugged-p)))
81 (setq wl-plug-state-indicator
83 wl-plug-state-indicator-on
84 wl-plug-state-indicator-off))
86 (wl-toggle-plugged t 'flush))
87 (force-mode-line-update t))
89 (defun wl-toggle-plugged (&optional arg queue-flush-only)
91 (elmo-quit) ; Disconnect current connection.
92 (unless queue-flush-only
97 (setq wl-plugged nil))
98 (t (setq wl-plugged (null wl-plugged))))
99 (elmo-set-plugged wl-plugged))
100 (setq elmo-plugged wl-plugged)
106 (wl-summary-msgdb-save)
107 ;; msgdb is saved, but cache is not saved yet.
108 (wl-summary-set-message-modified)))
109 (wl-collect-summary)))
113 (setq wl-plug-state-indicator wl-plug-state-indicator-on)
114 (elmo-dop-queue-flush)
115 (if (and wl-draft-enable-queuing
117 (wl-draft-queue-flush))
118 (when (and (eq major-mode 'wl-summary-mode)
119 (elmo-folder-plugged-p wl-summary-buffer-folder-name))
120 (let* ((msgdb-dir (elmo-msgdb-expand-path
121 wl-summary-buffer-folder-name))
122 (seen-list (elmo-msgdb-seen-load msgdb-dir)))
124 (wl-summary-flush-pending-append-operations seen-list))
125 (elmo-msgdb-seen-save msgdb-dir seen-list)))
126 (run-hooks 'wl-plugged-hook))
127 (setq wl-plug-state-indicator wl-plug-state-indicator-off)
128 (run-hooks 'wl-unplugged-hook))
129 (force-mode-line-update t))
133 (defvar wl-plugged-port-label-alist
134 (list (cons elmo-default-nntp-port "nntp")
135 (cons elmo-default-imap4-port "imap4")
136 (cons elmo-default-pop3-port "pop3")))
137 ;;(cons elmo-pop-before-smtp-port "pop3")
139 (defconst wl-plugged-switch-variables
140 '(("Queuing" . wl-draft-enable-queuing)
141 ("AutoFlushQueue" . wl-auto-flush-queue)
142 ("DisconnectedOperation" . elmo-enable-disconnected-operation)))
144 (defvar wl-plugged-buf-name "Plugged")
145 (defvar wl-plugged-mode-map nil)
146 (defvar wl-plugged-alist nil)
147 (defvar wl-plugged-switch nil)
148 (defvar wl-plugged-winconf nil)
149 (defvar wl-plugged-sending-queue-alist nil)
150 (defvar wl-plugged-dop-queue-alist nil)
151 (defvar wl-plugged-alist-modified nil)
153 (defvar wl-plugged-glyph nil)
154 (defvar wl-unplugged-glyph nil)
156 (defvar wl-plugged-mode-menu-spec
158 ["Toggle plugged" wl-plugged-toggle t]
159 ["Toggle All plugged" wl-plugged-toggle-all t]
160 ["Prev Port" wl-plugged-move-to-previous t]
161 ["Next Port" wl-plugged-move-to-next t]
162 ["Prev Server" wl-plugged-move-to-previous-server t]
163 ["Next Server" wl-plugged-move-to-next-server t]
164 ["Flush queue" wl-plugged-flush-queue t]
166 ["Exit" wl-plugged-exit t]))
170 (defun wl-plugged-setup-mouse ()
171 (define-key wl-plugged-mode-map 'button2 'wl-plugged-click))
173 (defun wl-plugged-setup-mouse ())
174 (defun wl-plugged-setup-mouse ()
175 (define-key wl-plugged-mode-map [mouse-2] 'wl-plugged-click)))))
177 (unless wl-plugged-mode-map
178 (setq wl-plugged-mode-map (make-sparse-keymap))
179 (define-key wl-plugged-mode-map " " 'wl-plugged-toggle)
180 (define-key wl-plugged-mode-map "\C-m" 'wl-plugged-toggle)
181 (define-key wl-plugged-mode-map "\M-t" 'wl-plugged-toggle-all)
182 (define-key wl-plugged-mode-map "q" 'wl-plugged-exit)
183 (define-key wl-plugged-mode-map "\C-t" 'wl-plugged-exit)
184 (define-key wl-plugged-mode-map "F" 'wl-plugged-flush-queue)
185 (define-key wl-plugged-mode-map "P" 'wl-plugged-move-to-previous-server)
186 (define-key wl-plugged-mode-map "N" 'wl-plugged-move-to-next-server)
187 (define-key wl-plugged-mode-map "p" 'wl-plugged-move-to-previous)
188 (define-key wl-plugged-mode-map "n" 'wl-plugged-move-to-next)
189 (define-key wl-plugged-mode-map "\e\t" 'wl-plugged-move-to-previous)
190 (define-key wl-plugged-mode-map "\t" 'wl-plugged-move-to-next)
191 (wl-plugged-setup-mouse)
195 "Menu used in Plugged mode."
196 wl-plugged-mode-menu-spec))
198 (defun wl-plugged-mode ()
199 "Mode for setting Wanderlust plugged.
200 See info under Wanderlust for full documentation.
203 \\{wl-plugged-mode-map}
205 Entering Plugged mode calls the value of `wl-plugged-mode-hook'."
207 (kill-all-local-variables)
208 (use-local-map wl-plugged-mode-map)
209 (setq major-mode 'wl-plugged-mode)
210 (setq mode-name "Plugged")
211 (easy-menu-add wl-plugged-mode-menu)
212 (when wl-show-plug-status-on-modeline
213 (setq mode-line-format (wl-make-modeline)))
214 (setq wl-plugged-switch wl-plugged)
215 (setq wl-plugged-alist-modified nil)
216 (setq buffer-read-only t)
217 (run-hooks 'wl-plugged-mode-hook))
219 (defmacro wl-plugged-string (plugged &optional time)
220 (` (if (, time) wl-plugged-auto-off
221 (if (, plugged) wl-plugged-plug-on wl-plugged-plug-off))))
223 (defmacro wl-plugged-server-indent ()
224 (` (make-string wl-plugged-server-indent ? )))
226 (defun wl-plugged-set-variables ()
227 (setq wl-plugged-sending-queue-alist
228 (wl-plugged-sending-queue-info))
229 (setq wl-plugged-dop-queue-alist
230 (wl-plugged-dop-queue-info))
231 (setq wl-plugged-alist
232 (sort (copy-sequence elmo-plugged-alist)
234 (string< (caar a) (caar b))))))
236 (defun wl-plugged-sending-queue-info ()
237 ;; sending queue status
238 (let (alist msgs sent-via server port)
239 (setq msgs (elmo-list-folder wl-queue-folder))
241 (setq sent-via (wl-draft-queue-info-operation (car msgs) 'get-sent-via))
243 (when (eq (nth 1 (car sent-via)) 'unplugged)
244 (setq server (car (nth 2 (car sent-via)))
245 port (cdr (nth 2 (car sent-via))))
246 (elmo-plugged-p server port) ;; add elmo-plugged-alist if nothing.
248 (wl-append-assoc-list
252 (setq sent-via (cdr sent-via)))
253 (setq msgs (cdr msgs)))
256 (defun wl-plugged-sending-queue-status (qinfo)
257 ;; sending queue status
258 (let ((len (length (cdr qinfo))))
259 (concat (wl-plugged-set-folder-icon
261 (wl-folder-get-petname wl-queue-folder))
263 (format ": %d msgs (" len)
264 (format ": %d msg (" len))
265 (mapconcat (function int-to-string) (cdr qinfo) ",")
268 (defun wl-plugged-dop-queue-info ()
271 elmo-dop-queue dop-queue last alist server-info
273 (elmo-dop-queue-load)
274 (elmo-dop-queue-merge)
275 (setq dop-queue (sort elmo-dop-queue '(lambda (a b)
276 (string< (car a) (car b)))))
277 (wl-append dop-queue (list nil)) ;; terminate(dummy)
278 (setq last (caar dop-queue)) ;; first
280 (setq ope (cons (nth 1 (car dop-queue))
281 (length (nth 2 (car dop-queue)))))
282 (if (string= last (caar dop-queue))
283 (wl-append operation (list ope))
284 ;;(setq count (1+ count))
285 (when (and last (setq server-info (elmo-folder-portinfo last)))
287 (wl-append-assoc-list
288 (cons (car server-info) (nth 1 server-info)) ;; server port
289 (cons last operation)
291 (setq last (caar dop-queue)
292 operation (list ope)))
293 (setq dop-queue (cdr dop-queue)))
296 (defun wl-plugged-dop-queue-status (qinfo &optional column)
298 (let ((operations (cdr qinfo))
299 (column (or column wl-plugged-queue-status-column)))
301 '(lambda (folder-ope)
302 (concat (wl-plugged-set-folder-icon
304 (wl-folder-get-petname (car folder-ope)))
309 (format "%s:%d" (car ope) (cdr ope))
310 (format "%s" (car ope))))
311 (cdr folder-ope) ",")
314 (concat "\n" (wl-set-string-width column "")))))
316 (defun wl-plugged-drawing (plugged-alist)
317 (let ((buffer-read-only nil)
318 (alist plugged-alist)
319 (vars wl-plugged-switch-variables)
320 last server port label plugged time
321 line len qinfo column)
324 (insert (format "%s:[%s]%s"
326 (wl-plugged-string (symbol-value (cdar vars)))
327 (if (cdr vars) " " "")))
328 (setq vars (cdr vars)))
330 (let ((elmo-plugged wl-plugged-switch))
331 (setq line (format "[%s](wl-plugged)"
332 (wl-plugged-string (elmo-plugged-p))))
333 ;; sending queue status
334 (when (setq qinfo (assoc (cons nil nil) wl-plugged-sending-queue-alist))
336 (wl-set-string-width wl-plugged-queue-status-column line)
337 (wl-plugged-sending-queue-status qinfo))))
340 (setq server (caaar alist)
342 label (nth 1 (car alist))
343 plugged (nth 2 (car alist))
344 time (nth 3 (car alist)))
345 (unless (string= last server)
347 (insert (format "%s[%s]%s\n"
348 (wl-plugged-server-indent)
350 (elmo-plugged-p server nil plugged-alist))
356 (make-string wl-plugged-port-indent ? )
357 (wl-plugged-string plugged time)
364 (cdr (assq port wl-plugged-port-label-alist))
367 (setq column (max (if line (1+ (string-width line)) 0)
368 wl-plugged-queue-status-column))
370 ;; sending queue status
371 ((setq qinfo (assoc (cons server port) wl-plugged-sending-queue-alist))
374 (wl-set-string-width column line)
375 (wl-plugged-sending-queue-status qinfo))))
377 ((setq qinfo (assoc (cons server port) wl-plugged-dop-queue-alist))
380 (wl-set-string-width column line)
381 (wl-plugged-dop-queue-status qinfo column)))))
383 (setq alist (cdr alist)))
384 (delete-region (1- (point-max)) (point-max)) ;; delete line at the end.
385 (goto-char (point-min))
387 (wl-highlight-plugged-current-line)
389 (set-buffer-modified-p nil)
390 (count-lines (point-min) (point-max)))
392 (defun wl-plugged-redrawing-switch (indent switch &optional time)
394 (when (re-search-forward
395 (format "^%s\\[\\([^]]+\\)\\]" (make-string indent ? )))
396 (goto-char (match-beginning 1))
397 (delete-region (match-beginning 1) (match-end 1))
398 (insert (wl-plugged-string switch time))
399 (wl-highlight-plugged-current-line)
402 (defun wl-plugged-redrawing (plugged-alist)
403 (let ((buffer-read-only nil)
404 (alist plugged-alist)
405 last server port plugged time)
406 (goto-char (point-min))
407 (wl-plugged-redrawing-switch 0 (elmo-plugged-p))
409 (setq server (caaar alist)
411 plugged (nth 2 (car alist))
412 time (nth 3 (car alist)))
413 (unless (string= last server)
415 (wl-plugged-redrawing-switch
416 wl-plugged-server-indent
417 (elmo-plugged-p server nil plugged-alist))
420 (wl-plugged-redrawing-switch
421 wl-plugged-port-indent plugged time)
422 (setq alist (cdr alist))))
423 (set-buffer-modified-p nil))
425 (defun wl-plugged-change ()
427 (if (not elmo-plugged-alist)
428 (message "No plugged info")
429 (setq wl-plugged-winconf (current-window-configuration))
430 (let* ((cur-win (selected-window))
431 (max-lines (if (eq major-mode 'wl-summary-mode)
436 (set-buffer (get-buffer-create wl-plugged-buf-name))
438 (buffer-disable-undo (current-buffer))
439 (delete-windows-on (current-buffer))
440 (wl-plugged-set-variables)
441 (setq lines (wl-plugged-drawing wl-plugged-alist)))
442 (select-window cur-win)
443 (setq window-lines (min max-lines (max lines window-min-height)))
444 (when (> (- (window-height) window-lines) window-min-height)
445 (split-window cur-win (- (window-height) window-lines)))
446 (switch-to-buffer wl-plugged-buf-name)
449 (enlarge-window (- window-lines (window-height)))
450 (when (fboundp 'pos-visible-in-window-p)
451 (goto-char (point-min))
452 (while (and (<= (window-height) max-lines)
453 (not (pos-visible-in-window-p (1- (point-max)))))
454 (enlarge-window 2))))
456 (goto-char (point-min))
458 (wl-plugged-move-to-next)))) ;; goto first entry
460 (defsubst wl-plugged-get-server ()
463 (wl-plugged-move-to-previous-server)
465 (when (looking-at (format "^%s\\[[^]]+\\]\\(.*\\)"
466 (wl-plugged-server-indent)))
467 (elmo-match-buffer 1))))
469 (defun wl-plugged-toggle ()
471 (let ((cur-point (point)))
477 (let (variable switch name)
478 (goto-char cur-point)
479 (when (and (not (bobp))
480 (not (eq (char-before) ? )))
481 (if (re-search-backward " [^ ]+" nil t)
483 (re-search-backward "^[^ ]+" nil t)))
484 (when (looking-at "\\([^ :[]+\\):?\\[\\([^]]+\\)\\]")
485 (setq name (elmo-match-buffer 1))
486 (setq switch (not (string= (elmo-match-buffer 2) wl-plugged-plug-on)))
487 (when (setq variable (cdr (assoc name wl-plugged-switch-variables)))
488 (set variable switch))
489 (goto-char (match-beginning 2))
490 (let ((buffer-read-only nil))
491 (delete-region (match-beginning 2) (match-end 2))
492 (insert (wl-plugged-string switch))
493 (set-buffer-modified-p nil)))))
495 ((looking-at "^\\( *\\)\\[\\([^]]+\\)\\]\\([^ \n]*\\)")
496 (let* ((indent (length (elmo-match-buffer 1)))
497 (switch (elmo-match-buffer 2))
498 (name (elmo-match-buffer 3))
499 (plugged (not (string= switch wl-plugged-plug-on)))
500 (alist wl-plugged-alist)
503 ((eq indent wl-plugged-port-indent) ;; toggle port plug
505 ((string-match "\\([^([]*\\)(\\([^)[]+\\))" name)
506 (setq port (string-to-int (elmo-match-string 2 name))))
509 (setq server (wl-plugged-get-server))
510 (elmo-set-plugged plugged server port nil alist))
511 ((eq indent wl-plugged-server-indent) ;; toggle server plug
512 (elmo-set-plugged plugged name nil nil alist))
513 ((eq indent 0) ;; toggle all plug
514 (elmo-set-plugged plugged nil nil nil alist)))
516 (wl-plugged-redrawing wl-plugged-alist)
517 ;; change wl-plug-state-indicator
518 (let ((elmo-plugged wl-plugged-switch))
519 (setq wl-plugged-switch (elmo-plugged-p))
520 (setq wl-plug-state-indicator
521 (if wl-plugged-switch
522 wl-plug-state-indicator-on
523 wl-plug-state-indicator-off))
524 (force-mode-line-update t))))))
525 (setq wl-plugged-alist-modified t)
526 (goto-char cur-point)))
528 (defun wl-plugged-click (e)
533 (defun wl-plugged-toggle-all ()
535 (let ((cur-point (point)))
536 (setq wl-plugged-switch (not wl-plugged-switch))
537 (elmo-set-plugged wl-plugged-switch nil nil nil wl-plugged-alist)
538 (wl-plugged-redrawing wl-plugged-alist)
539 (goto-char cur-point)
540 (setq wl-plugged-alist-modified t)
541 ;; change wl-plug-state-indicator
542 (setq wl-plug-state-indicator
543 (if wl-plugged-switch
544 wl-plug-state-indicator-on
545 wl-plug-state-indicator-off))
546 (force-mode-line-update t)))
548 (defun wl-plugged-exit ()
550 (setq ;;elmo-plugged-alist wl-plugged-alist
551 wl-plugged wl-plugged-switch
553 wl-plugged-sending-queue-alist nil
554 wl-plugged-dop-queue-alist nil)
555 (run-hooks 'wl-plugged-exit-hook)
556 (when wl-plugged-alist-modified
557 (wl-toggle-plugged (if wl-plugged 'on 'off) t))
558 (kill-buffer (current-buffer))
559 (if wl-plugged-winconf
560 (set-window-configuration wl-plugged-winconf)))
562 (defun wl-plugged-flush-queue ()
564 (let ((cur-point (point))
565 (dop-status (elmo-dop-queue-flush))
566 (send-status (wl-draft-queue-flush)))
567 (unless (or dop-status send-status)
568 (message "No processing queue."))
569 (wl-plugged-set-variables)
570 (wl-plugged-drawing wl-plugged-alist)
571 (goto-char cur-point)))
573 (defun wl-plugged-move-to-next ()
575 (when (re-search-forward "\\[\\([^]]+\\)\\]" nil t)
576 (let ((pos (match-beginning 1)))
577 (if (invisible-p pos)
578 (goto-char (next-visible-point pos))
581 (defun wl-plugged-move-to-previous ()
583 (if (eq (char-before) ?\]) (forward-char -1))
584 (when (re-search-backward "\\[\\([^]]+\\)\\]" nil t)
585 (let ((pos (match-beginning 1)))
586 (if (invisible-p pos)
587 (goto-char (next-visible-point pos))
590 (defun wl-plugged-move-to-next-server ()
593 (format "^%s\\[\\([^]]+\\)\\]" (wl-plugged-server-indent)))
597 (if (re-search-forward regexp nil t)
598 (setq point (match-beginning 1))))
599 (if point (goto-char point))))
601 (defun wl-plugged-move-to-previous-server ()
604 (format "^%s\\[\\([^]]+\\)\\]" (wl-plugged-server-indent))))
605 (if (re-search-backward regexp nil t)
606 (goto-char (match-beginning 1)))))
608 ;;; end of wl-plugged-mode
611 "Save summary and folder status."
613 (wl-save-status 'keep-summary))
615 (defun wl-save-status (&optional keep-summary)
616 (message "Saving summary and folder status...")
619 (let ((summaries (wl-collect-summary)))
625 (wl-summary-cleanup-temp-marks))
626 (wl-summary-save-status keep-summary)
630 (wl-refile-alist-save
631 wl-refile-alist-file-name wl-refile-alist)
632 (wl-refile-alist-save
633 wl-refile-msgid-alist-file-name wl-refile-msgid-alist)
634 (wl-folder-info-save)
635 (and (featurep 'wl-fldmgr) (wl-fldmgr-exit))
636 (wl-crosspost-alist-save)
637 (message "Saving summary and folder status...done."))
641 (when (or (not wl-interactive-exit)
642 (y-or-n-p "Quit Wanderlust?"))
644 (run-hooks 'wl-exit-hook)
646 (wl-folder-cleanup-variables)
647 (elmo-cleanup-variables)
651 (list (format "%s\\(:.*\\)?"
652 (default-value 'wl-message-buf-name))
654 wl-folder-buffer-name)
656 (elmo-buffer-cache-clean-up)
657 (if (fboundp 'mmelmo-cleanup-entity-buffers)
658 (mmelmo-cleanup-entity-buffers))
661 (remove-hook 'kill-emacs-hook 'wl-save-status))
663 (message "") ;; empty minibuffer.
666 (defun wl-init (&optional arg)
668 (setq elmo-plugged wl-plugged)
669 (let (succeed demo-buf)
671 (setq demo-buf (wl-demo)))
673 (add-hook 'kill-emacs-hook 'wl-save-status))
678 (wl-refile-alist-setup)
679 (wl-crosspost-alist-load)
683 (setq elmo-use-semi t))
685 (setq elmo-use-semi nil))
688 (fset 'wl-summary-from-func-internal
689 (symbol-value 'wl-summary-from-func))
690 (fset 'wl-summary-subject-func-internal
691 (symbol-value 'wl-summary-subject-func))
692 (fset 'wl-summary-subject-filter-func-internal
693 (symbol-value 'wl-summary-subject-filter-func))
694 (setq elmo-no-from wl-summary-no-from-message)
695 (setq elmo-no-subject wl-summary-no-subject-message)
698 (message "Checking environment...")
699 (wl-check-environment arg)
700 (message "Checking environment...done.")))
702 (kill-buffer demo-buf))
705 (run-hooks 'wl-init-hook)))))
707 (defun wl-check-environment (no-check-folder)
708 (unless (featurep 'mime-setup)
709 (require 'mime-setup))
711 (error "Please set `wl-from'"))
712 (unless (string-match "[^.]\\.[^.]" (or wl-message-id-domain
714 (concat (system-name)
717 (error "Please set `wl-local-domain' to get valid FQDN"))
718 (when (not no-check-folder)
719 (if (not (eq (elmo-folder-get-type wl-draft-folder) 'localdir))
720 (error "%s is not allowed for draft folder" wl-draft-folder))
721 (unless (elmo-folder-exists-p wl-draft-folder)
723 (format "Draft Folder %s does not exist, create it?"
725 (elmo-create-folder wl-draft-folder)
726 (error "Draft Folder is not created")))
727 (if (and wl-draft-enable-queuing
728 (not (elmo-folder-exists-p wl-queue-folder)))
730 (format "Queue Folder %s does not exist, create it?"
732 (elmo-create-folder wl-queue-folder)
733 (error "Queue Folder is not created")))
734 (unless (elmo-folder-exists-p wl-trash-folder)
736 (format "Trash Folder %s does not exist, create it?"
738 (elmo-create-folder wl-trash-folder)
739 (error "Trash Folder is not created")))
740 (unless (elmo-folder-exists-p elmo-lost+found-folder)
741 (elmo-create-folder elmo-lost+found-folder)))
742 (unless (file-exists-p wl-tmp-dir)
744 (format "Temp directory (to save multipart) %s does not exist, create it now?"
746 (make-directory wl-tmp-dir)
747 (error "Temp directory is not created"))))
750 (defun wl (&optional arg)
751 "Start Wanderlust -- Yet Another Message Interface On Emacsen.
752 If prefix argument is specified, folder checkings are skipped."
758 (let ((make (wl-folder arg)))
759 (wl-plugged-init make)))
760 (run-hooks 'wl-hook))
762 ;; Define some autoload functions WL might use.
764 ;; This little mapcar goes through the list below and marks the
765 ;; symbols in question as autoloaded functions.
769 (let ((interactive (nth 1 (memq ':interactive package))))
774 (when (consp function)
775 (setq keymap (car (memq 'keymap function)))
776 (setq function (car function)))
777 (autoload function (car package) nil interactive keymap))))
778 (if (eq (nth 1 package) ':interactive)
781 '(("wl-fldmgr" :interactive t
782 wl-fldmgr-access-display-all wl-fldmgr-access-display-normal
783 wl-fldmgr-add wl-fldmgr-clear-cut-entity-list wl-fldmgr-copy
784 wl-fldmgr-copy-region wl-fldmgr-cut wl-fldmgr-cut-region
785 wl-fldmgr-make-access-group wl-fldmgr-make-filter
786 wl-fldmgr-make-group wl-fldmgr-make-multi
787 wl-fldmgr-reconst-entity-hashtb wl-fldmgr-rename wl-fldmgr-delete
788 wl-fldmgr-save-folders wl-fldmgr-set-petname wl-fldmgr-sort
789 wl-fldmgr-subscribe wl-fldmgr-subscribe-region
790 wl-fldmgr-unsubscribe wl-fldmgr-unsubscribe-region wl-fldmgr-yank )
792 (wl-fldmgr-mode-map keymap)
793 wl-fldmgr-add-entity-hashtb)
794 ("wl-expire" :interactive t
795 wl-folder-archive-current-entity
796 wl-folder-expire-current-entity wl-summary-archive
799 wl-score-save wl-summary-rescore-msgs wl-summary-score-headers
800 wl-summary-score-update-all-lines )
801 ("wl-score" :interactive t
802 wl-score-change-score-file wl-score-edit-current-scores
803 wl-score-edit-file wl-score-flush-cache wl-summary-rescore
804 wl-score-set-mark-below wl-score-set-expunge-below
805 wl-summary-increase-score wl-summary-lower-score ))))
807 ;; for backward compatibility
808 (defalias 'wl-summary-from-func-petname 'wl-summary-default-from)