annotate lisp/mh-e/mh-inc.el @ 79911:dfdcf47b10f6

(Mouse Buttons): Update elisp xref to "Click Events" on click count.
author Nick Roberts <nickrob@snap.net.nz>
date Wed, 23 Jan 2008 01:19:17 +0000
parents 3c2488d0ebd9
children 606f2d163a64 90c9ebd43589
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
67760
9c3504ae6060 Follow MH-E Developers Guide conventions. Use `' quotes for Help
Bill Wohler <wohler@newt.com>
parents: 67681
diff changeset
1 ;;; mh-inc.el --- MH-E "inc" and separate mail spool handling
68465
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
2
79713
3c2488d0ebd9 Add 2008 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 78231
diff changeset
3 ;; Copyright (C) 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
4
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
5 ;; Author: Peter S. Galbraith <psg@debian.org>
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
6 ;; Maintainer: Bill Wohler <wohler@newt.com>
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
7 ;; Keywords: mail
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
8 ;; See: mh-e.el
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
9
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
10 ;; This file is part of GNU Emacs.
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
11
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
78231
800dd75c042b Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents: 75347
diff changeset
14 ;; the Free Software Foundation; either version 3, or (at your option)
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
15 ;; any later version.
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
16
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
17 ;; GNU Emacs is distributed in the hope that it will be useful,
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
20 ;; GNU General Public License for more details.
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
21
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
64085
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62847
diff changeset
24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62847
diff changeset
25 ;; Boston, MA 02110-1301, USA.
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
26
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
27 ;;; Commentary:
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
28
68465
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
29 ;; Support for inc. In addition to reading from the system mailbox,
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
30 ;; inc can also be used to incorporate mail from multiple spool files
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
31 ;; into separate folders. See "C-h v mh-inc-spool-list".
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
32
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
33 ;;; Change Log:
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
34
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
35 ;;; Code:
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
36
68465
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
37 (require 'mh-e)
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 52401
diff changeset
38 (mh-require-cl)
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
39
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
40 (defvar mh-inc-spool-map-help nil
68465
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
41 "Help text for `mh-inc-spool-map'.")
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
42
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
43 (define-key mh-inc-spool-map "?"
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
44 '(lambda ()
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
45 (interactive)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
46 (if mh-inc-spool-map-help
68465
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
47 (mh-help mh-inc-spool-map-help)
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
48 (mh-ephem-message
68465
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
49 "There are no keys defined yet; customize `mh-inc-spool-list'"))))
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
50
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
51 ;;;###mh-autoload
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
52 (defun mh-inc-spool-make ()
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
53 "Make all commands and defines keys for contents of `mh-inc-spool-list'."
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
54 (setq mh-inc-spool-map-help nil)
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
55 (when mh-inc-spool-list
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
56 (loop for elem in mh-inc-spool-list
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
57 do (let ((spool (nth 0 elem))
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
58 (folder (nth 1 elem))
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
59 (key (nth 2 elem)))
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
60 (progn
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
61 (mh-inc-spool-generator folder spool)
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
62 (mh-inc-spool-def-key key folder))))))
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
63
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
64 (defalias 'mh-inc-spool-make-no-autoload 'mh-inc-spool-make)
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
65
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
66 (defun mh-inc-spool-generator (folder spool)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
67 "Create a command to inc into FOLDER from SPOOL file."
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
68 (let ((folder1 (make-symbol "folder"))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
69 (spool1 (make-symbol "spool")))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
70 (set folder1 folder)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
71 (set spool1 spool)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
72 (setf (symbol-function (intern (concat "mh-inc-spool-" folder)))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
73 `(lambda ()
68465
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
74 ,(format "Inc spool file %s into folder %s." spool folder)
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
75 (interactive)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
76 (mh-inc-folder ,spool1 (concat "+" ,folder1))))))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
77
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
78 (defun mh-inc-spool-def-key (key folder)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
79 "Define a KEY in `mh-inc-spool-map' to inc FOLDER and collect help string."
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
80 (when (not (= 0 key))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
81 (define-key mh-inc-spool-map (format "%c" key)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
82 (intern (concat "mh-inc-spool-" folder)))
68465
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
83 (add-to-list 'mh-inc-spool-map-help
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
84 (concat "[" (char-to-string key) "] inc " folder " folder\n")
37d03b3298bf The Great Cleanup
Bill Wohler <wohler@newt.com>
parents: 68199
diff changeset
85 t)))
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
86
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
87 (provide 'mh-inc)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
88
67681
3a8785724cca * mh-acros.el:
Bill Wohler <wohler@newt.com>
parents: 64085
diff changeset
89 ;; Local Variables:
3a8785724cca * mh-acros.el:
Bill Wohler <wohler@newt.com>
parents: 64085
diff changeset
90 ;; indent-tabs-mode: nil
3a8785724cca * mh-acros.el:
Bill Wohler <wohler@newt.com>
parents: 64085
diff changeset
91 ;; sentence-end-double-space: nil
3a8785724cca * mh-acros.el:
Bill Wohler <wohler@newt.com>
parents: 64085
diff changeset
92 ;; End:
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
93
67681
3a8785724cca * mh-acros.el:
Bill Wohler <wohler@newt.com>
parents: 64085
diff changeset
94 ;; arch-tag: 3713cf2a-6082-4cb4-8ce2-99d9acaba835
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
95 ;;; mh-inc.el ends here