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
7 ;; Time-stamp: <2000-04-07 09:15:33 teranisi>
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.
35 (unless (and (fboundp 'defgroup)
38 (defmacro defgroup (&rest args))
39 (defmacro defcustom (symbol value &optional doc &rest args)
40 (let ((doc (concat "*" (or doc ""))))
41 (` (defvar (, symbol) (, value) (, doc))))))
52 (provide 'wl) ; circular dependency
63 (require 'wl-highlight)
74 (defun wl-plugged-init (&optional make-alist)
75 (setq elmo-plugged wl-plugged)
76 (if wl-reset-plugged-alist
77 (elmo-set-plugged elmo-plugged))
79 (wl-make-plugged-alist))
81 (setq elmo-plugged (setq wl-plugged (elmo-plugged-p)))
82 (setq wl-plug-state-indicator
84 wl-plug-state-indicator-on
85 wl-plug-state-indicator-off))
87 (wl-toggle-plugged t 'flush))
88 (force-mode-line-update t))
90 (defun wl-toggle-plugged (&optional arg queue-flush-only)
92 (elmo-quit) ; Disconnect current connection.
93 (unless queue-flush-only
98 (setq wl-plugged nil))
99 (t (setq wl-plugged (null wl-plugged))))
100 (elmo-set-plugged wl-plugged))
101 (setq elmo-plugged wl-plugged)
107 (wl-summary-msgdb-save)
108 ;; msgdb is saved, but cache is not saved yet.
109 (wl-summary-set-message-modified)))
110 (wl-collect-summary)))
114 (setq wl-plug-state-indicator wl-plug-state-indicator-on)
115 (elmo-dop-queue-flush)
116 (if (and wl-draft-enable-queuing
118 (wl-draft-queue-flush))
119 (when (and (eq major-mode 'wl-summary-mode)
120 (elmo-folder-plugged-p wl-summary-buffer-folder-name))
121 (let* ((msgdb-dir (elmo-msgdb-expand-path
122 wl-summary-buffer-folder-name))
123 (seen-list (elmo-msgdb-seen-load msgdb-dir)))
125 (wl-summary-flush-pending-append-operations seen-list))
126 (elmo-msgdb-seen-save msgdb-dir seen-list)))
127 (run-hooks 'wl-plugged-hook))
128 (setq wl-plug-state-indicator wl-plug-state-indicator-off)
129 (run-hooks 'wl-unplugged-hook))
130 (force-mode-line-update t))
134 (defvar wl-plugged-port-label-alist
135 (list (cons elmo-default-nntp-port "nntp")
136 (cons elmo-default-imap4-port "imap4")
137 (cons elmo-default-pop3-port "pop3")))
138 ;;(cons elmo-pop-before-smtp-port "pop3")
140 (defconst wl-plugged-switch-variables
141 '(("Queuing" . wl-draft-enable-queuing)
142 ("AutoFlushQueue" . wl-auto-flush-queue)
143 ("DisconnectedOperation" . elmo-enable-disconnected-operation)))
145 (defvar wl-plugged-buf-name "Plugged")
146 (defvar wl-plugged-mode-map nil)
147 (defvar wl-plugged-alist nil)
148 (defvar wl-plugged-switch nil)
149 (defvar wl-plugged-winconf nil)
150 (defvar wl-plugged-sending-queue-alist nil)
151 (defvar wl-plugged-dop-queue-alist nil)
152 (defvar wl-plugged-alist-modified nil)
154 (defvar wl-plugged-glyph nil)
155 (defvar wl-unplugged-glyph nil)
157 (defvar wl-plugged-mode-menu-spec
159 ["Toggle plugged" wl-plugged-toggle t]
160 ["Toggle All plugged" wl-plugged-toggle-all t]
161 ["Prev Port" wl-plugged-move-to-previous t]
162 ["Next Port" wl-plugged-move-to-next t]
163 ["Prev Server" wl-plugged-move-to-previous-server t]
164 ["Next Server" wl-plugged-move-to-next-server t]
165 ["Flush queue" wl-plugged-flush-queue t]
167 ["Exit" wl-plugged-exit t]))
171 (defun wl-plugged-setup-mouse ()
172 (define-key wl-plugged-mode-map 'button2 'wl-plugged-click))
174 (defun wl-plugged-setup-mouse ())
175 (defun wl-plugged-setup-mouse ()
176 (define-key wl-plugged-mode-map [mouse-2] 'wl-plugged-click)))))
178 (unless wl-plugged-mode-map
179 (setq wl-plugged-mode-map (make-sparse-keymap))
180 (define-key wl-plugged-mode-map " " 'wl-plugged-toggle)
181 (define-key wl-plugged-mode-map "\C-m" 'wl-plugged-toggle)
182 (define-key wl-plugged-mode-map "\M-t" 'wl-plugged-toggle-all)
183 (define-key wl-plugged-mode-map "q" 'wl-plugged-exit)
184 (define-key wl-plugged-mode-map "\C-t" 'wl-plugged-exit)
185 (define-key wl-plugged-mode-map "F" 'wl-plugged-flush-queue)
186 (define-key wl-plugged-mode-map "P" 'wl-plugged-move-to-previous-server)
187 (define-key wl-plugged-mode-map "N" 'wl-plugged-move-to-next-server)
188 (define-key wl-plugged-mode-map "p" 'wl-plugged-move-to-previous)
189 (define-key wl-plugged-mode-map "n" 'wl-plugged-move-to-next)
190 (define-key wl-plugged-mode-map "\e\t" 'wl-plugged-move-to-previous)
191 (define-key wl-plugged-mode-map "\t" 'wl-plugged-move-to-next)
192 (wl-plugged-setup-mouse)
196 "Menu used in Plugged mode."
197 wl-plugged-mode-menu-spec))
199 (defun wl-plugged-mode ()
200 "Mode for setting Wanderlust plugged.
201 See info under Wanderlust for full documentation.
204 \\{wl-plugged-mode-map}
206 Entering Plugged mode calls the value of `wl-plugged-mode-hook'."
208 (kill-all-local-variables)
209 (use-local-map wl-plugged-mode-map)
210 (setq major-mode 'wl-plugged-mode)
211 (setq mode-name "Plugged")
212 (easy-menu-add wl-plugged-mode-menu)
213 (when wl-show-plug-status-on-modeline
214 (setq mode-line-format (wl-make-modeline)))
215 (setq wl-plugged-switch wl-plugged)
216 (setq wl-plugged-alist-modified nil)
217 (setq buffer-read-only t)
218 (run-hooks 'wl-plugged-mode-hook))
220 (defmacro wl-plugged-string (plugged &optional time)
221 (` (if (, time) wl-plugged-auto-off
222 (if (, plugged) wl-plugged-plug-on wl-plugged-plug-off))))
224 (defmacro wl-plugged-server-indent ()
225 (` (make-string wl-plugged-server-indent ? )))
227 (defun wl-plugged-set-variables ()
228 (setq wl-plugged-sending-queue-alist
229 (wl-plugged-sending-queue-info))
230 (setq wl-plugged-dop-queue-alist
231 (wl-plugged-dop-queue-info))
232 (setq wl-plugged-alist
233 (sort (copy-sequence elmo-plugged-alist)
235 (string< (caar a) (caar b))))))
237 (defun wl-plugged-sending-queue-info ()
238 ;; sending queue status
239 (let (alist msgs sent-via server port)
240 (setq msgs (elmo-list-folder wl-queue-folder))
242 (setq sent-via (wl-draft-queue-info-operation (car msgs) 'get-sent-via))
244 (when (eq (nth 1 (car sent-via)) 'unplugged)
245 (setq server (car (nth 2 (car sent-via)))
246 port (cdr (nth 2 (car sent-via))))
247 (elmo-plugged-p server port) ;; add elmo-plugged-alist if nothing.
249 (wl-append-assoc-list
253 (setq sent-via (cdr sent-via)))
254 (setq msgs (cdr msgs)))
257 (defun wl-plugged-sending-queue-status (qinfo)
258 ;; sending queue status
259 (let ((len (length (cdr qinfo))))
260 (concat (wl-plugged-set-folder-icon
262 (wl-folder-get-petname wl-queue-folder))
264 (format ": %d msgs (" len)
265 (format ": %d msg (" len))
266 (mapconcat (function int-to-string) (cdr qinfo) ",")
269 (defun wl-plugged-dop-queue-info ()
272 elmo-dop-queue dop-queue last alist server-info
274 (elmo-dop-queue-load)
275 (elmo-dop-queue-merge)
276 (setq dop-queue (sort elmo-dop-queue '(lambda (a b)
277 (string< (car a) (car b)))))
278 (wl-append dop-queue (list nil)) ;; terminate(dummy)
279 (setq last (caar dop-queue)) ;; first
281 (setq ope (cons (nth 1 (car dop-queue))
282 (length (nth 2 (car dop-queue)))))
283 (if (string= last (caar dop-queue))
284 (wl-append operation (list ope))
285 ;;(setq count (1+ count))
286 (when (and last (setq server-info (elmo-folder-portinfo last)))
288 (wl-append-assoc-list
289 (cons (car server-info) (nth 1 server-info)) ;; server port
290 (cons last operation)
292 (setq last (caar dop-queue)
293 operation (list ope)))
294 (setq dop-queue (cdr dop-queue)))
297 (defun wl-plugged-dop-queue-status (qinfo &optional column)
299 (let ((operations (cdr qinfo))
300 (column (or column wl-plugged-queue-status-column)))
302 '(lambda (folder-ope)
303 (concat (wl-plugged-set-folder-icon
305 (wl-folder-get-petname (car folder-ope)))
310 (format "%s:%d" (car ope) (cdr ope))
311 (format "%s" (car ope))))
312 (cdr folder-ope) ",")
315 (concat "\n" (wl-set-string-width column "")))))
317 (defun wl-plugged-drawing (plugged-alist)
318 (let ((buffer-read-only nil)
319 (alist plugged-alist)
320 (vars wl-plugged-switch-variables)
321 last server port label plugged time
322 line len qinfo column)
325 (insert (format "%s:[%s]%s"
327 (wl-plugged-string (symbol-value (cdar vars)))
328 (if (cdr vars) " " "")))
329 (setq vars (cdr vars)))
331 (let ((elmo-plugged wl-plugged-switch))
332 (setq line (format "[%s](wl-plugged)"
333 (wl-plugged-string (elmo-plugged-p))))
334 ;; sending queue status
335 (when (setq qinfo (assoc (cons nil nil) wl-plugged-sending-queue-alist))
337 (wl-set-string-width wl-plugged-queue-status-column line)
338 (wl-plugged-sending-queue-status qinfo))))
341 (setq server (caaar alist)
343 label (nth 1 (car alist))
344 plugged (nth 2 (car alist))
345 time (nth 3 (car alist)))
346 (unless (string= last server)
348 (insert (format "%s[%s]%s\n"
349 (wl-plugged-server-indent)
351 (elmo-plugged-p server nil plugged-alist))
357 (make-string wl-plugged-port-indent ? )
358 (wl-plugged-string plugged time)
365 (cdr (assq port wl-plugged-port-label-alist))
368 (setq column (max (if line (1+ (string-width line)) 0)
369 wl-plugged-queue-status-column))
371 ;; sending queue status
372 ((setq qinfo (assoc (cons server port) wl-plugged-sending-queue-alist))
375 (wl-set-string-width column line)
376 (wl-plugged-sending-queue-status qinfo))))
378 ((setq qinfo (assoc (cons server port) wl-plugged-dop-queue-alist))
381 (wl-set-string-width column line)
382 (wl-plugged-dop-queue-status qinfo column)))))
384 (setq alist (cdr alist)))
385 (delete-region (1- (point-max)) (point-max)) ;; delete line at the end.
386 (goto-char (point-min))
388 (wl-highlight-plugged-current-line)
390 (set-buffer-modified-p nil)
391 (count-lines (point-min) (point-max)))
393 (defun wl-plugged-redrawing-switch (indent switch &optional time)
395 (when (re-search-forward
396 (format "^%s\\[\\([^]]+\\)\\]" (make-string indent ? )))
397 (goto-char (match-beginning 1))
398 (delete-region (match-beginning 1) (match-end 1))
399 (insert (wl-plugged-string switch time))
400 (wl-highlight-plugged-current-line)
403 (defun wl-plugged-redrawing (plugged-alist)
404 (let ((buffer-read-only nil)
405 (alist plugged-alist)
406 last server port plugged time)
407 (goto-char (point-min))
408 (wl-plugged-redrawing-switch 0 (elmo-plugged-p))
410 (setq server (caaar alist)
412 plugged (nth 2 (car alist))
413 time (nth 3 (car alist)))
414 (unless (string= last server)
416 (wl-plugged-redrawing-switch
417 wl-plugged-server-indent
418 (elmo-plugged-p server nil plugged-alist))
421 (wl-plugged-redrawing-switch
422 wl-plugged-port-indent plugged time)
423 (setq alist (cdr alist))))
424 (set-buffer-modified-p nil))
426 (defun wl-plugged-change ()
428 (if (not elmo-plugged-alist)
429 (message "No plugged info")
430 (setq wl-plugged-winconf (current-window-configuration))
431 (let* ((cur-win (selected-window))
432 (max-lines (if (eq major-mode 'wl-summary-mode)
437 (set-buffer (get-buffer-create wl-plugged-buf-name))
439 (buffer-disable-undo (current-buffer))
440 (delete-windows-on (current-buffer))
441 (wl-plugged-set-variables)
442 (setq lines (wl-plugged-drawing wl-plugged-alist)))
443 (select-window cur-win)
444 (setq window-lines (min max-lines (max lines window-min-height)))
445 (when (> (- (window-height) window-lines) window-min-height)
446 (split-window cur-win (- (window-height) window-lines)))
447 (switch-to-buffer wl-plugged-buf-name)
450 (enlarge-window (- window-lines (window-height)))
451 (when (fboundp 'pos-visible-in-window-p)
452 (goto-char (point-min))
453 (while (and (<= (window-height) max-lines)
454 (not (pos-visible-in-window-p (1- (point-max)))))
455 (enlarge-window 2))))
457 (goto-char (point-min))
459 (wl-plugged-move-to-next)))) ;; goto first entry
461 (defsubst wl-plugged-get-server ()
464 (wl-plugged-move-to-previous-server)
466 (when (looking-at (format "^%s\\[[^]]+\\]\\(.*\\)"
467 (wl-plugged-server-indent)))
468 (elmo-match-buffer 1))))
470 (defun wl-plugged-toggle ()
472 (let ((cur-point (point)))
478 (let (variable switch name)
479 (goto-char cur-point)
480 (when (and (not (bobp))
481 (not (eq (char-before) ? )))
482 (if (re-search-backward " [^ ]+" nil t)
484 (re-search-backward "^[^ ]+" nil t)))
485 (when (looking-at "\\([^ :[]+\\):?\\[\\([^]]+\\)\\]")
486 (setq name (elmo-match-buffer 1))
487 (setq switch (not (string= (elmo-match-buffer 2) wl-plugged-plug-on)))
488 (when (setq variable (cdr (assoc name wl-plugged-switch-variables)))
489 (set variable switch))
490 (goto-char (match-beginning 2))
491 (let ((buffer-read-only nil))
492 (delete-region (match-beginning 2) (match-end 2))
493 (insert (wl-plugged-string switch))
494 (set-buffer-modified-p nil)))))
496 ((looking-at "^\\( *\\)\\[\\([^]]+\\)\\]\\([^ \n]*\\)")
497 (let* ((indent (length (elmo-match-buffer 1)))
498 (switch (elmo-match-buffer 2))
499 (name (elmo-match-buffer 3))
500 (plugged (not (string= switch wl-plugged-plug-on)))
501 (alist wl-plugged-alist)
504 ((eq indent wl-plugged-port-indent) ;; toggle port plug
506 ((string-match "\\([^([]*\\)(\\([^)[]+\\))" name)
507 (setq port (string-to-int (elmo-match-string 2 name))))
510 (setq server (wl-plugged-get-server))
511 (elmo-set-plugged plugged server port nil alist))
512 ((eq indent wl-plugged-server-indent) ;; toggle server plug
513 (elmo-set-plugged plugged name nil nil alist))
514 ((eq indent 0) ;; toggle all plug
515 (elmo-set-plugged plugged nil nil nil alist)))
517 (wl-plugged-redrawing wl-plugged-alist)
518 ;; change wl-plug-state-indicator
519 (let ((elmo-plugged wl-plugged-switch))
520 (setq wl-plugged-switch (elmo-plugged-p))
521 (setq wl-plug-state-indicator
522 (if wl-plugged-switch
523 wl-plug-state-indicator-on
524 wl-plug-state-indicator-off))
525 (force-mode-line-update t))))))
526 (setq wl-plugged-alist-modified t)
527 (goto-char cur-point)))
529 (defun wl-plugged-click (e)
534 (defun wl-plugged-toggle-all ()
536 (let ((cur-point (point)))
537 (setq wl-plugged-switch (not wl-plugged-switch))
538 (elmo-set-plugged wl-plugged-switch nil nil nil wl-plugged-alist)
539 (wl-plugged-redrawing wl-plugged-alist)
540 (goto-char cur-point)
541 (setq wl-plugged-alist-modified t)
542 ;; change wl-plug-state-indicator
543 (setq wl-plug-state-indicator
544 (if wl-plugged-switch
545 wl-plug-state-indicator-on
546 wl-plug-state-indicator-off))
547 (force-mode-line-update t)))
549 (defun wl-plugged-exit ()
551 (setq ;;elmo-plugged-alist wl-plugged-alist
552 wl-plugged wl-plugged-switch
554 wl-plugged-sending-queue-alist nil
555 wl-plugged-dop-queue-alist nil)
556 (run-hooks 'wl-plugged-exit-hook)
557 (when wl-plugged-alist-modified
558 (wl-toggle-plugged (if wl-plugged 'on 'off) t))
559 (kill-buffer (current-buffer))
560 (if wl-plugged-winconf
561 (set-window-configuration wl-plugged-winconf)))
563 (defun wl-plugged-flush-queue ()
565 (let ((cur-point (point))
566 (dop-status (elmo-dop-queue-flush))
567 (send-status (wl-draft-queue-flush)))
568 (unless (or dop-status send-status)
569 (message "No processing queue."))
570 (wl-plugged-set-variables)
571 (wl-plugged-drawing wl-plugged-alist)
572 (goto-char cur-point)))
574 (defun wl-plugged-move-to-next ()
576 (when (re-search-forward "\\[\\([^]]+\\)\\]" 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-previous ()
584 (if (eq (char-before) ?\]) (forward-char -1))
585 (when (re-search-backward "\\[\\([^]]+\\)\\]" nil t)
586 (let ((pos (match-beginning 1)))
587 (if (invisible-p pos)
588 (goto-char (next-visible-point pos))
591 (defun wl-plugged-move-to-next-server ()
594 (format "^%s\\[\\([^]]+\\)\\]" (wl-plugged-server-indent)))
598 (if (re-search-forward regexp nil t)
599 (setq point (match-beginning 1))))
600 (if point (goto-char point))))
602 (defun wl-plugged-move-to-previous-server ()
605 (format "^%s\\[\\([^]]+\\)\\]" (wl-plugged-server-indent))))
606 (if (re-search-backward regexp nil t)
607 (goto-char (match-beginning 1)))))
609 ;;; end of wl-plugged-mode
612 "Save summary and folder status."
614 (wl-save-status 'keep-summary))
616 (defun wl-save-status (&optional keep-summary)
617 (message "Saving summary and folder status...")
620 (let ((summaries (wl-collect-summary)))
626 (wl-summary-cleanup-temp-marks))
627 (wl-summary-save-status keep-summary)
631 (wl-refile-alist-save
632 wl-refile-alist-file-name wl-refile-alist)
633 (wl-refile-alist-save
634 wl-refile-msgid-alist-file-name wl-refile-msgid-alist)
635 (wl-folder-info-save)
636 (and (featurep 'wl-fldmgr) (wl-fldmgr-exit))
637 (wl-crosspost-alist-save)
638 (message "Saving summary and folder status...done."))
642 (when (or (not wl-interactive-exit)
643 (y-or-n-p "Quit Wanderlust?"))
645 (run-hooks 'wl-exit-hook)
647 (wl-folder-cleanup-variables)
648 (elmo-cleanup-variables)
652 (list (format "%s\\(:.*\\)?"
653 (default-value 'wl-message-buf-name))
655 wl-folder-buffer-name)
657 (elmo-buffer-cache-clean-up)
658 (if (fboundp 'mmelmo-cleanup-entity-buffers)
659 (mmelmo-cleanup-entity-buffers))
662 (remove-hook 'kill-emacs-hook 'wl-save-status))
664 (message "") ;; empty minibuffer.
667 (defun wl-init (&optional arg)
669 (setq elmo-plugged wl-plugged)
670 (let (succeed demo-buf)
672 (setq demo-buf (wl-demo)))
674 (add-hook 'kill-emacs-hook 'wl-save-status))
679 (wl-refile-alist-setup)
680 (wl-crosspost-alist-load)
684 (setq elmo-use-semi t))
686 (setq elmo-use-semi nil))
689 (fset 'wl-summary-from-func-internal
690 (symbol-value 'wl-summary-from-func))
691 (fset 'wl-summary-subject-func-internal
692 (symbol-value 'wl-summary-subject-func))
693 (fset 'wl-summary-subject-filter-func-internal
694 (symbol-value 'wl-summary-subject-filter-func))
695 (setq elmo-no-from wl-summary-no-from-message)
696 (setq elmo-no-subject wl-summary-no-subject-message)
699 (message "Checking environment...")
700 (wl-check-environment arg)
701 (message "Checking environment...done.")))
703 (kill-buffer demo-buf))
706 (run-hooks 'wl-init-hook)))))
708 (defun wl-check-environment (no-check-folder)
709 (unless (featurep 'mime-setup)
710 (require 'mime-setup))
712 (error "Please set `wl-from'"))
713 (unless (string-match "[^.]\\.[^.]" (or wl-message-id-domain
715 (concat (system-name)
718 (error "Please set `wl-local-domain' to get valid FQDN"))
719 (when (not no-check-folder)
720 (if (not (eq (elmo-folder-get-type wl-draft-folder) 'localdir))
721 (error "%s is not allowed for draft folder" wl-draft-folder))
722 (unless (elmo-folder-exists-p wl-draft-folder)
724 (format "Draft Folder %s does not exist, create it?"
726 (elmo-create-folder wl-draft-folder)
727 (error "Draft Folder is not created")))
728 (if (and wl-draft-enable-queuing
729 (not (elmo-folder-exists-p wl-queue-folder)))
731 (format "Queue Folder %s does not exist, create it?"
733 (elmo-create-folder wl-queue-folder)
734 (error "Queue Folder is not created")))
735 (unless (elmo-folder-exists-p wl-trash-folder)
737 (format "Trash Folder %s does not exist, create it?"
739 (elmo-create-folder wl-trash-folder)
740 (error "Trash Folder is not created")))
741 (unless (elmo-folder-exists-p elmo-lost+found-folder)
742 (elmo-create-folder elmo-lost+found-folder)))
743 (unless (file-exists-p wl-tmp-dir)
745 (format "Temp directory (to save multipart) %s does not exist, create it now?"
747 (make-directory wl-tmp-dir)
748 (error "Temp directory is not created"))))
751 (defun wl (&optional arg)
752 "Start Wanderlust -- Yet Another Message Interface On Emacsen.
753 If prefix argument is specified, folder checkings are skipped."
759 (let ((make (wl-folder arg)))
760 (wl-plugged-init make)))
761 (run-hooks 'wl-hook))
763 ;; Define some autoload functions WL might use.
765 ;; This little mapcar goes through the list below and marks the
766 ;; symbols in question as autoloaded functions.
770 (let ((interactive (nth 1 (memq ':interactive package))))
775 (when (consp function)
776 (setq keymap (car (memq 'keymap function)))
777 (setq function (car function)))
778 (autoload function (car package) nil interactive keymap))))
779 (if (eq (nth 1 package) ':interactive)
782 '(("wl-fldmgr" :interactive t
783 wl-fldmgr-access-display-all wl-fldmgr-access-display-normal
784 wl-fldmgr-add wl-fldmgr-clear-cut-entity-list wl-fldmgr-copy
785 wl-fldmgr-copy-region wl-fldmgr-cut wl-fldmgr-cut-region
786 wl-fldmgr-make-access-group wl-fldmgr-make-filter
787 wl-fldmgr-make-group wl-fldmgr-make-multi
788 wl-fldmgr-reconst-entity-hashtb wl-fldmgr-rename wl-fldmgr-delete
789 wl-fldmgr-save-folders wl-fldmgr-set-petname wl-fldmgr-sort
790 wl-fldmgr-subscribe wl-fldmgr-subscribe-region
791 wl-fldmgr-unsubscribe wl-fldmgr-unsubscribe-region wl-fldmgr-yank )
793 (wl-fldmgr-mode-map keymap)
794 wl-fldmgr-add-entity-hashtb)
795 ("wl-expire" :interactive t
796 wl-folder-archive-current-entity
797 wl-folder-expire-current-entity wl-summary-archive
800 wl-score-save wl-summary-rescore-msgs wl-summary-score-headers
801 wl-summary-score-update-all-lines )
802 ("wl-score" :interactive t
803 wl-score-change-score-file wl-score-edit-current-scores
804 wl-score-edit-file wl-score-flush-cache wl-summary-rescore
805 wl-score-set-mark-below wl-score-set-expunge-below
806 wl-summary-increase-score wl-summary-lower-score ))))
808 ;; for backward compatibility
809 (defalias 'wl-summary-from-func-petname 'wl-summary-default-from)