summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--COPYING377
-rw-r--r--INSTALL75
-rw-r--r--Makefile288
-rw-r--r--Makefile.in67
-rw-r--r--NEWS323
-rw-r--r--README186
-rw-r--r--TODO127
-rw-r--r--base64-decode.c76
-rwxr-xr-xconfigure3455
-rw-r--r--configure.ac277
-rw-r--r--contrib/attempted-locking.diff105
-rw-r--r--contrib/vm-blueman.el119
-rw-r--r--contrib/vm-mime-display-internal-application.el204
-rw-r--r--contrib/vm-mime.el-w3m.patch134
-rw-r--r--example.vm250
-rw-r--r--id1
-rw-r--r--info/Makefile.in76
-rw-r--r--info/vm-pcrisis.texinfo1372
-rw-r--r--info/vm.texinfo (renamed from vm.texinfo)86
-rwxr-xr-xinstall-sh251
-rw-r--r--lisp/Makefile.in225
-rwxr-xr-xlisp/autoloads.py126
-rw-r--r--lisp/tapestry.el (renamed from tapestry.el)49
-rw-r--r--lisp/vcard.el703
-rw-r--r--lisp/vm-autoload.el6
-rw-r--r--lisp/vm-avirtual.el1233
-rw-r--r--lisp/vm-biff.el487
-rw-r--r--lisp/vm-build.el91
-rw-r--r--lisp/vm-crypto.el (renamed from vm-crypto.el)52
-rw-r--r--lisp/vm-delete.el (renamed from vm-delete.el)52
-rw-r--r--lisp/vm-digest.el (renamed from vm-digest.el)64
-rw-r--r--lisp/vm-edit.el (renamed from vm-edit.el)44
-rw-r--r--lisp/vm-folder.el (renamed from vm-folder.el)157
-rw-r--r--lisp/vm-grepmail.el262
-rw-r--r--lisp/vm-imap.el (renamed from vm-imap.el)154
-rw-r--r--lisp/vm-license.el54
-rw-r--r--lisp/vm-macro.el (renamed from vm-macro.el)43
-rw-r--r--lisp/vm-mark.el (renamed from vm-mark.el)58
-rw-r--r--lisp/vm-menu.el (renamed from vm-menu.el)276
-rw-r--r--lisp/vm-message-history.el203
-rw-r--r--lisp/vm-message.el (renamed from vm-message.el)44
-rw-r--r--lisp/vm-mime.el (renamed from vm-mime.el)860
-rw-r--r--lisp/vm-minibuf.el (renamed from vm-minibuf.el)133
-rw-r--r--lisp/vm-misc.el (renamed from vm-misc.el)95
-rw-r--r--lisp/vm-motion.el (renamed from vm-motion.el)52
-rw-r--r--lisp/vm-mouse.el (renamed from vm-mouse.el)141
-rw-r--r--lisp/vm-page.el (renamed from vm-page.el)84
-rw-r--r--lisp/vm-pcrisis.el1482
-rw-r--r--lisp/vm-pgg.el1298
-rw-r--r--lisp/vm-pine.el1245
-rw-r--r--lisp/vm-pop.el (renamed from vm-pop.el)89
-rw-r--r--lisp/vm-ps-print.el448
-rw-r--r--lisp/vm-reply.el (renamed from vm-reply.el)443
-rw-r--r--lisp/vm-revno.el9
-rw-r--r--lisp/vm-rfaddons.el2436
-rw-r--r--lisp/vm-save.el (renamed from vm-save.el)352
-rw-r--r--lisp/vm-search.el (renamed from vm-search.el)40
-rw-r--r--lisp/vm-serial.el894
-rw-r--r--lisp/vm-sort.el (renamed from vm-sort.el)169
-rw-r--r--lisp/vm-startup.el3
-rw-r--r--lisp/vm-summary-faces.el258
-rw-r--r--lisp/vm-summary.el (renamed from vm-summary.el)89
-rw-r--r--lisp/vm-thread.el (renamed from vm-thread.el)46
-rw-r--r--lisp/vm-toolbar.el (renamed from vm-toolbar.el)214
-rw-r--r--lisp/vm-undo.el (renamed from vm-undo.el)46
-rw-r--r--lisp/vm-user.el (renamed from vm-user.el)41
-rw-r--r--lisp/vm-vars.el (renamed from vm-vars.el)784
-rw-r--r--lisp/vm-vcard.el79
-rwxr-xr-xlisp/vm-version.el170
-rw-r--r--lisp/vm-virtual.el (renamed from vm-virtual.el)82
-rw-r--r--lisp/vm-window.el (renamed from vm-window.el)42
-rw-r--r--lisp/vm.el (renamed from vm-startup.el)795
-rwxr-xr-xmake-autoloads52
-rw-r--r--pixmaps/Makefile.in56
-rw-r--r--pixmaps/audio_stamp-colorful.xpm43
-rw-r--r--pixmaps/audio_stamp-simple.xpm43
-rw-r--r--pixmaps/autofile-dn.xbm26
-rw-r--r--pixmaps/autofile-dn.xpm92
-rw-r--r--pixmaps/autofile-up.xbm26
-rw-r--r--pixmaps/autofile-up.xpm93
-rw-r--r--pixmaps/autofile-xx.xbm26
-rw-r--r--pixmaps/compose-dn.xbm26
-rw-r--r--pixmaps/compose-dn.xpm91
-rw-r--r--pixmaps/compose-up.xbm26
-rw-r--r--pixmaps/compose-up.xpm92
-rw-r--r--pixmaps/compose-xx.xbm26
-rw-r--r--pixmaps/delete-dn.xbm26
-rw-r--r--pixmaps/delete-dn.xpm90
-rw-r--r--pixmaps/delete-up.xbm26
-rw-r--r--pixmaps/delete-up.xpm91
-rw-r--r--pixmaps/delete-xx.xbm26
-rw-r--r--pixmaps/document-colorful.xpm69
-rw-r--r--pixmaps/document-simple.xpm45
-rw-r--r--pixmaps/file-dn.xbm26
-rw-r--r--pixmaps/file-dn.xpm92
-rw-r--r--pixmaps/file-up.xbm26
-rw-r--r--pixmaps/file-up.xpm93
-rw-r--r--pixmaps/file-xx.xbm26
-rw-r--r--pixmaps/film-colorful.xpm69
-rw-r--r--pixmaps/film-simple.xpm45
-rw-r--r--pixmaps/followup-dn.xpm43
-rw-r--r--pixmaps/followup-up.xpm43
-rw-r--r--pixmaps/forward-dn.xpm43
-rw-r--r--pixmaps/forward-up.xpm43
-rw-r--r--pixmaps/gear-colorful.xpm279
-rw-r--r--pixmaps/gear-simple.xpm46
-rw-r--r--pixmaps/getmail-dn.xbm26
-rw-r--r--pixmaps/getmail-dn.xpm93
-rw-r--r--pixmaps/getmail-up.xbm26
-rw-r--r--pixmaps/getmail-up.xpm94
-rw-r--r--pixmaps/getmail-xx.xbm26
-rw-r--r--pixmaps/gtk/autofile-dn.xpm36
-rw-r--r--pixmaps/gtk/autofile-up.xpm36
-rw-r--r--pixmaps/gtk/compose-dn.xpm35
-rw-r--r--pixmaps/gtk/compose-up.xpm35
-rw-r--r--pixmaps/gtk/delete-dn.xpm35
-rw-r--r--pixmaps/gtk/delete-up.xpm35
-rw-r--r--pixmaps/gtk/file-dn.xpm36
-rw-r--r--pixmaps/gtk/file-up.xpm36
-rw-r--r--pixmaps/gtk/followup-dn.xpm35
-rw-r--r--pixmaps/gtk/followup-up.xpm35
-rw-r--r--pixmaps/gtk/forward-dn.xpm35
-rw-r--r--pixmaps/gtk/forward-up.xpm35
-rw-r--r--pixmaps/gtk/getmail-dn.xpm36
-rw-r--r--pixmaps/gtk/getmail-up.xpm36
-rw-r--r--pixmaps/gtk/help-dn.xpm32
-rw-r--r--pixmaps/gtk/help-up.xpm32
-rw-r--r--pixmaps/gtk/mime-dn.xpm32
-rw-r--r--pixmaps/gtk/mime-up.xpm32
-rw-r--r--pixmaps/gtk/mime-xx.xpm33
-rw-r--r--pixmaps/gtk/next-dn.xpm34
-rw-r--r--pixmaps/gtk/next-up.xpm34
-rw-r--r--pixmaps/gtk/previous-dn.xpm35
-rw-r--r--pixmaps/gtk/previous-up.xpm35
-rw-r--r--pixmaps/gtk/print-dn.xpm35
-rw-r--r--pixmaps/gtk/print-up.xpm35
-rw-r--r--pixmaps/gtk/quit-dn.xpm32
-rw-r--r--pixmaps/gtk/quit-up.xpm32
-rw-r--r--pixmaps/gtk/recover-dn.xpm30
-rw-r--r--pixmaps/gtk/recover-up.xpm30
-rw-r--r--pixmaps/gtk/reply-dn.xpm35
-rw-r--r--pixmaps/gtk/reply-up.xpm35
-rw-r--r--pixmaps/gtk/undelete-dn.xpm35
-rw-r--r--pixmaps/gtk/undelete-up.xpm35
-rw-r--r--pixmaps/gtk/visit-dn.xpm35
-rw-r--r--pixmaps/gtk/visit-up.xpm35
-rw-r--r--pixmaps/help-dn.xbm26
-rw-r--r--pixmaps/help-dn.xpm87
-rw-r--r--pixmaps/help-up.xbm26
-rw-r--r--pixmaps/help-up.xpm90
-rw-r--r--pixmaps/help-xx.xbm26
-rwxr-xr-xpixmaps/make-gtk-pixmaps.py24
-rw-r--r--pixmaps/message-colorful.xpm62
-rw-r--r--pixmaps/message-simple.xpm45
-rw-r--r--pixmaps/mime-colorful-dn.xpm137
-rw-r--r--pixmaps/mime-colorful-up.xpm133
-rw-r--r--pixmaps/mime-colorful-xx.xpm134
-rw-r--r--pixmaps/mime-dn.xbm26
-rw-r--r--pixmaps/mime-dn.xpm40
-rw-r--r--pixmaps/mime-simple-dn.xpm57
-rw-r--r--pixmaps/mime-simple-up.xpm57
-rw-r--r--pixmaps/mime-simple-xx.xpm57
-rw-r--r--pixmaps/mime-up.xbm32
-rw-r--r--pixmaps/mime-up.xpm40
-rw-r--r--pixmaps/mime-xx.xbm26
-rw-r--r--pixmaps/mime-xx.xpm41
-rw-r--r--pixmaps/mime/application.xpm31
-rw-r--r--pixmaps/mime/audio.xpm30
-rw-r--r--pixmaps/mime/image.xpm30
-rw-r--r--pixmaps/mime/message.xpm33
-rw-r--r--pixmaps/mime/multipart.xpm40
-rw-r--r--pixmaps/mime/text.xpm40
-rw-r--r--pixmaps/mime/video.xpm30
-rw-r--r--pixmaps/mona_stamp-colorful.xpm123
-rw-r--r--pixmaps/mona_stamp-simple.xpm45
-rw-r--r--pixmaps/next-dn.xbm26
-rw-r--r--pixmaps/next-dn.xpm88
-rw-r--r--pixmaps/next-up.xbm26
-rw-r--r--pixmaps/next-up.xpm89
-rw-r--r--pixmaps/next-xx.xbm26
-rw-r--r--pixmaps/previous-dn.xbm26
-rw-r--r--pixmaps/previous-dn.xpm89
-rw-r--r--pixmaps/previous-up.xbm26
-rw-r--r--pixmaps/previous-up.xpm90
-rw-r--r--pixmaps/previous-xx.xbm26
-rw-r--r--pixmaps/print-dn.xbm26
-rw-r--r--pixmaps/print-dn.xpm92
-rw-r--r--pixmaps/print-up.xbm26
-rw-r--r--pixmaps/print-up.xpm93
-rw-r--r--pixmaps/print-xx.xbm26
-rw-r--r--pixmaps/quit-dn.xbm26
-rw-r--r--pixmaps/quit-dn.xpm92
-rw-r--r--pixmaps/quit-up.xbm26
-rw-r--r--pixmaps/quit-up.xpm93
-rw-r--r--pixmaps/quit-xx.xbm26
-rw-r--r--pixmaps/recover-dn.xbm26
-rw-r--r--pixmaps/recover-dn.xpm84
-rw-r--r--pixmaps/recover-up.xbm26
-rw-r--r--pixmaps/recover-up.xpm84
-rw-r--r--pixmaps/recover-xx.xbm26
-rw-r--r--pixmaps/reply-dn.xbm26
-rw-r--r--pixmaps/reply-dn.xpm91
-rw-r--r--pixmaps/reply-up.xbm26
-rw-r--r--pixmaps/reply-up.xpm92
-rw-r--r--pixmaps/reply-xx.xbm26
-rw-r--r--pixmaps/stuffed_box-colorful.xpm291
-rw-r--r--pixmaps/stuffed_box-simple.xpm46
-rw-r--r--pixmaps/undelete-dn.xbm26
-rw-r--r--pixmaps/undelete-dn.xpm90
-rw-r--r--pixmaps/undelete-up.xbm26
-rw-r--r--pixmaps/undelete-up.xpm91
-rw-r--r--pixmaps/undelete-xx.xbm26
-rw-r--r--pixmaps/visit-dn.xbm26
-rw-r--r--pixmaps/visit-dn.xpm90
-rw-r--r--pixmaps/visit-up.xbm26
-rw-r--r--pixmaps/visit-up.xpm91
-rw-r--r--pixmaps/visit-xx.xbm26
-rwxr-xr-xrelease.sh54
-rw-r--r--src/Makefile.in45
-rw-r--r--src/base64-decode.c77
-rw-r--r--src/base64-encode.c (renamed from base64-encode.c)53
-rw-r--r--src/qp-decode.c (renamed from qp-decode.c)26
-rw-r--r--src/qp-encode.c (renamed from qp-encode.c)61
-rwxr-xr-xsrc/vm-mail38
-rw-r--r--vm-byteopts.el23
-rw-r--r--vm-easymenu.el225
-rw-r--r--vm-license.el47
-rw-r--r--vm-version.el110
228 files changed, 25813 insertions, 7494 deletions
diff --git a/COPYING b/COPYING
index e3027ae..d511905 100644
--- a/COPYING
+++ b/COPYING
@@ -1,37 +1,40 @@
GNU GENERAL PUBLIC LICENSE
- Version 1, February 1989
+ Version 2, June 1991
- Copyright (C) 1989 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
- The license agreements of most software companies try to keep users
-at the mercy of those companies. By contrast, our General Public
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. The
-General Public License applies to the Free Software Foundation's
-software and to any other program whose authors commit to using it.
-You can use it for your programs, too.
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
When we speak of free software, we are referring to freedom, not
-price. Specifically, the General Public License is designed to make
-sure that you have the freedom to give away or sell copies of free
-software, that you receive source code or can get it if you want it,
-that you can change the software or use pieces of it in new free
-programs; and that you know you can do these things.
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
- For example, if you distribute copies of a such a program, whether
+ For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
-source code. And you must tell them their rights.
+source code. And you must show them these terms so they know their
+rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
@@ -44,120 +47,207 @@ want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
The precise terms and conditions for copying, distribution and
modification follow.
-
+
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
- 0. This License Agreement applies to any program or other work which
-contains a notice placed by the copyright holder saying it may be
-distributed under the terms of this General Public License. The
-"Program", below, refers to any such program or work, and a "work based
-on the Program" means either the Program or any work containing the
-Program or a portion of it, either verbatim or with modifications. Each
-licensee is addressed as "you".
-
- 1. You may copy and distribute verbatim copies of the Program's source
-code as you receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this
-General Public License and to the absence of any warranty; and give any
-other recipients of the Program a copy of this General Public License
-along with the Program. You may charge a fee for the physical act of
-transferring a copy.
-
- 2. You may modify your copy or copies of the Program or any portion of
-it, and copy and distribute such modifications under the terms of Paragraph
-1 above, provided that you also do the following:
-
- a) cause the modified files to carry prominent notices stating that
- you changed the files and the date of any change; and
-
- b) cause the whole of any work that you distribute or publish, that
- in whole or in part contains the Program or any part thereof, either
- with or without modifications, to be licensed at no charge to all
- third parties under the terms of this General Public License (except
- that you may choose to grant warranty protection to some or all
- third parties, at your option).
-
- c) If the modified program normally reads commands interactively when
- run, you must cause it, when started running for such interactive use
- in the simplest and most usual way, to print or display an
- announcement including an appropriate copyright notice and a notice
- that there is no warranty (or else, saying that you provide a
- warranty) and that users may redistribute the program under these
- conditions, and telling the user how to view a copy of this General
- Public License.
-
- d) You may charge a fee for the physical act of transferring a
- copy, and you may at your option offer warranty protection in
- exchange for a fee.
-
-Mere aggregation of another independent work with the Program (or its
-derivative) on a volume of a storage or distribution medium does not bring
-the other work under the scope of these terms.
-
- 3. You may copy and distribute the Program (or a portion or derivative of
-it, under Paragraph 2) in object code or executable form under the terms of
-Paragraphs 1 and 2 above provided that you also do one of the following:
-
- a) accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of
- Paragraphs 1 and 2 above; or,
-
- b) accompany it with a written offer, valid for at least three
- years, to give any third party free (except for a nominal charge
- for the cost of distribution) a complete machine-readable copy of the
- corresponding source code, to be distributed under the terms of
- Paragraphs 1 and 2 above; or,
-
- c) accompany it with the information you received as to where the
- corresponding source code may be obtained. (This alternative is
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
- received the program in object code or executable form alone.)
-
-Source code for a work means the preferred form of the work for making
-modifications to it. For an executable file, complete source code means
-all the source code for all modules it contains; but, as a special
-exception, it need not include source code for modules which are standard
-libraries that accompany the operating system on which the executable
-file runs, or for standard header files or definitions files that
-accompany that operating system.
-
- 4. You may not copy, modify, sublicense, distribute or transfer the
-Program except as expressly provided under this General Public License.
-Any attempt otherwise to copy, modify, sublicense, distribute or transfer
-the Program is void, and will automatically terminate your rights to use
-the Program under this License. However, parties who have received
-copies, or rights to use copies, from you under this General Public
-License will not have their licenses terminated so long as such parties
-remain in full compliance.
-
- 5. By copying, distributing or modifying the Program (or any work based
-on the Program) you indicate your acceptance of this license to do so,
-and all its terms and conditions.
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the original
-licensor to copy, distribute or modify the Program subject to these
-terms and conditions. You may not impose any further restrictions on the
-recipients' exercise of the rights granted herein.
-
- 7. The Free Software Foundation may publish revised and/or new versions
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
-specifies a version number of the license which applies to it and "any
+specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
-the license, you may choose any version ever published by the Free Software
+this License, you may choose any version ever published by the Free Software
Foundation.
- 8. If you wish to incorporate parts of the Program into other free
+ 10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
@@ -167,7 +257,7 @@ of promoting the sharing and reuse of software generally.
NO WARRANTY
- 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
@@ -177,7 +267,7 @@ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
- 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
@@ -188,3 +278,62 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..b470fbb
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,75 @@
+USING CONFIGURE
+===============
+
+0) If you get VM from the revision control, the ./configure script is
+ not included. You have to run "autoconf" to create it.
+
+1) Select your emacs flavor, this is the option --with-emacs and its
+ default is emacs (GNU Emacs). Choose a prefix for the installation
+ with --prefix, by default /usr/local.
+
+ The default locations are as follows:
+
+ a) GNU Emacs: lisp files goto ${prefix}/share/emacs/site-lisp and
+ info files to ${prefix}/info (overridable with --with-lispdir=...
+ and --infodir=...)
+
+ b) XEmacs: lisp files goto ${prefix}/lib/xemacs/site-packages/lisp/vm and
+ info files to ${prefix}/lib/xemacs/site-packages/info, (overridable
+ with --with-infodir=... and --infodir=...)
+
+ ATTENTION: Files byte-compiled with GNU Emacs are NOT COMPATIBLE with the
+ XEmacs and you may experience strange problems during startup when doing
+ so. Even between GNU Emacs versions there might be problems! Thus you must
+ ensure you are configuring with --with-emacs=xemacs when installing VM for
+ XEmacs! Also if you want to use BBDB features please specify the path
+ to its source files with the -with-other-dirs option.
+
+ a) GNU Emacs users run:
+ ./configure --with-other-dirs=/absolute/path/to/bbdb/lisp
+
+ b) XEmacs+BBDB users run:
+ ./configure --with-emacs=xemacs --with-other-dirs=/path/to/bbdb/lisp
+
+ It is possible to build VM in a separate directory. For instance, type
+
+ mkdir build; cd build; ../configure
+
+2) Compile everything by running:
+
+ make
+
+ You may ignore warnings, however error messages indicate that some modules
+ (partially) will not work, i.e. if other library files are missing or you
+ are running GNU Emacs.
+
+3) Installing the files
+
+ a) The manual way
+
+ Add the "lisp" and "info" directories in the VM bulit directory to the
+ Emacs search paths, e.g. if you have built vm in ~/vm add the following
+ to your ~/.emacs resp. ~/.xemacs/init.el.
+
+ (add-to-list 'load-path
+ (expand-file-name "~/vm/lisp"))
+ (add-to-list 'Info-default-directory-list
+ (expand-file-name "~/vm/info")))
+
+ GNU Emacs users, have to load the autloads by hand by adding
+
+ (require 'vm-autoloads)
+
+ to their ~/.emacs.
+
+ XEmacs: You are lucky nothing to do for you!
+
+ b) make install
+
+ Which might work, but must not work as most distros have their own
+ directory layout.
+
+4) You are now ready to use VM. C-h i should start up the Emacs Info
+ system and if you have installed the Info documents properly you can
+ use the online documentation to teach yourself how to use VM.
+
diff --git a/Makefile b/Makefile
deleted file mode 100644
index d867ace..0000000
--- a/Makefile
+++ /dev/null
@@ -1,288 +0,0 @@
-# All versions of Emacs prior to 19.34 for Emacs and
-# prior to 19.14 for XEmacs are unsupported.
-
-# what emacs is called on your system
-EMACS = emacs
-
-# top of the installation
-prefix = /usr/local
-
-# where the Info file should go
-INFODIR = ${prefix}/lib/emacs/info
-
-# where the vm.elc, tapestry.elc, etc. files should go
-LISPDIR = ${prefix}/lib/emacs/site-lisp
-
-# where the toolbar pixmaps should go.
-# vm-toolbar-pixmap-directory must point to the same place.
-# vm-image-directory must point to the same place.
-PIXMAPDIR = ${prefix}/lib/emacs/etc/vm
-
-# where the binaries should be go.
-BINDIR = ${prefix}/bin
-
-############## no user servicable parts beyond this point ###################
-
-# no csh please
-SHELL = /bin/sh
-
-# byte compiler options
-BYTEOPTS = ./vm-byteopts.el
-
-# have to preload the files that contain macro definitions or the
-# byte compiler will compile everything that references them
-# incorrectly. also preload a file that sets byte compiler options.
-PRELOADS = -l $(BYTEOPTS) -l ./vm-version.el -l ./vm-message.el -l ./vm-macro.el -l ./vm-vars.el
-
-# compile with noninteractive and relatively clean environment
-BATCHFLAGS = -batch -q -no-site-file
-
-# files that contain key macro definitions. almost everything
-# depends on them because the byte-compiler inlines macro
-# expansions. everything also depends on the byte compiler
-# options file since this might do odd things like turn off
-# certain compiler optimizations.
-CORE = vm-message.el vm-macro.el vm-byteopts.el
-
-# vm-version.elc needs to be first in this list, because load time
-# code needs the Emacs/XEmacs MULE/no-MULE feature stuff.
-OBJECTS = \
- vm-version.elc \
- vm-crypto.elc \
- vm-delete.elc vm-digest.elc vm-easymenu.elc vm-edit.elc vm-folder.elc \
- vm-imap.elc vm-license.elc vm-macro.elc vm-mark.elc vm-menu.elc \
- vm-message.elc \
- vm-mime.elc vm-minibuf.elc vm-misc.elc vm-motion.elc \
- vm-mouse.elc vm-page.elc vm-pop.elc vm-reply.elc \
- vm-save.elc \
- vm-search.elc vm-sort.elc vm-summary.elc vm-startup.elc vm-thread.elc \
- vm-toolbar.elc vm-undo.elc \
- vm-user.elc vm-vars.elc vm-virtual.elc vm-window.elc
-
-SOURCES = \
- vm-version.el \
- vm-crypto.el \
- vm-delete.el vm-digest.el vm-easymenu.el vm-edit.el vm-folder.el \
- vm-imap.el vm-license.el vm-macro.el vm-mark.el vm-menu.el vm-message.el \
- vm-mime.el vm-minibuf.el vm-misc.el vm-motion.el \
- vm-mouse.el vm-page.el vm-pop.el vm-reply.el vm-save.el \
- vm-search.el vm-sort.el vm-startup.el vm-summary.el vm-thread.el \
- vm-toolbar.el vm-undo.el \
- vm-user.el vm-vars.el vm-virtual.el vm-window.el
-
-UTILS = qp-decode qp-encode base64-decode base64-encode
-
-vm: vm.elc
-
-vm.elc: autoload
-
-noautoload: $(OBJECTS) tapestry.elc
- @echo "building vm.elc (with all modules included)..."
- @cat $(OBJECTS) tapestry.elc > vm.elc
-
-autoload: vm-autoload.elc $(OBJECTS) tapestry.elc
- @echo "building vm.elc (with all modules set to autoload)..."
- @echo "(defun vm-its-such-a-cruel-world ()" > vm.el
- @echo " (require 'vm-version)" >> vm.el
- @echo " (require 'vm-startup)" >> vm.el
- @echo " (require 'vm-vars)" >> vm.el
- @echo " (require 'vm-autoload))" >> vm.el
- @echo "(vm-its-such-a-cruel-world)" >> vm.el
- @echo "(fmakunbound 'vm-its-such-a-cruel-world)" >> vm.el
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm.el
-
-all: vm.info vm utils
-
-debug: $(SOURCES) tapestry.el
- @echo "building vm.elc (uncompiled, no autoloads)..."
- @cat $(SOURCES) tapestry.el > vm.elc
-
-utils: $(UTILS)
-
-qp-decode: qp-decode.c
- $(CC) $(CFLAGS) -o qp-decode qp-decode.c
-
-qp-encode: qp-encode.c
- $(CC) $(CFLAGS) -o qp-encode qp-encode.c
-
-base64-decode: base64-decode.c
- $(CC) $(CFLAGS) -o base64-decode base64-decode.c
-
-base64-encode: base64-encode.c
- $(CC) $(CFLAGS) -o base64-encode base64-encode.c
-
-install: all install-info install-el install-vm install-pixmaps install-utils
-
-install-info: vm.info
- test -d $(INFODIR) || mkdir -p $(INFODIR)
- cp vm.info vm.info-* $(INFODIR)
-
-install-vm: vm.elc
- test -d $(LISPDIR) || mkdir -p $(LISPDIR)
- cp *.elc $(LISPDIR)
-
-install-el:
- test -d $(LISPDIR) || mkdir -p $(LISPDIR)
- cp *.el $(LISPDIR)
-
-install-pixmaps:
- test -d $(PIXMAPDIR) || mkdir -p $(PIXMAPDIR)
- cp pixmaps/*.x[pb]m $(PIXMAPDIR)
-
-install-utils: $(UTILS)
- test -d $(BINDIR) || mkdir -p $(BINDIR)
- cp $(UTILS) $(BINDIR)
-
-clean:
- rm -f $(UTILS) vm.info vm.info-* vm-autoload.el vm-autoload.elc $(OBJECTS) tapestry.elc
-
-vm.info: vm.texinfo
- @echo "making vm.info..."
- @$(EMACS) $(BATCHFLAGS) -insert vm.texinfo -l texinfmt -f texinfo-format-buffer -f save-buffer
-
-# We use tr -d because Emacs under Cygwin apparently outputs CRLF
-# under Windows. We remove the CRs.
-# Solaris 8's tr -d '\r' removes r's so we use '\015' instead.
-# the echo command can also emit CRs.
-vm-autoload.elc: $(SOURCES)
- @echo scanning sources to build autoload definitions...
- @$(EMACS) $(BATCHFLAGS) -l ./make-autoloads -f print-autoloads $(SOURCES) | tr -d '\015' > vm-autoload.el
- @echo "(provide 'vm-autoload)" | tr -d '\015' >> vm-autoload.el
- @echo compiling vm-autoload.el...
- @$(EMACS) $(BATCHFLAGS) -l $(BYTEOPTS) -f batch-byte-compile vm-autoload.el
-
-vm-crypto.elc: vm-crypto.el $(CORE)
- @echo compiling vm-crypto.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-crypto.el
-
-vm-delete.elc: vm-delete.el $(CORE)
- @echo compiling vm-delete.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-delete.el
-
-vm-digest.elc: vm-digest.el $(CORE)
- @echo compiling vm-digest.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-digest.el
-
-vm-edit.elc: vm-edit.el $(CORE)
- @echo compiling vm-edit.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-edit.el
-
-vm-folder.elc: vm-folder.el $(CORE)
- @echo compiling vm-folder.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-folder.el
-
-vm-imap.elc: vm-imap.el $(CORE)
- @echo compiling vm-imap.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-imap.el
-
-vm-license.elc: vm-license.el $(CORE)
- @echo compiling vm-license.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-license.el
-
-vm-macro.elc: vm-macro.el $(CORE)
- @echo compiling vm-macro.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-macro.el
-
-vm-mark.elc: vm-mark.el $(CORE)
- @echo compiling vm-mark.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-mark.el
-
-vm-menu.elc: vm-menu.el vm-easymenu.el $(CORE)
- @echo compiling vm-menu.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -l ./vm-easymenu.el -f batch-byte-compile vm-menu.el
-
-vm-message.elc: vm-message.el $(CORE)
- @echo compiling vm-message.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-message.el
-
-vm-minibuf.elc: vm-minibuf.el $(CORE)
- @echo compiling vm-minibuf.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-minibuf.el
-
-vm-mime.elc: vm-mime.el $(CORE)
- @echo compiling vm-mime.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-mime.el
-
-vm-misc.elc: vm-misc.el $(CORE)
- @echo compiling vm-misc.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-misc.el
-
-vm-mouse.elc: vm-mouse.el $(CORE)
- @echo compiling vm-mouse.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-mouse.el
-
-vm-motion.elc: vm-motion.el $(CORE)
- @echo compiling vm-motion.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-motion.el
-
-vm-page.elc: vm-page.el $(CORE)
- @echo compiling vm-page.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-page.el
-
-vm-pop.elc: vm-pop.el $(CORE)
- @echo compiling vm-pop.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-pop.el
-
-vm-reply.elc: vm-reply.el $(CORE)
- @echo compiling vm-reply.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-reply.el
-
-vm-save.elc: vm-save.el $(CORE)
- @echo compiling vm-save.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-save.el
-
-vm-search.elc: vm-search.el $(CORE)
- @echo compiling vm-search.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-search.el
-
-vm-sort.elc: vm-sort.el $(CORE)
- @echo compiling vm-sort.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-sort.el
-
-vm-startup.elc: vm-startup.el $(CORE)
- @echo compiling vm-startup.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-startup.el
-
-vm-summary.elc: vm-summary.el $(CORE)
- @echo compiling vm-summary.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-summary.el
-
-vm-thread.elc: vm-thread.el $(CORE)
- @echo compiling vm-thread.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-thread.el
-
-vm-toolbar.elc: vm-toolbar.el $(CORE)
- @echo compiling vm-toolbar.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-toolbar.el
-
-vm-undo.elc: vm-undo.el $(CORE)
- @echo compiling vm-undo.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-undo.el
-
-vm-user.elc: vm-user.el $(CORE)
- @echo compiling vm-user.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-user.el
-
-vm-vars.elc: vm-vars.el $(CORE)
- @echo compiling vm-vars.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-vars.el
-
-vm-version.elc: vm-version.el $(CORE)
- @echo compiling vm-version.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-version.el
-
-vm-virtual.elc: vm-virtual.el $(CORE)
- @echo compiling vm-virtual.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-virtual.el
-
-vm-window.elc: vm-window.el $(CORE)
- @echo compiling vm-window.el...
- @$(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile vm-window.el
-
-tapestry.elc: tapestry.el
- @echo compiling tapestry.el...
- @$(EMACS) $(BATCHFLAGS) -l $(BYTEOPTS) -f batch-byte-compile tapestry.el
-
-vm-easymenu.elc: vm-easymenu.el
- @echo compiling vm-easymenu.el...
- @$(EMACS) $(BATCHFLAGS) -l $(BYTEOPTS) -f batch-byte-compile vm-easymenu.el
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..3e2420f
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,67 @@
+@SET_MAKE@
+
+# location of required programms
+BZR = bzr --no-plugins
+TAR = @TAR@
+RM = @RM@
+XARGS = @XARGS@
+prefix = @prefix@
+INSTALL = @INSTALL@
+
+SUBDIRS = lisp info src pixmaps
+
+##############################################################################
+all:
+ @for i in $(SUBDIRS) ; do ($(MAKE) -C $$i); done
+
+Makefile: config.status @srcdir@/Makefile.in
+ ./config.status $@
+
+@srcdir@/configure: @srcdir@/configure.ac
+ cd @srcdir@ ; autoconf
+ ./config.status --recheck
+
+config.status: @srcdir@/configure
+ ./config.status --recheck
+
+install:
+ @for i in $(SUBDIRS) ; do ($(MAKE) -C $$i install); done
+
+clean:
+ @for i in $(SUBDIRS) ; do ($(MAKE) -C $$i clean); done
+
+distclean:
+ @for i in $(SUBDIRS) ; do ($(MAKE) -C $$i distclean); done
+
+push:
+ $(BZR) push
+
+##############################################################################
+PKGDIR = $(shell pwd)/,,package/
+PKGINFO = $(PKGDIR)/lisp/vm/_pkg.el
+xemacs-package:
+ if [ "x@EMACS_FLAVOR@" != "xxemacs" ]; then \
+ echo "ERROR: Current build dir not configured for XEmacs,"; \
+ echo "ERROR: Please re-run configure with --with-emacs=xemacs."; \
+ exit 1; \
+ fi
+ -$(RM) -rf ,,package
+ cd lisp; make PACKAGEDIR=$(PKGDIR)/lisp/vm install-pkg
+ cd info; make info_dir=$(PKGDIR)/info install-pkg
+ cd src; make info_dir=$(PKGDIR)/bin install-pkg
+ echo ";;;###autoload" > $(PKGINFO)
+ echo "(package-provide 'vm'" > $(PKGINFO)
+ echo " :version 0.7" >> $(PKGINFO)
+ echo ' :author-version "'`$(BZR) revno "@top_srcdir@"`'"' >> $(PKGINFO)
+ echo " :type 'regular)" >> $(PKGINFO)
+ mkdir $(PKGDIR)/pkginfo;
+ touch $(PKGDIR)/pkginfo/MANIFEST.vm;
+ cd $(PKGDIR); find -type f | cut -c3- > pkginfo/MANIFEST.vm
+ cd ,,package; $(TAR) -cvzf ../vm-pkg.tar.gz *
+
+##############################################################################
+release::
+ ./release.sh
+
+snapshot::
+ ./release.sh snapshot
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..d725bbe
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,323 @@
+VM 8.0.9
+
+ BUGFIXES:
+
+ * Added documentation to `vm-mime-external-content-types-alist' that no
+ extra single quotes should be used around %f as the file name is already
+ quoted for the shell. (Thanks to Martin Schwenke)
+
+ * Fixed version number generation in release script. It was broken for
+ 8.0.8, i.e. it was showing 8.0.x-xemacs-542 instead. Now also other
+ branch related information is stored in the file vm-revno.el.
+
+VM 8.0.8
+
+ IMPROVEMENTS:
+
+ * Reactivated "Allow defadvice on function `vm' by recursing on session
+ start". It should work correctly now.
+
+ * Added interactive `vm-pipe-message-to-command-discard-output' and
+ the non-interactive `vm-pipe-message-to-command-to-string' for using
+ it in own functions.
+
+ * Added `vm-pipe-messages-to-command*' for bulk piping messages to a
+ single command, i.e. like saving to a pipe. This is substantially
+ faster than `vm-pipe-message-to-command*' which call the command on
+ each message separately. You may want to use it to feed spamassasin.
+
+ * Modified key bindings for piping messages, i.e. "|" is a prefix key
+ now. Type it twice to get the old pipe command, "|d" will call the
+ discard the output, just display some infos in the mode line. "|s"
+ will call `vm-pipe-messages-to-command' and "|n" will also call it
+ but discard the output.
+
+ * Removed vm-easymenu.el and use easymenu.el instead.
+
+ * In `vm-save-message-preview', ask the user if the output file already
+ exists instead of silently overwriting it.
+
+ BUGFIXES:
+
+ * Moved [Undo] to Dispose menu and [Emacs] to Help menu as these do not
+ work in Emacs 22 anymore when on the menu bar.
+
+ * Fixed intermixing of signature and quoted text in reply if
+ `vm-reply-include-presentation' is t. (Thanks to Roland Winkler for
+ debugging and reporting)
+
+ * Fixed yanking of presentation from wrong folder when folder is virtual.
+ (Thanks to Roland Winkler for reporting)
+
+ * Redistributed flag not displayed in presentation buffer mode line.
+ https://bugzilla.redhat.com/show_bug.cgi?id=428248 (Thanks to Jonathan
+ Underwood for the fix)
+
+ * `vm-submit-bug-report' gets the variables dynamically now and thus does
+ not miss new ones or references old ones anymore.
+
+ * Correctly determine the real folder when postponing compositions started
+ from a virtual folder. (Thanks to Uday S. Reddy for reporting and
+ debugging)
+
+ * Avoid crash when `vm-mouse-set-mouse-track-highlight' is not called
+ within a summary buffer or without a valid message pointer.
+
+ * Do not disable modes which do not exist. (Thanks to Uday S. Reddy for
+ reporting)
+
+VM 8.0.7
+
+ BUGFIXES:
+
+ * Disable only those minor modes listed in the variable
+ `vm-disable-modes-before-encoding' before encoding a
+ composition. (Thanks to Alley for reporting and debugging)
+
+ * Removed recursion from function `vm' added by 8.0.6, as it
+ causes startup troubles.
+
+ * Removed extra newline before attachment buttons. (Thanks to Alley for
+ reporting)
+
+ * Removed wrongly used calls to `interactive-p'. (Thanks to Alley for
+ reporting and debugging)
+
+VM 8.0.6
+
+ IMPROVEMENTS:
+
+ * Rewrote INSTALL to be more consistent and more understandable.
+
+ * Allow defadvice on function `vm' by recursing on session start. (Thanks
+ to Blueman for the code)
+
+ BUGFIXES:
+
+ * Ignore empty reply-to in `vm-ignored-reply-to'.
+
+ * Quoted the variable `vm-summary-format' in a doc string.
+
+ * Fixed typos in the docstring of `vm-mail-send-and-exit'.
+
+ * Disable all minor modes before encoding a composition. This results in
+ faster encoding when font-lock was enabled and avoids problems when
+ parts of a MIME object button get expanded due to an abbrev and thus the
+ extent/overlay gets split into two separate parts causing an encoding
+ error.
+
+ * Avoid duplicate mime buttons during decoding. (Thanks to Alley for
+ reporting)
+
+ * Mask 8 bit chars by 0xff in `vm-mime-qp-encode-region' to avoid crash
+ for those with all higher order bits set (negative ones?) (Thanks to
+ Blueman for the fix.)
+
+VM 8.0.5
+
+ BUGFIXES:
+
+ * Fixed bug caused by fixing `vm-drop-buffer-name-chars' in 8.0.4. There
+ is a 20-40% chance to create a new bug when fixing one. Regression
+ tests would be nice, but we do not have any for VM ;-/
+
+VM 8.0.4
+
+ IMPROVEMENTS:
+
+ * Require cl.el at compile-time only. (Thanks to John J. Foerch)
+
+ * Quiet compiler warning about old style backquotes. (Thanks to John
+ J. Foerch)
+
+ BUGFIXES:
+
+ * Correctly call custom-add-load. (Thanks to John J. Foerch and
+ Jonathan.underwood)
+
+ * Fixed building of vm-cus-load.el for Emacs 21.
+
+ * Use the old default for `vm-primary-inbox', i.e. "~/INBOX".
+
+ * Honor a t in `vm-drop-buffer-name-chars' as documented.
+
+VM 8.0.3
+
+ IMPROVEMENTS:
+
+ * Unified `vm-continue-what-message', i.e. first check for composition
+ buffers, if none exist then for saved drafts. Also added new variable
+ `vm-zero-drafts-start-compose'.
+
+ BUGFIXES:
+
+ * Fixed building of autoloads for GNU Emacs.
+
+ * Docfixes for vm-pine.el (Thanks to Stephen Eglen).
+
+ * Resurrected `vm-add-reply-subject-prefix' which was lost by the commit
+ of revno 91.
+
+ * Search for BZR only if bzrdir exists and use locate-file only when
+ defined.
+
+ * Use vm-mime-8bit-composition-charset as a fallback also for MULE Emacs.
+
+ * Fixed defcustom of vm-keep-crash-boxes and vm-spool-files.
+
+ * Fixed the section headers of the NEWS file.
+
+VM 8.0.2
+
+ IMPROVEMENTS:
+
+ * Added --with-pixmapdir to configure the location of the pixmaps.
+
+ * DESTDIR-Patch (Ulrich Mueller).
+
+ BUGFIXES:
+
+ * Avoid overflow of `buffer-undo-list' when inserting or encoding
+ big attachments.
+
+ * defcustom of `vm-mime-all-attachments-directory' should list nil.
+
+ * Honor pre VM 8.0.0 values of `vm-folder-directory' and
+ `vm-primary-inbox'. This should eliminate problems with users which
+ never changed the defaults.
+
+ * Use "cygwin-mount" to fix paths when available.
+
+ * Activate summary faces only when requested by vm-enable-addons.
+
+ * Fixed defcustom of `vm-enable-addons' and added documentation.
+
+ * "make install" creates $(bindir) now.
+
+ * Separate paths (e.g. otherdirs) only by semicolons to avoid problems on
+ Win32.
+
+ * Handle paths with spaces correctly.
+
+ * Install also pixmaps for GTK enabled Emacs.
+
+ * Just use the first subject when replying/forwarding to a set of
+ messages. This avoids long filenames for saved composition buffers.
+
+ * Ensure we are compiling with an emacs version >= 21.
+
+ * Encode headers regexp and case-fold-search corrected. (Ulrich Mueller)
+
+ * vm-summary-faces-mode does not leak extents anymore.
+
+VM 8.0.1
+
+ NOTES:
+
+ In order to get more features from vm-rfaddons set the variable
+ `vm-enable-addons' in your ~/.vm.
+
+ BUGFIXES:
+
+ * A saner default for vm-shrunken-header-face.
+
+ * Added documentation on vm-shrunken-headers-face and
+ vm-shrunken-headers-keymap.
+
+ * Added a new custom group `vm-faces' for faces.
+
+ * Added autoload token for vm-user-agent.
+
+ * Use INSTALL_PROGRAM instead of INSTALL_DATA for programs.
+
+ * Do not set vm-folder-directory if there is ~/INBOX. If VM does not get
+ mail after upgrading from 7.19 it is probably due to the new default for
+ vm-folder-directory, which was nil before.
+
+ * Revised the bindings and enabled features to a hopefully less
+ controversial setting.
+
+VM 8.0.0
+
+ NOTES:
+
+ VM is now in my hands and I will do my best to keep it alive!
+
+ ,--------------------------------------------------------------------------
+ | From: Kyle Jones <kyle_jones@wonderworks.com>
+ | To: Robert Widhopf-Fenk <hack@robf.de>
+ | Date: Wed, 21 Feb 2007 13:11:32 -0800
+ | Subject: Handing over VM?
+ |
+ | Robert Widhopf-Fenk writes:
+ | > Hi Kyle,
+ | >
+ | > I have been maintaining VM "unofficially" for the last few
+ | > years and now I want to become the official maintainer of
+ | > VM.
+ | >
+ | > Do I get your OK?
+ |
+ | Yes. Obviously I've moved on, though I've been slow to admit it
+ | to myself. Good luck.
+ `--------------------------------------------------------------------------
+
+ * My (robf) VM extensions are now activated by default, where it makes
+ sense to me.
+
+ * Releases are numbered now MAJOR.MINOR.PATCHLEVEL, where MAJOR is
+ increased when fundamental changes occur, MINOR for new features and
+ PATCHLEVEL for bugfix releases.
+
+ * New cleaner source tree layout.
+
+ * Better built system based on configure. Autoloads are generated only
+ for those functions marked with the autoload token now, which are mainly
+ interactive function. Thus, loading occurs only on demand and startup
+ should be faster.
+
+ BUGFIXES:
+
+ * All bugs reported to gnu.emacs.vm.bugs, gnu.emacs.vm.info and directly
+ to me are fixed either by the patches posted by others or me.
+
+ * If there are any missing autoloads, please report them and add a
+ (require 'vm-SOURCE) to your ~/.vm!
+
+ * Probably added numerous new bugs.
+
+
+ IMPROVEMENTS: compared to 7.19 (not vmrf)
+
+ * A new icon set based on vm-small-pixmaps.tgz which was floating around.
+ This one should fit by height to the one used in XEmacs and Emacs 22,
+ but it is slightly larger than those used in Emacs 21. If you see the
+ old icons, the please set the variables `vm-image-directory' and
+ `vm-toolbar-pixmap-directory' to nil in your ~/.vm!
+
+ * vm-mime-type-converter-alist now also works when replying to messages,
+ i.e. for text/html one can use lynx or w3m for the conversion.
+ (setq vm-mime-type-converter-alist
+ '(("text/html" "text/plain" "lynx -force_html -dump /dev/stdin")))
+
+ * Postponing (draft handling) of compositions and continuing of drafts, in
+ fact any messages also those from other people. (Info node: Sending
+ Messages)
+
+ * New mail header insertion functions for return-receipts, mail-priority
+ and FCC.
+
+ * More virtual folder selectors and replacements of other functions based
+ on selectors. (Info node: Virtual Folders)
+
+ * vm-serial.el provides message templates for composition and
+ personalizes mass emails. (Info node: TODO)
+
+ * vm-biff.el for popups with a list of new messages.
+
+ * vm-rfaddons.el has various stuff, look at the source if you are curious
+ or miss some VM feature, as it might already be there!
+
+;;; Local Variables: ***
+;;; mode:text ***
+;;; End: ***
diff --git a/README b/README
index 2666eee..47ec20e 100644
--- a/README
+++ b/README
@@ -1,66 +1,120 @@
-How to setup VM:
-
-0) Look at the Makefile and review the values of EMACS, INFODIR,
- LISPDIR, BINDIR and PIXMAPDIR. If they are not right for your
- system, change them.
-
-1) Your build options:
- `make' to build a usable VM.
- `make vm.info' to build the Info online help document.
- 'make utils' to compile the external Quoted-Printable and
- BASE64 encoders and decoders.
- `make all' to make everything.
- If there are byte compiler warnings, ignore them. They
- probably can't be avoided with code that is run on multipe
- Emacs versions.
-
-2) Put all the .elc files into a Lisp directory that is in your
- Emacs load-path. If you've already set LISPDIR to this
- directory, just `make install'.
-
-3) If you're using XEmacs or Emacs 21 and you want toolbar
- support, make a directory called `vm' in the XEmacs `etc'
- directory. Copy the files in pixmaps directory into the
- directory you just created. VM will look for the pixmaps
- there by default.
-
- Alternately you can put the pixmap files in any directory you
- want or just leave them where they are. Be sure to point the
- variables vm-toolbar-pixmap-directory and vm-image-directory at
- the direrctory where you put the files. That is
-
- (setq vm-toolbar-pixmap-directory "/path/to/pixmaps")
- (setq vm-image-directory "/path/to/pixmaps")
-
- in your .emacs or .vm file. If you've set PIXMAPDIR, 'make
- install' will copy the files to that directory.
-
-4) If you built the Info document, copy the file vm.info* files
- into the Emacs' info. ('make install' will do this for you if
- you've set INFODIR). You may need to edit the "dir" file in
- that directory and add a menu entry for VM. It should look
- like this:
-
-* VM:: (vm) A mail reader.
-
-5) Put these lines in your .emacs file if they aren't there
- already:
-
- (autoload 'vm "vm" "Start VM on your primary inbox." t)
- (autoload 'vm-other-frame "vm" "Like `vm' but starts in another frame." t)
- (autoload 'vm-visit-folder "vm" "Start VM on an arbitrary folder." t)
- (autoload 'vm-visit-virtual-folder "vm" "Visit a VM virtual folder." t)
- (autoload 'vm-mode "vm" "Run VM major mode on a buffer" t)
- (autoload 'vm-mail "vm" "Send a mail message using VM." t)
- (autoload 'vm-submit-bug-report "vm" "Send a bug report about VM." t)
-
-You're now ready to use VM. C-h i should start up the Emacs Info
-system and if you've installed the Info document properly you can
-use the online documentation to teach yourself how to use VM.
-
-Please use M-x vm-submit-bug-report to report bugs. The bug report
-will be sent to bug-vm@uunet.uu.net and be gatewayed from there to
-gnu.emacs.vm.bug.
-
-VM's home page on the World Wide Web is at http://www.wonderworks.com/vm .
-You can get the latest version of VM from there.
+VM was written by Kyle Jones! Hail Kyle! The last release from Kyle was 7.19.
+
+VM's home page up to version 7.19 on the World Wide Web is at
+http://www.wonderworks.com/vm and the FAQ is still hosted there.
+
+This VM is based on my (Robert Widhopf-Fenk) patches against VM 7.19.
+
+The persons who have contributed to this version of VM are:
+
+ * Aidan Kehoe
+ * Glenn ???
+ * Jens Gustedt
+ * John J Foerch
+ * Kevin Rogers
+ * Kyle Jones
+ * Rob Hodges
+ * Robert Marshall
+ * Robert P. Goldman
+ * Robert Widhopf-Fenk
+
+Please mail me a note, if I have forgotten someone or accidently put you on
+the list.
+
+Read INSTALL and follow the instructions to compile and setup VM.
+
+*******************************************************************************
+BUGS
+
+If you have any problems or meet a bug it is best to discuss them on the USENET
+groups gnu.emacs.vm.bugs or gnu.emacs.vm.info! Also search the groups before
+posting as there might have been some discussion and a fix before.
+
+Report any problems or bugs otherwise they cannot be fixed!
+
+Please provide the version number of VM and Emacs and how to reproduce the
+problem.
+
+Personally I am an follower of the XEmacs church and thus some things may not
+work with GNU Emacs, nevertheless I test VM also on GNU Emacs from time to
+time and I am happy to merge you fixes.
+
+*******************************************************************************
+Homepage
+
+The new homepage of VM is at http://www.nongnu.org/viewmail/ hosted by
+Savannah. There is a bugtracker and other stuff, but I prefer the news
+groups!
+
+*******************************************************************************
+Wiki
+
+The Wiki at http://www.emacswiki.org/cgi-bin/wiki?id=CategoryViewMail is
+best suited to conserve code snippets, cooking guides or feature requests.
+
+*******************************************************************************
+BZR (http://bazaar-vcs.org/)
+
+I maintain my changes with BZR now, since CVS and SVN suck and TLA/BAZ do as well.
+
+If you want to send me changes or start hacking on your own you may want to
+branch from my repository at http://www.robf.de/Hacking/bazaar/vm-repo.
+
+# create your own branch from the trunk
+bzr get http://www.robf.de/Hacking/bazaar/vm-repo/vm-trunk
+# get updates
+bzr pull
+# start hacking
+xemacs vm-pgg.el
+# commit your changes
+bzr commit
+# Generate a bundle of your changes for merging
+bzr bundle-revisions --output=xy-changes.diff
+# Attach the bundle to a mail (rather than doing cut&paste) and send
+# it to hack@robf.de with a descriptive subject.
+
+*******************************************************************************
+COMMENTS
+
+The documentation of my changes is incomplete and the changes may even cause
+new problems or bugs.
+
+This VM provides the following hacks & enhancements and other stuff not
+listed here, as I am quite lazy in writing docs. ;c)
+
+Additional extensions for VM written by myself:
+- vm-pine.el for draft handling and other Pine inspired functions.
+- vm-ps-print.el for nice ps-printing functions
+- vm-rfaddons.el adds various add-ons to VM
+- vm-grepmail a grepmail interface for VM
+- vm-avirtual.el brings additional virtual folder selectors and functions
+ for spam tagging
+- vm-biff.el is a xbiff within VM, notifying you of new mail
+- vm-serial.el templates for mails, personalized serial mails
+- vm-summary-faces.el face base on virtual selectors
+
+Additional extensions for VM from other people:
+- vm-pcrisis.el by Rob Hodges for people with personal crisis which need
+ to rewrite headers automatically.
+- vcard.el by Noah Friedman <friedman@splode.com> for
+ vm-vcard.el displaying vcards within VM.
+
+Changes of the VM core (incomplete):
+- make-autoloads: enhanced output & ignore links
+- vm-mime.el:
+ * vm-pine patch for attachment handling of continued message drafts
+ * mime button displaying file name of attachment
+ * write mime filter
+ * qp-decoding of disposition parameters like filename etc.
+- vm-mouse.el: handling of email-addresses like "mailto:" URLs
+- vm-page.el: vm-energize-urls is interactive now, this allows you to easily
+ check URLs in a message you are currently composing.
+- vm-reply.el:
+ * Proper setting of subject & references when replying to multiple
+ messages.
+ * Filtering of MIME types when yanking a message. Now only those
+ types listed in `vm-included-mime-types-list' are yanked and you
+ will have no attachment mess any more!
+- vm-startup.el: vm-mail takes now a subject argument
+- vm-vars.el: two new variables for customization (see vm-reply)
+ * vm-included-mime-types-list
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..4cc7478
--- /dev/null
+++ b/TODO
@@ -0,0 +1,127 @@
+This file lists the bugs, feature requests and wishes for future versions
+of VM. If you are missing anything please let me know!
+
+******************************************************************************
+EVERGREENS
+
+There are some things which probably will never be fixed ...
+
+ * Update the info file. News should also be there not in the NEWS file?
+
+ * Cleanup and reorganize the code.
+
+ * Better doc strings: VM has nearly none in the core, just my own extensions
+ have been documented properly using "M-x checkdoc RET".
+
+ * Enable sane extensions and configurations: The default should satisfy most
+ people, but still allow one to disable what they dislike.
+
+ * Integrate more extensions from others into the core.
+
+******************************************************************************
+BUGS
+
+These are bugs which must be fixed before the next release.
+
+******************************************************************************
+ROADMAP
+
+The features planed for one of the next releases.
+The order hints on the priority, but it is no gurantee.
+
+ * GNU Emacs: does not highlight attachment buttons in compositions
+
+ * Merge changes from the Debian package.
+
+ * Some of the user defined summary specifiers should become internal ones.
+
+ * Better HTML support for both displaying and replying, but probably not for
+ composition as there is no urge to surrender here! There should be a test
+ for w3m-emacs, w3, lynx, w3m and the best method should be selected by
+ default if not configured by the user.
+
+ HTML only messages should be converted into mixes/alternative parts by
+ vm-assimilate-html-message. vm-mime-show-alternatives should probably
+ be smart enough to display all but the chosen part as button.
+
+ * Click in mailto: link does not work when being used from w3 buffers.
+
+ * Virtual selectors matching on specific mime parts, e.g.
+ (vm-vs-text regexp): matching only text parts and those which can be
+ converted to text.
+ (vm-vs-attachment regexp): matching the disposition of parts
+
+ * Improved (i)search support: Only text parts and certain headers should be
+ searched and it should also work for virtual folders. We might utilize
+ virtual folder selectors here. [1]
+
+
+ * Better IMAP support, i.e. just fetch headers, sync, offline, search. It is
+ really bad now and thus I do use Thunderbird at work!
+
+ * Maildir support: It is a nice format and possibly can fix the problem of
+ huge mail folders, as VM must not read the whole buffer into memory, just
+ the index. Also it would allow for using external indexing tools like
+ http://www.rpcurnow.force9.co.uk/mairix/ and make folders really virtual.
+
+ * Virtual folders everywhere, i.e. only one physical folder. VM should
+ not read the folder into a buffer, but only query relevant messages from
+ an maildb-backend.
+
+******************************************************************************
+REST
+
+The unsorted and remaining ones.
+
+ * Marking + Delete is dead slow on folders with many (>2000) messages.
+
+ * Shortcut to expunge a single message.
+
+From EU
+
+ * Fix bugs when marking threads by "M T". Sometimes it misses some messages,
+ IMHO ones of broken MUAs not setting the References: header, but hey we
+ cannot fix them so let's work around them.
+
+ * for text/alternative messages, when the plain text part is
+ displayed internally, [add variable that will allow to] show icon
+ for the html (or rich text) part, which will allow to delete it
+ easily using $d. I now have to edit these by hand...
+
+ * The binding of mouse-3 overrides the usual usage of mouse-3 which
+ is very useful. An option to allow binding this menu to another
+ key (C-mouse-3?) would be great.
+
+ * when attachments appear with no empty line separating them from the
+ text, the attachment icon appears on the same line as the text
+ before it. this results in poor appearance (I think), Would be
+ much nicer to show the attachment icon on a separate line, rather
+ than continued on the last text line as now.
+
+ * Typing h when in the presentation window makes vm display only a
+ single windows with headers rather than adding a headers window to
+ the presentation mode window. (when in vm, change to presentation
+ buffer, type C-x1 and then h"
+
+ * When reading mail I have the frame divided into three windows:
+ headers, presentation and BBDB. When replying from the header
+ window, the reply window just replaces the headers window, leaving
+ the presentation window and the BBDB window unchanged. The
+ resulting reply window is too small... would be good to have it
+ replace all three windows (headers, presentation, BBDB) until the
+ reply is sent.
+
+******************************************************************************
+REFERENCES
+
+[1] Newsgroups: gnu.emacs.vm.info
+ Subject: Re: Improved search for mixed (mime) ascii/html folders?
+
+[2] Message-ID: <1159541555.884682.318660@c28g2000cwb.googlegroups.com>
+ Newsgroups: gnu.emacs.vm.info
+ Subject: VM feature requests
+ Date: 29 Sep 2006 07:52:35 -0700
+
+;;; Local Variables: ***
+;;; mode:text ***
+;;; End: ***
diff --git a/base64-decode.c b/base64-decode.c
deleted file mode 100644
index fe87460..0000000
--- a/base64-decode.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* public domain */
-
-/* BASE64 on stdin -> converted data on stdout */
-
-#include <stdio.h>
-
-#ifdef _WIN32
-#ifndef WIN32
-#define WIN32
-#endif
-#endif
-
-#ifdef WIN32
-#include <io.h>
-#include <fcntl.h>
-#endif
-
-unsigned char alphabet[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
-int
-main()
-{
- static char inalphabet[256], decoder[256];
- int i, bits, c, char_count, errors = 0;
-
-#ifdef WIN32
- _setmode( _fileno(stdout), _O_BINARY);
-#endif
-
- for (i = (sizeof alphabet) - 1; i >= 0 ; i--) {
- inalphabet[alphabet[i]] = 1;
- decoder[alphabet[i]] = i;
- }
-
- char_count = 0;
- bits = 0;
- while ((c = getchar()) != EOF) {
- if (c == '=')
- break;
- if (c > 255 || ! inalphabet[c])
- continue;
- bits += decoder[c];
- char_count++;
- if (char_count == 4) {
- putchar((bits >> 16));
- putchar(((bits >> 8) & 0xff));
- putchar((bits & 0xff));
- bits = 0;
- char_count = 0;
- } else {
- bits <<= 6;
- }
- }
- if (c == EOF) {
- if (char_count) {
- fprintf(stderr, "base64 encoding incomplete: at least %d bits truncated",
- ((4 - char_count) * 6));
- errors++;
- }
- } else { /* c == '=' */
- switch (char_count) {
- case 1:
- fprintf(stderr, "base64 encoding incomplete: at least 2 bits missing");
- errors++;
- break;
- case 2:
- putchar((bits >> 10));
- break;
- case 3:
- putchar((bits >> 16));
- putchar(((bits >> 8) & 0xff));
- break;
- }
- }
- exit(errors ? 1 : 0);
-}
diff --git a/configure b/configure
new file mode 100755
index 0000000..25b5817
--- /dev/null
+++ b/configure
@@ -0,0 +1,3455 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.61 for VM vm-8.0.x.
+#
+# Report bugs to <hack@robf.de>.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+#
+# Copyright (C) 2006-2007 Robert Widhopf-Fenk <hack@robf.de>
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+
+ if test $as_have_required = yes && (eval ":
+(as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells=
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ case $as_dir in
+ /*)
+ for as_base in sh bash ksh sh5; do
+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ done;;
+ esac
+done
+IFS=$as_save_IFS
+
+
+ for as_shell in $as_candidate_shells $SHELL; do
+ # Try only shells that exist, to save several forks.
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+ as_have_required=yes
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+ (exit $1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ for as_var in BASH_ENV ENV
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell autoconf@gnu.org about your system,
+ echo including any error possibly output before this
+ echo message
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME='VM'
+PACKAGE_TARNAME='vm'
+PACKAGE_VERSION='vm-8.0.x'
+PACKAGE_STRING='VM vm-8.0.x'
+PACKAGE_BUGREPORT='hack@robf.de'
+
+ac_unique_file="configure.ac"
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+SET_MAKE
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+LN_S
+RM
+LS
+MKDIR
+GREP
+XARGS
+TAR
+MAKEINFO
+TEXI2DVI
+EMACS_PROG
+lispdir
+pixmapdir
+EMACS_FLAVOR
+EMACS_VERSION
+FLAGS
+info_dir
+OTHERDIRS
+PACKAGEDIR
+SYMLINKS
+LINKPATH
+LIBOBJS
+LTLIBOBJS'
+ac_subst_files=''
+ ac_precious_vars='build_alias
+host_alias
+target_alias'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+ eval enable_$ac_feature=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+ eval enable_$ac_feature=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+ eval with_$ac_package=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+ eval with_$ac_package=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute directory names.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ { echo "$as_me: error: Working directory cannot be determined" >&2
+ { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ { echo "$as_me: error: pwd does not report name of working directory" >&2
+ { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$0" ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+ { (exit 1); exit 1; }; }
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures VM vm-8.0.x to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/vm]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of VM vm-8.0.x:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-emacs=PROG choose which flavor of Emacs to use
+ --with-lispdir=DIR where to install lisp files
+ --with-pixmapdir=DIR where to install pixmap files
+ --with-other-dirs=DIRS set other needed lisp directories (a list of
+ semicolon separated paths)
+ --with-package-dir=DIR set the Emacs package directory to DIR
+ --with-symlinks install VM by linking instead of copying [no]
+ --with-linkpath=PATH path to symlink from if `pwd' does not work
+
+Report bugs to <hack@robf.de>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" || continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+VM configure vm-8.0.x
+generated by GNU Autoconf 2.61
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+
+Copyright (C) 2006-2007 Robert Widhopf-Fenk <hack@robf.de>
+_ACEOF
+ exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by VM $as_me vm-8.0.x, which was
+generated by GNU Autoconf 2.61. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args '$ac_arg'"
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+ set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+ set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+ set x "$ac_default_prefix/share/config.site" \
+ "$ac_default_prefix/etc/config.site"
+fi
+shift
+for ac_site_file
+do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+ac_config_files="$ac_config_files Makefile lisp/Makefile info/Makefile src/Makefile pixmaps/Makefile"
+
+
+# Common system utilities checking:
+{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
+set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ SET_MAKE=
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+IFS=$as_save_IFS
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6; }
+fi
+
+# Extract the first word of "rm", so it can be a program name with args.
+set dummy rm; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_RM+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $RM in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_RM="$RM" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_RM" && ac_cv_path_RM="/bin/rm"
+ ;;
+esac
+fi
+RM=$ac_cv_path_RM
+if test -n "$RM"; then
+ { echo "$as_me:$LINENO: result: $RM" >&5
+echo "${ECHO_T}$RM" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "ls", so it can be a program name with args.
+set dummy ls; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_LS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $LS in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_LS="$LS" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_LS" && ac_cv_path_LS="/bin/ls"
+ ;;
+esac
+fi
+LS=$ac_cv_path_LS
+if test -n "$LS"; then
+ { echo "$as_me:$LINENO: result: $LS" >&5
+echo "${ECHO_T}$LS" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "mkdir", so it can be a program name with args.
+set dummy mkdir; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_MKDIR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $MKDIR in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_MKDIR" && ac_cv_path_MKDIR="/bin/mkdir"
+ ;;
+esac
+fi
+MKDIR=$ac_cv_path_MKDIR
+if test -n "$MKDIR"; then
+ { echo "$as_me:$LINENO: result: $MKDIR" >&5
+echo "${ECHO_T}$MKDIR" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "grep", so it can be a program name with args.
+set dummy grep; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $GREP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GREP" && ac_cv_path_GREP="/bin/grep"
+ ;;
+esac
+fi
+GREP=$ac_cv_path_GREP
+if test -n "$GREP"; then
+ { echo "$as_me:$LINENO: result: $GREP" >&5
+echo "${ECHO_T}$GREP" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+
+# External programs checking:
+ # Extract the first word of "xargs", so it can be a program name with args.
+set dummy xargs; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_XARGS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$XARGS"; then
+ ac_cv_prog_XARGS="$XARGS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_XARGS="xargs"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+XARGS=$ac_cv_prog_XARGS
+if test -n "$XARGS"; then
+ { echo "$as_me:$LINENO: result: $XARGS" >&5
+echo "${ECHO_T}$XARGS" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ if test "x${XARGS}" = "x" ; then
+ { echo "$as_me:$LINENO: WARNING: *** No xargs program found." >&5
+echo "$as_me: WARNING: *** No xargs program found." >&2;}
+ { echo "$as_me:$LINENO: WARNING: *** make clean/tarball will not work." >&5
+echo "$as_me: WARNING: *** make clean/tarball will not work." >&2;}
+ fi
+ for ac_prog in gtar tar
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_TAR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$TAR"; then
+ ac_cv_prog_TAR="$TAR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_TAR="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+TAR=$ac_cv_prog_TAR
+if test -n "$TAR"; then
+ { echo "$as_me:$LINENO: result: $TAR" >&5
+echo "${ECHO_T}$TAR" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$TAR" && break
+done
+
+ if test "x${TAR}" = "xtar" ; then
+ { echo "$as_me:$LINENO: checking that tar is GNU tar" >&5
+echo $ECHO_N "checking that tar is GNU tar... $ECHO_C" >&6; }
+ ${TAR} --version > /dev/null 2>&1 || TAR=
+ if test "x${TAR}" = "x" ; then
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ else
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ fi
+ fi
+ if test "x${TAR}" = "x" ; then
+ { echo "$as_me:$LINENO: WARNING: *** No GNU tar program found." >&5
+echo "$as_me: WARNING: *** No GNU tar program found." >&2;}
+ { echo "$as_me:$LINENO: WARNING: *** Some targets will be unavailable." >&5
+echo "$as_me: WARNING: *** Some targets will be unavailable." >&2;}
+ fi
+ # Extract the first word of "makeinfo", so it can be a program name with args.
+set dummy makeinfo; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_MAKEINFO+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$MAKEINFO"; then
+ ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_MAKEINFO="makeinfo"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+MAKEINFO=$ac_cv_prog_MAKEINFO
+if test -n "$MAKEINFO"; then
+ { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
+echo "${ECHO_T}$MAKEINFO" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ if test "x${MAKEINFO}" = "x" ; then
+ { echo "$as_me:$LINENO: WARNING: *** No makeinfo program found." >&5
+echo "$as_me: WARNING: *** No makeinfo program found." >&2;}
+ { echo "$as_me:$LINENO: WARNING: *** Info files will not be built." >&5
+echo "$as_me: WARNING: *** Info files will not be built." >&2;}
+ fi
+ # Extract the first word of "texi2dvi", so it can be a program name with args.
+set dummy texi2dvi; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_TEXI2DVI+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$TEXI2DVI"; then
+ ac_cv_prog_TEXI2DVI="$TEXI2DVI" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_TEXI2DVI="texi2dvi"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+TEXI2DVI=$ac_cv_prog_TEXI2DVI
+if test -n "$TEXI2DVI"; then
+ { echo "$as_me:$LINENO: result: $TEXI2DVI" >&5
+echo "${ECHO_T}$TEXI2DVI" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ if test "x${TEXI2DVI}" = "x" ; then
+ { echo "$as_me:$LINENO: WARNING: *** No texi2dvi program found." >&5
+echo "$as_me: WARNING: *** No texi2dvi program found." >&2;}
+ { echo "$as_me:$LINENO: WARNING: *** DVI and PDF files will not be built." >&5
+echo "$as_me: WARNING: *** DVI and PDF files will not be built." >&2;}
+ fi
+
+
+# Check whether --with-emacs was given.
+if test "${with_emacs+set}" = set; then
+ withval=$with_emacs; EMACS_PROG="${withval}"
+else
+ for ac_prog in emacs xemacs
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_EMACS_PROG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$EMACS_PROG"; then
+ ac_cv_prog_EMACS_PROG="$EMACS_PROG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_EMACS_PROG="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+EMACS_PROG=$ac_cv_prog_EMACS_PROG
+if test -n "$EMACS_PROG"; then
+ { echo "$as_me:$LINENO: result: $EMACS_PROG" >&5
+echo "${ECHO_T}$EMACS_PROG" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$EMACS_PROG" && break
+done
+
+fi
+
+ if test "x${EMACS_PROG}" = "x" ; then
+ { { echo "$as_me:$LINENO: error: *** No Emacs program found." >&5
+echo "$as_me: error: *** No Emacs program found." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ # EMACS TYPE ##################################################
+ { echo "$as_me:$LINENO: checking checking emacs-type of ${EMACS_PROG}" >&5
+echo $ECHO_N "checking checking emacs-type of ${EMACS_PROG}... $ECHO_C" >&6; }
+ cat > conftest.el <<TEST
+(princ (format "%s" (if (featurep 'xemacs ) 'xemacs 'emacs)))
+TEST
+ EMACS_FLAVOR=`"${EMACS_PROG}" --no-site-file --batch -l conftest.el | ${GREP} .`
+ { echo "$as_me:$LINENO: result: ${EMACS_FLAVOR}" >&5
+echo "${ECHO_T}${EMACS_FLAVOR}" >&6; }
+ # EMACS VERSION ###############################################
+ { echo "$as_me:$LINENO: checking checking emacs-version of ${EMACS_PROG}" >&5
+echo $ECHO_N "checking checking emacs-version of ${EMACS_PROG}... $ECHO_C" >&6; }
+ cat > conftest.el <<TEST
+(princ (format "%d" emacs-major-version))
+TEST
+ EMACS_VERSION=`"${EMACS_PROG}" --no-site-file --batch -l conftest.el | ${GREP} .`
+ if test ${EMACS_VERSION} -lt 21; then
+ { { echo "$as_me:$LINENO: error: Emacs version ${EMACS_VERSION} is too old, 21 is minimum!" >&5
+echo "$as_me: error: Emacs version ${EMACS_VERSION} is too old, 21 is minimum!" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ # EMACS DEPENDENT SETTINGS ####################################
+ # We may add a version check here ...
+ { echo "$as_me:$LINENO: result: ${EMACS_VERSION}" >&5
+echo "${ECHO_T}${EMACS_VERSION}" >&6; }
+
+ # Copied from gnus aclocal.m4
+
+# Check whether --with-lispdir was given.
+if test "${with_lispdir+set}" = set; then
+ withval=$with_lispdir; lispdir=${withval}
+fi
+
+ { echo "$as_me:$LINENO: checking where .elc files should go" >&5
+echo $ECHO_N "checking where .elc files should go... $ECHO_C" >&6; }
+ if test -z "$lispdir"; then
+ theprefix=$prefix
+ if test "x$theprefix" = "xNONE"; then
+ theprefix=$ac_default_prefix
+ fi
+ datadir="\$(prefix)/share"
+ if test "$EMACS_FLAVOR" = "xemacs"; then
+ datadir="\$(prefix)/lib"
+ lispdir="${datadir}/${EMACS_FLAVOR}/site-packages/lisp/vm"
+ else
+ lispdir="${datadir}/${EMACS_FLAVOR}/site-lisp/vm"
+ fi
+ for thedir in share lib; do
+ potential=
+ if test -d "${theprefix}/${thedir}/${EMACS_FLAVOR}/site-lisp"; then
+ if test "$EMACS_FLAVOR" = "xemacs"; then
+ lispdir="\$(prefix)/${thedir}/${EMACS_FLAVOR}/site-packages/lisp/vm"
+ else
+ lispdir="${datadir}/${EMACS_FLAVOR}/site-lisp/vm"
+ fi
+ break
+ fi
+ done
+ fi
+ { echo "$as_me:$LINENO: result: $lispdir" >&5
+echo "${ECHO_T}$lispdir" >&6; }
+
+
+
+# Check whether --with-pixmapdir was given.
+if test "${with_pixmapdir+set}" = set; then
+ withval=$with_pixmapdir; pixmapdir=${withval}
+fi
+
+ { echo "$as_me:$LINENO: checking where pixmaps should go" >&5
+echo $ECHO_N "checking where pixmaps should go... $ECHO_C" >&6; }
+ if test -z "$pixmapdir"; then
+ pixmapdir="${datadir}/vm"
+ fi
+ { echo "$as_me:$LINENO: result: $pixmapdir" >&5
+echo "${ECHO_T}$pixmapdir" >&6; }
+
+
+# if test "x${EMACS_FLAVOR}" = "xemacs" ; then
+# PACKAGEDIR="${prefix}/share/emacs/site-lisp"
+# else
+# PACKAGEDIR="${HOME}/.xemacs/xemacs-packages"
+# fi
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking wich options to pass on to (X)Emacs" >&5
+echo $ECHO_N "checking wich options to pass on to (X)Emacs... $ECHO_C" >&6; }
+ if test "x$FLAGS" = "x"; then
+ if test "x$EMACS_FLAVOR" = "xxemacs"; then
+ FLAGS="-batch -no-autoloads -l \$(srcdir)/vm-build.el"
+ else
+ FLAGS="-batch -q -no-site-file -no-init-file -l \$(srcdir)/vm-build.el"
+ fi
+ else
+ FLAGS=$FLAGS
+ fi
+ { echo "$as_me:$LINENO: result: $FLAGS" >&5
+echo "${ECHO_T}$FLAGS" >&6; }
+
+
+
+ { echo "$as_me:$LINENO: checking where the TeXinfo docs should go" >&5
+echo $ECHO_N "checking where the TeXinfo docs should go... $ECHO_C" >&6; }
+ if test "$infodir" = "\${prefix}/info"; then
+ if test "$EMACS_FLAVOR" = "xemacs"; then
+ info_dir="\$(prefix)/${thedir}/${EMACS_FLAVOR}/site-packages/info"
+ else
+ info_dir="\$(prefix)/share/info"
+ fi
+ else
+ info_dir=$infodir
+ fi
+ { echo "$as_me:$LINENO: result: $info_dir" >&5
+echo "${ECHO_T}$info_dir" >&6; }
+
+
+
+
+
+# Check whether --with-other-dirs was given.
+if test "${with_other_dirs+set}" = set; then
+ withval=$with_other_dirs;
+
+ OTHERDIRS="${withval}"
+
+fi
+
+
+ { echo "$as_me:$LINENO: checking otherdirs" >&5
+echo $ECHO_N "checking otherdirs... $ECHO_C" >&6; }
+ cat > conftest.el <<TEST
+ (let ((otherdirs (delete "" (split-string "${OTHERDIRS}" ";")))
+ absolutedirs
+ dir)
+ (while otherdirs
+ (setq dir (expand-file-name (vm-fix-cygwin-path (car otherdirs)))
+ otherdirs (cdr otherdirs))
+ (if (not (file-exists-p dir))
+ (error "Directory %S does not exist!" dir)
+ (add-to-list 'absolutedirs dir)))
+ (princ (format "%S" absolutedirs)))
+TEST
+ OTHERDIRS=`"${EMACS_PROG}" --no-site-file --batch -l lisp/vm-build.el -l conftest.el`
+ { echo "$as_me:$LINENO: result: $OTHERDIRS" >&5
+echo "${ECHO_T}$OTHERDIRS" >&6; }
+
+
+
+# is there a sane way to set this to a useful default?
+
+
+
+# Check whether --with-package-dir was given.
+if test "${with_package_dir+set}" = set; then
+ withval=$with_package_dir;
+
+ PACKAGEDIR="${withval}"
+
+fi
+
+
+
+
+
+
+# Check whether --with-symlinks was given.
+if test "${with_symlinks+set}" = set; then
+ withval=$with_symlinks;
+
+ SYMLINKS="${withval}"
+
+else
+ SYMLINKS="no"
+fi
+
+
+
+
+
+
+# Check whether --with-linkpath was given.
+if test "${with_linkpath+set}" = set; then
+ withval=$with_linkpath;
+
+ LINKPATH="${withval}"
+
+fi
+
+
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by VM $as_me vm-8.0.x, which was
+generated by GNU Autoconf 2.61. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+# Files that config.status was made for.
+config_files="$ac_config_files"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+VM config.status vm-8.0.x
+configured by $0, generated by GNU Autoconf 2.61,
+ with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2006 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ echo "$ac_cs_version"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ CONFIG_SHELL=$SHELL
+ export CONFIG_SHELL
+ exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
+ "info/Makefile") CONFIG_FILES="$CONFIG_FILES info/Makefile" ;;
+ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "pixmaps/Makefile") CONFIG_FILES="$CONFIG_FILES pixmaps/Makefile" ;;
+
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+#
+# Set up the sed scripts for CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+
+_ACEOF
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+SET_MAKE!$SET_MAKE$ac_delim
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+INSTALL_DATA!$INSTALL_DATA$ac_delim
+LN_S!$LN_S$ac_delim
+RM!$RM$ac_delim
+LS!$LS$ac_delim
+MKDIR!$MKDIR$ac_delim
+GREP!$GREP$ac_delim
+XARGS!$XARGS$ac_delim
+TAR!$TAR$ac_delim
+MAKEINFO!$MAKEINFO$ac_delim
+TEXI2DVI!$TEXI2DVI$ac_delim
+EMACS_PROG!$EMACS_PROG$ac_delim
+lispdir!$lispdir$ac_delim
+pixmapdir!$pixmapdir$ac_delim
+EMACS_FLAVOR!$EMACS_FLAVOR$ac_delim
+EMACS_VERSION!$EMACS_VERSION$ac_delim
+FLAGS!$FLAGS$ac_delim
+info_dir!$info_dir$ac_delim
+OTHERDIRS!$OTHERDIRS$ac_delim
+PACKAGEDIR!$PACKAGEDIR$ac_delim
+SYMLINKS!$SYMLINKS$ac_delim
+LINKPATH!$LINKPATH$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 63; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in :F $CONFIG_FILES
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+ { (exit 1); exit 1; }; };;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+ ac_file_inputs="$ac_file_inputs $ac_f"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input="Generated from "`IFS=:
+ echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ fi
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin";;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir="$ac_dir"
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+case `sed -n '/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out"; rm -f "$tmp/out";;
+ *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+ esac
+ ;;
+
+
+
+ esac
+
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+
+# configure.ac ends here
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..8153511
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,277 @@
+# configure.ac --- configuration setup for VM
+
+# Author: Robert Widhopf-Fenk <hack@robf.de>
+
+# Copyright (C) 2006-2007
+
+# VM is free software; you can redistribute it and/or modify it under the
+# terms of the GNU Library General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+
+# VM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for
+# more details.
+
+# You should have received a copy of the GNU Library General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+# Process this file with autoconf to produce a new configure script
+
+m4_define([VM_PRE_INIT],
+[ m4_define([VM_VERSION],
+ m4_esyscmd([bzr nick | xargs printf '%s'
+ ]))
+])
+
+# VM_ARG_SUBST(VAR, OPTION, VAL, DESC[, DEFAULT[, ACTION]])
+#
+# Substitute the autoconf variable VAR to a value specified by the user
+# option --with-OPTION[=VAL] (described by DESC), or with a DEFAULT value.
+# If an additional ACTION is given, it is executed at the top of the
+# ACTION-IF-FOUND part of AC_ARG_WITH.
+# #### WARNING: pay attention to the quoting of ACTION if given !!!!!
+AC_DEFUN([VM_ARG_SUBST],
+[
+ AC_SUBST([$1])
+ AC_ARG_WITH([$2],
+ AC_HELP_STRING([--with-][$2]ifelse($3, [], [], [=$3]),
+ [$4]ifelse($5, [], [], [ [[[$5]]]])),
+ [
+ ifelse($6, [], [], $6)
+ $1="${withval}"
+ ],
+ ifelse($5, [], [], [$1="$5"]))
+])
+
+# Find a (g)tar program and make sure it is GNU one. A failure is not fatal
+# since tar is needed for non critical targets only.
+AC_DEFUN([VM_PROG_GNU_TAR],
+ [ AC_CHECK_PROGS(TAR, gtar tar)
+ if test "x${TAR}" = "xtar" ; then
+ AC_MSG_CHECKING([that tar is GNU tar])
+ ${TAR} --version > /dev/null 2>&1 || TAR=
+ if test "x${TAR}" = "x" ; then
+ AC_MSG_RESULT(no)
+ else
+ AC_MSG_RESULT(yes)
+ fi
+ fi
+ if test "x${TAR}" = "x" ; then
+ AC_MSG_WARN([*** No GNU tar program found.])
+ AC_MSG_WARN([*** Some targets will be unavailable.])
+ fi ])
+
+# Find an xargs program. A failure is not fatal, only clean/tarball will not
+# work
+AC_DEFUN([VM_PROG_XARGS],
+ [ AC_CHECK_PROG(XARGS, xargs, xargs)
+ if test "x${XARGS}" = "x" ; then
+ AC_MSG_WARN([*** No xargs program found.])
+ AC_MSG_WARN([*** make clean/tarball will not work.])
+ fi ])
+
+# Find a makeinfo program. A failure is not fatal, only info files won't be
+# built.
+AC_DEFUN([VM_PROG_MAKEINFO],
+ [ AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo)
+ if test "x${MAKEINFO}" = "x" ; then
+ AC_MSG_WARN([*** No makeinfo program found.])
+ AC_MSG_WARN([*** Info files will not be built.])
+ fi ])
+
+# Find a texi2dvi program. A failure is not fatal, only dvi and pdf files
+# won't be built.
+AC_DEFUN([VM_PROG_TEXI2DVI],
+ [ AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi)
+ if test "x${TEXI2DVI}" = "x" ; then
+ AC_MSG_WARN([*** No texi2dvi program found.])
+ AC_MSG_WARN([*** DVI and PDF files will not be built.])
+ fi ])
+
+# Choose an Emacs flavor according to the --with-emacs user option, or try
+# emacs and xemacs.
+# We use EMACS_PROG instead of EMACS to avoid colliding with Emacs' own
+# internal environment.
+AC_DEFUN([VM_PROG_EMACS],
+ [ AC_ARG_WITH([emacs],
+ AC_HELP_STRING([--with-emacs=PROG],
+ [choose which flavor of Emacs to use]),
+ [ EMACS_PROG="${withval}" ],
+ [ AC_CHECK_PROGS(EMACS_PROG, emacs xemacs) ])
+ if test "x${EMACS_PROG}" = "x" ; then
+ dnl This is critical enough to generate an error and not a warning...
+ AC_MSG_ERROR([*** No Emacs program found.])
+ fi
+ # EMACS TYPE ##################################################
+ AC_MSG_CHECKING([checking emacs-type of ${EMACS_PROG}])
+ cat > conftest.el <<TEST
+(princ (format "%s" (if (featurep 'xemacs ) 'xemacs 'emacs)))
+TEST
+ EMACS_FLAVOR=`"${EMACS_PROG}" --no-site-file --batch -l conftest.el | ${GREP} .`
+ AC_MSG_RESULT([${EMACS_FLAVOR}])
+ # EMACS VERSION ###############################################
+ AC_MSG_CHECKING([checking emacs-version of ${EMACS_PROG}])
+ cat > conftest.el <<TEST
+(princ (format "%d" emacs-major-version))
+TEST
+ EMACS_VERSION=`"${EMACS_PROG}" --no-site-file --batch -l conftest.el | ${GREP} .`
+ if test ${EMACS_VERSION} -lt 21; then
+ AC_MSG_ERROR([Emacs version ${EMACS_VERSION} is too old, 21 is minimum!])
+ fi
+ # EMACS DEPENDENT SETTINGS ####################################
+ # We may add a version check here ...
+ AC_MSG_RESULT([${EMACS_VERSION}])
+
+ # Copied from gnus aclocal.m4
+ AC_ARG_WITH(lispdir,[ --with-lispdir=DIR where to install lisp files], lispdir=${withval})
+ AC_MSG_CHECKING([where .elc files should go])
+ if test -z "$lispdir"; then
+ dnl Set default value
+ theprefix=$prefix
+ if test "x$theprefix" = "xNONE"; then
+ theprefix=$ac_default_prefix
+ fi
+ datadir="\$(prefix)/share"
+ if test "$EMACS_FLAVOR" = "xemacs"; then
+ datadir="\$(prefix)/lib"
+ lispdir="${datadir}/${EMACS_FLAVOR}/site-packages/lisp/vm"
+ else
+ lispdir="${datadir}/${EMACS_FLAVOR}/site-lisp/vm"
+ fi
+ for thedir in share lib; do
+ potential=
+ if test -d "${theprefix}/${thedir}/${EMACS_FLAVOR}/site-lisp"; then
+ if test "$EMACS_FLAVOR" = "xemacs"; then
+ lispdir="\$(prefix)/${thedir}/${EMACS_FLAVOR}/site-packages/lisp/vm"
+ else
+ lispdir="${datadir}/${EMACS_FLAVOR}/site-lisp/vm"
+ fi
+ break
+ fi
+ done
+ fi
+ AC_MSG_RESULT($lispdir)
+ AC_SUBST(lispdir)
+
+ AC_ARG_WITH(pixmapdir,[ --with-pixmapdir=DIR where to install pixmap files], pixmapdir=${withval})
+ AC_MSG_CHECKING([where pixmaps should go])
+ if test -z "$pixmapdir"; then
+ dnl Set default value
+ pixmapdir="${datadir}/vm"
+ fi
+ AC_MSG_RESULT($pixmapdir)
+ AC_SUBST(pixmapdir)
+
+# if test "x${EMACS_FLAVOR}" = "xemacs" ; then
+# PACKAGEDIR="${prefix}/share/emacs/site-lisp"
+# else
+# PACKAGEDIR="${HOME}/.xemacs/xemacs-packages"
+# fi
+
+ AC_SUBST(EMACS_PROG)
+ AC_SUBST(EMACS_FLAVOR)
+ AC_SUBST(EMACS_VERSION)
+])
+
+# copied from gnus aclocal.m4
+AC_DEFUN([VM_BUILD_FLAGS], [
+ AC_MSG_CHECKING([wich options to pass on to (X)Emacs])
+ if test "x$FLAGS" = "x"; then
+ if test "x$EMACS_FLAVOR" = "xxemacs"; then
+ FLAGS="-batch -no-autoloads -l \$(srcdir)/vm-build.el"
+ else
+ FLAGS="-batch -q -no-site-file -no-init-file -l \$(srcdir)/vm-build.el"
+ fi
+ else
+ FLAGS=$FLAGS
+ fi
+ AC_MSG_RESULT($FLAGS)
+ AC_SUBST(FLAGS)
+])
+
+
+# Copied from gnus aclocal.m4 (AC_PATH_INFO_DIR)
+AC_DEFUN([VM_PATH_INFO_DIR], [
+ AC_MSG_CHECKING([where the TeXinfo docs should go])
+ dnl Set default value. This must be an absolute path.
+ if test "$infodir" = "\${prefix}/info"; then
+ if test "$EMACS_FLAVOR" = "xemacs"; then
+ info_dir="\$(prefix)/${thedir}/${EMACS_FLAVOR}/site-packages/info"
+ else
+ info_dir="\$(prefix)/share/info"
+ fi
+ else
+ info_dir=$infodir
+ fi
+ AC_MSG_RESULT($info_dir)
+ AC_SUBST(info_dir)
+])
+
+# --with-other-dir option
+AC_DEFUN([VM_OTHERDIRS],
+ [ VM_ARG_SUBST([OTHERDIRS], [other-dirs], [DIRS],
+ [set other needed lisp directories (a list of semicolon separated paths)],
+ [],)
+ AC_MSG_CHECKING([otherdirs])
+ cat > conftest.el <<TEST
+ (let ((otherdirs (delete "" (split-string "${OTHERDIRS}" ";")))
+ absolutedirs
+ dir)
+ (while otherdirs
+ (setq dir (expand-file-name (vm-fix-cygwin-path (car otherdirs)))
+ otherdirs (cdr otherdirs))
+ (if (not (file-exists-p dir))
+ (error "Directory %S does not exist!" dir)
+ (add-to-list 'absolutedirs dir)))
+ (princ (format "%S" absolutedirs)))
+TEST
+ OTHERDIRS=`"${EMACS_PROG}" --no-site-file --batch -l lisp/vm-build.el -l conftest.el`
+ AC_MSG_RESULT($OTHERDIRS)
+ AC_SUBST(OTHERDIRS)
+])
+
+##############################################################################
+VM_PRE_INIT
+AC_INIT([VM], [VM_VERSION], [hack@robf.de])
+
+AC_COPYRIGHT([Copyright (C) 2006-2007 Robert Widhopf-Fenk <hack@robf.de>])
+
+AC_CONFIG_SRCDIR([configure.ac])
+AC_CONFIG_FILES([Makefile lisp/Makefile info/Makefile src/Makefile pixmaps/Makefile])
+
+# Common system utilities checking:
+AC_PROG_MAKE_SET
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PATH_PROG(RM, rm, /bin/rm)
+AC_PATH_PROG(LS, ls, /bin/ls)
+AC_PATH_PROG(MKDIR, mkdir, /bin/mkdir)
+AC_PATH_PROG(GREP, grep, /bin/grep)
+
+# External programs checking:
+VM_PROG_XARGS
+VM_PROG_GNU_TAR
+VM_PROG_MAKEINFO
+VM_PROG_TEXI2DVI
+
+VM_PROG_EMACS
+VM_BUILD_FLAGS
+VM_PATH_INFO_DIR
+VM_OTHERDIRS
+
+# is there a sane way to set this to a useful default?
+VM_ARG_SUBST([PACKAGEDIR], [package-dir], [DIR],
+ [set the Emacs package directory to DIR],)
+
+VM_ARG_SUBST([SYMLINKS], [symlinks], [],
+ [install VM by linking instead of copying], [no])
+
+VM_ARG_SUBST([LINKPATH], [linkpath], [PATH],
+ [path to symlink from if `pwd' does not work])
+
+AC_OUTPUT
+
+# configure.ac ends here
diff --git a/contrib/attempted-locking.diff b/contrib/attempted-locking.diff
new file mode 100644
index 0000000..93f59cf
--- /dev/null
+++ b/contrib/attempted-locking.diff
@@ -0,0 +1,105 @@
+# Bazaar revision bundle v0.8
+#
+# message:
+# first shot at improving the locking.
+# committer: rpgoldman@real-time.com
+# date: Sun 2006-10-08 18:19:49.986000061 -0500
+
+=== modified file vm-folder.el
+--- vm-folder.el
++++ vm-folder.el
+@@ -2993,6 +2993,8 @@
+ buffer-file-name)))
+ (vm-get-spooled-mail nil))
+ (progn
++ ;; if we've got new mail, then lock the buffer....
++ (lock-buffer)
+ ;; don't move the message pointer unless the folder
+ ;; was empty.
+ (if (and (null vm-message-pointer)
+@@ -3185,6 +3187,9 @@
+ vm-default-folder-permission-bits))
+ (save-buffer prefix))
+ (and oldmodebits (set-default-file-modes oldmodebits))))
++ ;; if the folder's been locked (it should have been), then
++ ;; unlock it.
++ (unlock-buffer)
+ (vm-set-buffer-modified-p nil)
+ ;; clear the modified flag in virtual folders if all the
+ ;; real buffers associated with them are unmodified.
+@@ -3630,6 +3635,9 @@
+ mail-waiting ))))
+
+ (defun vm-get-spooled-mail (&optional interactive)
++ "Gets new spooled mail according to the folder-access method.
++Returns a list of new messages \(not sure what the data type of
++\"message\" is in this context\)."
+ (if vm-block-new-mail
+ (error "Can't get new mail until you save this folder."))
+ (cond ((eq vm-folder-access-method 'pop)
+
+=== modified file vm-startup.el
+--- vm-startup.el
++++ vm-startup.el
+@@ -153,7 +153,7 @@
+ (coding-system-for-read
+ (vm-line-ending-coding-system)))
+ (message "Reading %s..." file)
+- (prog1 (find-file-noselect file)
++ (prog1 (vm-find-file-noselect file)
+ ;; update folder history
+ (let ((item (or remote-spec folder
+ vm-primary-inbox)))
+@@ -223,6 +223,8 @@
+ ;; If the buffer's not modified then we know that there can be no
+ ;; messages in the folder that are not on disk.
+ (or (buffer-modified-p) (setq vm-messages-not-on-disk 0))
++ ;; if the buffer's been modified, it should be locked...
++ (and (buffer-modified-p) (lock-buffer))
+ (setq first-time (not (eq major-mode 'vm-mode))
+ preserve-auto-save-file (and buffer-file-name
+ (not (buffer-modified-p))
+@@ -393,6 +395,33 @@
+ (if (not (input-pending-p))
+ (message totals-blurb)))))))
+
++;;; helper function
++(defun vm-find-file-noselect (filename)
++ (let* ((buffer (find-file-noselect filename))
++ (lock (file-locked-p filename)))
++ (cond ((null lock)
++ ;; not locked, no worries
++ buffer)
++ ((eq lock t)
++ ;; this xemacs has the buffer locked. I don't believe that
++ ;; this should be a problem, either. Unless it means that
++ ;; I've introduced a bug, and not properly unlocked things...
++ (warn "Buffer is locked by this emacs. Unexpected -- please report.")
++ buffer)
++ (t
++ ;; the lock value is the name of the locking user
++ (let ((query-result (ask-user-about-lock
++ filename lock)))
++ (cond ((eq query-result t)
++ ;; steal the lock
++ buffer)
++ ((null query-result)
++ (save-excursion
++ (set-buffer buffer)
++ (setq buffer-read-only t))
++ (message "Opening folder read-only.")
++ buffer)))))))
++
+ ;;;###autoload
+ (defun vm-other-frame (&optional folder read-only)
+ "Like vm, but run in a newly created frame."
+
+# revision id: rpgoldman@real-time.com-20061008231949-1bd9467b25ca41b8
+# sha1: 9ee06c49007ffdec241f9f0f4206dda2e327015f
+# inventory sha1: afad72f633b5cbae416178d327931a735786f2f0
+# parent ids:
+# hack@robf.de-20061005191950-d7498e730daa5855
+# base id: hack@robf.de-20061005191950-d7498e730daa5855
+# properties:
+# branch-nick: vm
+
diff --git a/contrib/vm-blueman.el b/contrib/vm-blueman.el
new file mode 100644
index 0000000..ac3eacd
--- /dev/null
+++ b/contrib/vm-blueman.el
@@ -0,0 +1,119 @@
+;From: blueman <NOSPAM@nospam.com>
+;Subject: Function to fit displayed mime images to width
+;Newsgroups: gnu.emacs.vm.info
+;Date: Tue, 12 Dec 2006 18:07:44 GMT
+
+;Was going through some old code and would like to share this helpful
+;function..
+
+;; Stretch/Shrink mime image to fit exactly in frame width.
+;; The shrink functionality is particularly helpful since images displayed
+;; by emacs look wacked when they extend past a line width
+(defun vm-mime-fitwidth-image (extent)
+"Stretch/Shrink mime image to fit exactly in frame width (JJK)."
+ (let* ((layout (vm-extent-property extent 'vm-mime-layout))
+ (blob (get (vm-mm-layout-cache layout)
+ 'vm-mime-display-internal-image-xxxx))
+ dims tempfile factor)
+ ;; Emacs 19 uses a different layout cache than XEmacs or Emacs 21+.
+ ;; The cache blob is a list in that case.
+ (if (consp blob)
+ (setq tempfile (car blob))
+ (setq tempfile blob))
+ (setq dims (vm-get-image-dimensions tempfile))
+ (setq factor (/ (float (* (1- (frame-width)) (frame-char-width))) (car dims)))
+ (vm-mime-frob-image-xxxx extent
+ "-scale"
+ (concat (int-to-string (* factor (car dims)))
+ "x"
+ (int-to-string (* factor (nth 1 dims)))))))
+
+;; Functionality to add above function to standard attachment menu
+(add-hook 'vm-menu-setup-hook
+ (lambda ()
+ (require 'easymenu)
+ (easy-menu-add-item vm-menu-fsfemacs-image-menu
+ nil
+ ["Fit to width"
+ (vm-mime-run-display-function-at-point 'vm-mime-fitwidth-image)
+ (stringp vm-imagemagick-convert-program)]
+ "4x Larger" )
+ (easy-menu-add-item vm-menu-fsfemacs-attachment-menu
+ nil
+ ["Save attachment..."
+ (vm-mime-run-display-function-at-point
+ 'vm-mime-send-body-to-file)
+ t ]
+ "Set Content Disposition..." )
+ (easy-menu-add-item vm-menu-fsfemacs-attachment-menu
+ nil
+ ["Delete attachment..."
+ (vm-delete-mime-object)
+ t ]
+ "Set Content Disposition..." )
+ (easy-menu-add-item vm-menu-fsfemacs-attachment-menu
+ nil
+ ["Attach to message..."
+ (call-interactively 'vm-mime-attach-object-from-message)
+ t ]
+ "Set Content Disposition..." )
+ (easy-menu-add-item vm-menu-fsfemacs-attachment-menu
+ nil
+ ["Display as Ascii"
+ (vm-mime-run-display-function-at-point
+ 'vm-mime-display-body-as-text)
+ t ]
+ "Set Content Disposition..." )
+ (easy-menu-add-item vm-menu-fsfemacs-attachment-menu
+ nil
+ ["Pipe to Command"
+ (vm-mime-run-display-function-at-point
+ 'vm-mime-pipe-body-to-queried-command-discard-output)
+ t ]
+ "Set Content Disposition..." )
+ ))
+
+
+
+;From: blueman <NOSPAM@nospam.com>
+;Subject: Function to retrieve mail via fetchmail from emacs/vm
+;Newsgroups: gnu.emacs.vm.info
+;Date: Tue, 12 Dec 2006 18:31:57 GMT
+
+;Was going through some old code and would like to share this helpful
+;function..
+
+;Note this runs the users local fetchmail process as configured by
+;~/.fetchmailrc
+(defun vm-fetchmail ()
+"*Fetch mail asynchronously from remote server (JJK)"
+ (interactive)
+ (cond
+ ((file-executable-p vm-fetchmail-function)
+ (set-process-sentinel
+ (start-process "Fetchmail" "*Fetchmail*" vm-fetchmail-function)
+ 'vm-fetchmail-sentinel)
+ (message "Fetching new mail..."))
+ (t (error "Error: Fetchmail not found on system!"))))
+
+(defvar vm-fetchmail-function "/usr/bin/fetchmail"
+"Function used to fetch remote mail (JJK)")
+
+(defun vm-fetchmail-sentinel (process status)
+ (beep t)
+ (setq status (substring status -2 -1))
+ (message "Finished fetching... %s"
+ (if (string= status "d") "*New mail*"
+ (setq status (string-to-number status))
+ (cond
+ ((= status 1) "No new mail")
+ ((= status 2) "Error opening socket")
+ ((= status 3) "User authentication failed")
+ ((= status 4) "Fatal protocol error")
+ ((= status 5) "Syntax error")
+ ((= status 6) "Bad permissions on run control file")
+ ((= status 7) "Error condition reported by server")
+ ((= status 8) "Client-side exclusion error")
+ ((= status 9) "Lock busy")
+ (t "Other error")))))
+
diff --git a/contrib/vm-mime-display-internal-application.el b/contrib/vm-mime-display-internal-application.el
new file mode 100644
index 0000000..de898f0
--- /dev/null
+++ b/contrib/vm-mime-display-internal-application.el
@@ -0,0 +1,204 @@
+;;; vm-mime-display-internal-application.el --- Display application attachments
+;;; -*-unibyte: t; coding: iso-8859-1;-*-
+
+;; Copyright © 2004 Kevin Rodgers
+
+;; Author: Kevin Rodgers <ihs_4664@yahoo.com>
+;; Created: 11 Jun 2004
+;; Version: $Revision: 1.5 $
+;; Keywords: mail, mime
+;; RCS: $Id: vm-mime-display-internal-application.el,v 1.5 2004/07/14 23:29:04 kevinr Exp $
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2 of
+;; the License, or (at your option) any later version.
+
+;; This program is distributed in the hope that it will be
+;; useful, but WITHOUT ANY WARRANTY; without even the implied
+;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+;; PURPOSE. See the GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public
+;; License along with this program; if not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+;; MA 02111-1307 USA
+
+;;; Commentary:
+
+;; VM does not provide a way to display additional MIME media types
+;; internally. This file defines a new user variable to control which
+;; application/* subtypes can be displayed within Emacs:
+;; C-h v vm-mime-internal-application-subtypes
+;;
+;; It also defines user commands to register a subtype and to install
+;; all registered subtypes as internally displayable applications:
+;; M-x vm-mime-register-internal-application
+;; M-x vm-mime-install-internal-applications
+;;
+;; Usage:
+;; (load-library "vm-mime-display-internal-application")
+;; (vm-mime-register-internal-application "foo" t) ; to run foo-mode
+;; (vm-mime-register-internal-application "bar" 'baz-mode)
+;; (vm-mime-install-internal-applications)
+
+;;; Code:
+
+(require 'vm)
+
+(defvar vm-mime-internal-application-subtypes
+ ;; see http://www.iana.org/assignments/media-types/application/
+ '(("emacs-lisp" . t) ; lisp-mode.el
+ ("tar" . t) ; tar-mode.el
+ ("arc" . archive-mode) ; arc-mode.el
+ ("lzh" . archive-mode) ; arc-mode.el
+ ("zip" . archive-mode) ; arc-mode.el
+ ("zoo" . archive-mode) ; arc-mode.el
+ ;; For file-name-handler subtypes, let find-file-noselect ->
+ ;; after-find-file -> (normal-mode t) choose the mode. Specify
+ ;; ignore instead of normal-mode for these subtypes, so that the
+ ;; optional FIND-FILE argument doesn't override enable-local-variables.
+ ("gzip" . ignore) ; jka-compr.el
+ ("bzip2" . ignore) ; jka-compr.el
+ ("compress" . ignore)) ; jka-compr.el
+ "List of MIME \"application/*\" subtypes that should be displayed internally.
+
+Each (SUBTYPE . MODE) element maps the \"applicaton/SUBTYPE\" MIME
+content type to the major MODE used to display it. Both the MODE and
+`vm-mime-display-internal-application/SUBTYPE' functions must be
+defined.
+
+If MODE is t, SUBTYPE-mode is used to display \"application/SUBTYPE\"
+attachments.")
+
+(defvar vm-mime-internal-application-x-subtypes nil
+ "*If non-nil, display application/x-SUBTYPE attachments the same as application/SUBTYPE attachments.
+See `vm-mime-internal-application-subtypes'.")
+
+(defadvice vm-mime-can-display-internal (after application/xxxx activate
+ compile)
+ "Respect `vm-mime-internal-application-subtypes'."
+ (or ad-return-value
+ (setq ad-return-value
+ (let* ((layout (ad-get-arg 0))
+ (type (car (vm-mm-layout-type layout)))
+ (subtype (if (vm-mime-types-match "application" type)
+ (substring type (1+ (match-end 0)))))
+ (mode (if subtype
+ (vm-mime-can-display-internal-application
+ subtype))))
+ (if mode
+ (let ((charset (or (vm-mime-get-parameter layout "charset")
+ "us-ascii")))
+ (or (vm-mime-charset-internally-displayable-p charset)
+ (vm-mime-can-convert-charset charset))))))))
+
+(defun vm-mime-can-display-internal-application (subtype)
+ "Return the Emacs mode for displaying \"application/SUBTYPE\" MIME objects."
+ (catch 'major-mode
+ (let ((subtypes vm-mime-internal-application-subtypes)
+ mode)
+ (while subtypes
+ (if (or (equal subtype (car (car subtypes)))
+ (and vm-mime-internal-application-x-subtypes
+ (equal subtype (concat "x-" (car (car subtypes))))))
+ (cond ((and (eq (cdr (car subtypes)) 't)
+ (fboundp (setq mode (intern (concat subtype "-mode")))))
+ (throw 'major-mode mode))
+ ((fboundp (setq mode (cdr (car subtypes))))
+ (throw 'major-mode mode))))
+ (setq subtypes (cdr subtypes)))
+ nil)))
+
+(defun vm-mime-display-internal-application/xxxx (layout)
+ "Display LAYOUT in its own buffer."
+ ;; see vm-mime-display-external-generic
+ (let* ((tempfile (or (get (vm-mm-layout-cache layout)
+ 'vm-mime-display-internal-application/xxxx)
+ (let ((suffix
+ (or (vm-mime-extract-filename-suffix layout)
+ (vm-mime-find-filename-suffix-for-type
+ layout)))
+ (filename
+ (or (vm-mime-get-disposition-parameter layout
+ "filename")
+ (vm-mime-get-parameter layout "name"))))
+ (vm-make-tempfile-name suffix filename))))
+ (type (car (vm-mm-layout-type layout)))
+ (subtype (if (vm-mime-types-match "application" type)
+ (substring type (1+ (match-end 0))))))
+ (vm-mime-send-body-to-file layout nil tempfile)
+ (vm-register-message-garbage-files (list tempfile))
+ (put (vm-mm-layout-cache layout)
+ 'vm-mime-display-internal-application/xxxx
+ tempfile)
+ (let* ((inhibit-local-variables t)
+ (enable-local-variables nil)
+ (enable-local-eval nil)
+ (pop-up-frames vm-mutable-frames)
+ (pop-up-windows vm-mutable-windows)
+ (mode (vm-mime-can-display-internal-application subtype)))
+ (pop-to-buffer
+ (find-file-noselect tempfile)) ; (with-auto-compression-mode ...)
+ (or (eq major-mode mode)
+ (funcall mode))
+;; (when pop-up-frames
+;; (set-window-dedicated-p (selected-window) t))
+ (cond (pop-up-frames
+ (add-hook 'kill-buffer-hook 'delete-frame t t))
+ (pop-up-windows
+ (add-hook 'kill-buffer-hook 'delete-window t t))))))
+
+(defun vm-mime-register-internal-application (subtype mode)
+ "Add (SUBTYPE . MODE) to `vm-mime-internal-application-subtypes'.
+Also define the `vm-mime-display-internal-application/SUBTYPE' and
+`vm-mime-display-button-application/SUBTYPE' functions.
+
+If MODE is nil, just define the functions."
+ (interactive
+ (let* ((subtype (completing-read "Subtype: "
+ vm-mime-internal-application-subtypes))
+ (subtype-mode (fboundp (intern (concat subtype "-mode"))))
+ (completion-ignore-case nil)
+ (mode (intern (completing-read (if subtype-mode
+ "Mode: (default t) "
+ "Mode: ")
+ obarray
+ (lambda (s)
+ (and (fboundp s)
+ (string-match "-mode\\'"
+ (symbol-name s))))
+ t nil nil (if subtype-mode "t")))))
+ (or (eq mode 't)
+ (fboundp mode) ; i.e. (equal (symbol-name mode) "")
+ (error "Undefined mode: %s" mode)) ; (unintern mode)
+ (list subtype mode)))
+ (if mode
+ (setq vm-mime-internal-application-subtypes
+ (cons (cons subtype mode) vm-mime-internal-application-subtypes)))
+ (let ((internal
+ (intern (concat "vm-mime-display-internal-application/" subtype)))
+ (button
+ (intern (concat "vm-mime-display-button-application/" subtype))))
+ (defalias internal 'vm-mime-display-internal-application/xxxx)
+ (fset button (lambda (layout)
+ (vm-mime-display-button-xxxx layout nil)))
+ (if vm-mime-internal-application-x-subtypes
+ (progn
+ (defalias (intern (concat "vm-mime-display-internal-application/x-"
+ subtype))
+ internal)
+ (defalias (intern (concat "vm-mime-display-button-application/x-"
+ subtype))
+ button)))))
+
+(defun vm-mime-install-internal-applications ()
+ "Define display and button functions for each registered subtype.
+See `vm-mime-internal-application-subtypes'."
+ (interactive)
+ (let ((subtypes vm-mime-internal-application-subtypes))
+ (while subtypes
+ (vm-mime-register-internal-application (car (car subtypes)) nil)
+ (setq subtypes (cdr subtypes)))))
+
+;;; vm-mime-display-internal-application.el ends here
diff --git a/contrib/vm-mime.el-w3m.patch b/contrib/vm-mime.el-w3m.patch
new file mode 100644
index 0000000..88fa068
--- /dev/null
+++ b/contrib/vm-mime.el-w3m.patch
@@ -0,0 +1,134 @@
+=== modified file 'vm-mime.el'
+--- vm-mime.el 2006-08-21 21:17:05 +0000
++++ vm-mime.el 2006-09-18 23:09:23 +0000
+@@ -2060,49 +2060,87 @@
+ (defun vm-mime-display-internal-text (layout)
+ (vm-mime-display-internal-text/plain layout))
+
++(autoload 'w3m-region "w3m" "Render region using w3m")
++
++(defcustom vm-mime-renderer-for-text/html 'w3
++ "The HTML renderer to use for internal display.
++W3M is usually faster and better than W3."
++ :group 'vm
++ :type '(choice (const w3)
++ (const w3m)))
++
++(defun vm-mime-display-internal-text/html-with-w3m (start end)
++ (save-restriction
++ (narrow-to-region start end)
++ (let ((w3m-safe-url-regexp "\\`cid:")
++ w3m-force-redisplay)
++ (goto-char (point-max))
++ (insert-before-markers "z")
++ (w3m-region (point-min) (1- (point-max)))
++ (goto-char (point-max))
++ (delete-char -1))
++
++ (when (and (boundp 'w3m-minor-mode-map) w3m-minor-mode-map)
++ (add-text-properties (point-min) (point-max)
++ (list 'keymap w3m-minor-mode-map)))))
++
++(defun vm-mime-display-internal-text/html-with-w3 (start end)
++ ;; w3-region apparently deletes all the text in the
++ ;; region and then insert new text. This makes the
++ ;; end == start. The fix is to move the end marker
++ ;; forward with a placeholder character so that when
++ ;; w3-region delete all the text, end will still be
++ ;; ahead of the insertion point and so will be moved
++ ;; forward when the new text is inserted. We'll
++ ;; delete the placeholder afterward.
++ (goto-char end)
++ (insert-before-markers "z")
++ (w3-region start (1- end))
++ (goto-char end)
++ (delete-char -1))
++
+ (defun vm-mime-display-internal-text/html (layout)
+- (if (and (fboundp 'w3-region)
+- vm-mime-use-w3-for-text/html)
+- (condition-case error-data
+- (let ((buffer-read-only nil)
+- (start (point))
+- (charset (or (vm-mime-get-parameter layout "charset")
+- "us-ascii"))
+- end buffer-size)
+- (message "Inlining text/html, be patient...")
+- (vm-mime-insert-mime-body layout)
+- (setq end (point-marker))
+- (vm-mime-transfer-decode-region layout start end)
+- (vm-mime-charset-decode-region charset start end)
+- ;; w3-region apparently deletes all the text in the
+- ;; region and then insert new text. This makes the
+- ;; end == start. The fix is to move the end marker
+- ;; forward with a placeholder character so that when
+- ;; w3-region delete all the text, end will still be
+- ;; ahead of the insertion point and so will be moved
+- ;; forward when the new text is inserted. We'll
+- ;; delete the placeholder afterward.
+- (goto-char end)
+- (insert-before-markers "z")
+- (w3-region start (1- end))
+- (goto-char end)
+- (delete-char -1)
+- ;; remove read-only text properties
+- (let ((inhibit-read-only t))
+- (remove-text-properties start end '(read-only nil)))
+- (goto-char end)
+- (message "Inlining text/html... done")
+- t )
+- (error (vm-set-mm-layout-display-error
+- layout
+- (format "Inline HTML display failed: %s"
+- (prin1-to-string error-data)))
+- (message "%s" (vm-mm-layout-display-error layout))
+- (sleep-for 2)
+- nil ))
+- (vm-set-mm-layout-display-error layout "Need W3 to inline HTML")
+- (message "%s" (vm-mm-layout-display-error layout))
+- nil ))
++ (let ((render-func
++ (cond ((eq vm-mime-renderer-for-text/html 'w3m)
++ 'vm-mime-display-internal-text/html-with-w3m)
++ ((eq vm-mime-renderer-for-text/html 'w3)
++ 'vm-mime-display-internal-text/html-with-w3)
++ (t
++ (vm-set-mm-layout-display-error
++ layout
++ (concat "Inline HTML display failed: function "
++ (symbol-name vm-mime-inline-render-function-for-text/html)
++ " not found. Please bind a valid function to vm-mime-inline-render-function-for-text/html."))
++ (message "%s" (vm-mm-layout-display-error layout))
++ nil))))
++ (if (fboundp render-func)
++ (condition-case error-data
++ (let ((buffer-read-only nil)
++ (start (point))
++ (charset (or (vm-mime-get-parameter layout "charset")
++ "us-ascii"))
++ end buffer-size)
++ (message "Inlining text/html, be patient...")
++ (vm-mime-insert-mime-body layout)
++ (setq end (point-marker))
++ (vm-mime-transfer-decode-region layout start end)
++ (vm-mime-charset-decode-region charset start end)
++
++ (funcall render-func start end)
++
++ ;; remove read-only text properties
++ (let ((inhibit-read-only t))
++ (remove-text-properties start end '(read-only nil)))
++ (goto-char end)
++ (message "Inlining text/html... done")
++ t )
++ (error (vm-set-mm-layout-display-error
++ layout
++ (format "Inline HTML display failed: %s"
++ (prin1-to-string error-data)))
++ (message "%s" (vm-mm-layout-display-error layout))
++ (sleep-for 2)
++ nil ))))))
+
+ (defun vm-mime-display-internal-text/plain (layout &optional no-highlighting)
+ (let ((start (point)) end need-conversion
+
diff --git a/example.vm b/example.vm
new file mode 100644
index 0000000..c3df8a1
--- /dev/null
+++ b/example.vm
@@ -0,0 +1,250 @@
+;;; .vm --- Example ~/.vm
+;;;
+;;; -*- emacs-lisp -*-
+;;;
+;;; Copyright (C) 2007 Robert Widhopf-Fenk
+;;;
+;;; This program is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 1, or (at your option)
+;;; any later version.
+;;;
+;;; This program is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with this program; if not, write to the Free Software
+;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+;;;
+
+;;; You may use this file as a starting point for setting up and customizing
+;;; VM to your own needs.
+
+;;*****************************************************************************
+;; Make VM your default mail agent in Emacs
+(setq mail-user-agent 'vm-user-agent)
+
+;;*****************************************************************************
+;; Folders and spool files, this is where your mail comes from.
+
+;; vm-spool-files is a list of lists, each sublist should be of the form
+;; (INBOX SPOOLNAME CRASHBOX)
+
+(setq vm-spool-files
+ (list
+ ;; You can drop mail to the same inbox from different spool files.
+ (list vm-primary-inbox "/var/spool/mail/username1" vm-crash-box)
+ (list vm-primary-inbox "/var/spool/mail/username2" vm-crash-box)
+ ;; Another spool file
+ (list "spam" (expand-file-name "~spam/drop")
+ (concat vm-folder-directory "spam.crash"))
+ ;; POP
+ (list "gmail.pop" "pop:pop.google.com:110:pass:YourEmailAddress:*"
+ (concat vm-folder-directory "gmail.pop.crash"))
+ ;; POP-SSL
+ (list "gmail.pop" "pop-ssl:pop.google.com:995:pass:YourEmailAddress:*"
+ (concat vm-folder-directory "gmail.pop.crash"))
+ ;; IMAP
+ (list "gmail.imap" "imap:imap.google.com:143:inbox:login:YourEmailAddress:*"
+ (concat vm-folder-directory "gmail.imap.crash"))
+ ))
+
+;;*****************************************************************************
+;; Summary
+
+;; See the recipients for emails you sent instead of yourself.
+(setq vm-summary-uninteresting-senders
+ (regexp-opt '("@robf.de" "Robert Widhopf-Fenk")))
+
+;; Change the summary format by setting `vm-summary-format'.
+;; Run "M-x vm-fix-my-summary!!! RET" to fix existing summaries.
+
+;;*****************************************************************************
+;; Viewing messages
+;;
+;; HTML messages can be converted to text or the w3 resp. w3m Emacs viewers
+;; can be used for displaying.
+
+(setq vm-mime-type-converter-alist
+ '(("text/html" "text/plain" "lynx -force_html -dump /dev/stdin")
+ ("message/delivery-status" "text/plain")
+ ("application/zip" "text/plain" "listzip")
+ ("application/x-zip-compressed" "text/plain" "zipinfo /dev/stdin")
+ ("application/x-www-form-urlencoded" "text/plain")
+ ("message/disposition-notification" "text/plain")
+ ("application/mac-binhex40" "application/octet-stream" "hexbin -s"))
+
+
+;; Set up w3m (you should check if it exists)
+(require 'vm-w3m)
+(setq vm-included-mime-types-list
+ '("text/plain" "text/html" "text/enriched" "message/rfc822"))
+
+;;*****************************************************************************
+;; Composing email
+
+(setq mail-default-headers "From: Robert Widhopf-Fenk <hack@robf.de>\n")
+
+(vmpc-my-identities "me@company1.nil" "me@home.nil" "me@alterego.nil")
+(require 'vm-pcrisis)
+
+;;*****************************************************************************
+;; A hook function to setup mail-composing buffers
+(defun robf-vm-mail-mode-hook ()
+ "Robert Widhopf-Fenks `vm-mail-mode-hook'."
+ (interactive)
+
+ (when (string-match "received" (buffer-name))
+ (make-local-variable 'vm-confirm-quit)
+ (setq vm-confirm-quit t))
+
+ (setq fill-column 60
+ comment-start "> "
+ indent-line-function 'indent-relative-maybe)
+
+ ;; mark lines longer than `fill-column' chars red
+ (add-to-list 'mail-font-lock-keywords
+ (list (concat "^" (make-string fill-column ?.)
+ "\\(.+$\\)")
+ '(1 font-lock-warning-face t)))
+
+ (ispell-change-dictionary "deutsch8")
+
+ (font-lock-mode 1)
+ (turn-on-auto-fill)
+ (turn-on-filladapt-mode)
+ (flyspell-mode 1)
+; (enriched-mode 1)
+; (auto-capitalize-mode)
+; (vm-mail-subject-prefix-cleanup)
+ )
+
+(add-hook 'vm-mail-mode-hook 'robf-vm-mail-mode-hook)
+
+;; Do you like boxquotes?
+(require 'boxquote)
+
+(defun boxquote-region-and-edit-title (s e)
+ (interactive "r")
+ (boxquote-region s e)
+ (call-interactively 'boxquote-title))
+
+;;*****************************************************************************
+;; Sending email via SMTP.
+;;
+;; This is not done by VM, by by separate packages. The standard package is
+;; smtpmail.el and it should come with your Emacs. If you have more than one
+;; email address and have to send them using different SMTP servers, the you
+;; might want to take a look at esmtpmail.el a fork from smtpmail.el targeted
+;; to deal with personal crisis support.
+(require 'esmtpmail)
+(setq send-mail-function 'esmtpmail-send-it
+ esmtpmail-default-smtp-server "smtp.someprovider.com"
+ ;; trace buffers help debugging problems
+ esmtpmail-debug-info t)
+
+;; Select the SMTP server based on the From: header, i.e. the email address of
+;; the author. There are also other authentication methods, see the docs.
+(setq esmtpmail-send-it-by-alist
+ (list
+ '("YourEmaiAddress1" "SMTPSERVER1"
+ (vm-pop-login "pop:SMTPSERVER1:110:pass:YourEmailAddress:*"))
+ '("YourEmaiAddress2" "SMTPSERVER2"
+ (vm-after-pop "pop:SMTPSERVER2:110:pass:YourEmailAddress:*"))))
+
+;;*****************************************************************************
+;; Feed mail to a local queue if you are offline
+(require 'feedmail)
+
+(setq send-mail-function 'vm-mail-send-or-feed-it
+ feedmail-enable-queue t
+ feedmail-ask-before-queue nil
+ feedmail-buffer-eating-function 'feedmail-buffer-to-smtpmail
+ feedmail-queue-directory (expand-file-name "~/Mail/QUEUE"))
+
+(define-key vm-mode-map "Qr" 'feedmail-run-the-queue)
+(define-key vm-mode-map "Qc" 'vm-smtp-server-online-p)
+(define-key vm-mode-map "Qw" 'feedmail-queue-reminder-medium)
+
+(setq auto-mode-alist (cons '("\\.fqm$" . mail-mode) auto-mode-alist))
+
+;; Check the queue on startup
+(when (and (> (car (feedmail-look-at-queue-directory
+ feedmail-queue-directory)) 0))
+ (feedmail-queue-reminder-medium)
+ (sit-for 2)
+ (if (y-or-n-p "Send messages now? ")
+ (feedmail-run-the-queue)))
+
+;;*****************************************************************************
+;; BBDB - the address book for Emacs
+(require 'bbdb)
+(require 'bbdb-autoloads)
+(bbdb-initialize 'vm 'sendmail)
+(bbdb-insinuate-vm)
+
+;; create records for people you reply to
+(add-hook 'vm-reply-hook 'bbdb-force-record-create)
+
+;;*****************************************************************************
+;; Now change some keyboard bindings
+(define-key vm-mode-map [(meta up)] 'vm-previous-unread-message)
+(define-key vm-mode-map [(meta down)] 'vm-next-unread-message)
+(define-key vm-mode-map "\C- " 'vm-scroll-backward)
+(define-key vm-mode-map " " 'vm-scroll-forward)
+(define-key vm-mode-map "c" 'vm-continue-what-message-other-frame)
+(define-key vm-mode-map "C" 'vm-continue-postponed-message)
+(define-key vm-mode-map "R" 'vm-reply-other-frame)
+(define-key vm-mode-map "r" 'vm-reply-include-text-other-frame)
+(define-key vm-mode-map "\C-R" 'vm-followup-other-frame)
+(define-key vm-mode-map "\C-r" 'vm-followup-include-text-other-frame)
+(define-key vm-mode-map "f" 'vm-forward-message-other-frame)
+(define-key vm-mode-map "m" 'vm-toggle-mark)
+(define-key vm-mode-map "d" 'vm-delete-message-action)
+(define-key vm-mode-map "s" 'vm-virtual-save-message)
+(define-key vm-mode-map "w" 'vm-save-message-preview)
+(define-key vm-mode-map "lr" 'vm-delete-message-labels)
+(define-key vm-mode-map "li" 'rf-vm-label-toggle-important)
+(define-key vm-mode-map "ls" 'rf-vm-label-toggle-spam)
+(define-key vm-mode-map "W" 'vm-save-message-sans-headers)
+(define-key vm-mode-map "W" (make-sparse-keymap))
+(define-key vm-mode-map "WW" 'vm-apply-window-configuration)
+(define-key vm-mode-map "WS" 'vm-save-window-configuration)
+(define-key vm-mode-map "WD" 'vm-delete-window-configuration)
+(define-key vm-mode-map "W?" 'vm-window-help)
+(define-key vm-mode-map "x" 'vm-expunge-folder)
+(define-key vm-mode-map "X" 'vm-expunge-pop-messages)
+(define-key vm-mode-map "#" nil)
+(define-key vm-mode-map "/" 'bbdb)
+(define-key vm-mode-map [(control return)] 'vm-edit-init-file)
+(define-key vm-mode-map "S" 'vm-save-everything)
+(define-key vm-mode-map "\C-a" 'vm-mime-auto-save-all-attachments)
+(define-key vm-mode-map "VO" 'vm-virtual-omit-message)
+(define-key vm-mode-map "VU" 'vm-virtual-update-folders)
+(define-key vm-mode-map [(control s)] 'isearch-forward)
+(define-key vm-mode-map "o" 'vm-switch-to-folder)
+
+(define-key vm-summary-mode-map [(control up)] 'previous-line)
+(define-key vm-summary-mode-map [(control down)] 'next-line)
+(define-key vm-summary-mode-map [(control s)] 'vm-isearch-forward)
+
+(define-key vm-mail-mode-map [tab] 'indent-relative)
+(define-key vm-mail-mode-map [(control tab)] 'mail-interactive-insert-alias)
+(define-key vm-mail-mode-map [return] 'newline-and-indent)
+(define-key vm-mail-mode-map "\C-c\C-i" 'vm-serial-yank-mail)
+(define-key vm-mail-mode-map "\C-c\C-o" 'vm-serial-expand-tokens)
+(define-key vm-mail-mode-map [(control c) (control I)] 'vm-serial-insert-token)
+(define-key vm-mail-mode-map [(control meta delete)] 'kill-this-buffer)
+(define-key vm-mail-mode-map "\C-c\C-c" 'vm-mail-mode-comment-region)
+(define-key vm-mail-mode-map "\C-c\C-d" 'vm-mail-mode-elide-reply-region)
+(define-key vm-mail-mode-map "\C-c\C-k" 'vm-mail-mode-citation-clean-up)
+(define-key vm-mail-mode-map "\C-c\C-a" 'vm-mime-attach-file)
+(define-key vm-mail-mode-map "\C-c\C-b" 'boxquote-region-and-edit-title)
+
+;;; Local Variables: ***
+;;; mode:emacs-lisp ***
+;;; End: ***
+
+;;; .vm ends here
diff --git a/id b/id
new file mode 100644
index 0000000..874d2b0
--- /dev/null
+++ b/id
@@ -0,0 +1 @@
+Version: $Id: vm-8.0.9-544$
diff --git a/info/Makefile.in b/info/Makefile.in
new file mode 100644
index 0000000..5624e98
--- /dev/null
+++ b/info/Makefile.in
@@ -0,0 +1,76 @@
+@SET_MAKE@
+
+# no csh please
+SHELL = /bin/sh
+
+SOURCES = vm-version.el $(wildcard *.el)
+
+##############################################################################
+# location of required programms
+prefix = @prefix@
+MKDIR = @MKDIR@
+RM = @RM@
+LS = @LS@
+XARGS = @XARGS@
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_DATA = @INSTALL_DATA@
+
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+datadir= @datadir@
+datarootdir= @datarootdir@
+info_dir = @info_dir@
+
+EMACS_PROG = @EMACS_PROG@
+EMACS_FLAVOR = @EMACS_FLAVOR@
+
+FLAGS = @FLAGS@
+
+SYMLINKS = @SYMLINKS@
+LINKPATH = @LINKPATH@
+
+##############################################################################
+
+all: info
+
+info: vm.info vm-pcrisis.info
+
+Makefile: @srcdir@/Makefile.in
+ cd @srcdir@/..; ./config.status
+
+install: install-pkg
+
+install-pkg: uninstall-pkg info
+ @mkdir -p -m 0755 "$(DESTDIR)$(info_dir)"; \
+ if test "x$(SYMLINKS)" = "xno" ; then \
+ for i in `${LS} *.info* ` ; do \
+ echo "Installing $$i in $(DESTDIR)$(info_dir)" ; \
+ $(INSTALL_DATA) $$i "$(DESTDIR)$(info_dir)" ; \
+ done ; \
+ else \
+ if test "x$(LINKPATH)" = "x" ; then \
+ for i in `${LS} *.info* ` ; do \
+ echo "Linking $$i in $(DESTDIR)$(info_dir)" ; \
+ $(LN_S) "`pwd`/$$i" "$(DESTDIR)$(info_dir)/$$i" ; \
+ done ; \
+ else \
+ for i in `${LS} *.info* ` ; do \
+ echo "Linking $(LINKPATH)/texinfo/$$i in $(DESTDIR)$(info_dir)" ; \
+ $(LN_S) "$(LINKPATH)/texinfo/$$i" "$(DESTDIR)$(info_dir)/$$i" ; \
+ done ; \
+ fi ; \
+ fi
+ @echo VM INFO files successfully installed\!
+
+uninstall-pkg:
+ -$(RM) "$(DESTDIR)$(info_dir)"/vm*.info*
+
+##############################################################################
+clean:
+ -$(RM) -f *.info *.info-[0-9]
+
+distclean: clean
+ -$(RM) -f Makefile
+
diff --git a/info/vm-pcrisis.texinfo b/info/vm-pcrisis.texinfo
new file mode 100644
index 0000000..5f85b26
--- /dev/null
+++ b/info/vm-pcrisis.texinfo
@@ -0,0 +1,1372 @@
+\input texinfo
+@c %**start of header
+@setfilename vm-pcrisis.info
+@settitle Personality Crisis for VM
+@c %**end of header
+@dircategory Emacs
+@direntry
+* VM-pcrisis: (vm-pcrisis). A personality crisis solver for VM
+@end direntry
+
+@paragraphindent asis
+
+@ifinfo
+This is the documentation for Personality Crisis, an add-on for the
+mail reader VM which allows you to do all sorts of things
+automatically when you compose new mail messages or replies.
+
+Copyright @copyright{} 1999 Rob Hodges, 2006 Robert Widhopf-Fenk
+@end ifinfo
+
+@c ***************************************************************************
+
+@node Top, Getting Started, (dir), (dir)
+@c node-name, next, previous, up
+@chapter Personality Crisis for VM
+
+This is the documentation for Personality Crisis 0.9.1
+
+It was written by Rob Hodges <s323140@@student.uq.edu.au>.
+
+It is currently maintained by Robert Widhopf-Fenk <hack@@robf.de>
+
+Please read the docs before sending email about problems you are having.
+Most problems are due to incorrect regexps. That said, if something in
+the docs is unclear, I'd like to know so that I can improve them. And
+if you find a bug, I'd definitely like to know. I hope you enjoy this
+package.
+
+@menu
+* Getting Started::
+* vmpc-conditions::
+* vmpc-actions::
+* Associating Conditions with Actions::
+* Miscellaneous Variables::
+* Debugging::
+* New In This Version::
+@end menu
+
+The incompete list of Roberts which have been involved in vm-prisis:
+
+@itemize @bullet
+@item Rob Hodges
+@item Robert Widhopf-Fenk
+@item Robert P. Goldman
+@item Robert Marshall
+@end itemize
+
+@c ***************************************************************************
+
+@node Getting Started, vmpc-conditions, Top, Top
+@c node-name, next, previous, up
+@chapter Getting Started
+
+@menu
+* Installation::
+* Quick start::
+* Description::
+* Specific Abilities::
+* Common Uses::
+* Overview::
+* Calling Automorph::
+@end menu
+
+@node Installation, Quick start, Getting Started, Getting Started
+@section Installation
+
+@enumerate
+
+@item
+Load VM if you haven't previously done so in your current Emacs session.
+
+@item
+Byte-compile vm-pcrisis.el, using @code{M-x byte-compile-file}. You may
+get some byte-compiler warnings; ignore them. (For the curious:
+Personality Crisis uses some functions that have different names in FSF
+Emacs and XEmacs, automatically detecting which one you are running. The
+byte-compiler isn't smart enough to know this, so it warns of the
+functions it doesn't know about, even though they'll never be run.)
+
+@item
+Place the resulting .elc file somewhere in your Emacs load-path. It
+would probably be a good idea to leave the .el file there with it too,
+but you don't have to.
+
+@item
+Add the following line to your ~/.vm file:
+@lisp
+(require 'vm-pcrisis)
+@end lisp
+
+@item
+Read the rest of this manual and set up the variables it describes.
+
+@end enumerate
+
+@c ***************************************************************************
+
+@node Quick start, Description, Installation, Getting Started
+@section Quick start
+
+You do not want to read a manual but solve your personal crisis now?
+
+Then add the following to your ~/.vm file:
+
+@lisp
+(require 'vm-pcrisis)
+(vmpc-my-identities "me@@company1.nil" "me@@home.nil" "me@@alterego.nil")
+@end lisp
+
+Where you add you own email addresses to the call of
+@code{vmpc-my-identities}. This will prompt you for
+the profile to use when first writing an message to a
+unknown email address.
+
+@c ***************************************************************************
+
+@node Description, Specific Abilities, Quick start, Getting Started
+@section Description
+
+Personality Crisis can look at the headers of a message you are replying
+to or forwarding, or a message you are composing, and you can set it up
+to do just about anything based on those. To get some ideas about how
+this might be useful, see @ref{Common Uses}. You can also use it to
+explicitly choose a "personality" when composing new messages.
+
+@c ***************************************************************************
+
+@node Specific Abilities, Common Uses, Description, Getting Started
+@section Specific Abilities
+
+Based on the headers of a message you are replying to, you can get
+vm-pcrisis to do any number of these things:
+
+@itemize @bullet
+@item Change or insert any headers you like in your reply.
+@item Change or insert a signature in your reply.
+@item Insert some text in the body of your reply.
+@item Change any header in your reply to the value of any of the
+headers in the message you are replying to.
+@item Call some functions before VM creates the reply.
+@item Call some functions in the reply buffer.
+@item Prompt you for a personality profile to use, and optionally,
+remember to use that profile when sending messages to the same address
+in the future.
+@end itemize
+
+Similar functionality is available when forwarding messages.
+
+Based on the headers of a message you are composing, it can do these
+things:
+
+@itemize @bullet
+@item Change or insert any headers you like.
+@item Change or insert a signature.
+@item Insert some text in the message body.
+@item Call some functions in the message buffer.
+@item Prompt you for a personality profile to use, and optionally,
+remember to use that profile when sending messages to the same address
+in the future.
+@end itemize
+
+If you wish, you can also have vm-pcrisis prompt you for a personality
+when composing a new mail, which is useful if you need to set up VM
+variables with new mails, or if you prefer to more deliberatly choose
+who you are for each message.
+
+If you write your own functions to do things that vm-pcrisis can't do by
+itself, ready-made functions are provided to allow you easy access to
+the contents of headers in both the message you are replying to, and
+the message you are writing.
+
+@c ***************************************************************************
+
+@node Common Uses, Overview, Specific Abilities, Getting Started
+@c node-name, next, previous, up
+@section Common Uses
+
+These are some of the common uses for Personality Crisis.
+
+@itemize @bullet
+@item People with multiple e-mail addresses can automatically set up
+headers such as From: and Reply-To:, so that eg. their work email
+keeps going to their work account, and their private email to their
+private account.
+
+@item People who like to have different nicknames and signatures for
+different lists can do so. (Well, uh, that's why I called it
+Personality Crisis...) As of version 0.7, you can select your
+personality for new mail messages as well as replies.
+
+@item When people send you html-formatted email, you can have your reply
+automatically include a form letter explaining why they shouldn't, and
+how to turn it off. (Such a letter is not included with this package;
+you'll have to write it yourself.)
+
+@item People who email in multiple languages can set up the encoding for the
+reply, along with the keymap, ispell dictionary, attribution line for
+citations, etc, in the reply buffer.
+
+@item When you get email from a mailing list that has the Reply-To:
+header set for the whole list, automatically change the To: field in
+your reply to point to the original sender instead. (You can do the
+reverse as well... if you can take the flamage.) VM allows you to do
+this, but only if the correct reply address is in the "From" field.
+
+@item Automatically change the signature and various headers, etc, in a
+new mail message after typing in the To: address.
+
+@item Automatically remember which personality to use when sending to a
+particular address.
+
+@item If you put your imagination to work while reading through this
+manual, you'll probably think of other ways that vm-pcrisis can help
+you. Have fun!
+
+@end itemize
+
+@c ***************************************************************************
+
+@node Overview, Calling Automorph, Common Uses, Getting Started
+@section Overview
+
+When setting up variables for Personality Crisis, you begin by thinking
+about what you want it to do when a certain condition occurs, either
+when you are replying to or forwarding a message, or in the midst of
+writing a message.
+
+You define the condition in @code{vmpc-conditions}, and the action you
+want vm-pcrisis to take in @code{vmpc-actions}, giving a name to each.
+You then associate the condition with the action in
+@code{vmpc-reply-alist} if it's one that relies on the headers of a
+message you are replying to, @code{vmpc-forward-alist} if it's a message
+you are forwarding, or @code{vmpc-automorph-alist} if it's based on the
+headers of your own message. As of v0.84, you may also use
+@code{vmpc-newmail-alist} to associate conditions with actions for new
+messages, and since v0.85, @code{vmpc-resend-alist} for resending
+(bouncing) messages.
+
+If you want to use the @code{vmpc-automorph} function, which takes
+actions based on the headers of a message you are composing, you should
+read @ref{Calling Automorph} to decide where you want to hook it in.
+
+The remainder of this manual will provide more information about how to
+do all of these things.
+
+@c ***************************************************************************
+
+@node Calling Automorph, , Overview, Getting Started
+@section Calling Automorph
+
+The @code{vmpc-automorph} function automatically sets various things in
+a mail message based on what's already present in its headers.
+Obviously, you'll need to have entered those headers before it is
+called.
+
+You'll have to set up what this function does --- for which, see
+@ref{vmpc-conditions}, @ref{vmpc-actions} and @ref{vmpc-automorph-alist}
+--- but you'll also have to consider when you want it called.
+
+Most people would prefer never to have to call it explicitly; it's
+generally nicer to just have it called automatically when you do one
+of the other things that you have to do in the course of composing a
+message. Here are a couple of ideas:
+
+@itemize @bullet
+@item Hitching a ride on the mail-text function: automorph with C-c C-t.@*
+A very good idea if you are in the habit of using this to move from
+your headers to the body of your message.
+
+@item Let vm-pcrisis help you: tab between headers.@*
+See below for more about this.
+
+@item Pre-empting vm-mail-send-and-exit: automorph with C-c C-c.@*
+A rather foolish idea, in my opinion. You'll never get to see the
+results of what automorph does. If there should happen to be a bug in
+Personality Crisis that fails to take into account, say, multi-line
+headers, you might end up sending a mail to your boss with an
+inappropriate signature that, say, mentions his wife in an
+unflattering way, and find yourself all-too-suddenly unemployed. How
+likely is this? Well, in a previous version, such a bug existed. I
+fixed it, but there could be more like it; I wouldn't risk it.
+
+@item Calling it explicitly with some key combo.@*
+Boring but easy.
+@end itemize
+
+The last of these is the easiest --- just bind it to a key in mail
+mode. For example, to bind it to the F7 key, you might put this in
+your ~/.vm file:
+
+@lisp
+(define-key vm-mail-mode-map [f7] 'vmpc-automorph)
+@end lisp
+
+Attaching to other functions is also fairly straightforward. Just use a
+wrapper function. For example:
+
+@lisp
+(defun mail-text-and-automorph ()
+ (interactive)
+ (mail-text)
+ (vmpc-automorph))
+@end lisp
+
+Then bind this function to C-c C-t (or whatever keystroke you like to
+use).
+
+But what's this thing about tabbing between headers? Well, if you just
+want to hit TAB to go from the To: field to the Subject: field, and TAB
+again to then go to the start of the message body, calling
+@code{vmpc-automorph} along the way, you can add this in your ~/.vm
+file:
+
+@lisp
+(define-key vm-mail-mode-map [tab] 'vmpc-tab-header-or-tab-stop)
+@end lisp
+
+If you also want shift-tab to take you back to the previous header, you
+should check what keysym is produced by shift-tab on your system, by
+doing @code{Ctrl-h k Shift-TAB} -- for me, it produces
+@code{iso-left-tab}. So I add this to my ~/.vm:
+
+@lisp
+(define-key vm-mail-mode-map [iso-left-tab] 'vmpc-backward-tab-header-or-tab-stop)
+@end lisp
+
+You can use any one or more of these ideas, calling the automorph
+function as often as you like. Because its actions depend on the
+headers, and those actions can include the changing of headers, calling
+it twice may not have the same effect as calling it once. It may pay to
+bear this in mind when you set up the profiles!
+
+@c ***************************************************************************
+
+@node vmpc-conditions, vmpc-actions, Getting Started, Top
+@c node-name, next, previous, up
+@chapter vmpc-conditions
+
+@menu
+* The vmpc-conditions variable::
+* vmpc-conditions examples::
+@end menu
+
+@node The vmpc-conditions variable, vmpc-conditions examples, vmpc-conditions, vmpc-conditions
+@section The vmpc-conditions variable
+
+The @code{vmpc-conditions} variable is a list of conditions, each of which
+can cause Personality Crisis to take a different action. You give each
+condition a unique, descriptive name. The format of the list is
+something like this:
+
+@lisp
+'( ("a descriptive name"
+ (lisp-statement-1) )
+ ("another descriptive name"
+ (lisp-statement-2) ) )
+@end lisp
+
+The lisp-statement can be any statement in lisp that will evaluate to
+nil if the condition is to be considered false, or non-nil if true.
+(Don't be afraid, non-lispers, examples are coming...) Personality
+Crisis provides some functions which can be used there, in combination
+with @code{and}, @code{or}, and @code{vmpc-xor} to produce a
+fine-grained control over when your actions will trigger.
+
+If you are using @code{vm-avirtual.el} you can also use
+@code{vmpc-check-virtual-selector} to check a virtual folder selector.
+
+@itemize @bullet
+
+@item @code{vmpc-header-match} is of course the main one. When making
+replies or forwards, this matches against the contents of a header in
+the message you are replying/forwarding; when using the
+@code{vmpc-automorph} function, it matches against a header in the
+message you are composing.
+
+@item @code{vmpc-body-match} is just like @code{vmpc-header-match} but
+allows you to match against the text in the body of the message.
+
+@item @code{vmpc-other-cond} returns true when a specified condition earlier
+in the list has been found true. It's essentially a shortcut for
+building more complex conditions from basic ones.
+
+@item @code{vmpc-none-true-yet} returns true if none of the conditions that
+come before it in @code{vmpc-conditions} have returned true. You can
+optionally specify exceptions, so that it can act as a
+"none-true-yet-except..." condition. This is a very useful shortcut to
+place last in the list, in order to trigger an action prompting you for
+a profile to use.
+
+@end itemize
+
+You can also use @code{y-or-n-p} if you always want to have a choice in
+what to do when a certain condition occurs.
+
+We will cover all of these in the examples that follow.
+
+
+@c ***************************************************************************
+
+@node vmpc-conditions examples, , The vmpc-conditions variable, vmpc-conditions
+@c node-name, next, previous, up
+@section vmpc-conditions examples
+
+Suppose you wanted to set up a condition that triggered when you replied
+to messages that came from a particular mailing list. Looking at the
+headers of these messages, (exposing all of them with @code{t} in VM), you
+see that they always have a header like this:
+
+Resent-Sender: foo-list-maintainer@@bar.baz.com
+
+Then, in your ~/.vm file, you would have something like this:
+
+@lisp
+(setq vmpc-conditions '(
+ ("foo-list messages"
+ (vmpc-header-match "Resent-Sender"
+ "foo-list-maintainer@@bar.baz.com"))
+))
+@end lisp
+
+This gives you a condition called "foo-list messages" which returns true
+when the contents of the "Resent-Sender" header include a match for the
+regular expression "foo-list-maintainer@@bar.baz.com".
+
+-----------------------------------------------------------------
+
+@subheading Regexp Aside #1:
+Usually this will be perfectly adequate. Of course, since the second
+string is a regexp, this will also match
+"foo-list-maintainer@@barybaz.com", but the odds that you'll come across
+that are pretty low. However, if the header contents had included
+another regexp special character, it might not match at all. The
+easiest way to deal with both these problems is to wrap the string up in
+a call to @code{regexp-quote}. Like this:
+
+@lisp
+(setq vmpc-conditions '(
+ ("foo-list messages"
+ (vmpc-header-match "Resent-Sender"
+ (regexp-quote "foo-list-maintainer@@bar.baz.com")))
+))
+@end lisp
+
+@subheading Regexp Aside #2:
+The @code{regexp-opt} function provides a convenient way of producing a
+regexp to match against any number of strings. Suppose the
+"Resent-Sender" field could contain either
+"foo-list-maintainer@@bar.baz.com" or "foo-list-bot@@bar.baz.com". Then
+you could use @code{regexp-opt} like this:
+
+@lisp
+(setq vmpc-conditions '(
+ ("foo-list messages"
+ (vmpc-header-match "Resent-Sender"
+ (regexp-opt '("foo-list-maintainer@@bar.baz.com"
+ "foo-list-bot@@bar.baz.com"))))
+))
+@end lisp
+
+@subheading Regexp Aside #3:
+If you write your own regular expressions instead of using
+@code{regexp-quote} and @code{regexp-opt}, you should keep in mind that
+they must be in lisp syntax. In short, this means that you should use
+two backslashes wherever you would usually use one, and if you use a
+double-quote (") it should be escaped with a backslash to avoid
+prematurely ending the string. You can learn more about regexps from
+your Emacs documentation.
+
+@subheading Regexp Aside #4:
+The behaviour of vmpc-header-match is to return true if a match for the
+regular expression occurs anywhere in the contents of the header. If
+you want your regexp to only match the entire header contents, it should
+begin with a caret (^) and end with a dollar sign ($).
+
+-----------------------------------------------------------------
+
+Alright, enough about regexps! Let's get on with the example.
+
+Suppose the next thing you want to do is set up a condition that
+triggers when somebody sends you one of those blasted HTML emails.
+(When we look at @code{vmpc-actions} you'll see how you can automatically
+include a form letter asking them not to do this in your reply.) Your
+setup might now expand to this:
+
+@lisp
+(setq vmpc-conditions '(
+ ("foo-list messages"
+ (vmpc-header-match "Resent-Sender"
+ (regexp-quote "foo-list-maintainer@@bar.baz.com")))
+ ("html messages"
+ (vmpc-header-match "Content-type"
+ "multipart/alternative\\|html"))
+))
+@end lisp
+
+Let's further suppose that foo-list is set up so that replies go to the
+entire list, and that you haven't over-ridden this with
+@code{vm-reply-ignored-reply-tos} because it's usually what you want.
+But when somebody sends an html message to the list, you now have a
+setup which results in your anti-html form letter being included in a
+message to the whole list. You'd rather it went to them personally.
+Okay, let's set up some more refined conditions:
+
+@lisp
+(setq vmpc-conditions '(
+ ("foo-list messages"
+ (vmpc-header-match "Resent-Sender"
+ (regexp-quote "foo-list-maintainer@@bar.baz.com")))
+ ("html messages"
+ (vmpc-header-match "Content-type"
+ "multipart/alternative\\|html"))
+ ("plaintext messages from foo-list"
+ (and (vmpc-other-cond "foo-list messages")
+ (not (vmpc-other-cond "html messages"))))
+ ("html messages from foo-list"
+ (and (vmpc-other-cond "foo-list-messages")
+ (vmpc-other-cond "html messages")))
+ ("html messages not from foo-list"
+ (and (vmpc-other-cond "html messages")
+ (not (vmpc-other-cond "foo-list messages"))))
+))
+@end lisp
+
+All of a sudden you have five conditions, but you'll only associate
+the last three of them with actions. The first two are just building
+blocks for the others. So now you can associate different actions with
+each condition: For html messages from foo-list, you can change the To:
+address in your reply to point to the original sender, as well as
+including your anti-html form letter; for html messages not from
+foo-list, just include the form letter; and for plaintext messages from
+foo-list, set up your desired personality for a normal reply to the
+list.
+
+What if you want a condition that always returns true, so you can
+associate it with an action that you want performed every time? It
+would look like this:
+
+@lisp
+ ("condition that's always true"
+ 't)
+@end lisp
+
+-----------------------------------------------------------------
+
+@subheading Aside:
+If you want one that always triggers for replies, but not when using
+@code{vmpc-automorph}, it would look like this:
+
+@lisp
+ ("condition that's always true for replies"
+ (eq vmpc-current-state 'reply))
+@end lisp
+
+Similarly, for one that always triggers with automorph, but not for
+replies, you'd have:
+
+@lisp
+ ("condition that's always true for automorph"
+ (eq vmpc-current-state 'automorph))
+@end lisp
+
+-----------------------------------------------------------------
+
+If you add that condition, and more to deal with other mailing lists and
+situations, you might want to be prompted about what action to take when
+none of the conditions match (except, of course, the one that's always
+true). This simplest way to produce such a condition (which you can
+then associate with a prompting action) is to use
+@code{vmpc-none-true-yet}. So you'd end up with something like:
+
+@lisp
+(setq vmpc-conditions '(
+ ("condition that's always true"
+ 't)
+ ("foo-list messages"
+ (vmpc-header-match "Resent-Sender"
+ (regexp-quote "foo-list-maintainer@@bar.baz.com")))
+ ("html messages"
+ (vmpc-header-match "Content-type"
+ "multipart/alternative\\|html"))
+ ("plaintext messages from foo-list"
+ (and (vmpc-other-cond "foo-list messages")
+ (not (vmpc-other-cond "html messages"))))
+ ("html messages from foo-list"
+ (and (vmpc-other-cond "foo-list-messages")
+ (vmpc-other-cond "html messages")))
+ ("html messages not from foo-list"
+ (and (vmpc-other-cond "html messages")
+ (not (vmpc-other-cond "foo-list messages"))))
+
+ ;; any number of other conditions could go here
+
+ ("unknown sender"
+ (vmpc-none-true-yet "condition that's always true"))
+))
+@end lisp
+
+It's also possible to match against the text in the body of a message
+you are replying to, forwarding or composing. If you wanted to check
+whether the phrase "make money fast" appeared in a message, you'd have
+a condition like this:
+
+@lisp
+("message from an idiot"
+ (vmpc-body-match "make[\n ]+money[\n ]+fast"))
+@end lisp
+
+Note how the regexp is constructed in order to take account of the
+fact that the phrase may be split over more than one line.
+
+Both @code{vmpc-header-match} and @code{vmpc-body-match} are affected
+by your default value of @code{case-fold-search}. If you wanted to
+force a case-sensitive search in the previous example, you'd re-write
+it like this:
+
+@lisp
+("message from an idiot using all-caps"
+ (let ((case-fold-search nil))
+ (vmpc-body-match "MAKE[\n ]+MONEY[\n ]+FAST")))
+@end lisp
+
+Similarly, if you wanted to force it to be case-insensitive, you'd do
+this:
+
+@lisp
+("message from an idiot using any case"
+ (let ((case-fold-search t))
+ (vmpc-body-match "make[\n ]+money[\n ]+fast")))
+@end lisp
+
+
+You can use @code{vmpc-header-match} to test if a regexp appears in any
+header field matching another regexp. For example, to find out if the
+regexp "fire\\|water" appears in any header, you would use something
+like
+@lisp
+(vmpc-header-match "[^ \t\n:]+:" "fire\\|water" ", ")
+@end lisp
+
+Essentially what this does is to take the contents of every header in
+the message, put them all together in a gigantic string -- separated
+from each other by a comma and a space -- and run
+@lisp
+(string-match "fire\\|water" gigantic-string-of-all-headers)
+@end lisp
+
+In the event that you want to look for a regexp that includes ", " you
+can use a different string as the separator to ensure that a match
+doesn't span the contents of different headers.
+
+The above header field regexp checks every single header -- even the
+X-VM-v5-Data header. You could use a more restrictive regular
+expression for the header name if you prefer. For example, to check
+only the From: and Apparently-To: headers, you could use
+@lisp
+(vmpc-header-match "From:\\|Apparently-To:" "fire\\|water" ", ")
+@end lisp
+
+
+What if you have an action that you only want to perform if the message
+is from foo-list and doesn't have "bar" in the subject, or the message
+is not from foo-list and does have "bar" in the subject, or if the
+message has "quux" in the subject, regardless of whether it's from
+foo-list or not? And what if, even then, you only want the action
+performed if you answer yes to a prompt? Here's what the condition
+would look like:
+
+@lisp
+("a complex condition"
+ (and
+ (or (vmpc-xor (vmpc-other-cond "foo-list-messages")
+ (vmpc-header-match "bar"))
+ (vmpc-header-match "quux"))
+ (y-or-n-p "Perform action for complex condition? ")))
+@end lisp
+
+It will only prompt you if the @code{or} part is true, because that's how the
+@code{and} form works in elisp --- it stops evaluating its arguments after the
+first false one it finds.
+
+Okay, I believe I've gone into much more depth here than the average
+user will ever need; the point is that with a little lisp knowledge you
+can have as fine a control over the automated actions of vm-pcrisis as you
+need. Even without real lisp knowledge, I hope that you can figure out
+enough from these examples to achieve such control.
+
+@c ***************************************************************************
+
+@node vmpc-actions, Associating Conditions with Actions, vmpc-conditions, Top
+@c node-name, next, previous, up
+@chapter vmpc-actions
+
+@menu
+* The vmpc-actions variable::
+* vmpc-actions examples::
+@end menu
+
+@node The vmpc-actions variable, vmpc-actions examples, vmpc-actions, vmpc-actions
+@section The vmpc-actions variable
+
+The @code{vmpc-actions} variable is a list of actions, which can equally
+be referred to as "profiles". You will set up some of them for replies,
+some for @code{vmpc-automorph} (if you use it), and some for when you are
+prompted for a profile (if you have an action that uses
+@code{vmpc-prompt-for-profile}). Many will be equally applicable in all
+three cases, which is why they are all kept in the same place.
+
+Each action is given a unique, descriptive name, and consists of one or
+more function calls, so that the format of the list looks something like
+this:
+
+@lisp
+'( ("foo"
+ (function-1 arg1 arg2)
+ (function-2)
+ (function-3 arg1))
+ ("bar"
+ (function-4)) )
+@end lisp
+
+This will start making sense with the real examples in the next section.
+But first, we'll look at what functions are available here:
+
+@itemize @bullet
+
+@item (vmpc-signature "signature-file") will replace the signature in
+your message with the contents of the specified file, if it exists;
+otherwise the string itself will be used as the signature.
+@item (vmpc-pre-signature "pre-signature-file") works in the same way,
+but specifies a "pre-signature" --- text that is inserted in your message
+above the signature.
+@item (vmpc-substitute-header "Header-Field" "new header contents") will
+replace the contents of the specified header-field in your message with
+the new contents, creating the header field if necessary.
+@item (vmpc-substitute-replied-header "Dest-Header" "Src-Header") takes
+the contents of the Src-Header field in the message you are replying to,
+and inserts them as the contents of the Dest-Header field in your
+reply, creating the Dest-Header field if necessary. (If it's contained
+in an action which is called when you are not replying to a message, it
+does nothing. The same is true of all of these functions: when they are
+called in an inappropriate context, they only do as much as they can.)
+@item (vmpc-pre-function (foo-function args)) evaluates the lisp
+expression
+@lisp
+(foo-function args)
+@end lisp
+before VM creates a mail composition buffer. (This is useful for setting
+VM variables which need to be set at this stage, such as the message
+encoding.) It therefore does nothing in automorph mode.
+@item (vmpc-composition-buffer (foo-function args)) does the
+same, but in the composition buffer.
+@item (vmpc-prompt-for-profile arg) prompts the user for a profile
+(action) to run. (The user would be well advised not to choose one
+which itself contains this function!) If ARG is present, it should be
+set to 'prompt or 'always. The presence of ARG indicates that you want
+it to check who your message is destined for, and remember to apply the
+profile you choose now to messages sent to that person in the future,
+instead of prompting you for a profile the next time. If set to
+'prompt, it will ask whether it should remember; if set to 'always, it
+will always remember. If ARG is not present, it does not remember.
+
+@end itemize
+
+Do not include your own functions in actions directly; call them with
+@code{vmpc-pre-function} or @code{vmpc-composition-buffer}
+instead -- otherwise they will be called twice, both before and after the
+composition buffer is created.
+
+@c ***************************************************************************
+
+@node vmpc-actions examples, , The vmpc-actions variable, vmpc-actions
+@c node-name, next, previous, up
+@section vmpc-actions examples
+
+In your ~/.vm you'll have something like this:
+
+@lisp
+(setq vmpc-actions '(
+ ;; actions go here
+))
+@end lisp
+
+Okay, here come some example actions which you can adapt and place, one
+after the other, in the place of the comment above.
+
+Say you wanted two personality profiles from which you could choose when
+prompted, and to automatically apply when certain conditions were met
+with replies or in automorph mode. One thing to bear in mind is that
+when you are prompted, there will be auto-completion available --- you'll
+only need to type enough to uniquely identify a profile (you won't even
+need to hit TAB). Also, the first profile in @code{vmpc-actions} will
+be the default at the prompt, so you can just hit RET to use it.
+Therefore, the first profile you place in @code{vmpc-actions} should be
+the one you expect to use most often, and you should choose names for
+profiles which uniquely distinguish themselves at the first or second
+character.
+
+Okay, here are a couple of profiles which show how to insert signatures
+and change the contents of a header field.
+
+@lisp
+("foo on the hill"
+ (vmpc-substitute-header "From"
+ "\"The Foo On The Hill\" <foo@@hill.com>")
+ (vmpc-signature "~/.foo-sig"))
+("david"
+ (vmpc-substitute-header "From"
+ "\"David Foo\" <foo@@hill.com>")
+ (vmpc-signature ""))
+@end lisp
+
+When an empty string is given as the signature, as in the second
+profile, vm-pcrisis will actually remove any signature that has been
+placed there by other actions.
+
+Also note that by including a From: header, we override the values of
+@code{user-full-name} and @code{user-mail-address}.
+
+We could equally well have chosen to override those values directly
+using composition-buffer-functions, like this:
+
+@lisp
+("foo on the hill"
+ (vmpc-composition-buffer
+ (setq user-full-name "The Foo On The Hill")
+ (setq user-mail-address "foo@@hill.com"))
+ (vmpc-signature "~/.foo-sig"))
+("david"
+ (vmpc-composition-buffer
+ (setq user-full-name "David Foo"))
+ (setq user-mail-address "foo@@hill.com"))
+ (vmpc-signature ""))
+@end lisp
+
+If we had two different mailboxes and wanted to direct replies back into
+the right one, we would want to also set @code{mail-default-reply-to},
+or use @code{vmpc-substitute-header} to insert a Reply-To: header.
+
+-----------------------------------------------------------------
+
+@subheading Aside:
+Why did we use @code{vmpc-composition-buffer} rather than
+@code{vmpc-pre-function} to set those variables? Well, their values are
+only examined when you actually send your message, so you could equally
+well set them with either, but the @code{vmpc-automorph} function does
+not run pre-functions, so if we want these profiles to work properly for
+automorph, we need to use composition-buffer-functions.
+
+In other cases, such as setting VM's charset variables, you have no
+option but to use pre-functions, because they have to be set to
+appropriate values before the composition buffer is created. If anyone
+finds a workaround for this, please let me know so I can include it
+here.
+
+-----------------------------------------------------------------
+
+Pre-signatures can be specified in the same way as signatures:
+
+@lisp
+("insert anti-html form letter"
+ (vmpc-pre-signature "~/stuff/formletters/why_html_is_bad.txt"))
+@end lisp
+
+Alright, suppose that messages from foo-list have their Reply-To: header
+set to point back to the list, with the address of the real sender in
+the From: field. We could override it with
+@code{vm-reply-ignored-reply-tos}, but usually we prefer this behaviour.
+Only under certain conditions do we want to set our To: field to the
+contents of the From: field in the replied message. The action to do
+this would look like this:
+
+@lisp
+("set To to From"
+ (vmpc-substitute-replied-header "To" "From"))
+@end lisp
+
+Let's say we also want an action that can prompt us for a profile, so
+we can associate it with an "unknown sender" condition. Here we go:
+
+@lisp
+("prompt for a profile"
+ (vmpc-prompt-for-profile))
+@end lisp
+
+If we want vm-pcrisis to figure out who our message is destined for and to
+remember to use the profile we choose the next time we send to that
+address instead of prompting, we would do it like this:
+
+@lisp
+("prompt for a profile, and remember it automatically"
+ (vmpc-prompt-for-profile 'always))
+@end lisp
+
+The associations between addresses and profiles will be stored in the
+file named by @code{vmpc-auto-profiles-file} --- by default, this is
+"~/.vmpc-auto-profiles". If your OS has a shonky filesystem that can
+not deal with filenames like that, you might have to change this value.
+
+Keep in mind that the associations stored in this file are only used by
+@code{vmpc-prompt-for-profile}. They do not have the effect of adding
+new associations between addresses and profiles in the general operation
+of vm-pcrisis; they are simply used by @code{vmpc-prompt-for-profile}
+instead of prompting you in the future.
+
+IMPORTANT: When vm-pcrisis decides who your message is destined for, it
+does so on the basis of the Reply-To: or From: field of the message
+being replied (or in the case of automorph, the To: field of your
+message). This takes account of @code{vm-reply-ignored-reply-tos}, but
+DOES NOT take account of any other actions which might change the To:
+address in your message. There is, therefore, a possibility that when
+using this feature in both automorph and reply mode, an association made
+in one mode may not be properly suited to the other. The best way to
+avoid this problem is to set up your conditions so that the above action
+is not run in conjunction with other actions that change the To: field.
+This is not really limiting, because the situations in which you are
+changing the To: field will generally be ones in which you know which
+profile you want to use anyway.
+
+You can also set it up so that after prompting you for a profile, it
+will tell you which address it has decided your message is going to, and
+prompt you whether to save an association between that profile and that
+address. Like this:
+
+@lisp
+("prompt for a profile, and remember it if I say so"
+ (vmpc-prompt-for-profile 'prompt))
+@end lisp
+
+@c ***************************************************************************
+
+@node Associating Conditions with Actions, Miscellaneous Variables, vmpc-actions, Top
+@chapter Associating Conditions with Actions
+
+@menu
+* vmpc-action-alist::
+* vmpc-reply-alist::
+* vmpc-automorph-alist::
+* vmpc-forward-alist::
+* vmpc-resend-alist::
+* vmpc-newmail-alist::
+@end menu
+
+@c ***************************************************************************
+
+@node vmpc-action-alist, vmpc-reply-alist, Associating Conditions with Actions, Associating Conditions with Actions
+@c node-name, next, previous, up
+@section vmpc-action-alist
+
+The @code{vmpc-action-alist} variable controls which actions are
+performed if various conditions are met when creating a reply. Its
+format is something like this:
+
+@lisp
+'( ("condition 1" "action 1" "action 2")
+ ("condition 2" "action 3")
+ ... )
+@end lisp
+
+If you do not want to set all the other alists then sent this one as it
+will be used as a fall back.
+
+@c ***************************************************************************
+
+@node vmpc-reply-alist, vmpc-automorph-alist, vmpc-action-alist, Associating Conditions with Actions
+@c node-name, next, previous, up
+@section vmpc-reply-alist
+
+The @code{vmpc-reply-alist} variable controls which actions are
+performed if various conditions are met when creating a reply. Its
+format is something like this:
+
+@lisp
+'( ("condition 1" "action 1" "action 2")
+ ("condition 2" "action 3")
+ ... )
+@end lisp
+
+If we follow on from our examples in the previous sections, we might
+have this in our ~/.vm file:
+
+@lisp
+(setq vmpc-reply-alist '(
+ ("condition that's always true" "david")
+ ("plaintext messages from foo-list" "foo on the hill")
+ ("html messages from foo-list" "set To to From"
+ "insert anti-html form letter")
+ ("html messages not from foo-list" "insert anti-html form letter")
+ ("unknown sender" "prompt for a profile, and remember it if I say so")
+))
+@end lisp
+
+@c ***************************************************************************
+
+@node vmpc-automorph-alist, vmpc-forward-alist, vmpc-reply-alist, Associating Conditions with Actions
+@c node-name, next, previous, up
+@section vmpc-automorph-alist
+
+The @code{vmpc-automorph-alist} variable has the same syntax as
+@code{vmpc-reply-alist} and follows the same principles. (See
+@ref{vmpc-reply-alist}.) The only difference is that it controls
+which actions are associated with which conditions when the
+@code{vmpc-automorph} function is called.
+
+@c ***************************************************************************
+@node vmpc-forward-alist, vmpc-resend-alist, vmpc-automorph-alist, Associating Conditions with Actions
+@section vmpc-forward-alist
+
+The @code{vmpc-forward-alist} variable has the same syntax as
+@code{vmpc-reply-alist} and follows the same principles. (See
+@ref{vmpc-reply-alist}.) The only difference is that it controls
+which actions are associated with which conditions when forwarding
+messages.
+
+@c ***************************************************************************
+@node vmpc-resend-alist, vmpc-newmail-alist, vmpc-forward-alist, Associating Conditions with Actions
+@section vmpc-resend-alist
+
+The @code{vmpc-resend-alist} variable has the same syntax as
+@code{vmpc-reply-alist} and follows the same principles. (See
+@ref{vmpc-reply-alist}.) The only difference is that it controls
+which actions are associated with which conditions when resending
+messages with @code{vm-resend-message}.
+
+
+@c ***************************************************************************
+
+@node vmpc-newmail-alist, , vmpc-resend-alist, Associating Conditions with Actions
+@section vmpc-newmail-alist
+
+The @code{vmpc-newmail-alist} variable has the same syntax as
+@code{vmpc-reply-alist} and follows the same principles. (See
+@ref{vmpc-reply-alist}.) The only difference is that it controls
+which actions are associated with which conditions when creating new
+messages with vm-mail.
+
+One strategy for this is to have conditions based on the folder from
+which you are sending mail. You might like to set things this up for
+some folders, and have vm-pcrisis prompt you for an action in the other
+folders. Here's how you might do that...
+
+In @code{vmpc-conditions}, you'd have a couple of conditions like this:
+
+@lisp
+("mail to foo-list"
+ (string-match "^foo" (buffer-name (current-buffer))))
+("no cond"
+ (vmpc-none-true-yet))
+@end lisp
+
+Then in @code{vmpc-actions}, you'd set up an action for your mail to
+foo-list, and another one to prompt you for a profile:
+
+@lisp
+("foo profile"
+ (vmpc-substitute-header "From"
+ "\"The Foo King\" <david@@bar.com>")
+ (vmpc-signature "~/.foo-sig"))
+("prompt"
+ (vmpc-prompt-for-profile))
+@end lisp
+
+Finally, you'd set up @code{vmpc-newmail-alist} like this:
+
+@lisp
+(setq vmpc-newmail-alist
+ '(
+ ("mail to foo-list" "foo profile")
+ ("no cond" "prompt")
+ ))
+@end lisp
+
+@c ***************************************************************************
+
+@node Miscellaneous Variables, Debugging, Associating Conditions with Actions, Top
+@c node-name, next, previous, up
+@chapter Miscellaneous Variables
+
+@menu
+* vmpc-auto-profiles-file::
+* vmpc-auto-profiles-expunge-days::
+* vmpc-sig-face::
+* vmpc-pre-sig-face::
+* vmpc-intangible-sig::
+* vmpc-intangible-pre-sig::
+* vmpc-expect-default-signature::
+@end menu
+
+@c ***************************************************************************
+
+@node vmpc-auto-profiles-file, vmpc-auto-profiles-expunge-days, Miscellaneous Variables, Miscellaneous Variables
+@c node-name, next, previous, up
+@section vmpc-auto-profiles-file
+
+The variable @code{vmpc-auto-profiles-file} contains the name of the
+file used for saving profiles when @code{vmpc-prompt-for-profile} is
+used with an 'always or 'prompt argument (see @ref{The vmpc-actions
+variable} and @ref{vmpc-actions examples}).
+
+By default it is set to "~/.vmpc-auto-profiles".
+
+@c ***************************************************************************
+
+@node vmpc-auto-profiles-expunge-days, vmpc-sig-face, vmpc-auto-profiles-file, Miscellaneous Variables
+@c node-name, next, previous, up
+@section vmpc-auto-profiles-expunge-days
+
+In order to keep vmpc-auto-profiles-file from becoming massive,
+Personality Crisis will check the age of profile associations in that
+file each time it adds a new one. Associations that have not been used
+in the last number of days given by
+@code{vmpc-auto-profiles-expunge-days} will be removed. This variable
+is set to 100 by default.
+
+@c ***************************************************************************
+
+@node vmpc-sig-face, vmpc-pre-sig-face, vmpc-auto-profiles-expunge-days, Miscellaneous Variables
+@section vmpc-sig-face
+
+This is the face used to highlight the signature. You can use
+@code{set-face-foreground}, @code{set-face-background} and
+@code{set-face-font} to change the colours and font.
+
+@c ***************************************************************************
+
+@node vmpc-pre-sig-face, vmpc-intangible-sig, vmpc-sig-face, Miscellaneous Variables
+@section vmpc-pre-sig-face
+
+This is the face used to highlight the pre-signature. You can use
+@code{set-face-foreground}, @code{set-face-background} and
+@code{set-face-font} to change the colours and font.
+
+@c ***************************************************************************
+
+@node vmpc-intangible-sig, vmpc-intangible-pre-sig, vmpc-pre-sig-face, Miscellaneous Variables
+@section vmpc-intangible-sig
+
+If @code{vmpc-intangible-sig} is non-nil, movement and mouse commands
+will cause your cursor to slide to one side or the other of the
+signature, preventing you from actually writing text inside the area
+that Personality Crisis calls the signature.
+
+This is somewhat useful because if automorph replaces the signature, you
+probably won't want any text you added to be replaced along with it. To
+activate this feature, just add the following to your ~/.vm file:
+
+@lisp
+(setq vmpc-intangible-sig t)
+@end lisp
+
+@c ***************************************************************************
+
+@node vmpc-intangible-pre-sig, vmpc-expect-default-signature, vmpc-intangible-sig, Miscellaneous Variables
+@section vmpc-intangible-pre-sig
+
+The @code{vmpc-intangible-pre-sig} variable works just like
+@code{vmpc-intangible-sig}, but affects the pre-signature. See
+@ref{vmpc-intangible-sig}.
+
+@c ***************************************************************************
+
+@node vmpc-expect-default-signature, , vmpc-intangible-pre-sig, Miscellaneous Variables
+@section vmpc-expect-default-signature
+
+Traditionally, signatures are added to new mail messages using a
+signature-insertion function bound to @code{mail-mode-hook} or similar,
+so that every message you wrote started off containing a signature. If
+you use the vm-pcrisis signature functions in addition to such a setup,
+you should add the following to your ~/.vm file:
+
+(setq vmpc-expect-default-signature t)
+
+This will allow Personality Crisis to properly take account of your
+setup, provided that your signature-insertion function uses the standard
+@samp{\n-- \n} signature delimiter.
+
+@c ***************************************************************************
+
+@node Debugging, New In This Version, Miscellaneous Variables, Top
+@c node-name, next, previous, up
+@chapter Debugging
+
+With a complex setup it can be come hard to understand why vm-pcrisis
+is doing a specific thing. In order to understand what is going on you
+should check the value of the following variables:
+
+@itemize @bullet
+
+@item @code{vmpc-true-conditions} is the list of true conditions.
+
+@item @code{vmpc-actions-to-run} is the list of actions to run,
+i.e. those actions mapped by a @code{vmpc-*-alist}.
+
+@item @code{vmpc-saved-headers-alist} the value of headers saved for
+substitution.
+
+@end itemize
+
+If you want to check new contions you can run
+@code{vmpc-build-true-conditions-list} interactively.
+
+If you want to check which true conditions are mapped to actions you can
+run @code{vmpc-build-actions-to-run-list} interactively. True
+conditions which are not mapped to an action are silently ignored.
+
+If you want to run new actions you can run @code{vmpc-read-actions} and
+@code{vmpc-run-actions} interactively.
+
+@c ***************************************************************************
+
+
+@node New In This Version, , Debugging, Top
+@c node-name, next, previous, up
+@chapter New In This Version
+
+Version 0.11:
+
+@itemize @bullet
+
+@item Profiles can now be stored in the BBDB instead of the file
+@code{vmpc-auto-profiles-file}. To enable this and migrate your old
+profiles you should call @code{vmpc-migrate-profiles-to-BBDB} once. A
+backup of your BBDB will be created first as
+@file{~/.bbdb-vmpc-profile-migration-backup} and your old profiles-file
+will be moved to @file{~/.vmpc-auto-profiles-migrated-to-BBDB}.
+
+@item Added @code{vmpc-add-header} which allows to create a header
+multiple times. This is useful when having more than one FCC header.
+
+@item @code{vmpc-prompt-for-profile} finds now all profiles, i.e. before
+it stopped at the first match, now it will check all email addresses.
+
+@end itemize
+
+Version 0.10:
+
+@itemize @bullet
+
+@item Added support for a list of actions in @code{vmpc-prompt-for-profile}.
+Before it was only possible to specify a single action.
+
+@end itemize
+
+Version 0.9:
+
+@itemize @bullet
+
+@item The new maintainer is: Robert Widhopf-Fenk <hack@@robf.de>
+
+@item All variables of pcrisis can be customized now.
+
+@item Added new function @code{vmpc-toggle-no-automorph} to disable automorph
+for the current buffer.
+
+@item @code{vmpc-prompt-for-profile} checks all relevant headers
+now and will only prompt for a profile if no matches were found. It
+also can be called interactively to correct a existing profile
+association.
+
+@item Renamed @code{vmpc-composition-buffer-function} to @code{vmpc-composition-buffer}.
+
+@item @code{vmpc-pre-function} and @code{vmpc-composition-buffer} handle forms
+now, not only a single function which must be quoted.
+
+@item Renamed @code{vmpc-replies-alist} to @code{vmpc-reply-alist} and
+@code{vmpc-forwards-alist} to @code{vmpc-forward-alist} for consistency.
+
+@item New function @code{vmpc-true-conditions} to test conditions without actually
+running some actions.
+
+@item New function @code{vmpc-read-actions} to set actions by hand.
+
+@item @code{vmpc-build-actions-to-run-list} and @code{vmpc-run-actions} are interactive
+now.
+
+@item @code{vmpc-prompt-for-profile} will search all headers for a
+recipient with an associated profile before prompting for one.
+
+@item When calling @code{vmpc-prompt-for-profile} interactively form a
+composition buffer one will get prompted again for a profile. This
+allows to easily fix a bad association.
+
+@item The state variables become buffer-local now, which should prevent some
+bugs, i.e. for saved headers.
+
+@item Rewrite of unlispish code.
+
+@item @code{M-x checkdoc RET}
+
+@item Several bug fixes and enhancements from Robert P. Goldman.
+
+@item Fixes and updates of the info file.
+
+@end itemize
+
+Version 0.85:
+
+@itemize @bullet
+
+@item This version adds @code{vmpc-resend-alist}, which should be
+especially useful for mailing list maintainers who receive bounced
+non-member posts, and anyone else who frequently uses
+@code{vm-resend-message}.
+
+@end itemize
+
+Version 0.84:
+
+@itemize @bullet
+
+@item There is now a @code{vmpc-newmail-alist} in recognition of the fact that
+you @strong{can} actually test for useful criteria (such as what folder
+you are in when you invoke vm-mail) when creating a brand new message.
+
+@item Due to the above, the @code{vmpc-newmail-prompt-for-profile}
+variable is now obsoleted. Its effect can be duplicated easily enough;
+see @ref{vmpc-newmail-alist} for details.
+
+@end itemize
+
+Older versions:
+
+@itemize @bullet
+
+@item Pre-signatures and signatures are now dealt with in a more
+sensible manner. You might not notice the difference, except that you
+can now have them highlighted in @code{vmpc-pre-sig-face} and
+@code{vmpc-sig-face}, and you can set up either so that your cursor
+skips across them with @code{vmpc-intangible-pre-sig} and
+@code{vmpc-intangible-sig}. However, if you use another signature
+package to insert a signature in every mail buffer, you should look at
+setting @code{vmpc-expect-default-signature}.
+
+@item You can now use vm-pcrisis in conjunction with the forwarding
+functions of VM. Just set up @code{vmpc-forwards-alist}, which has an
+identical format to @code{vmpc-replies-alist}.
+
+@item There is now a @code{vmpc-body-match} function which matches
+text in the body of a message you are composing, replying to or
+forwarding. See @ref{vmpc-conditions examples} for more about that.
+
+@item You can now use @code{vmpc-header-match} to test if a regexp appears in
+any header field matching another regexp. For example, to find out if
+the regexp "fire\\|water" appears in any header, you would use
+something like
+@lisp
+(vmpc-header-match "[^ \t\n:]+:" "fire\\|water" ", ")
+@end lisp
+For further details, again see @ref{vmpc-conditions examples}.
+
+@item @code{vmpc-auto-profiles-expunge-days} can now be set to nil if
+you want to never expunge old profile associations. Associations are
+now "touched" each time they are used, so that as long as they are used
+more often than @code{vmpc-auto-profiles-expunge-days} they will never
+be expunged.
+
+@end itemize
+
+
+
+
+@bye
diff --git a/vm.texinfo b/info/vm.texinfo
index 59af2f3..f0d837a 100644
--- a/vm.texinfo
+++ b/info/vm.texinfo
@@ -1,8 +1,9 @@
\input texinfo @comment -*-Text-*-
@setfilename vm.info
@settitle VM User's Manual
+@dircategory Emacs
@direntry
-* VM:: A mail reader.
+* VM: (vm). A mail reader.
@end direntry
@iftex
@finalout
@@ -35,13 +36,12 @@ notice identical to this one except for the removal of this paragraph
@sp 6
@center @titlefont{VM User's Manual}
@sp 4
-@center VM Version 7.19
+@center VM Version 8.0
@sp 5
-@center Kyle E. Jones
-@center @t{kyle_jones@@wonderworks.com}
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1989, 1991, 1999, 2002, 2003 Kyle E. Jones
+Copyright @copyright{} 2003 - 2007 Robert Widhopf-Fenk
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -249,7 +249,7 @@ by typing @kbd{L} (@code{vm-load-init-file}) from within VM.
inbox}. If the variable @code{vm-auto-get-new-mail} is set
non-@code{nil}, VM will gather any mail present in your system mailbox
and integrate it into your primary inbox. The default name of your
-primary inbox is @file{~/INBOX}, but VM will use whatever file is named
+primary inbox is @file{~/Mail/inbox}, but VM will use whatever file is named
by the variable @code{vm-primary-inbox}.
@vindex vm-crash-box
@@ -794,7 +794,7 @@ The variable's value should be a list of the form:
@end example
@var{IMAPDROP} is a IMAP maildrop specification in the same format used
-by @code{vm-spool-files}.
+by @code{vm-spool-files}. @xref{IMAP Spool Files}.
For example:
@@ -1640,6 +1640,7 @@ Manual}. However, mail composition buffers created by VM have some
extra command keys.
@table @kbd
+
@findex vm-yank-message
@findex vm-yank-message-other-folder
@kindex C-c C-y
@@ -1657,6 +1658,7 @@ value of @code{vm-included-text-prefix} to every yanked line, and don't yank
any headers other than those specified in
@code{vm-visible-headers} and @code{vm-invisible-headers}. To yank a message from
a different folder than the parent of this composition, use
+
@key{M-x vm-yank-message-other-buffer}.
@kindex C-c C-v
@item C-c C-v <Any VM command key>
@@ -1686,6 +1688,7 @@ encoded message. If you change your mind about using the
attachment, you can remove it from the composition with @key{C-k}.
If you want to move the attachment to some other part of the message,
you can kill it @key{C-k} and yank it back with @key{C-y}.
+
@kindex C-c C-m
@item C-c C-m (@code{vm-mime-attach-message})
Attaches a mail message to the composition. If invoked with a
@@ -1699,6 +1702,7 @@ the selected folder will be attached as a MIME digest.
@kindex C-c C-b
@item C-c C-b (@code{vm-mime-attach-buffer})
Attaches an Emacs buffer to the composition.
+
@findex vm-mime-encode-composition
@kindex C-c C-e
@item C-c C-e (@code{vm-mime-encode-composition})
@@ -1708,6 +1712,7 @@ it. After signing the message, you would use C-c C-c as usual to
send the message. Emacs' @code{undo} command can be used to undo
the encoding, so that you can continue composing the unencoded
message.
+
@findex vm-preview-composition
@kindex C-c C-p
@item C-c C-p (@code{vm-preview-composition})
@@ -1716,6 +1721,18 @@ temporary folder and you can read the message and interact with
it using normal VM mode commands to see how it might look to a
recipient. Type @key{q} to quit the temporary folder and resume
composing your message.
+
+@findex vm-postpone-composition
+@kindex C-c C-d
+@item C-c C-d (@code{vm-postpone-composition})
+Postpones the current composition. The message is stored in the
+folder specified in @code{vm-postponed-folder}. You can continue composing
+of messages by visiting @code{vm-postponed-folder}, selecting the a messsage
+and @key{m} or by directly calling the function on any message in any folder
+@kbd{M-x vm-continue-postponed-message}. When called with a prefix arg
+@code{vm-postpone-composition} will ask you for the folder to save the draft
+to, i.e. you might also save it to your inbox.
+
@end table
@findex vm-mail
@@ -2031,7 +2048,8 @@ If you have a directory where you keep all your mail folders, you should
set the variable @code{vm-folder-directory} to point to it. If this
variable is set, @code{vm-save-message} will insert this directory name
into the minibuffer before prompting you for a folder name; this will save
-you some typing.
+you some typing. The default value of @code{vm-folder-directory} is
+@code{~/Mail}.
@vindex vm-auto-folder-alist
Another aid to selecting folders in which to save mail is the variable
@@ -2373,7 +2391,7 @@ message order would be unchanged. VM numbers and presents the messages
in a different order internally. If you want the message order to be
changed in the folder so that other programs can see the change, you
can either invoke @code{vm-sort-messages} with a prefix argument, or
-you can set @code{vm-move-message-physically} non-@code{nil} before
+you can set @code{vm-move-messages-physically} non-@code{nil} before
sorting. Either way, VM will shift the actual messages around in the
folder buffer, and when you save the folder, the order change will be
visible to other programs.
@@ -2833,6 +2851,39 @@ member of some virtual folder currently
being visited.
@item written
matches message if it has been saved without its headers.
+@item older-than
+matches message if it is atleast @var{ARG} days old
+@item eval
+matches message if evaluating the sexpr @var{ARG} yields @code{t}.
+@item outgoing
+matches message if your are the author of it, i.e. if the yuthor matches
+@code{vm-summary-uninteresting-senders}
+@item spam-score
+matches message if its spam score is atleast @var{ARG}. See
+@code{vm-vs-spam-score-headers} for configuration.
+@item spam-word
+matches message if it contains a word from @code{vm-spam-words-file}
+@item folder-name
+matches message if it is from a folder matching @code{ARG}
+@item in-bbdb
+matches if the addresses from the message are in the BBDB. With an option
+first argument you might select the address class and with an optional second
+argument if only the first address should be checked.
+@example
+(in-bbdb authors)
+@end example
+@example
+(in-bbdb recipients t)
+@end example
+@item attachment
+matches if a message contains an attachment resp. its text matched
+@code{vm-vs-attachment-regexp}
+@item vm-mode
+matches the message if in vm-mode and one of its argument
+selectors match the message.
+@item mail-mode
+matches the message if in mail-mode and one of its argument
+selectors match the message.
@end table
Here is an example that you may find useful as a template to
@@ -2922,6 +2973,25 @@ The keys @kbd{V S} and @kbd{V A} invoke
containing all the messages in the current folder with the same
subject or author as the current message.
+The keys @kbd{V O} @code{vm-virtual-omit-message} will omit a message from the
+virtual folder and @kbd{V U} @code{vm-virtual-update-folders} will force an
+update of the virtual folder.
+
+@kbd{M-x vm-virtual-check-selector-interactive} allows to test selectors
+interactively and will emit debug information when called with a prefix
+argument.
+
+Automatical marking of messages for deletion based on a selector can be
+achived with @code{vm-virtual-auto-delete-message} for interactive use and the
+function and @code{vm-virtual-auto-delete-messages} when added to the VM hook
+@code{vm-arrived-messages-hook}. This can be quite handy for marking spam for
+deletion.
+
+@kbd{M-x vm-virtual-save-message} can be used to save messages to the
+folder corresponging to the first matching selector and the function
+@kbd{vm-virtual-auto-archive-messages} can file messages based on
+selectors (see also @code{vm-auto-archive-messages}).
+
@node Frames and Windows, Toolbar, Virtual Folders, Top
@chapter Frames and Windows
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..e9de238
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,251 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission. M.I.T. makes no representations about the
+# suitability of this software for any purpose. It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "install: no input file specified"
+ exit 1
+else
+ true
+fi
+
+if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+
+ if [ -d $dst ]; then
+ instcmd=:
+ chmodcmd=""
+ else
+ instcmd=mkdir
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f $src -o -d $src ]
+ then
+ true
+ else
+ echo "install: $src does not exist"
+ exit 1
+ fi
+
+ if [ x"$dst" = x ]
+ then
+ echo "install: no destination specified"
+ exit 1
+ else
+ true
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+ if [ -d $dst ]
+ then
+ dst="$dst"/`basename $src`
+ else
+ true
+ fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+ pathcomp="${pathcomp}${1}"
+ shift
+
+ if [ ! -d "${pathcomp}" ] ;
+ then
+ $mkdirprog "${pathcomp}"
+ else
+ true
+ fi
+
+ pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+ $doit $instcmd $dst &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ dstfile=`basename $dst $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ true
+ fi
+
+# Make a temp file name in the proper directory.
+
+ dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd $src $dsttmp &&
+
+ trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+ $doit $rmcmd -f $dstdir/$dstfile &&
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
+
+fi &&
+
+
+exit 0
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
new file mode 100644
index 0000000..fc94060
--- /dev/null
+++ b/lisp/Makefile.in
@@ -0,0 +1,225 @@
+@SET_MAKE@
+
+##############################################################################
+# no csh please
+SHELL = /bin/sh
+
+# the list of source files
+SOURCES = vm-version.el
+SOURCES += vm.el
+SOURCES += vm-autoload.el
+SOURCES += vm-avirtual.el
+SOURCES += vm-biff.el
+SOURCES += vm-crypto.el
+SOURCES += vm-delete.el
+SOURCES += vm-digest.el
+SOURCES += vm-edit.el
+SOURCES += vm-folder.el
+SOURCES += vm-grepmail.el
+SOURCES += vm-imap.el
+SOURCES += vm-license.el
+SOURCES += vm-macro.el
+SOURCES += vm-mark.el
+SOURCES += vm-menu.el
+SOURCES += vm-message.el
+SOURCES += vm-message-history.el
+SOURCES += vm-mime.el
+SOURCES += vm-minibuf.el
+SOURCES += vm-misc.el
+SOURCES += vm-motion.el
+SOURCES += vm-mouse.el
+SOURCES += vm-page.el
+SOURCES += vm-pcrisis.el
+SOURCES += vm-pgg.el
+SOURCES += vm-pine.el
+SOURCES += vm-pop.el
+SOURCES += vm-ps-print.el
+SOURCES += vm-reply.el
+SOURCES += vm-rfaddons.el
+SOURCES += vm-save.el
+SOURCES += vm-search.el
+SOURCES += vm-serial.el
+SOURCES += vm-sort.el
+SOURCES += vm-startup.el
+SOURCES += vm-summary.el
+SOURCES += vm-summary-faces.el
+SOURCES += vm-thread.el
+SOURCES += vm-toolbar.el
+SOURCES += vm-undo.el
+SOURCES += vm-user.el
+SOURCES += vm-vars.el
+SOURCES += vm-vcard.el
+SOURCES += vm-version.el
+SOURCES += vm-virtual.el
+SOURCES += vm-window.el
+
+SOURCES += vcard.el
+SOURCES += tapestry.el
+
+# to list of object files
+ifeq (@EMACS_FLAVOR@,emacs)
+OBJECTS = vm-autoloads.elc vm-cus-load.elc
+else
+OBJECTS = auto-autoloads.elc custom-load.elc
+endif
+
+OBJECTS += $(SOURCES:.el=.elc)
+
+INSTALL_FILES = $(SOURCES) $(OBJECTS) vm-revno.elc
+
+# for autoload generation
+AUTOLOAD_PACKAGE_NAME = (setq autoload-package-name \"vm\")
+AUTOLOAD_FILE = (setq generated-autoload-file \"./auto-autoloads.el\")
+
+##############################################################################
+# location of required programms
+BZR = bzr --no-plugins
+RM = @RM@
+LS = @LS@
+XARGS = @XARGS@
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_DATA = @INSTALL_DATA@
+
+prefix = @prefix@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+datadir= @datadir@
+datarootdir= @datarootdir@
+lispdir = @lispdir@
+pixmapdir= @pixmapdir@
+
+EMACS_PROG = @EMACS_PROG@
+EMACS_FLAVOR = @EMACS_FLAVOR@
+
+FLAGS = @FLAGS@
+
+EMACS_COMP = lispdir="$(lispdir)" srcdir="$(srcdir)" "$(EMACS_PROG)" $(FLAGS)
+
+export OTHERDIRS = @OTHERDIRS@
+
+SYMLINKS = @SYMLINKS@
+LINKPATH = @LINKPATH@
+
+.el.elc:
+ "$(EMACS_PROG)" $(FLAGS) -f batch-byte-compile $<
+
+##############################################################################
+all: $(OBJECTS)
+
+install: install-el install-elc
+
+##############################################################################
+vm-revno.el:
+ echo ";;; This is a generated file, do not edit it!" > vm-revno.el
+ echo "(setq vm-revno \"`$(BZR) nick`-`$(BZR) revno`\")" >> vm-revno.el
+ echo "(setq vm-author \"`$(BZR) whoami`\")" >> vm-revno.el
+
+##############################################################################
+# GNU Emacs's vm-autoload file
+vm-autoloads.el: $(SOURCES:%=@srcdir@/%)
+ -$(RM) $@
+ echo > $@
+ (build_dir="`pwd`"; cd "@srcdir@"; \
+ "$(EMACS_PROG)" $(FLAGS) -l autoload \
+ -f vm-built-autoloads "@abs_builddir@/$@" "`pwd`")
+ echo "(custom-add-load 'vm 'vm-cus-load)" >> $@
+ echo "(setq vm-configure-datadir \"${datadir}\")" >> $@
+ echo "(setq vm-configure-pixmapdir \"${pixmapdir}\")" >> $@
+ echo "(provide 'vm-autoloads)" >> $@
+
+vm-cus-load.el: $(SRCS:%=@srcdir@/%)
+ "$(EMACS_PROG)" $(FLAGS) -f vm-custom-make-dependencies .
+ifeq (@EMACS_VERSION@,21)
+ sed -e "s/provide 'cus-load/provide 'vm-cus-load/" cus-load.el > $@
+ $(RM) cus-load.el
+endif
+
+##############################################################################
+# XEmacs#s auto-autoloads and custom-load file
+auto-autoloads.el: $(SOURCES:%=@srcdir@/%)
+ -$(RM) $@
+# (build_dir=`pwd`; cd "@srcdir@"; \
+# $(EMACS_PROG) $(FLAGS) -l autoload \
+# -f vm-built-autoloads "@abs_builddir@/$@" "`pwd`")
+ "$(EMACS_PROG)" $(FLAGS) \
+ -eval "$(AUTOLOAD_PACKAGE_NAME)" \
+ -eval "$(AUTOLOAD_FILE)" \
+ -l autoload -f batch-update-autoloads $^
+ # avoid getting an error about an already loaded vm-autoloads
+ mv $@ $@.tmp
+ echo "(setq features (delete 'vm-autoloads features))" > $@
+ cat $@.tmp >> $@
+ echo "(setq features (delete 'vm-autoloads features))" >> $@
+ echo "(setq vm-configure-datadir \"${datadir}\")" >> $@
+ echo "(setq vm-configure-pixmapdir \"${pixmapdir}\")" >> $@
+ $(RM) $@.tmp
+
+
+custom-load.el: $(SRCS:%=@srcdir@/%)
+ "$(EMACS_PROG)" $(FLAGS) -f vm-custom-make-dependencies .
+
+##############################################################################
+install-pkg: all vm-revno.elc
+ @if test "x$(SYMLINKS)" = "xno" ; then \
+ mkdir -p -m 0755 $(DESTDIR)$(PACKAGEDIR); \
+ for i in $(SRCS:%=@srcdir@/%) $(INSTALL_FILES) ; do \
+ echo "Installing $$i in $(DESTDIR)$(PACKAGEDIR)" ; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(PACKAGEDIR) ; \
+ done ; \
+ else \
+ if test "x$(LINKPATH)" = "x" ; then \
+ $(LN_S) "`pwd`" $(DESTDIR)$(PACKAGEDIR) ; \
+ else \
+ $(LN_S) $(LINKPATH)/lisp $(DESTDIR)$(PACKAGEDIR) ; \
+ fi ; \
+ fi
+ @echo VM ELISP files successfully installed\!
+
+# This entry will never install .el files if there are no .elc files.
+install-el: all vm-revno.elc
+ $(INSTALL) -d -m 0755 "$(DESTDIR)$(lispdir)/"
+ for elc in *.elc; do \
+ el=`basename $$elc c`; \
+ if test -f "$(srcdir)/$$el"; then \
+ echo "Install $$el in $(DESTDIR)$(lispdir)/"; \
+ $(INSTALL_DATA) "${srcdir}/$$el" "$(DESTDIR)$(lispdir)/"; \
+ fi; \
+ done;
+ if $(LS) $(contrib)/*.elc > /dev/null 2>&1; then \
+ for elc in $(contribdir)/*.elc; do \
+ el=`basename $$elc c`; \
+ if test -f "${srcdir}/$(contribdir)/$$el"; then \
+ echo "Install $(contribdir)/$$el in $(DESTDIR)$(lispdir)/"; \
+ $(INSTALL_DATA) "${srcdir}/$(contribdir)/$$el" "$(DESTDIR)$(lispdir)/"; \
+ fi; \
+ done; \
+ fi;
+
+install-elc: all vm-revno.elc
+ $(INSTALL) -d -m 0755 "$(DESTDIR)$(lispdir)/"
+ for elc in *.elc; do \
+ echo "Install $$elc in $(DESTDIR)$(lispdir)/"; \
+ $(INSTALL_DATA) $$elc "$(DESTDIR)$(lispdir)/"; \
+ done;
+ if $(LS) $(contribdir)/*.elc > /dev/null 2>&1; then \
+ for elc in $(contribdir)/*.elc; do \
+ echo "Install $$elc in $(DESTDIR)$(lispdir)"; \
+ $(INSTALL_DATA) $$elc "$(DESTDIR)$(lispdir)"; \
+ done; \
+ fi;
+
+
+
+##############################################################################
+Makefile: @srcdir@/Makefile.in
+ cd ..; ./config.status
+
+##############################################################################
+clean:
+ -$(RM) -f *.elc vm-autoloads.el auto-autoloads.el custom-load.el
+
+distclean: clean
+ -$(RM) -f Makefile
+
diff --git a/lisp/autoloads.py b/lisp/autoloads.py
new file mode 100755
index 0000000..b7ebec2
--- /dev/null
+++ b/lisp/autoloads.py
@@ -0,0 +1,126 @@
+#!/usr/bin/python
+# -*- python -*-
+
+import sys
+
+def identifier_start(string, startpos=0):
+ #print string, startpos
+ while (startpos < len(string) and
+ ("() \t\r\n.,".find(string[startpos]) != -1)):
+ startpos = startpos + 1
+ return startpos
+
+def identifier_end(string, startpos=0):
+ #print string, startpos
+ while (startpos < len(string) and
+ ("() \t\r\n.,".find(string[startpos]) == -1)):
+ startpos = startpos + 1
+ return startpos
+
+class Def:
+ def __init__(self, filename, lineno, autoload, symbol):
+ self.filename = filename
+ self.lineno = lineno
+ self.autoload = autoload
+ self.symbol = symbol
+ def __str__(self):
+ return ("%s:%d %s %s" % (self.filename,
+ self.lineno,
+ self.symbol,
+ self.autoload))
+
+def find_defs(filename, pattern="(defun", pos=0):
+ """Find definitions of pattern in the given file.
+ Returns defined symbols."""
+ symbols = []
+
+ fd = open(filename)
+ lineno = 0
+ autoload = False
+ for l in fd:
+ lineno = lineno + 1
+ if l.startswith(";;;###autoload"):
+ autoload = True
+ continue
+ s = l.find(pattern)
+ if s == -1 or s != pos:
+ continue
+ s = identifier_start(l, s + len(pattern))
+ while "() \t\r\n.,".find(l[s]) != -1:
+ s = s + 1
+ e = identifier_end(l, s)
+ if s == e:
+ raise "Could not find identifier end in " + repr(l)
+ continue
+ #print s, e
+ #print l[s : e]
+ symbols.append(Def(filename, lineno, autoload, l[s : e]))
+ autoload = False
+ fd.close()
+ return symbols
+
+preloaded = ["vm-version.el", "vm-misc.el", "vm-macro.el", "vm-folder.el",
+ "vm-summary.el", "vm-minibuf.el", "vm-motion.el", "vm-page.el",
+ "vm-mouse.el", "vm-window.el", "vm-menu.el", "vm-message.el",
+ "vm-toolbar.el", "vm.el", "vm-undo.el", "vm-mime.el",
+ "vm-vars.el"]
+
+def check_calls(filename, funs, missing):
+ #print "-" * 50
+ #print filename
+ fd = open(filename)
+ required = []
+ for l in fd:
+ s = l.find("(require")
+ if s != -1:
+ s = identifier_start(l, s + len("(require '" ))
+ e = identifier_end(l, s)
+ #print l[s:e], "*" * 50
+ required.append(l[s:e] + ".el")
+ #print required
+ continue
+
+ # check for calls to external function without autoloads or require
+ for c in l.split("("):
+ s = identifier_start(c, 0)
+ e = identifier_end(c, s)
+
+ #print repr(c)
+ s = identifier_start(c, 0)
+ e = identifier_end(c, s)
+ f = c[s:e]
+ if f not in funs:
+ continue
+ d = funs[f]
+ if ((d.filename != filename) and (not d.autoload) and
+ (d.filename not in preloaded) and
+ (d.filename not in required)):
+ #print preloaded
+ #print "'%s' : '%s' => '%s' %s" % (filename, f, d.filename,
+ #d.filename in preloaded)
+ #print preloaded
+ if not missing.has_key(d.filename):
+ missing[d.filename] = []
+ if f not in missing[d.filename]:
+ missing[d.filename].append(f)
+ fd.close()
+
+
+# emit cross references with missing autoloads
+if __name__ == '__main__':
+ funs = {}
+ for filename in sys.argv[3:]:
+ for d in find_defs(filename):
+ if funs.has_key(d.symbol):
+ print "Duplicate %s <> %s" % (d, funs[d.symbol])
+ else:
+ funs[d.symbol] = d
+ missing = {}
+ for filename in sys.argv[3:]:
+ check_calls(filename, funs, missing)
+ for f in missing.keys():
+ print f
+ for m in missing[f]:
+ print "\t", m
+
+
diff --git a/tapestry.el b/lisp/tapestry.el
index a34a4c5..2af12e8 100644
--- a/tapestry.el
+++ b/lisp/tapestry.el
@@ -1,25 +1,22 @@
-;;; Tools to configure your GNU Emacs windows
-;;; Copyright (C) 1991, 1993, 1994, 1995, 1997 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; A copy of the GNU General Public License can be obtained from this
-;;; program's author (send electronic mail to kyle@uunet.uu.net) or from
-;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
-;;; 02139, USA.
-;;;
-;;; Send bug reports to kyle@uunet.uu.net.
-
-;;(provide 'tapestry)
+;;; tapestry.el --- Tools to configure your GNU Emacs windows
+;;
+;; Copyright (C) 1991, 1993, 1994, 1995, 1997 Kyle E. Jones
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+;;; Code:
(defvar tapestry-version "1.09")
;; Pass state information between the tapestry-set-window-map
@@ -27,8 +24,9 @@
;; is explained in tapestry-set-buffer-map.
(defvar tapestry-windows-changed nil)
+;;;###autoload
(defun tapestry (&optional frame-list)
- "Returns a list containing complete information about the current
+"Returns a list containing complete information about the current
configuration of Emacs frames, windows, buffers and cursor
positions. Call the function set-tapestry with the list that this function
returns to restore the configuration.
@@ -53,6 +51,8 @@ restored across multiple Emacs sessions."
(tapestry-select-frame sf))
(list frame-map other-maps)))
+
+;;;###autoload
(defun set-tapestry (map &optional n root-window-edges)
"Restore the frame/window/buffer configuration described by MAP,
which should be a list previously returned by a call to
@@ -432,6 +432,7 @@ ROOT-WINDOW-EDGES will be used."
(setq prev curr curr (cdr curr))))
list ))
+;;;###autoload
(defun tapestry-remove-frame-parameters (map params)
(let (frame-map)
(while params
@@ -441,6 +442,7 @@ ROOT-WINDOW-EDGES will be used."
(setq frame-map (cdr frame-map)))
(setq params (cdr params)))))
+;;;###autoload
(defun tapestry-nullify-tapestry-elements (map &optional buf-file-name buf-name
window-start window-point
window-hscroll selected-window)
@@ -461,6 +463,7 @@ ROOT-WINDOW-EDGES will be used."
(setq p (cdr p)))
(setq map (cdr map)))))
+;;;###autoload
(defun tapestry-replace-tapestry-element (map what function)
(let (mapi mapj p old new)
(cond ((eq what 'buffer-file-name)
@@ -609,3 +612,5 @@ ROOT-WINDOW-EDGES will be used."
t ))
(provide 'tapestry)
+
+;;; tapestry.el ends here
diff --git a/lisp/vcard.el b/lisp/vcard.el
new file mode 100644
index 0000000..0248ffa
--- /dev/null
+++ b/lisp/vcard.el
@@ -0,0 +1,703 @@
+;;; vcard.el --- vcard parsing and display routines
+
+;; Copyright (C) 1997, 1999, 2000 Noah S. Friedman
+
+;; Author: Noah Friedman <friedman@splode.com>
+;; Maintainer: friedman@splode.com
+;; Keywords: vcard, mail, news
+;; Created: 1997-09-27
+
+;; $Id: vcard.el,v 1.11 2000/06/29 17:07:55 friedman Exp $
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+;;; Commentary:
+
+;; Unformatted vcards are just plain ugly. But if you live in the MIME
+;; world, they are a better way of exchanging contact information than
+;; freeform signatures since the former can be automatically parsed and
+;; stored in a searchable index.
+;;
+;; This library of routines provides the back end necessary for parsing
+;; vcards so that they can eventually go into an address book like BBDB
+;; (although this library does not implement that itself). Also included
+;; is a sample pretty-printer which MUAs can use which do not provide their
+;; own vcard formatters.
+
+;; This library does not interface directly with any mail user agents. For
+;; an example of bindings for the VM MUA, see vm-vcard.el available from
+;;
+;; http://www.splode.com/~friedman/software/emacs-lisp/index.html#mail
+;;
+;; Updates to vcard.el should be available there too.
+
+;; The main entry point to this package is `vcard-pretty-print' although
+;; any documented variable or function is considered part of the API for
+;; operating on vcard data.
+
+;; The vcard 2.1 format is defined by the versit consortium.
+;; See http://www.imc.org/pdi/vcard-21.ps
+;;
+;; RFC 2426 defines the vcard 3.0 format.
+;; See ftp://ftp.rfc-editor.org/in-notes/rfc2426.txt
+
+;; A parsed vcard is a list of attributes of the form
+;;
+;; (proplist value1 value2 ...)
+;;
+;; Where proplist is a list of property names and parameters, e.g.
+;;
+;; (property1 (property2 . parameter2) ...)
+;;
+;; Each property has an associated implicit or explicit parameter value
+;; (not to be confused with attribute values; in general this API uses
+;; `parameter' to refer to property values and `value' to refer to attribute
+;; values to avoid confusion). If a property has no explicit parameter value,
+;; the parameter value is considered to be `t'. Any property which does not
+;; exist for an attribute is considered to have a nil parameter.
+
+;; TODO:
+;; * Finish supporting the 3.0 extensions.
+;; Currently, only the 2.1 standard is supported.
+;; * Handle nested vcards and grouped attributes?
+;; (I've never actually seen one of these in use.)
+;; * Handle multibyte charsets.
+;; * Inverse of vcard-parse-string: write .VCF files from alist
+;; * Implement a vcard address book? Or is using BBDB preferable?
+;; * Improve the sample formatter.
+
+;;; Code:
+
+(defgroup vcard nil
+ "Support for the vCard electronic business card format."
+ :group 'vcard
+ :group 'mail
+ :group 'news)
+
+;;;###autoload
+(defcustom vcard-pretty-print-function 'vcard-format-sample-box
+ "*Formatting function used by `vcard-pretty-print'."
+ :type 'function
+ :group 'vcard)
+
+;;;###autoload
+(defcustom vcard-standard-filters
+ '(vcard-filter-html
+ vcard-filter-adr-newlines
+ vcard-filter-tel-normalize
+ vcard-filter-textprop-cr)
+ "*Standard list of filters to apply to parsed vcard data.
+These filters are applied sequentially to vcard attributes when
+the function `vcard-standard-filter' is supplied as the second argument to
+`vcard-parse'."
+ :type 'hook
+ :group 'vcard)
+
+
+;;; No user-settable options below.
+
+;; XEmacs 21 ints and chars are disjoint types.
+;; For all else, treat them as the same.
+(defalias 'vcard-char-to-int
+ (if (fboundp 'char-to-int) 'char-to-int 'identity))
+
+;; This is just the version number for this package; it does not refer to
+;; the vcard format specification. Currently, this package does not yet
+;; support the full vcard 3.0 specification.
+;;
+;; Whenever any part of the API defined in this package change in a way
+;; that is not backward-compatible, the major version number here should be
+;; incremented. Backward-compatible additions to the API should be
+;; indicated by increasing the minor version number.
+(defconst vcard-api-version "2.0")
+
+;; The vcard standards allow specifying the encoding for an attribute using
+;; these values as immediate property names, rather than parameters of the
+;; `encoding' property. If these are encountered while parsing, associate
+;; them as parameters of the `encoding' property in the returned structure.
+(defvar vcard-encoding-tags
+ '("quoted-printable" "base64" "8bit" "7bit"))
+
+;; The vcard parser will auto-decode these encodings when they are
+;; encountered. These methods are invoked via vcard-parse-region-value.
+(defvar vcard-region-decoder-methods
+ '(("quoted-printable" . vcard-region-decode-quoted-printable)
+ ("base64" . vcard-region-decode-base64)))
+
+;; This is used by vcard-region-decode-base64
+(defvar vcard-region-decode-base64-table
+ (let* ((a "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")
+ (len (length a))
+ (tbl (make-vector 123 nil))
+ (i 0))
+ (while (< i len)
+ (aset tbl (vcard-char-to-int (aref a i)) i)
+ (setq i (1+ i)))
+ tbl))
+
+
+;;; This function can be used generically by applications to obtain
+;;; a printable representation of a vcard.
+
+;;;###autoload
+(defun vcard-pretty-print (vcard)
+ "Format VCARD into a string suitable for display to user.
+VCARD can be an unparsed string containing raw VCF vcard data
+or a parsed vcard alist as returned by `vcard-parse-string'.
+
+The result is a string with formatted vcard information suitable for
+insertion into a mime presentation buffer.
+
+The function specified by the variable `vcard-pretty-print-function'
+actually performs the formatting. That function will always receive a
+parsed vcard alist."
+ (and (stringp vcard)
+ (setq vcard (vcard-parse-string vcard)))
+ (funcall vcard-pretty-print-function vcard))
+
+
+;;; Parsing routines
+
+;;;###autoload
+(defun vcard-parse-string (raw &optional filter)
+ "Parse RAW vcard data as a string, and return an alist representing data.
+
+If the optional function FILTER is specified, apply that filter to each
+attribute. If no filter is specified, `vcard-standard-filter' is used.
+
+Filters should accept two arguments: the property list and the value list.
+Modifying in place the property or value list will affect the resulting
+attribute in the vcard alist.
+
+Vcard data is normally in the form
+
+ begin: vcard
+ prop1a: value1a
+ prop2a;prop2b;prop2c=param2c: value2a
+ prop3a;prop3b: value3a;value3b;value3c
+ end: vcard
+
+\(Whitespace around the `:' separating properties and values is optional.\)
+If supplied to this function an alist of the form
+
+ \(\(\(\"prop1a\"\) \"value1a\"\)
+ \(\(\"prop2a\" \"prop2b\" \(\"prop2c\" . \"param2c\"\)\) \"value2a\"\)
+ \(\(\"prop3a\" \"prop3b\"\) \"value3a\" \"value3b\" \"value3c\"\)\)
+
+would be returned."
+ (let ((vcard nil)
+ (buf (generate-new-buffer " *vcard parser work*")))
+ (unwind-protect
+ (save-excursion
+ (set-buffer buf)
+ ;; Make sure last line is newline-terminated.
+ ;; An extra trailing newline is harmless.
+ (insert raw "\n")
+ (setq vcard (vcard-parse-region (point-min) (point-max) filter)))
+ (kill-buffer buf))
+ vcard))
+
+;;;###autoload
+(defun vcard-parse-region (beg end &optional filter)
+ "Parse the raw vcard data in region, and return an alist representing data.
+This function is just like `vcard-parse-string' except that it operates on
+a region of the current buffer rather than taking a string as an argument.
+
+Note: this function modifies the buffer!"
+ (or filter
+ (setq filter 'vcard-standard-filter))
+ (let ((case-fold-search t)
+ (vcard-data nil)
+ (pos (make-marker))
+ (newpos (make-marker))
+ properties value)
+ (save-restriction
+ (narrow-to-region beg end)
+ (save-match-data
+ ;; Unfold folded lines and delete naked carriage returns
+ (goto-char (point-min))
+ (while (re-search-forward "\r$\\|\n[ \t]" nil t)
+ (goto-char (match-beginning 0))
+ (delete-char 1))
+
+ (goto-char (point-min))
+ (re-search-forward "^begin:[ \t]*vcard[ \t]*\n")
+ (set-marker pos (point))
+ (while (and (not (looking-at "^end[ \t]*:[ \t]*vcard[ \t]*$"))
+ (re-search-forward ":[ \t]*" nil t))
+ (set-marker newpos (match-end 0))
+ (setq properties
+ (vcard-parse-region-properties pos (match-beginning 0)))
+ (set-marker pos (marker-position newpos))
+ (re-search-forward "[ \t]*\n")
+ (set-marker newpos (match-end 0))
+ (setq value
+ (vcard-parse-region-value properties pos (match-beginning 0)))
+ (set-marker pos (marker-position newpos))
+ (goto-char pos)
+ (funcall filter properties value)
+ (setq vcard-data (cons (cons properties value) vcard-data)))))
+ (nreverse vcard-data)))
+
+(defun vcard-parse-region-properties (beg end)
+ (downcase-region beg end)
+ (let* ((proplist (vcard-split-string (buffer-substring beg end) ";"))
+ (props proplist)
+ split)
+ (save-match-data
+ (while props
+ (cond ((string-match "=" (car props))
+ (setq split (vcard-split-string (car props) "=" 2))
+ (setcar props (cons (car split) (car (cdr split)))))
+ ((member (car props) vcard-encoding-tags)
+ (setcar props (cons "encoding" (car props)))))
+ (setq props (cdr props))))
+ proplist))
+
+(defun vcard-parse-region-value (proplist beg end)
+ (let* ((encoding (vcard-get-property proplist "encoding"))
+ (decoder (cdr (assoc encoding vcard-region-decoder-methods)))
+ result pos match-beg match-end)
+ (save-restriction
+ (narrow-to-region beg end)
+ (cond (decoder
+ ;; Each `;'-separated field needs to be decoded and saved
+ ;; separately; if the entire region were decoded at once, we
+ ;; would not be able to distinguish between the original `;'
+ ;; chars and those which were encoded in order to quote them
+ ;; against being treated as field separators.
+ (goto-char beg)
+ (setq pos (set-marker (make-marker) (point)))
+ (setq match-beg (make-marker))
+ (setq match-end (make-marker))
+ (save-match-data
+ (while (< pos (point-max))
+ (cond ((search-forward ";" nil t)
+ (set-marker match-beg (match-beginning 0))
+ (set-marker match-end (match-end 0)))
+ (t
+ (set-marker match-beg (point-max))
+ (set-marker match-end (point-max))))
+ (funcall decoder pos match-beg)
+ (setq result (cons (buffer-substring pos match-beg) result))
+ (set-marker pos (marker-position match-end))))
+ (setq result (nreverse result))
+ (vcard-set-property proplist "encoding" nil))
+ (t
+ (setq result (vcard-split-string (buffer-string) ";")))))
+ (goto-char (point-max))
+ result))
+
+
+;;; Functions for retrieving property or value information from parsed
+;;; vcard attributes.
+
+(defun vcard-values (vcard have-props &optional non-props limit)
+ "Return the values in VCARD.
+This function is like `vcard-ref' and takes the same arguments, but return
+only the values, not the associated property lists."
+ (mapcar 'cdr (vcard-ref vcard have-props non-props limit)))
+
+(defun vcard-ref (vcard have-props &optional non-props limit)
+ "Return the attributes in VCARD with HAVE-PROPS properties.
+Optional arg NON-PROPS is a list of properties which candidate attributes
+must not have.
+Optional arg LIMIT means return no more than that many attributes.
+
+The attributes in VCARD which have all properties specified by HAVE-PROPS
+but not having any specified by NON-PROPS are returned. The first element
+of each attribute is the actual property list; the remaining elements are
+the values.
+
+If a specific property has an associated parameter \(e.g. an encoding\),
+use the syntax \(\"property\" . \"parameter\"\) to specify it. If property
+parameter is not important or it has no specific parameter, just specify
+the property name as a string."
+ (let ((attrs vcard)
+ (result nil)
+ (count 0))
+ (while (and attrs (or (null limit) (< count limit)))
+ (and (vcard-proplist-all-properties (car (car attrs)) have-props)
+ (not (vcard-proplist-any-properties (car (car attrs)) non-props))
+ (setq result (cons (car attrs) result)
+ count (1+ count)))
+ (setq attrs (cdr attrs)))
+ (nreverse result)))
+
+(defun vcard-proplist-all-properties (proplist props)
+ "Returns nil unless PROPLIST contains all properties specified in PROPS."
+ (let ((result t))
+ (while (and result props)
+ (or (vcard-get-property proplist (car props))
+ (setq result nil))
+ (setq props (cdr props)))
+ result))
+
+(defun vcard-proplist-any-properties (proplist props)
+ "Returns `t' if PROPLIST contains any of the properties specified in PROPS."
+ (let ((result nil))
+ (while (and (not result) props)
+ (and (vcard-get-property proplist (car props))
+ (setq result t))
+ (setq props (cdr props)))
+ result))
+
+(defun vcard-get-property (proplist property)
+ "Return the value from PROPLIST of PROPERTY.
+PROPLIST is a vcard attribute property list, which is normally the first
+element of each attribute entry in a vcard."
+ (or (and (member property proplist) t)
+ (cdr (assoc property proplist))))
+
+(defun vcard-set-property (proplist property value)
+ "In PROPLIST, set PROPERTY to VALUE.
+PROPLIST is a vcard attribute property list.
+If VALUE is nil, PROPERTY is deleted."
+ (let (elt)
+ (cond ((null value)
+ (vcard-delete-property proplist property))
+ ((setq elt (member property proplist))
+ (and value (not (eq value t))
+ (setcar elt (cons property value))))
+ ((setq elt (assoc property proplist))
+ (cond ((eq value t)
+ (setq elt (memq elt proplist))
+ (setcar elt property))
+ (t
+ (setcdr elt value))))
+ ((eq value t)
+ (nconc proplist (cons property nil)))
+ (t
+ (nconc proplist (cons (cons property value) nil))))))
+
+(defun vcard-delete-property (proplist property)
+ "Delete from PROPLIST the specified property PROPERTY.
+This will not succeed in deleting the first member of the proplist, but
+that element should never be deleted since it is the primary key."
+ (let (elt)
+ (cond ((setq elt (member property proplist))
+ (delq (car elt) proplist))
+ ((setq elt (assoc property proplist))
+ (delq (car (memq elt proplist)) proplist)))))
+
+
+;;; Vcard data filters.
+;;;
+;;; Filters receive both the property list and value list and may modify
+;;; either in-place. The return value from the filters are ignored.
+;;;
+;;; These filters can be used for purposes such as removing HTML tags or
+;;; normalizing phone numbers into a standard form.
+
+(defun vcard-standard-filter (proplist values)
+ "Apply filters in `vcard-standard-filters' to attributes."
+ (vcard-filter-apply-filter-list vcard-standard-filters proplist values))
+
+;; This function could be used to dispatch other filter lists.
+(defun vcard-filter-apply-filter-list (filter-list proplist values)
+ (while filter-list
+ (funcall (car filter-list) proplist values)
+ (setq filter-list (cdr filter-list))))
+
+;; Some lusers put HTML (or even javascript!) in their vcards under the
+;; misguided notion that it's a standard feature of vcards just because
+;; Netscape supports this feature. That is wrong; the vcard specification
+;; does not define any html content semantics and most MUAs cannot do
+;; anything with html text except display them unparsed, which is ugly.
+;;
+;; Thank Netscape for abusing the standard and damned near rendering it
+;; useless for interoperability between MUAs.
+;;
+;; This filter does a very rudimentary job.
+(defun vcard-filter-html (proplist values)
+ "Remove HTML tags from attribute values."
+ (save-match-data
+ (while values
+ (while (string-match "<[^<>\n]+>" (car values))
+ (setcar values (replace-match "" t t (car values))))
+ (setq values (cdr values)))))
+
+(defun vcard-filter-adr-newlines (proplist values)
+ "Replace newlines with \"; \" in `adr' values."
+ (and (vcard-get-property proplist "adr")
+ (save-match-data
+ (while values
+ (while (string-match "[\r\n]+" (car values))
+ (setcar values (replace-match "; " t t (car values))))
+ (setq values (cdr values))))))
+
+(defun vcard-filter-tel-normalize (proplist values)
+ "Normalize telephone numbers in `tel' values.
+Spaces and hyphens are replaced with `.'.
+US domestic telephone numbers are replaced with international format."
+ (and (vcard-get-property proplist "tel")
+ (save-match-data
+ (while values
+ (while (string-match "[\t._-]+" (car values))
+ (setcar values (replace-match " " t t (car values))))
+ (and (string-match "^(?\\(\\S-\\S-\\S-\\))? ?\
+\\(\\S-\\S-\\S- \\S-\\S-\\S-\\S-\\)"
+ (car values))
+ (setcar values
+ (replace-match "+1 \\1 \\2" t nil (car values))))
+ (setq values (cdr values))))))
+
+(defun vcard-filter-textprop-cr (proplist values)
+ "Strip carriage returns from text values."
+ (and (vcard-proplist-any-properties
+ proplist '("adr" "email" "fn" "label" "n" "org" "tel" "title" "url"))
+ (save-match-data
+ (while values
+ (while (string-match "\r+" (car values))
+ (setcar values (replace-match "" t t (car values))))
+ (setq values (cdr values))))))
+
+
+;;; Decoding methods.
+
+(defmacro vcard-hexstring-to-ascii (s)
+ (if (string-lessp emacs-version "20")
+ `(format "%c" (car (read-from-string (format "?\\x%s" ,s))))
+ `(format "%c" (string-to-number ,s 16))))
+
+(defun vcard-region-decode-quoted-printable (&optional beg end)
+ (save-excursion
+ (save-restriction
+ (save-match-data
+ (narrow-to-region (or beg (point-min)) (or end (point-max)))
+ (goto-char (point-min))
+ (while (re-search-forward "=\n" nil t)
+ (delete-region (match-beginning 0) (match-end 0)))
+ (goto-char (point-min))
+ (while (re-search-forward "=[0-9A-Za-z][0-9A-Za-z]" nil t)
+ (let ((s (buffer-substring (1+ (match-beginning 0)) (match-end 0))))
+ (replace-match (vcard-hexstring-to-ascii s) t t)))))))
+
+(defun vcard-region-decode-base64 (&optional beg end)
+ (save-restriction
+ (narrow-to-region (or beg (point-min)) (or end (point-max)))
+ (save-match-data
+ (goto-char (point-min))
+ (while (re-search-forward "[ \t\r\n]+" nil t)
+ (delete-region (match-beginning 0) (match-end 0))))
+ (goto-char (point-min))
+ (let ((count 0)
+ (n 0)
+ (c nil))
+ (while (not (eobp))
+ (setq c (char-after (point)))
+ (delete-char 1)
+ (cond ((char-equal c ?=)
+ (if (= count 2)
+ (insert (lsh n -10))
+ ;; count must be 3
+ (insert (lsh n -16) (logand 255 (lsh n -8))))
+ (delete-region (point) (point-max)))
+ (t
+ (setq n (+ n (aref vcard-region-decode-base64-table
+ (vcard-char-to-int c))))
+ (setq count (1+ count))
+ (cond ((= count 4)
+ (insert (logand 255 (lsh n -16))
+ (logand 255 (lsh n -8))
+ (logand 255 n))
+ (setq n 0 count 0))
+ (t
+ (setq n (lsh n 6))))))))))
+
+
+(defun vcard-split-string (string &optional separator limit)
+ "Split STRING at occurences of SEPARATOR. Return a list of substrings.
+Optional argument SEPARATOR can be any regexp, but anything matching the
+ separator will never appear in any of the returned substrings.
+ If not specified, SEPARATOR defaults to \"[ \\f\\t\\n\\r\\v]+\".
+If optional arg LIMIT is specified, split into no more than that many
+ fields \(though it may split into fewer\)."
+ (or separator (setq separator "[ \f\t\n\r\v]+"))
+ (let ((string-list nil)
+ (len (length string))
+ (pos 0)
+ (splits 0)
+ str)
+ (save-match-data
+ (while (<= pos len)
+ (setq splits (1+ splits))
+ (cond ((and limit
+ (>= splits limit))
+ (setq str (substring string pos))
+ (setq pos (1+ len)))
+ ((string-match separator string pos)
+ (setq str (substring string pos (match-beginning 0)))
+ (setq pos (match-end 0)))
+ (t
+ (setq str (substring string pos))
+ (setq pos (1+ len))))
+ (setq string-list (cons str string-list))))
+ (nreverse string-list)))
+
+(defun vcard-copy-tree (tree)
+ "Make a deep copy of nested conses."
+ (cond
+ ((consp tree)
+ (cons (vcard-copy-tree (car tree))
+ (vcard-copy-tree (cdr tree))))
+ (t tree)))
+
+(defun vcard-flatten (l)
+ (if (consp l)
+ (apply 'nconc (mapcar 'vcard-flatten l))
+ (list l)))
+
+
+;;; Sample formatting routines.
+
+(defun vcard-format-sample-box (vcard)
+ "Like `vcard-format-sample-string', but put an ascii box around text."
+ (let* ((lines (vcard-format-sample-lines vcard))
+ (len (vcard-format-sample-max-length lines))
+ (edge (concat "\n+" (make-string (+ len 2) ?-) "+\n"))
+ (line-fmt (format "| %%-%ds |" len))
+ (formatted-lines
+ (mapconcat (function (lambda (s) (format line-fmt s))) lines "\n")))
+ (if (string= formatted-lines "")
+ formatted-lines
+ (concat edge formatted-lines edge))))
+
+(defun vcard-format-sample-string (vcard)
+ "Format VCARD into a string suitable for display to user.
+VCARD should be a parsed vcard alist. The result is a string
+with formatted vcard information which can be inserted into a mime
+presentation buffer."
+ (mapconcat 'identity (vcard-format-sample-lines vcard) "\n"))
+
+(defun vcard-format-sample-lines (vcard)
+ (let* ((name (vcard-format-sample-get-name vcard))
+ (title (vcard-format-sample-values-concat vcard '("title") 1 "; "))
+ (org (vcard-format-sample-values-concat vcard '("org") 1 "; "))
+ (addr (vcard-format-sample-get-address vcard))
+ (tel (vcard-format-sample-get-telephone vcard))
+ (lines (delete nil (vcard-flatten (list name title org addr))))
+ (col-template (format "%%-%ds%%s"
+ (vcard-format-sample-offset lines tel)))
+ (l lines))
+ (while tel
+ (setcar l (format col-template (car l) (car tel)))
+ ;; If we stripped away too many nil slots from l, add empty strings
+ ;; back in so setcar above will work on next iteration.
+ (and (cdr tel)
+ (null (cdr l))
+ (setcdr l (cons "" nil)))
+ (setq l (cdr l))
+ (setq tel (cdr tel)))
+ lines))
+
+(defun vcard-format-sample-get-name (vcard)
+ (let ((name (car (car (vcard-values vcard '("fn") nil 1))))
+ (email (car (vcard-format-sample-values
+ vcard '((("email" "pref"))
+ (("email" "internet"))
+ (("email"))) 1))))
+ (cond ((and name email)
+ (format "%s <%s>" name email))
+ (email)
+ (name)
+ (""))))
+
+(defun vcard-format-sample-get-telephone (vcard)
+ (let ((fields '(("Work: "
+ (("tel" "work" "pref") . ("fax" "pager" "cell"))
+ (("tel" "work" "voice") . ("fax" "pager" "cell"))
+ (("tel" "work") . ("fax" "pager" "cell")))
+ ("Home: "
+ (("tel" "home" "pref") . ("fax" "pager" "cell"))
+ (("tel" "home" "voice") . ("fax" "pager" "cell"))
+ (("tel" "home") . ("fax" "pager" "cell"))
+ (("tel") . ("fax" "pager" "cell" "work")))
+ ("Cell: "
+ (("tel" "cell" "pref"))
+ (("tel" "cell")))
+ ("Fax: "
+ (("tel" "pref" "fax"))
+ (("tel" "work" "fax"))
+ (("tel" "home" "fax"))
+ (("tel" "fax")))))
+ (phones nil)
+ result)
+ (while fields
+ (setq result (vcard-format-sample-values vcard (cdr (car fields))))
+ (while result
+ (setq phones
+ (cons (concat (car (car fields)) (car (car result))) phones))
+ (setq result (cdr result)))
+ (setq fields (cdr fields)))
+ (nreverse phones)))
+
+(defun vcard-format-sample-get-address (vcard)
+ (let* ((addr (vcard-format-sample-values vcard '((("adr" "pref" "work"))
+ (("adr" "pref"))
+ (("adr" "work"))
+ (("adr"))) 1))
+ (street (delete "" (list (nth 0 addr) (nth 1 addr) (nth 2 addr))))
+ (city-list (delete "" (nthcdr 3 addr)))
+ (city (cond ((null (car city-list)) nil)
+ ((cdr city-list)
+ (format "%s, %s"
+ (car city-list)
+ (mapconcat 'identity (cdr city-list) " ")))
+ (t (car city-list)))))
+ (delete nil (if city
+ (append street (list city))
+ street))))
+
+(defun vcard-format-sample-values-concat (vcard have-props limit sep)
+ (let ((l (car (vcard-values vcard have-props nil limit))))
+ (and l (mapconcat 'identity (delete "" (vcard-copy-tree l)) sep))))
+
+(defun vcard-format-sample-values (vcard proplists &optional limit)
+ (let ((result (vcard-format-sample-ref vcard proplists limit)))
+ (if (equal limit 1)
+ (cdr result)
+ (mapcar 'cdr result))))
+
+(defun vcard-format-sample-ref (vcard proplists &optional limit)
+ (let ((result nil))
+ (while (and (null result) proplists)
+ (setq result (vcard-ref vcard
+ (car (car proplists))
+ (cdr (car proplists))
+ limit))
+ (setq proplists (cdr proplists)))
+ (if (equal limit 1)
+ (vcard-copy-tree (car result))
+ (vcard-copy-tree result))))
+
+(defun vcard-format-sample-offset (row1 row2 &optional maxwidth)
+ (or maxwidth (setq maxwidth (frame-width)))
+ (let ((max1 (vcard-format-sample-max-length row1))
+ (max2 (vcard-format-sample-max-length row2)))
+ (if (zerop max1)
+ 0
+ (+ max1 (min 5 (max 1 (- maxwidth (+ max1 max2))))))))
+
+(defun vcard-format-sample-max-length (strings)
+ (let ((maxlen 0))
+ (while strings
+ (setq maxlen (max maxlen (length (car strings))))
+ (setq strings (cdr strings)))
+ maxlen))
+
+(provide 'vcard)
+
+;;; vcard.el ends here.
diff --git a/lisp/vm-autoload.el b/lisp/vm-autoload.el
new file mode 100644
index 0000000..9ed5715
--- /dev/null
+++ b/lisp/vm-autoload.el
@@ -0,0 +1,6 @@
+;; only for compatibility with older BBDB and others
+
+(if (not (featurep 'xemacs))
+ (require 'vm-autoloads))
+
+(provide 'vm-autoload)
diff --git a/lisp/vm-avirtual.el b/lisp/vm-avirtual.el
new file mode 100644
index 0000000..1ef9b35
--- /dev/null
+++ b/lisp/vm-avirtual.el
@@ -0,0 +1,1233 @@
+;;; vm-avirtual.el --- additional functions for virtual folder selectors
+;;
+;; Copyright (C) 2000-2006 Robert Widhopf-Fenk
+;;
+;; Author: Robert Widhopf-Fenk
+;; Status: Tested with XEmacs 21.4.19 & VM 7.19
+;; Keywords: VM, virtual folders
+;; X-URL: http://www.robf.de/Hacking/elisp
+;; Version: $Id$
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+;;; Commentary:
+;;
+;; Virtual folders are one of the greatest features offered by VM, however
+;; sometimes I do not want do visit a virtual folder in order to do something
+;; on messages. E.g. I have a virtual folder selector for spam messages and I
+;; want VM to mark those messages matching the selector for deletion when
+;; retrieving new messages. This can be done with a trick described in
+;; the VM-FAQ, however this created two new buffers polluting my buffer space.
+;; So this package provides a function `vm-auto-delete-messages' for this
+;; purpose without drawbacks.
+;;
+;; Then after I realized I was maintaining three different variables for
+;; actually the same things. They were `vm-auto-folder-alist' for automatic
+;; selection of folders when saving messages, `vm-virtual-folder-alist' for my
+;; loved virtual folders and `vmpc-conditions' in order to solve the handling
+;; of my different email-addresses.
+;;
+;; This was kind of annoying, since virtual folder selector offer the best
+;; way of specifying conditions, but they only work on messages within
+;; folders and not on messages which are currently composed. So I decided to
+;; extent virtual folder selectors also to message composing, although not
+;; all of the selectors are meaning full for `mail-mode'.
+;;
+;; I wrote functions which can replace (*) the existing ones and others that
+;; add new (+) functionality. Finally I came up with the following ones:
+;; * vm-virtual-auto-archive-messages
+;; * vm-virtual-save-message
+;; * vmpc-check-virtual-selector
+;; + vm-virtual-auto-delete-messages
+;; + vm-virtual-auto-delete-message
+;; + vm-virtual-omit-message
+;; + vm-virtual-update-folders
+;; + vm-virtual-apply-function
+;; and the following variables
+;; vm-virtual-check-case-fold-search
+;; vm-virtual-auto-delete-message-selector
+;; vm-virtual-auto-folder-alist
+;; vm-virtual-message
+;; and a couple of new selectors
+;; mail-mode if in mail-mode evals its `argument' else `nil'
+;; vm-mode if in vm-mode evals its `arg' else `nil'
+;; eval evaluates its `arg' (write own complex selectors)
+;; older-than returns `t' is a message is older than `arg' days
+;;
+;; So by using theses new features I can maintain just one selector for
+;; e.g. my private email-address and get the right folder for saving messages,
+;; visiting the corresponding virtual folders, auto archiving, setting the FCC
+;; header and setting up `vmpc-conditions'. Do you know a mailer than can
+;; beet this?
+;;
+;; My default selector for spam messages:
+;;
+;; ("spam" ("received")
+;; (vm-mode
+;; (and (new) (undeleted)
+;; (or
+;; ;; kill all those where all authors/recipients
+;; ;; are unknown to my BBDB, i.e. messages from
+;; ;; strangers which are not directed to me!
+;; ;; (c't 12/2001)
+;; (not (in-bbdb))
+;; ;; authors that I do not know
+;; (and (not (in-bbdb authors))
+;; (or
+;; ;; with bad content
+;; (spam-word)
+;; ;; they hide ID codes by long subjects
+;; (subject " ")
+;; ;; HTML only messages
+;; (header "^Content-Type: text/html")
+;; ;; for 8bit encoding "chinese" spam
+;; (header "[¡-ÿ][¡-ÿ][¡-ÿ][¡-ÿ]")
+;; ;; for qp-encoding "chinese" spam
+;; (header "=[A-F][0-9A-F]=[A-F][0-9A-F]=[A-F][0-9A-F]=[A-F][0-9A-F]=[A-F][0-9A-F]")
+;; ))))))
+;;
+;;; Feel free to sent me any comments or bug reports.
+;;
+;;; Code:
+
+(require 'vm-virtual)
+
+(defgroup vm nil
+ "VM"
+ :group 'mail)
+
+(defgroup vm-avirtual nil
+ "VM additional virtual folder selectors and functions."
+ :group 'vm)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(eval-when-compile
+ (require 'cl))
+
+(eval-and-compile
+ (require 'advice)
+ (require 'regexp-opt)
+ (require 'vm-version)
+ (require 'vm-message)
+ (require 'vm-macro)
+ (require 'vm-vars)
+ (require 'time-date)
+
+ (let ((feature-list '(bbdb bbdb-autoloads bbdb-com)))
+ (while feature-list
+ (condition-case nil
+ (require (car feature-list))
+ (error
+ (if (load (format "%s\n" (car feature-list)) t)
+ (message "Library %s loaded!" (car feature-list))
+ (message "Could not load feature %S. Related functions may not work correctly!" (car feature-list))
+ (beep 1))))
+ (setq feature-list (cdr feature-list)))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defvar vm-mail-virtual-selector-function-alist
+ '(;; standard selectors
+ (and . vm-mail-vs-and)
+ (or . vm-mail-vs-or)
+ (not . vm-mail-vs-not)
+ (any . vm-mail-vs-any)
+ (header . vm-mail-vs-header)
+ (text . vm-mail-vs-text)
+ (header-or-text . vm-mail-vs-header-or-text)
+ (recipient . vm-mail-vs-recipient)
+ (author . vm-mail-vs-author)
+ (author-or-recipient . vm-mail-vs-author-or-recipient)
+ (subject . vm-mail-vs-subject)
+ (sortable-subject . vm-mail-vs-sortable-subject)
+ (more-chars-than . vm-mail-vs-more-chars-than)
+ (less-chars-than . vm-mail-vs-less-chars-than)
+ (more-lines-than . vm-mail-vs-more-lines-than)
+ (less-lines-than . vm-mail-vs-less-lines-than)
+ (replied . vm-mail-vs-replied)
+ (answered . vm-mail-vs-answered)
+ (forwarded . vm-mail-vs-forwarded)
+ (redistributed . vm-mail-vs-redistributed)
+ (unreplied . vm-mail-vs-unreplied)
+ (unanswered . vm-mail-vs-unanswered)
+ (unforwarded . vm-mail-vs-unforwarded)
+ (unredistributed . vm-mail-vs-unredistributed)
+
+ ;; unknown selectors which return always nil
+ (new . vm-mail-vs-unknown)
+ (unread . vm-mail-vs-unknown)
+ (read . vm-mail-vs-unknown)
+ (unseen . vm-mail-vs-unknown)
+ (recent . vm-mail-vs-unknown)
+ (deleted . vm-mail-vs-unknown)
+ (filed . vm-mail-vs-unknown)
+ (written . vm-mail-vs-unknown)
+ (edited . vm-mail-vs-unknown)
+ (marked . vm-mail-vs-unknown)
+ (undeleted . vm-mail-vs-unknown)
+ (unfiled . vm-mail-vs-unknown)
+ (unwritten . vm-mail-vs-unknown)
+ (unedited . vm-mail-vs-unknown)
+ (unmarked . vm-mail-vs-unknown)
+ (virtual-folder-member . vm-mail-vs-unknown)
+ (label . vm-mail-vs-unknown)
+ (sent-before . vm-mail-vs-unknown)
+ (sent-after . vm-mail-vs-unknown)
+
+
+ ;; new selectors
+ (mail-mode . vm-mail-vs-mail-mode)
+ (vm-mode . vm-vs-vm-mode)
+ (eval . vm-mail-vs-eval)
+ (older-than . vm-mail-vs-older-than)
+ (in-bbdb . vm-mail-vs-in-bbdb)
+ ))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defun vm-avirtual-add-selectors (selectors)
+ (let ((alist 'vm-virtual-selector-function-alist)
+ (sup-alist 'vm-supported-interactive-virtual-selectors)
+ sel)
+
+ (while selectors
+ (setq sel (car selectors))
+ (add-to-list alist (cons sel (intern (format "vm-vs-%s" sel))))
+ (add-to-list sup-alist (list (format "%s" sel)))
+ (setq selectors (cdr selectors)))))
+
+(vm-avirtual-add-selectors
+ '(mail-mode
+ vm-mode
+ eval
+ older-than
+ outgoing
+ selected
+ in-bbdb
+ uninteresting-senders
+ spam-word
+ folder-name
+ attachment
+ spam-level
+ spam-score))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; we redefine the basic selectors for some extra features ...
+
+(defcustom vm-virtual-check-case-fold-search t
+ "Wheater to use case-fold-search or not when applying virtual selectors.
+I was really missing this!"
+ :type 'boolean
+ :group 'vm-avirtual)
+
+(defcustom vm-virtual-check-diagnostics nil
+ "When set to nil we will display messages on matching selectors."
+ :type 'boolean
+ :group 'vm-avirtual)
+
+(defvar vm-virtual-check-level 0)
+
+(defun vm-vs-or (m &rest selectors)
+ (let ((case-fold-search vm-virtual-check-case-fold-search)
+ (vm-virtual-check-level (+ 2 vm-virtual-check-level))
+ (result nil) selector arglist function)
+ (while selectors
+ (setq selector (car (car selectors))
+ function (cdr (assq selector vm-virtual-selector-function-alist)))
+ (setq arglist (cdr (car selectors))
+ arglist (cdr (car selectors))
+ result (apply function m arglist)
+ selectors (if result nil (cdr selectors)))
+ (if vm-virtual-check-diagnostics
+ (princ (format "%sor: %s (%S%s)\n"
+ (make-string vm-virtual-check-level ? )
+ (if result t nil) selector
+ (if arglist (format " %S" arglist) "")))))
+ result))
+
+(defun vm-vs-and (m &rest selectors)
+ (let ((vm-virtual-check-level (+ 2 vm-virtual-check-level))
+ (result t) selector arglist function)
+ (while selectors
+ (setq selector (car (car selectors))
+ function (cdr (assq selector vm-virtual-selector-function-alist)))
+ (if (null function)
+ (error "Invalid selector"))
+ (setq arglist (cdr (car selectors))
+ result (apply function m arglist)
+ selectors (if (null result) nil (cdr selectors)))
+ (if vm-virtual-check-diagnostics
+ (princ (format "%sand: %s (%S%s)\n"
+ (make-string vm-virtual-check-level ? )
+ (if result t nil) selector
+ (if arglist (format " %S" arglist) "")))))
+ result))
+
+(defun vm-vs-not (m arg)
+ (let ((vm-virtual-check-level (+ 2 vm-virtual-check-level))
+ (selector (car arg))
+ (arglist (cdr arg))
+ result)
+ (setq result
+ (apply (cdr (assq selector vm-virtual-selector-function-alist))
+ m arglist))
+ (if vm-virtual-check-diagnostics
+ (princ (format "%snot: %s for (%S%s)\n"
+ (make-string vm-virtual-check-level ? )
+ (if result t nil) selector
+ (if arglist (format " %S" arglist) ""))))
+ (not result)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-avirtual-check-for-missing-selectors (&optional arg)
+ "Check if there are selectors missing for either vm-mode or mail-mode."
+ (interactive "P")
+ (let ((a (if arg vm-mail-virtual-selector-function-alist
+ vm-virtual-selector-function-alist))
+ (b (mapcar (lambda (s) (car s))
+ (if arg vm-virtual-selector-function-alist
+ vm-mail-virtual-selector-function-alist)))
+ l)
+ (while a
+ (if (not (memq (caar a) b))
+ (setq l (concat (format "%s" (caar a)) ", " l)))
+ (setq a (cdr a)))
+ (if l
+ (message "Selectors %s are missing!" l)
+ (message "No selectors are missing!"))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; new virtual folder selectors
+(defvar vm-virtual-message nil
+ "Set to the VM message vector when doing a `vm-vs-eval'.")
+
+(defcustom vm-vs-attachment-regexp "^Content-Disposition: attachment"
+ "Regexp used to detect attachments in an message."
+ :group 'vm-avirtual
+ :type 'regexp)
+
+(defun vm-vs-attachment (m)
+ (vm-vs-text m vm-vs-attachment-regexp))
+
+(defun vm-vs-folder-name (m regexp)
+ (setq m (vm-real-message-of m))
+ (string-match regexp (buffer-name (marker-buffer (vm-start-of m)))))
+
+(defun vm-vs-eval (&rest selectors)
+ (let ((vm-virtual-message (car selectors)))
+ (eval (cadr selectors))))
+
+(defun vm-vs-vm-mode (&rest selectors)
+ (if (not (equal major-mode 'mail-mode))
+ (apply 'vm-vs-or selectors)
+ nil))
+
+(defun vm-vs-older-than (m arg)
+ (let ((date (vm-get-header-contents m "Date:")))
+ (if date
+ (> (days-between (current-time-string) date) arg))))
+
+(defun vm-vs-outgoing (m)
+ (and vm-summary-uninteresting-senders
+ (or (string-match vm-summary-uninteresting-senders (vm-su-full-name m))
+ (string-match vm-summary-uninteresting-senders (vm-su-from m)))))
+
+(defun vm-vs-selected (m)
+ (save-excursion
+ (vm-select-folder-buffer)
+ (eq m (car vm-message-pointer))))
+
+(defun vm-vs-uninteresting-senders (m)
+ (string-match vm-summary-uninteresting-senders
+ (vm-get-header-contents m "From:")))
+
+(defun vm-vs-in-bbdb (m &optional address-class only-first)
+ "check if one of the email addresses from the mail is known."
+ (let (bbdb-user-mail-names)
+ (let* ((bbdb-get-only-first-address-p only-first)
+ (bbdb-user-mail-names nil)
+ (bbdb-get-addresses-headers
+ (if address-class
+ (or (list (assoc address-class bbdb-get-addresses-headers))
+ (error "no such address class"))
+ bbdb-get-addresses-headers))
+ (addresses (bbdb-get-addresses nil nil
+ 'bbdb/vm-get-header-content
+ (vm-real-message-of m)))
+ (done nil)
+ addr)
+ (while (and (not done) addresses)
+ (setq addr (caddar addresses)
+ addresses (cdr addresses))
+ (let ((name (car addr))
+ (net (cadr addr)))
+ (setq done (or (bbdb-search-simple nil net)
+ (bbdb-search-simple name nil)))))
+ done)))
+
+(defun vm-mail-vs-in-bbdb (&optional address-class only-first)
+ "check if one of the email addresses from the mail is known."
+ (let (bbdb-user-mail-names)
+ (let* ((bbdb-get-only-first-address-p only-first)
+ (bbdb-user-mail-names nil)
+ (bbdb-get-addresses-headers
+ (if address-class
+ (or (list (assoc address-class bbdb-get-addresses-headers))
+ (error "no such address class"))
+ bbdb-get-addresses-headers))
+ (addresses (bbdb-get-addresses nil nil
+ 'vm-mail-mode-get-header-contents))
+ (done nil)
+ addr)
+ (while (and (not done) addresses)
+ (setq addr (caddar addresses)
+ addresses (cdr addresses))
+ (let ((name (car addr))
+ (net (cadr addr)))
+ (setq done (or (bbdb-search-simple nil net)
+ (bbdb-search-simple name nil)))))
+ done)))
+
+(defvar vm-spam-words nil
+ "A list of words often contained in spam messages.")
+
+(defvar vm-spam-words-regexp nil
+ "A regexp matching those words in `vm-spam-words'.")
+
+(defcustom vm-spam-words-file
+ (expand-file-name "~/.spam-words")
+ "A file storing a list of words contained in spam messages."
+ :group 'vm-avirtual
+ :type 'file)
+
+(defun vm-vs-spam-word (m &optional selector)
+ (if (and (not vm-spam-words)
+ vm-spam-words-file
+ (file-readable-p vm-spam-words-file)
+ (not (get-file-buffer vm-spam-words-file)))
+ (save-excursion
+ (set-buffer (find-file-noselect vm-spam-words-file))
+ (goto-char (point-min))
+ (while (re-search-forward "^\\s-*\\([^#;].*\\)\\s-*$" (point-max) t)
+ (setq vm-spam-words (cons (match-string 1) vm-spam-words)))
+ (setq vm-spam-words-regexp (regexp-opt vm-spam-words))))
+ (if (and m vm-spam-words-regexp)
+ (let ((case-fold-search t))
+ (cond ((eq selector 'header)
+ (vm-vs-header m vm-spam-words-regexp))
+ ((eq selector 'header-or-text)
+ (vm-vs-header-or-text m vm-spam-words-regexp))
+ (t
+ (vm-vs-text m vm-spam-words-regexp))))))
+
+;;;###autoload
+(defun vm-add-spam-word (word)
+ "Add a new word to the list of spam words."
+ (interactive (list (if (region-active-p)
+ (buffer-substring (point) (mark))
+ (read-string "Spam word: "))))
+ (save-excursion
+ (when (not (member word vm-spam-words))
+ (if (get-file-buffer vm-spam-words-file)
+ (set-buffer (get-file-buffer vm-spam-words-file))
+ (set-buffer (find-file-noselect vm-spam-words-file)))
+ (goto-char (point-max))
+ ;; if the last character is no newline, then append one!
+ (if (and (not (= (point) (point-min)))
+ (save-excursion
+ (backward-char 1)
+ (not (looking-at "\n"))))
+ (insert "\n"))
+ (insert word)
+ (save-buffer)
+ (setq vm-spam-words (cons word vm-spam-words))
+ (setq vm-spam-words-regexp (regexp-opt vm-spam-words)))))
+
+;;;###autoload
+(defun vm-spam-words-rebuild ()
+ "Discharge the internal cached data about spam words."
+ (interactive)
+ (setq vm-spam-words nil
+ vm-spam-words-regexp nil)
+ (if (get-file-buffer vm-spam-words-file)
+ (kill-buffer (get-file-buffer vm-spam-words-file)))
+ (vm-vs-spam-word nil)
+ (message "%d spam words are installed!" (length vm-spam-words)))
+
+(defcustom vm-vs-spam-score-headers
+ '(("X-Spam-Score:" "[-+]?[0-9]*\\.?[0-9]+" string-to-number)
+ ("X-Spam-Status:" "[-+]?[0-9]*\\.?[0-9]+" string-to-number)
+ ("X-Spam-Level:" "\\*+" length))
+ "A list of headers to look for spam scores."
+ :group 'vm-avirtual
+ :type '(repeat (list (string :tag "Header regexp")
+ (regexp :tag "Regexp matching the score")
+ (function :tag "Function converting the score to a number"))))
+
+(defun vm-vs-spam-score (m min &optional max)
+ "True when the spam score is >= MIN and optionally <= MAX.
+The headers that will be checked are those listed in `vm-vs-spam-score-headers'."
+ (let ((spam-headers vm-vs-spam-score-headers)
+ it-is-spam)
+ (while spam-headers
+ (let* ((spam-selector (car spam-headers))
+ (score (vm-get-header-contents m (car spam-selector))))
+ (when (and score (string-match (nth 1 spam-selector) score))
+ (setq score (funcall (nth 2 spam-selector) (match-string 0 score)))
+ (if (and (<= min score) (if max (<= score max) t))
+ (setq it-is-spam t spam-headers nil))))
+ (setq spam-headers (cdr spam-headers)))
+ it-is-spam))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; new mail virtual folder selectors
+
+(defun vm-mail-vs-eval (&rest selectors)
+ (eval (cadr selectors)))
+
+(defun vm-mail-vs-mail-mode (&rest selectors)
+ (if (equal major-mode 'mail-mode)
+ (apply 'vm-mail-vs-or selectors)
+ nil))
+
+(defalias 'vm-vs-mail-mode 'vm-mail-vs-mail-mode)
+
+(defun vm-mail-vs-or (&rest selectors)
+ (let ((result nil) selector arglist
+ (case-fold-search vm-virtual-check-case-fold-search))
+ (while selectors
+ (setq selector (car (car selectors))
+ arglist (cdr (car selectors))
+ result (apply (cdr (assq selector
+ vm-mail-virtual-selector-function-alist))
+ arglist)
+ selectors (if result nil (cdr selectors)))
+ (if vm-virtual-check-diagnostics
+ (princ (format "%sor: %s (%S%s)\n"
+ (make-string vm-virtual-check-level ? )
+ (if result t nil) selector
+ (if arglist (format " %S" arglist) "")))))
+ result))
+
+(defun vm-mail-vs-and (&rest selectors)
+ (let ((result t) selector arglist)
+ (while selectors
+ (setq selector (car (car selectors))
+ arglist (cdr (car selectors))
+ result (apply (cdr (assq selector
+ vm-mail-virtual-selector-function-alist))
+ arglist)
+ selectors (if (null result) nil (cdr selectors)))
+ (if vm-virtual-check-diagnostics
+ (princ (format "%sand: %s (%S%s)\n"
+ (make-string vm-virtual-check-level ? )
+ (if result t nil) selector
+ (if arglist (format " %S" arglist) "")))))
+ result))
+
+(defun vm-mail-vs-not (arg)
+ (let ((selector (car arg))
+ (arglist (cdr arg))
+ result)
+ (setq result (apply (cdr (assq selector vm-mail-virtual-selector-function-alist))
+ arglist))
+ (if vm-virtual-check-diagnostics
+ (princ (format "%snot: %s for (%S%s)\n"
+ (make-string vm-virtual-check-level ? )
+ (if result t nil) selector
+ (if arglist (format " %S" arglist) ""))))
+ (not result)))
+
+;; return just nil for those selectors not known for mail-mode
+(defun vm-mail-vs-unknown (&optional arg)
+ nil)
+
+(defun vm-mail-vs-any ()
+ t)
+
+(defun vm-mail-vs-author (arg)
+ (let ((val (vm-mail-mode-get-header-contents "Sender\\|From:")))
+ (and val (string-match arg val))))
+
+(defun vm-mail-vs-recipient (arg)
+ (let (val)
+ (or
+ (and (setq val (vm-mail-mode-get-header-contents "\\(Resent-\\)?To:"))
+ (string-match arg val))
+ (and (setq val (vm-mail-mode-get-header-contents "\\(Resent-\\)?CC:"))
+ (string-match arg val))
+ (and (setq val (vm-mail-mode-get-header-contents "\\(Resent-\\)?BCC:"))
+ (string-match arg val)))))
+
+(defun vm-mail-vs-author-or-recipient (arg)
+ (or (vm-mail-vs-author arg)
+ (vm-mail-vs-recipient arg)))
+
+(defun vm-mail-vs-subject (arg)
+ (let ((val (vm-mail-mode-get-header-contents "Subject:")))
+ (and val (string-match arg val))))
+
+(defun vm-mail-vs-sortable-subject (arg)
+ (let ((case-fold-search t)
+ (subject (vm-mail-mode-get-header-contents "Subject:")))
+ (when subject
+ (if (and vm-subject-ignored-prefix
+ (string-match vm-subject-ignored-prefix subject)
+ (zerop (match-beginning 0)))
+ (setq subject (substring subject (match-end 0))))
+ (if (and vm-subject-ignored-suffix
+ (string-match vm-subject-ignored-suffix subject)
+ (= (match-end 0) (length subject)))
+ (setq subject (substring subject 0 (match-beginning 0))))
+ (setq subject (vm-with-string-as-temp-buffer
+ subject
+ (function vm-collapse-whitespace)))
+ (if (and vm-subject-significant-chars
+ (natnump vm-subject-significant-chars)
+ (< vm-subject-significant-chars (length subject)))
+ (setq subject
+ (substring subject 0 vm-subject-significant-chars)))
+ (string-match arg subject))))
+
+(defun vm-mail-vs-header (arg)
+ (save-excursion
+ (let ((start (point-min)) end)
+ (goto-char start)
+ (search-forward (concat "\n" mail-header-separator "\n"))
+ (setq end (match-beginning 0))
+ (goto-char start)
+ (re-search-forward arg end t))))
+
+(defun vm-mail-vs-text (arg)
+ (save-excursion
+ (goto-char (point-min))
+ (search-forward (concat "\n" mail-header-separator "\n"))
+ (re-search-forward arg (point-max) t)))
+
+(defun vm-mail-vs-header-or-text (arg)
+ (save-excursion
+ (goto-char (point-min))
+ (re-search-forward arg (point-max) t)))
+
+(defun vm-mail-vs-more-chars-than (arg)
+ (> (- (point-max) (point-min) (length mail-header-separator) 2) arg))
+
+(defun vm-mail-vs-less-chars-than (arg)
+ (< (- (point-max) (point-min) (length mail-header-separator) 2) arg))
+
+(defun vm-mail-vs-more-lines-than (arg)
+ (> (- (count-lines (point-min) (point-max)) 1) arg))
+
+(defun vm-mail-vs-less-lines-than (arg)
+ (< (- (count-lines (point-min) (point-max)) 1) arg))
+
+(defun vm-mail-vs-replied ()
+ vm-reply-list)
+(fset 'vm-mail-vs-answered 'vm-mail-vs-replied)
+
+(defun vm-mail-vs-forwarded ()
+ vm-forward-list)
+
+(defun vm-mail-vs-redistributed ()
+ (vm-mail-mode-get-header-contents "Resent-[^:]+:"))
+
+(defun vm-mail-vs-unreplied ()
+ (not (vm-mail-vs-forwarded )))
+(fset 'vm-mail-vs-unanswered 'vm-mail-vs-unreplied)
+
+(defun vm-mail-vs-unforwarded ()
+ (not (vm-mail-vs-forwarded )))
+
+(defun vm-mail-vs-unredistributed ()
+ (not (vm-mail-vs-redistributed )))
+
+(defun vm-mail-vs-older-than (arg)
+ (let* ((date (vm-mail-mode-get-header-contents "Date:"))
+ (days (and date (days-between (current-time-string) date))))
+ (and days (> days arg))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defun vm-virtual-get-selector-member (folder-name folder-list)
+ (let (match )
+ (while folder-list
+ (if (string-match (car folder-list) folder-name)
+ (setq folder-list nil
+ match t))
+ (setq folder-list (cdr folder-list)))
+ match))
+
+;;;###autoload
+(defun vm-virtual-get-selector (vfolder &optional valid-folder-list)
+ "Return the selector of virtual folder VFOLDER for VALID-FOLDER-LIST."
+ (interactive
+ (list (vm-read-string "Virtual folder: " vm-virtual-folder-alist)
+ (if (equal major-mode 'mail-mode) nil
+ (list (save-excursion (vm-select-folder-buffer)
+ (buffer-name))))))
+
+ (let ((sels (assoc vfolder vm-virtual-folder-alist))
+ selector folder-name)
+ (setq sels (and sels (cadr sels)))
+
+ (when sels
+ (if (not valid-folder-list)
+ (setq selector (append (cdr sels) selector))
+ (setq folder-name valid-folder-list)
+ (while folder-name
+ (if (vm-virtual-get-selector-member (car folder-name) (car sels))
+ (setq selector (append (cdr sels) selector)))
+ (setq folder-name (cdr folder-name)))))
+
+ selector))
+
+;;;###autoload
+(defun vm-virtual-check-selector (selector &optional msg virtual)
+ "Return t if SELECTOR matches the message MSG.
+If VIRTUAL is true we check the current message and not the real one."
+ (if msg
+ (if virtual
+ (apply 'vm-vs-or msg selector)
+ (save-excursion
+ (set-buffer (vm-buffer-of (vm-real-message-of msg)))
+ (apply 'vm-vs-or msg selector)))
+ (if (eq major-mode 'mail-mode)
+ (apply 'vm-mail-vs-or selector))))
+
+;;;###autoload
+(defun vm-virtual-check-selector-interactive (selector &optional diagnostics)
+ "Return t if SELECTOR matches the current message.
+Called with an prefix argument we display more diagnostics about the selector
+evaluation. Information is displayed in the order of evaluation and indented
+according to the level of recursion. The displayed information is has the
+format:
+ FATHER-SELECTOR: RESULT CHILD-SELECTOR"
+ (interactive
+ (list (vm-read-string "Virtual folder: " vm-virtual-folder-alist)
+ current-prefix-arg))
+ (save-excursion
+ (vm-select-folder-buffer)
+ (vm-error-if-folder-empty)
+ (vm-follow-summary-cursor)
+ (let ((msg (car vm-message-pointer))
+ (virtual (eq major-mode 'vm-virtual-mode))
+ (vm-virtual-check-diagnostics (or vm-virtual-check-diagnostics
+ diagnostics)))
+ (with-output-to-temp-buffer "*VM virtual-folder-check*"
+ (save-excursion
+ (set-buffer "*VM virtual-folder-check*")
+ (toggle-truncate-lines t))
+ (princ (format "Checking %S on <%s> from %s\n\n" selector
+ (vm-su-subject msg) (vm-su-from msg)))
+ (princ (format "\nThe virtual folder selector `%s' is %s!\n"
+ selector
+ (if (vm-virtual-check-selector
+ (vm-virtual-get-selector selector)
+ msg virtual)
+ "true"
+ "false")))))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defvar vmpc-current-state nil)
+;;;###autoload
+(defun vmpc-virtual-check-selector (selector &optional folder-list)
+ "Checks SELECTOR based on the state of vmpc on the original or current."
+ (setq selector (vm-virtual-get-selector selector folder-list))
+ (if (null selector)
+ (error "no virtual folder %s!!" selector))
+ (cond ((or (eq vmpc-current-state 'reply)
+ (eq vmpc-current-state 'forward)
+ (eq vmpc-current-state 'resend))
+ (vm-virtual-check-selector selector (car vm-message-pointer)))
+ ((eq vmpc-current-state 'automorph)
+ (vm-virtual-check-selector selector))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-virtual-apply-function (count &optional selector function)
+ "Apply a FUNCTION to the next COUNT messages matching SELECTOR."
+ (interactive "p")
+ (when (interactive-p)
+ (vm-follow-summary-cursor)
+ (setq selector (vm-virtual-get-selector
+ (vm-read-string "Virtual folder: "
+ vm-virtual-folder-alist))
+ function (key-or-menu-binding (read-key-sequence "VM command: "))))
+
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-error-if-folder-empty)
+
+ (let ((mlist (vm-select-marked-or-prefixed-messages (or count 1)))
+ (count 0))
+
+ (while mlist
+ (if (vm-virtual-check-selector selector (car mlist))
+ (progn (funcall function (car mlist))
+ (vm-increment count)))
+ (setq mlist (cdr mlist)))
+
+ count))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-virtual-update-folders (&optional count message-list)
+ "Updates all virtual folders.
+E.g. when creating a folder of all marked messages one can call this
+function in order to add newly marked messages to the virtual folder
+without recreating it."
+ (interactive "p")
+ (vm-select-folder-buffer)
+
+ (let ((new-messages (or message-list
+ (vm-select-marked-or-prefixed-messages count)))
+ b-list)
+ (setq new-messages (copy-sequence new-messages))
+ (if (and new-messages vm-virtual-buffers)
+ (save-excursion
+ (setq b-list vm-virtual-buffers)
+ (while b-list
+ ;; buffer might be dead
+ (if (buffer-name (car b-list))
+ (let (tail-cons)
+ (set-buffer (car b-list))
+ (setq tail-cons (vm-last vm-message-list))
+ (vm-build-virtual-message-list new-messages)
+ (if (or (null tail-cons) (cdr tail-cons))
+ (progn
+ (setq vm-ml-sort-keys nil)
+ (if vm-thread-obarray
+ (vm-build-threads (cdr tail-cons)))
+ (vm-set-summary-redo-start-point
+ (or (cdr tail-cons) vm-message-list))
+ (vm-set-numbering-redo-start-point
+ (or (cdr tail-cons) vm-message-list))
+ (if (null vm-message-pointer)
+ (progn (setq vm-message-pointer vm-message-list
+ vm-need-summary-pointer-update t)
+ (if vm-message-pointer
+ (vm-preview-current-message))))
+ (setq vm-messages-needing-summary-update new-messages
+ vm-need-summary-pointer-update t)
+ (vm-update-summary-and-mode-line)
+ (if vm-summary-show-threads
+ (vm-sort-messages "thread"))))))
+ (setq b-list (cdr b-list)))))
+ new-messages))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-virtual-omit-message (&optional count message-list)
+ "Omits a meassage from a virtual folder.
+IMHO allowing it for real folders makes no sense. One rather should create a
+virtual folder of all messages."
+ (interactive "p")
+ (vm-select-folder-buffer)
+
+ (if (not (eq major-mode 'vm-virtual-mode))
+ (error "This is no virtual folder."))
+
+ (let ((old-messages (or message-list
+ (vm-select-marked-or-prefixed-messages count)))
+ prev curr
+ (mp vm-message-list))
+
+ (while mp
+ (if (not (member (car mp) old-messages))
+ nil
+ (setq prev (vm-reverse-link-of (car mp))
+ curr (or (cdr prev) vm-message-list))
+ (vm-set-numbering-redo-start-point (or prev t))
+ (vm-set-summary-redo-start-point (or prev t))
+ (if (eq vm-message-pointer curr)
+ (setq vm-system-state nil
+ vm-message-pointer (or prev (cdr curr))))
+ (if (eq vm-last-message-pointer curr)
+ (setq vm-last-message-pointer nil))
+ (if (null prev)
+ (progn
+ (setq vm-message-list (cdr vm-message-list))
+ (and (cdr curr)
+ (vm-set-reverse-link-of (car (cdr curr)) nil)))
+ (setcdr prev (cdr curr))
+ (and (cdr curr)
+ (vm-set-reverse-link-of (car (cdr curr)) prev))))
+ (setq mp (cdr mp)))
+
+ (vm-update-summary-and-mode-line)
+ (if vm-summary-show-threads
+ (vm-sort-messages "thread"))
+ old-messages))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defcustom vm-virtual-auto-delete-message-selector "spam"
+ "*Name of virtual folder selector used for automatically deleting a message.
+Actually they are only marked for deletion."
+ :group 'vm-avirtual
+ :type 'string)
+
+(defcustom vm-virtual-auto-delete-message-folder nil
+ "*When set to a folder name we save affected messages there."
+ :group 'vm-avirtual
+ :type '(choice (file :tag "VM folder" "spam")
+ (const :tag "Disabled" nil)))
+
+(defcustom vm-virtual-auto-delete-message-expunge nil
+ "*When true we expunge the affected right after marking and saving them."
+ :group 'vm-avirtual
+ :type 'boolean)
+
+;;;###autoload
+(defun vm-virtual-auto-delete-message (&optional count selector)
+ "*Mark messages matching a virtual folder selector for deletion.
+The virtual folder selector can be configured by the variable
+`vm-virtual-auto-delete-message-selector'.
+
+This function does not visit the virtual folder, but checks only the current
+message, therefore it is much faster and not so disturbing like the method
+described in the VM-FAQ.
+
+In order to automatically mark spam for deletion use the function
+`vm-virtual-auto-delete-messages'. See its documentation on how to hook it
+into VM!"
+ (interactive "p")
+
+ (setq selector (or selector
+ (vm-virtual-get-selector
+ vm-virtual-auto-delete-message-selector)))
+
+ (let (spammlist)
+ (setq count (vm-virtual-apply-function
+ count
+ selector
+ (function (lambda (msg)
+ (setq spammlist (cons msg spammlist))
+ (vm-set-labels
+ msg
+ (list
+ vm-virtual-auto-delete-message-selector))
+ (vm-set-deleted-flag msg t)
+ (vm-mark-for-summary-update msg t)))))
+
+ (when spammlist
+ (setq spammlist (reverse spammlist))
+ ;; save them
+ (if vm-virtual-auto-delete-message-folder
+ (let ((vm-arrived-messages-hook nil)
+ (vm-arrived-message-hook nil)
+ (mlist spammlist))
+ (while mlist
+ (let ((vm-message-pointer mlist))
+ (vm-save-message vm-virtual-auto-delete-message-folder))
+ (setq mlist (cdr mlist)))))
+ ;; expunge them
+ (if vm-virtual-auto-delete-message-expunge
+ (vm-expunge-folder t t spammlist)))
+
+ (vm-display nil nil '(vm-delete-message vm-delete-message-backward)
+ (list this-command))
+
+ (vm-update-summary-and-mode-line)
+
+ (message "%s message%s %s!"
+ (if (> count 0) count "No")
+ (if (= 1 count) "" "s")
+ (concat
+ (if vm-virtual-auto-delete-message-folder
+ (format "saved to %s and "
+ vm-virtual-auto-delete-message-folder)
+ "")
+ (if vm-virtual-auto-delete-message-expunge
+ "expunged right away"
+ "marked for deletion")))))
+
+;;;###autoload
+(defun vm-virtual-auto-delete-messages ()
+ "*Mark all messages from the current upto the last for (spam-)deletion.
+Add this to `vm-arrived-messages-hook'!
+
+See the function `vm-virtual-auto-delete-message' for details.
+
+ (add-hook 'vm-arrived-messages-hook 'vm-virtual-auto-delete-messages)
+"
+ (interactive)
+
+ (if (interactive-p)
+ (vm-follow-summary-cursor))
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-virtual-auto-delete-message (length vm-message-pointer)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defcustom vm-virtual-auto-folder-alist nil
+ "*Non-nil value should be an alist that VM will use to choose a default
+folder name when messages are saved. The alist should be of the form
+ ((VIRTUAL-FOLDER-NAME . FOLDER-NAME)
+ ...)
+where VIRTUAL-FOLDER-NAME is a string, and FOLDER-NAME
+is a string or an s-expression that evaluates to a string.
+
+This allows you to extend `vm-virtual-auto-select-folder' to generate
+a folder name. Your function may use `folder' to get the currently choosen
+folder name and `mp' (a vm-pessage-pointer) to access the message.
+
+Example:
+ (setq vm-virtual-auto-folder-alist
+ '((\"spam\" (concat folder \"-\"
+ (format-time-string \"%y%m\" (current-time))))))
+
+This will return \"spam-0008\" as a folder name for messages matching the
+virtual folder selector of the virtual folder \"spam\" during August in year
+2000."
+ :type 'sexp
+ :group 'vm-avirtual)
+
+;;;###autoload
+(defun vm-virtual-auto-select-folder (&optional m avfolder-alist
+ valid-folder-list
+ not-to-history)
+ "Return the first matching virtual folder.
+This can be seen as an more powerful replacement of `vm-auto-select-folder'
+and it is used by `vm-virtual-save-message'. It might also be applied to
+messages which are composed in order to find the right FCC."
+ (when (not m)
+ (setq m (car vm-message-pointer)
+ avfolder-alist vm-virtual-folder-alist
+ valid-folder-list (cond ((eq major-mode 'mail-mode)
+ nil)
+ ((eq major-mode 'vm-mode)
+ (save-excursion
+ (vm-select-folder-buffer)
+ (list (buffer-name))))
+ ((eq major-mode 'vm-virtual-mode)
+ (list (buffer-name
+ (vm-buffer-of
+ (vm-real-message-of m))))))))
+
+ (let ((vfolders avfolder-alist)
+ selector folder-list)
+
+ (when t;(and m (aref m 0) (aref (aref m 0) 0)
+ ; (marker-buffer (aref (aref m 0) 0)))
+ (while vfolders
+ (setq selector (vm-virtual-get-selector (caar vfolders)
+ valid-folder-list))
+ (when (and selector (vm-virtual-check-selector selector m))
+ (setq folder-list (append (list (caar vfolders)) folder-list))
+ (if not-to-history
+ (setq vfolders nil)))
+ (setq vfolders (cdr vfolders)))
+
+ (setq folder-list (reverse folder-list))
+
+ (setq folder-list
+ (mapcar (lambda (f)
+ (let ((rf (assoc f vm-virtual-auto-folder-alist)))
+ (if rf
+ (eval (cadr rf))
+ f)))
+ folder-list))
+
+ (when (and (not not-to-history) folder-list)
+ (let ((fl (cdr folder-list)) f)
+ (while fl
+ (setq f (abbreviate-file-name
+ (expand-file-name (car fl) vm-folder-directory) t)
+ vm-folder-history (delete f vm-folder-history)
+ vm-folder-history (nconc (list f) vm-folder-history)
+ fl (cdr fl)))))
+ (car folder-list))))
+
+;;;###autoload
+(defvar vm-sort-compare-auto-folder-cache nil)
+(add-to-list 'vm-supported-sort-keys "auto-folder")
+
+(defun vm-sort-compare-auto-folder (m1 m2)
+ (let* ((folder-list (list (buffer-name)))
+ s1 s2)
+ (if (setq s1 (assoc m1 vm-sort-compare-auto-folder-cache))
+ (setq s1 (cdr s1))
+ (setq s1 (vm-virtual-auto-select-folder
+ m1 vm-virtual-folder-alist folder-list))
+ (add-to-list 'vm-sort-compare-auto-folder-cache (cons m1 s1)))
+ (if (setq s2 (assoc m2 vm-sort-compare-auto-folder-cache))
+ (setq s2 (cdr s2))
+ (setq s2 (vm-virtual-auto-select-folder
+ m2 vm-virtual-folder-alist folder-list))
+ (add-to-list 'vm-sort-compare-auto-folder-cache (cons m2 s2)))
+ (cond ((or (and (null s1) s2)
+ (and s1 s2 (string-lessp s1 s2)))
+ t)
+ ((or (and (null s1) (null s2))
+ (and s1 s2 (string-equal s1 s2)))
+ '=)
+ (t nil))))
+
+;;;###autoload
+(defun vm-sort-insert-auto-folder-names ()
+ (interactive)
+ (if (interactive-p)
+ (vm-sort-messages "auto-folder"))
+ (save-excursion
+ (vm-select-folder-buffer)
+ ;; remove old descriptions
+ (save-excursion
+ (set-buffer vm-summary-buffer)
+ (goto-char (point-min))
+ (let ((buffer-read-only nil)
+ (s (point-min))
+ (p (point-min)))
+ (while (setq p (next-single-property-change p 'vm-auto-folder))
+ (if (get-text-property (1+ p) 'vm-auto-folder)
+ (setq s p)
+ (delete-region s p))
+ (setq p (1+ p)))))
+ ;; add new descriptions
+ (let ((ml vm-message-list)
+ (oldf "")
+ m f)
+ (while ml
+ (setq m (car ml)
+ f (cdr (assoc m vm-sort-compare-auto-folder-cache)))
+ (when (not (equal oldf f))
+ (setq m (vm-su-start-of m))
+ (save-excursion
+ (set-buffer (marker-buffer m))
+ (let ((buffer-read-only nil))
+ (goto-char m)
+ (insert (format "%s\n" (or f "no default folder")))
+ (put-text-property m (point) 'vm-auto-folder t)
+ (put-text-property m (point) 'face 'blue)
+ ;; fix messages summary mark
+ (set-marker m (point))))
+ (setq oldf f))
+ (setq ml (cdr ml))))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-virtual-save-message (&optional folder count)
+ "Save the current message to a mail folder.
+Like `vm-save-message' but the default folder it guessed by
+`vm-virtual-auto-select-folder'."
+ (interactive
+ (list
+ ;; protect value of last-command
+ (let ((last-command last-command)
+ (this-command this-command))
+ (vm-follow-summary-cursor)
+ (let ((default (save-excursion
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-error-if-folder-empty)
+ (or (vm-virtual-auto-select-folder)
+ vm-last-save-folder)))
+ (dir (or vm-folder-directory default-directory)))
+ (cond ((and default
+ (let ((default-directory dir))
+ (file-directory-p default)))
+ (vm-read-file-name "Save in folder: "
+ dir nil nil default 'vm-folder-history))
+ (default
+ (vm-read-file-name
+ (format "Save in folder: (default %s) " default)
+ dir default nil nil 'vm-folder-history))
+ (t
+ (vm-read-file-name "Save in folder: " dir nil)))))
+ (prefix-numeric-value current-prefix-arg)))
+ (vm-save-message folder count))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-virtual-auto-archive-messages (&optional prompt)
+ "With a prefix ARG ask user before saving."
+ (interactive "P")
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-error-if-folder-empty)
+ (vm-error-if-folder-read-only)
+
+ (message "Archiving...")
+
+ (let ((auto-folder)
+ (folder-list (list (buffer-name)))
+ (archived 0))
+ (unwind-protect
+ ;; Need separate (let ...) so vm-message-pointer can
+ ;; revert back in time for
+ ;; (vm-update-summary-and-mode-line).
+ ;; vm-last-save-folder is tucked away here since archives
+ ;; shouldn't affect its value.
+ (let ((vm-message-pointer
+ (if (eq last-command 'vm-next-command-uses-marks)
+ (vm-select-marked-or-prefixed-messages 0)
+ vm-message-list))
+ (done nil)
+ stop-point
+ (vm-last-save-folder vm-last-save-folder)
+ (vm-move-after-deleting nil))
+ ;; mark the place where we should stop. otherwise if any
+ ;; messages in this folder are archived to this folder
+ ;; we would file messages into this folder forever.
+ (setq stop-point (vm-last vm-message-pointer))
+ (while (not done)
+ (and (not (vm-filed-flag (car vm-message-pointer)))
+ ;; don't archive deleted messages
+ (not (vm-deleted-flag (car vm-message-pointer)))
+ (setq auto-folder
+ (vm-virtual-auto-select-folder (car vm-message-pointer)
+ vm-virtual-folder-alist
+ folder-list))
+ ;; Don't let user archive into the same folder
+ ;; that they are visiting.
+ (not (eq (vm-get-file-buffer auto-folder)
+ (current-buffer)))
+ (or (null prompt)
+ (y-or-n-p
+ (format "Save message %s in folder %s? "
+ (vm-number-of (car vm-message-pointer))
+ auto-folder)))
+ (let ((vm-delete-after-saving vm-delete-after-archiving))
+ (vm-save-message auto-folder)
+ (vm-increment archived)
+ (message "%d archived, still working..." archived)))
+ (setq done (eq vm-message-pointer stop-point)
+ vm-message-pointer (cdr vm-message-pointer))))
+ ;; fix mode line
+ (intern (buffer-name) vm-buffers-needing-display-update)
+ (vm-update-summary-and-mode-line))
+ (if (zerop archived)
+ (message "No messages were archived")
+ (message "%d message%s archived"
+ archived (if (= 1 archived) "" "s")))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-virtual-make-folder-persistent ()
+ "Save all mails of current virtual folder to the real folder with the same
+name."
+ (interactive)
+ (save-excursion
+ (vm-select-folder-buffer)
+ (if (eq major-mode 'vm-virtual-mode)
+ (let ((file (substring (buffer-name) 1 -1)))
+ (vm-goto-message 0)
+ (vm-save-message file (length vm-message-list))
+ (message "Saved virtual folder in file \"%s\"" file))
+ (error "This is no virtual folder!"))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(provide 'vm-avirtual)
+
+;;; vm-rfaddons.el ends here
diff --git a/lisp/vm-biff.el b/lisp/vm-biff.el
new file mode 100644
index 0000000..af2578d
--- /dev/null
+++ b/lisp/vm-biff.el
@@ -0,0 +1,487 @@
+;;; vm-biff.el --- a xlbiff like tool for VM
+;;
+;; Copyright (C) 2001 Robert Fenk
+;;
+;; Author: Robert Fenk
+;; Status: Tested with XEmacs 21.4.15 & VM 7.18
+;; Keywords: VM helpers
+;; X-URL: http://www.robf.de/Hacking/elisp
+;; Version: $Id$
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+;;; Commentary:
+;;
+;; Put this file into your load path and add the following line to your .vm
+;; file
+;;
+;; (require 'vm-biff)
+;;
+;; Try: M-x customize-group vm-biff RET
+;;
+;; You should set `vm-auto-get-newmail', since otherwise this package
+;; does not make any sense! If getting mail is slow, use fetchmail to
+;; retrieve it to a local file and uses that file as VM spool file!
+;;
+
+
+(eval-when-compile
+ (require 'cl))
+
+(when vm-xemacs-p
+ (require 'overlay))
+
+(defgroup vm nil
+ "VM"
+ :group 'mail)
+
+(defgroup vm-biff nil
+ "The VM biff lib"
+ :group 'vm)
+
+(defcustom vm-biff-position 'center
+ "*Position of the popup-frame."
+ :group 'vm-biff
+ :type '(choice (const :tag "center the popup frame" center)
+ (list :tag "Position of the top-left corner."
+ :value (1 1)
+ (integer :tag "X")
+ (integer :tag "Y"))))
+
+
+(defcustom vm-biff-width 120
+ "*Width of the popup-frame."
+ :group 'vm-biff
+ :type 'integer)
+
+(defcustom vm-biff-max-height 10
+ "*Maximum hight of the popup window."
+ :group 'vm-biff
+ :type 'integer)
+
+(defcustom vm-biff-body-peek 50
+ "*Maximum number of chractes to peek into the body of a message."
+ :group 'vm-biff
+ :type 'integer)
+
+
+(defcustom vm-biff-focus-popup nil
+ "*t if popup window should get the focus after an update."
+ :group 'vm-biff
+ :type 'boolean)
+
+(defcustom vm-biff-auto-remove nil
+ "*Number of seconds after the popup window is automatically removed."
+ :group 'vm-biff
+ :type '(choice (integer :tag "Number of seconds" 10)
+ (const :tag "Disable remove" nil)))
+
+(defcustom vm-biff-summary-format nil
+ "*Like `vm-summary-format' but for popup buffers."
+ :group 'vm-biff
+ :type '(choice (string :tag "Summary format")
+ (const :tag "Disable own format" nil)))
+
+(defcustom vm-biff-selector '(and (new)
+ (not (deleted))
+ (not (outgoing)))
+ "*virtual folder selector matching messages to display in the pop-up."
+ :group 'vm-biff
+ :type 'sexp)
+
+(defcustom vm-biff-place-frame-function 'vm-biff-place-frame
+ "*Function that sets the popup frame position and size."
+ :group 'vm-biff
+ :type 'function)
+
+(defcustom vm-biff-select-hook nil
+ "*List of hook functions to be run when selection a message."
+ :group 'vm-biff
+ :type '(repeat (function)))
+
+(defcustom vm-biff-select-frame-hook nil
+ "*List of hook functions to be run when selection a message.
+You may want to add `vm-biff-fvwm-focus-vm-folder-frame'.
+"
+ :group 'vm-biff
+ :type '(repeat (function)))
+
+(defcustom vm-biff-folder-list nil
+ "*List of folders to generate a popup for.
+The default is all spool files listed in `vm-spool-files'.
+Testing is done by string-matching it against the current buffer-file-name.
+
+Another form is an alist of elements (FODERNAME SELECTOR),
+where SELECTOR is a virtual folder selector matching the
+messges which should be displayed. See `vm-biff-selector'
+for an example and `vm-virtual-folder-alist' on how virtual
+folder selectors work."
+ :group 'vm-biff
+ :type '(repeat (string)))
+
+(defvar vm-biff-keymap nil
+ "Keymap for vm-biff popup buffers.")
+
+(when (not vm-biff-keymap)
+ (setq vm-biff-keymap (make-sparse-keymap "VM Biff"))
+ (define-key vm-biff-keymap "q" 'vm-biff-delete-popup)
+ (define-key vm-biff-keymap " " 'vm-biff-delete-popup)
+ (define-key vm-biff-keymap [(space)] 'vm-biff-delete-popup)
+ (define-key vm-biff-keymap [(button1)] 'vm-biff-delete-popup)
+ (define-key vm-biff-keymap [(mouse-1)] 'vm-biff-delete-popup)
+ (define-key vm-biff-keymap [(return)] 'vm-biff-select-message)
+ (define-key vm-biff-keymap [(button2)] 'vm-biff-select-message-mouse)
+ (define-key vm-biff-keymap [(mouse-2)] 'vm-biff-select-message-mouse))
+
+(defun vm-summary-function-V (msg)
+ (let ((body-start (vm-text-of msg))
+ (body-end (vm-end-of msg))
+ peek)
+ (if (< vm-biff-body-peek (- body-end body-start))
+ (setq body-end (+ vm-biff-body-peek body-start)))
+ (save-excursion
+ (save-restriction
+ (set-buffer (vm-buffer-of msg))
+ (widen)
+ (goto-char body-end)
+ (re-search-forward "$" (point-max) t)
+ (setq peek (vm-decode-mime-encoded-words-in-string
+ (buffer-substring body-start (point))))
+ (let ((pos 0))
+ (if (string-match "^\n+" peek pos)
+ (setq peek (replace-match "" t t peek)))
+ (while (setq pos (string-match "\n\n+" peek pos))
+ (setq peek (replace-match "\n" t t peek)))
+ (setq pos 0)
+ (while (setq pos (string-match "\n" peek pos))
+ (setq peek (replace-match "\n\t" t t peek)
+ pos (+ 2 pos))))
+ (setq peek (concat "\t" peek))
+ (put-text-property 0 (length peek) 'face 'bold peek)
+ peek))))
+
+(defun vm-biff-place-frame (&optional f)
+ "Centers the frame and limits it to `vm-biff-max-height' lines."
+ (let ((f (or f (selected-frame)))
+ (height (1+ (count-lines (point-min) (point-max)))))
+ (if (> height vm-biff-max-height)
+ (setq height vm-biff-max-height))
+ (set-frame-size f vm-biff-width height)
+
+ (if (eq 'center vm-biff-position)
+ (set-frame-position
+ f
+ (/ (- (x-display-pixel-width) (frame-pixel-width f)) 2)
+ (/ (- (x-display-pixel-height) (frame-pixel-height f)) 2))
+ (apply 'set-frame-position f vm-biff-position))))
+
+(defconst vm-biff-frame-properties
+ '(;; common properties
+ (name . "New Mail")
+ (unsplittable . t)
+ (minibuffer . nil)
+ (user-position . t)
+ (menubar-visible-p . nil)
+ (default-toolbar-visible-p . nil)
+; (has-modeline-p . nil)
+ (top . 1)
+ (left . 1)
+ ;; Xemacs properties
+ (initially-unmapped . t)
+ (modeline-shadow-thickness . 0)
+ (vertical-scrollbar . nil)
+ ;; GNU Emacs properties
+ (vertical-scroll-bars . nil)
+ (menu-bar-lines . 0)
+ (tool-bar-lines . 0)
+ (visibility . nil)
+ )
+ "Default properties for popup frame.")
+
+(defvar vm-biff-message-pointer nil)
+(defvar vm-biff-folder-buffer nil)
+(defvar vm-biff-message-number nil)
+(defvar vm-biff-folder-frame nil)
+(defvar vm-biff--folder-window nil)
+
+(defun vm-biff-x-p ()
+ (if vm-xemacs-p
+ (memq (console-type) '(x mswindows))
+ t))
+
+(defun vm-biff-get-buffer-window (buf)
+ (if vm-xemacs-p
+ (get-buffer-window buf (vm-biff-x-p) (frame-device))
+ (get-buffer-window buf (vm-biff-x-p))))
+
+(defun vm-biff-find-folder-window (msg)
+ (let ((buf (vm-buffer-of msg)))
+ (save-excursion
+ (set-buffer buf)
+ (or (vm-biff-get-buffer-window buf)
+ (and vm-presentation-buffer
+ (vm-biff-get-buffer-window vm-presentation-buffer))
+ (and vm-summary-buffer
+ (vm-biff-get-buffer-window vm-summary-buffer))))))
+
+(defun vm-biff-find-folder-frame (msg)
+ (let ((ff (vm-biff-find-folder-window msg)))
+ (if ff (window-frame ff))))
+
+;;;###autoload
+(defun vm-biff-select-message ()
+ "Put focus on the folder frame and select the appropiate message."
+ (interactive)
+ (let* ((vm-biff-message-pointer
+ (or (get-text-property (point) 'vm-message-pointer)
+ vm-biff-message-pointer))
+ (msg (car vm-biff-message-pointer))
+ (vm-biff-message-number (vm-number-of msg))
+ (vm-biff-folder-buffer (vm-buffer-of msg))
+ (vm-biff-folder-window (vm-biff-find-folder-window msg))
+ vm-biff-folder-frame)
+
+ (if vm-biff-folder-window
+ (setq vm-biff-folder-frame (window-frame vm-biff-folder-window)))
+
+ (setq vm-biff-message-pointer nil)
+ (vm-biff-delete-popup)
+
+ (cond ((and vm-biff-folder-frame (vm-biff-x-p))
+ (select-frame vm-biff-folder-frame)
+ (focus-frame vm-biff-folder-frame)
+ (raise-frame vm-biff-folder-frame)
+ (run-hooks 'vm-biff-select-frame-hook)
+ (select-window vm-biff-folder-window))
+ (vm-biff-folder-window
+ (select-window vm-biff-folder-window))
+ (t
+ (bury-buffer)
+ (switch-to-buffer vm-biff-folder-buffer)))
+
+ (sit-for 0)
+
+ (if vm-biff-message-number
+ (vm-goto-message (string-to-number (vm-number-of msg))))
+
+ (run-hooks 'vm-biff-select-hook)))
+
+;;;###autoload
+(defun vm-biff-select-message-mouse (event)
+ (interactive "e")
+ (mouse-set-point event)
+ (vm-biff-select-message))
+
+(defcustom vm-biff-FvwmCommand-path "/usr/bin/FvwmCommand"
+ "Full qualified path to FvwmCommand."
+ :group 'vm-biff
+ :type 'file)
+
+;;;###autoload
+(defun vm-biff-fvwm-focus-vm-folder-frame ()
+ "Jumps to the frame containing the folder for the selected message.
+
+1) Your Emacs frame needs to have the folder name in its title, see the
+ variable `frame-title-format' on how to set this up.
+
+2) You need to define the FVWM2 function SelectWindow and start the
+ FvwmCommandS module. Therefore, you will need the following lines
+ in your .fvwm2rc file.
+
+AddToFunc InitFunction
++ I Module FvwmCommandS
+
+AddToFunc RestartFunction
++ I Module FvwmCommandS
+
+AddToFunc SelectWindow
++ I Next ($0) Iconify false
++ I Next ($0) Raise
++ I Next ($0) WarpToWindow 10p 10p
+"
+ (interactive)
+ (let ((p (start-process "FvwmCommand"
+ " *FvwmCommand*"
+ vm-biff-FvwmCommand-path
+ "-c")))
+ (process-send-string p (concat "SelectWindow *"
+ (buffer-name vm-biff-folder-buffer)
+ "*\n"))
+ (process-send-eof p)))
+
+;;;###autoload
+(defun vm-biff-delete-popup (&optional wf)
+ (interactive)
+ (if (vm-biff-x-p)
+ (delete-frame wf)
+ (if (not (one-window-p))
+ (delete-window wf)))
+ (sit-for 0))
+
+(defun vm-biff-timer-delete-popup (wf)
+ (if (featurep 'itimer)
+ (delete-itimer current-itimer))
+ (vm-biff-delete-popup wf))
+
+(defvar vm-biff-message-pointer nil)
+(make-variable-buffer-local 'vm-biff-message-pointer)
+
+;;;###autoload
+(defun vm-biff-popup (&optional force)
+ "Scan the current VM folder for new messages and popup a summary frame."
+ (interactive (list current-prefix-arg))
+
+ (save-excursion
+ (vm-select-folder-buffer)
+
+ (when (not vm-biff-folder-list)
+ (setq vm-biff-folder-list
+ (if (stringp (car vm-spool-files))
+ (list (expand-file-name
+ vm-primary-inbox
+ vm-folder-directory))
+ (mapcar (lambda (f)
+ (expand-file-name
+ (car f)
+ vm-folder-directory))
+ vm-spool-files))))
+
+ (let* ((mp vm-message-pointer)
+ (folder (buffer-name))
+ (do-mouse-track
+ (and vm-mouse-track-summary
+ (vm-mouse-support-possible-p)))
+ (buf (get-buffer-create
+ (concat " *new messages in VM folder: " folder "*")))
+ selector msg new-messages wf)
+
+ (let ((fl vm-biff-folder-list))
+ (while fl
+ (if (stringp (car fl))
+ (if (string-match (car fl) (or (buffer-file-name)
+ (buffer-name)))
+ (setq selector (list vm-biff-selector) fl nil))
+ (if (string-match (caar fl) (or (buffer-file-name)
+ (buffer-name)))
+ (setq selector (cdar fl) fl nil)))
+ (setq fl (cdr fl))))
+
+ (when selector
+ ;; collect the new messages
+ (set-buffer buf)
+ (setq buffer-read-only nil)
+ (erase-buffer)
+
+ (let (start)
+ (while mp
+ (setq msg (car mp))
+ (when (apply 'vm-vs-or msg selector)
+ (setq start (point))
+ (vm-tokenized-summary-insert msg
+ (vm-summary-sprintf
+ (or vm-biff-summary-format
+ vm-summary-format)
+ msg t))
+ (put-text-property start (point) 'vm-message-pointer mp)
+
+ (vm-summary-highlight-region start (point)
+ vm-summary-highlight-face)
+
+ (when do-mouse-track
+ (vm-mouse-set-mouse-track-highlight
+ start (point)))
+
+ (if (not new-messages) (setq new-messages mp)))
+ (setq mp (cdr mp))))
+
+ (when (and new-messages
+ (or force
+ (not (equal new-messages vm-biff-message-pointer))))
+ (setq msg (car new-messages))
+ (backward-delete-char 1)
+ (goto-char (point-min))
+
+ (setq truncate-lines t
+ buffer-read-only t)
+ (use-local-map vm-biff-keymap)
+ (setq vm-biff-message-pointer new-messages)
+
+ ;; if in the minibuffer then seletc a different window
+ (if (active-minibuffer-window)
+ (other-window))
+
+ ;; generate a own window/frame showing the messages
+ (if (vm-biff-x-p)
+ ;; X Window System or MS Windows
+ (let* ((sf (selected-frame))
+ (ff (vm-biff-find-folder-frame msg))
+ (props (if ff
+ (cons (cons 'popup ff)
+ vm-biff-frame-properties)
+ vm-biff-frame-properties))
+ (mf (or (and (if vm-xemacs-p
+ (get-buffer-window buf t (frame-device))
+ (get-buffer-window buf t))
+ (window-frame
+ (vm-biff-get-buffer-window buf)))
+ (make-frame props))))
+
+ (select-frame mf)
+ (switch-to-buffer buf)
+ (if vm-xemacs-p
+ (set-specifier horizontal-scrollbar-visible-p nil))
+
+ (if (functionp vm-biff-place-frame-function)
+ (funcall vm-biff-place-frame-function))
+
+ (make-frame-visible mf)
+ (setq wf mf)
+
+ (if vm-biff-focus-popup (focus-frame mf)
+ (select-frame sf)))
+
+ ;; Terminal
+ (let ((w (vm-get-buffer-window buf))
+ (window-min-height 2)
+ (h (count-lines (point-min) (point-max))))
+ (if w
+ (if vm-biff-focus-popup (select-window w))
+ (setq wf (split-window (selected-window))))
+ (sit-for 0)
+ (switch-to-buffer buf)
+ (if (> h vm-biff-max-height)
+ (setq h vm-biff-max-height))
+ (setq h (- (window-displayed-height) h))
+ (if (not (one-window-p))
+ (shrink-window h)))))
+
+ (if vm-biff-auto-remove
+ (cond
+ ((condition-case nil
+ (progn (require 'itimer) t)
+ (error nil))
+ (start-itimer (buffer-name)
+ 'vm-biff-timer-delete-popup
+ vm-biff-auto-remove
+ nil t t wf))
+ ((condition-case nil
+ (progn (require 'timer) t)
+ (error nil))
+ (run-at-time vm-biff-auto-remove nil
+ 'vm-biff-timer-delete-popup wf))))))))
+
+(add-hook 'vm-arrived-messages-hook 'vm-biff-popup t)
+
+(provide 'vm-biff)
diff --git a/lisp/vm-build.el b/lisp/vm-build.el
new file mode 100644
index 0000000..9da91e0
--- /dev/null
+++ b/lisp/vm-build.el
@@ -0,0 +1,91 @@
+;; Add the current dir to the load-path
+(setq load-path (cons default-directory load-path))
+;(setq debug-on-error t)
+
+(defun vm-fix-cygwin-path (path)
+ "If PATH does not exist, try the DOS path instead.
+ This handles EmacsW32 path problems when building on cygwin."
+ (if (file-exists-p path)
+ path
+ (let ((dos-path (cond ((functionp 'mswindows-cygwin-to-win32-path)
+ (mswindows-cygwin-to-win32-path path))
+ ((and (locate-library "cygwin-mount")
+ (require 'cygwin-mount))
+ (cygwin-mount-activate)
+ (cygwin-mount-convert-file-name path))
+ ((string-match "^/cygdrive/\\([a-z]\\)" path)
+ (replace-match (format "%s:"
+ (match-string 1 path))
+ t t path)))))
+ (if (and dos-path (file-exists-p dos-path))
+ dos-path
+ path))))
+
+;; Add additional dirs to the load-path
+(when (getenv "OTHERDIRS")
+ (let ((otherdirs (read (format "%s" (getenv "OTHERDIRS"))))
+ dir)
+ (while otherdirs
+ (setq dir (car otherdirs))
+ (if (not (file-exists-p dir))
+ (error "Extra `load-path' directory %S does not exist!" dir))
+; (print (format "Adding %S" dir))
+ (setq load-path (cons dir load-path)
+ otherdirs (cdr otherdirs))))
+
+ ;; Load byte compile
+ (require 'bytecomp)
+ (setq byte-compile-warnings '(free-vars))
+ (put 'inhibit-local-variables 'byte-obsolete-variable nil)
+
+ ;; Preload these to get macros right
+ (require 'cl)
+ (require 'vm-version)
+ (require 'vm-message)
+ (require 'vm-macro)
+ (require 'vm-vars)
+ (require 'sendmail))
+
+(defun vm-custom-make-dependencies ()
+ (if (load-library "cus-dep")
+ (if (functionp 'Custom-make-dependencies)
+ (Custom-make-dependencies)
+ (let ((generated-custom-dependencies-file "vm-cus-load.el"))
+ (custom-make-dependencies)))
+ (error "Failed to load 'cus-dep'")))
+
+(defun vm-built-autoloads (&optional autoloads-file source-dir)
+ (let ((autoloads-file (or autoloads-file
+ (vm-fix-cygwin-path (car command-line-args-left))))
+ (source-dir (or source-dir
+ (vm-fix-cygwin-path (car (cdr command-line-args-left)))))
+ (debug-on-error t)
+ (enable-local-eval nil))
+ (if (not (file-exists-p source-dir))
+ (error "Built directory %S does not exist!" source-dir))
+ (message "Building autoloads file %S\nin directory %S." autoloads-file source-dir)
+ (load-library "autoload")
+ (set-buffer (find-file-noselect autoloads-file))
+ (erase-buffer)
+ (setq generated-autoload-file autoloads-file)
+ (setq autoload-package-name "vm")
+ (setq make-backup-files nil)
+ (if (featurep 'xemacs)
+ (progn
+ (update-autoloads-from-directory source-dir)
+ (fixup-autoload-buffer (concat (if autoload-package-name
+ autoload-package-name
+ (file-name-nondirectory defdir))
+ "-autoloads"))
+ (save-some-buffers t))
+ ;; GNU Emacs 21 wants some content, but 22 does not like it ...
+ (insert ";;; vm-autoloads.el --- automatically extracted autoloads\n")
+ (insert ";;\n")
+ (insert ";;; Code:\n")
+ (if (>= emacs-major-version 21)
+ (update-autoloads-from-directories source-dir)
+ (if (>= emacs-major-version 22)
+ (update-directory-autoloads source-dir)
+ (error "Do not know how to generate autoloads"))))))
+
+(provide 'vm-build)
diff --git a/vm-crypto.el b/lisp/vm-crypto.el
index a8077f0..ac46f57 100644
--- a/vm-crypto.el
+++ b/lisp/vm-crypto.el
@@ -1,25 +1,28 @@
-;;; Encryption and related functions for VM
-;;; Copyright (C) 2001 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-crypto)
+;;; vm-crypto.el --- Encryption and related functions for VM
+;;
+;; Copyright (C) 2001 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+;;; Code:
;; compatibility
(fset 'vm-pop-md5 'vm-md5-string)
+;;;###autoload
(defun vm-md5-region (start end)
(if (fboundp 'md5)
(md5 (current-buffer) start end)
@@ -51,8 +54,8 @@
(if (or (re-search-forward "[^0-9a-f\n]" nil t)
(< (point-max) 32))
(error "%s produced bogus MD5 digest '%s'"
- vm-pop-md5-program
- (vm-buffer-substring-no-properties (point-min)
+ vm-pop-md5-program
+ (vm-buffer-substring-no-properties (point-min)
(point-max))))
;; MD5 digest is 32 chars long
;; mddriver adds a newline to make neaten output for tty
@@ -61,6 +64,7 @@
(and buffer (kill-buffer buffer))))))
;; output is in hex
+;;;###autoload
(defun vm-md5-string (string)
(if (fboundp 'md5)
(md5 string)
@@ -72,6 +76,7 @@
(delete-region (point) (point-max)))))))
;; output is the raw digest bits, not hex
+;;;###autoload
(defun vm-md5-raw-string (s)
(setq s (vm-md5-string s))
(let ((raw (make-string 16 0))
@@ -92,6 +97,7 @@
(setq i (+ i 2)))
raw ))
+;;;###autoload
(defun vm-xor-string (s1 s2)
(let ((len (length s1))
result (i 0))
@@ -103,6 +109,7 @@
(setq i (1+ i)))
result ))
+;;;###autoload
(defun vm-setup-ssh-tunnel (host port)
(let (local-port process done)
(while (not done)
@@ -153,6 +160,7 @@
(and work-buffer (kill-buffer work-buffer)))
file ))
+;;;###autoload
(defun vm-setup-stunnel-random-data-if-needed ()
(cond ((null vm-stunnel-random-data-method) nil)
((eq vm-stunnel-random-data-method 'generate)
@@ -162,6 +170,7 @@
(setq vm-stunnel-random-data-file
(vm-generate-random-data-file (* 4 1024)))))))
+;;;###autoload
(defun vm-tear-down-stunnel-random-data ()
(if (stringp vm-stunnel-random-data-file)
(vm-error-free-call 'delete-file vm-stunnel-random-data-file))
@@ -173,6 +182,7 @@
(list "-R" vm-stunnel-random-data-file))
(t nil)))
+;;;###autoload
(defun vm-stunnel-configuration-args (host port)
(if (eq vm-stunnel-wants-configuration-file 'unknown)
(setq vm-stunnel-wants-configuration-file
@@ -209,3 +219,5 @@
vm-stunnel-configuration-file))
(provide 'vm-crypto)
+
+;;; vm-crypto.el ends here
diff --git a/vm-delete.el b/lisp/vm-delete.el
index 409b0ca..084c323 100644
--- a/vm-delete.el
+++ b/lisp/vm-delete.el
@@ -1,22 +1,25 @@
-;;; Delete and expunge commands for VM.
-;;; Copyright (C) 1989-1997 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+;;; vm-delete.el --- Delete and expunge commands for VM.
+;;
+;; Copyright (C) 1989-1997 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-;;(provide 'vm-delete)
+;;; Code:
+;;;###autoload
(defun vm-delete-message (count)
"Add the `deleted' attribute to the current message.
@@ -60,6 +63,7 @@ only marked messages are deleted, other messages are ignored."
(eq vm-move-after-deleting t))))
(vm-next-message count t executing-kbd-macro)))))
+;;;###autoload
(defun vm-delete-message-backward (count)
"Like vm-delete-message, except the deletion direction is reversed."
(interactive "p")
@@ -67,6 +71,7 @@ only marked messages are deleted, other messages are ignored."
(vm-follow-summary-cursor))
(vm-delete-message (- count)))
+;;;###autoload
(defun vm-undelete-message (count)
"Remove the `deleted' attribute from the current message.
@@ -107,8 +112,9 @@ only marked messages are undeleted, other messages are ignored."
(eq vm-move-after-undeleting t))))
(vm-next-message count t executing-kbd-macro)))))
+;;;###autoload
(defun vm-kill-subject (&optional arg)
- "Delete all messages with the same subject as the current message.
+"Delete all messages with the same subject as the current message.
Message subjects are compared after ignoring parts matched by
the variables vm-subject-ignored-prefix and vm-subject-ignored-suffix.
@@ -150,8 +156,9 @@ don't move at all."
(eq vm-move-after-killing t))))
(vm-next-message arg t executing-kbd-macro))))
+;;;###autoload
(defun vm-delete-duplicate-messages ()
- "Delete duplicate messages in the current folder.
+"Delete duplicate messages in the current folder.
This command works by computing an MD5 hash for the body ofeach
non-deleted message in the folder and deleting messages that have
a hash that has already been seen. Messages that already deleted
@@ -199,6 +206,7 @@ unmarked messages are not hashed or considerd for deletion."
(if (= 1 del-count) "" "s")))
(vm-update-summary-and-mode-line)))
+;;;###autoload
(defun vm-expunge-folder (&optional shaddap just-these-messages
messages-to-expunge)
"Expunge messages with the `deleted' attribute.
@@ -302,7 +310,7 @@ ignored."
(setq vm-last-message-pointer nil))
(intern (buffer-name) buffers-altered)
(if (null vm-numbering-redo-start-point)
- (progn
+ (progn
(vm-set-numbering-redo-start-point (or prev t))
(vm-set-summary-redo-start-point (or prev t))))
;; lock out interrupt to preserve message list integrity
@@ -395,8 +403,12 @@ ignored."
vm-message-order-header-present)))
(vm-clear-expunge-invalidated-undos)))
buffers-altered))
+ (if vm-ml-sort-keys
+ (vm-sort-messages vm-ml-sort-keys))
(if (not shaddap)
(message "Deleted messages expunged.")))
(t (message "No messages are flagged for deletion.")))))
(provide 'vm-delete)
+
+;;; vm-delete.el ends here
diff --git a/vm-digest.el b/lisp/vm-digest.el
index 8a2abdd..9173d29 100644
--- a/vm-digest.el
+++ b/lisp/vm-digest.el
@@ -1,22 +1,25 @@
-;;; Message encapsulation
-;;; Copyright (C) 1989, 1990, 1993, 1994, 1997, 2001 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-digest)
-
+;;; vm-digest.el --- Message encapsulation
+;;
+;; Copyright (C) 1989, 1990, 1993, 1994, 1997, 2001 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+;;; Code:
+
+;;;###autoload
(defun vm-no-frills-encapsulate-message (m keep-list discard-regexp)
"Encapsulate a message M for forwarding, simply.
No message encapsulation standard is used. The message is
@@ -50,10 +53,12 @@ to find out how KEEP-LIST and DISCARD-REGEXP are used."
(vm-text-end-of m))
(goto-char beg)
(vm-reorder-message-headers nil nil vm-internal-unforwarded-header-regexp)
- (vm-reorder-message-headers nil keep-list discard-regexp)))))
+ (vm-reorder-message-headers nil keep-list discard-regexp)
+ (vm-decode-mime-message-headers)))))
(goto-char (point-max))
(insert "------- end of forwarded message -------\n"))))
+;;;###autoload
(defun vm-mime-encapsulate-messages (message-list keep-list discard-regexp
always-use-digest)
"Encapsulate the messages in MESSAGE-LIST as per the MIME spec.
@@ -152,6 +157,7 @@ all of them will be burst."
(setq list (cdr list)))
did-burst))
+;;;###autoload
(defun vm-mime-burst-layout (layout ident-header)
(let ((work-buffer nil)
(folder-buffer (current-buffer))
@@ -179,6 +185,7 @@ all of them will be burst."
(goto-char start)
(while (= (following-char) ?\n)
(delete-char 1)))
+ (insert ?\n)
(insert (vm-trailing-message-separator folder-type)))
((vm-mime-types-match "multipart/digest"
(car (vm-mm-layout-type layout)))
@@ -202,6 +209,7 @@ all of them will be burst."
(goto-char start)
(while (= (following-char) ?\n)
(delete-char 1)))
+ (insert ?\n)
(insert (vm-trailing-message-separator folder-type))
(setq part-list (cdr part-list))))
(t (error
@@ -253,6 +261,7 @@ from them."
(forward-char)))
(set-marker end nil))
+;;;###autoload
(defun vm-rfc934-encapsulate-messages (message-list keep-list discard-regexp)
"Encapsulate the messages in MESSAGE-LIST as per RFC 934.
The resulting digest is inserted at point in the current buffer.
@@ -345,6 +354,7 @@ converted to a hyphen."
(replace-match "------------------------------" t t)))
(set-marker end nil))
+;;;###autoload
(defun vm-rfc1153-encapsulate-messages (message-list keep-list discard-regexp)
"Encapsulate the messages in MESSAGE-LIST as per RFC 1153.
The resulting digest is inserted at point in the current buffer.
@@ -546,6 +556,7 @@ M should be a message struct for a real message."
M should be a message struct for a real message."
(vm-rfc1153-or-rfc934-burst-message m t))
+;;;###autoload
(defun vm-burst-digest (&optional digest-type)
"Burst the current message (a digest) into its individual messages.
The digest's messages are assimilated into the folder as new mail
@@ -630,21 +641,25 @@ all marked messages will be burst."
(vm-update-summary-and-mode-line))
(message totals-blurb)))
+;;;###autoload
(defun vm-burst-rfc934-digest ()
"Burst an RFC 934 style digest"
(interactive)
(vm-burst-digest "rfc934"))
+;;;###autoload
(defun vm-burst-rfc1153-digest ()
"Burst an RFC 1153 style digest"
(interactive)
(vm-burst-digest "rfc1153"))
+;;;###autoload
(defun vm-burst-mime-digest ()
"Burst a MIME digest"
(interactive)
(vm-burst-digest "mime"))
+;;;###autoload
(defun vm-burst-digest-to-temp-folder (&optional digest-type)
"Burst the current message (a digest) into a temporary folder.
The digest's messages are copied to a buffer and vm-mode is
@@ -708,6 +723,13 @@ all marked messages will be burst."
(vm-rfc1153-burst-message m))
(t (error "Unknown digest type: %s" digest-type)))
(message "Bursting %s digest... done" digest-type)
+ (and vm-delete-after-bursting
+ (yes-or-no-p (format "Delete message %s? " (vm-number-of m)))
+ (save-excursion
+ (set-buffer start-buffer)
+ ;; don't move message pointer when deleting the message
+ (let ((vm-move-after-deleting nil))
+ (vm-delete-message 1))))
(setq mlist (cdr mlist)))
(set-buffer-modified-p nil)
(vm-save-buffer-excursion
@@ -766,3 +788,5 @@ Returns either \"rfc934\", \"rfc1153\" or \"mime\"."
nil )))))
(provide 'vm-digest)
+
+;;; vm-digest.el ends here
diff --git a/vm-edit.el b/lisp/vm-edit.el
index b6fc78a..0018e09 100644
--- a/vm-edit.el
+++ b/lisp/vm-edit.el
@@ -1,22 +1,25 @@
-;;; Editing VM messages
-;;; Copyright (C) 1990, 1991, 1993, 1994, 1997, 2001 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+;;; vm-edit.el --- Editing VM messages
+;;
+;; Copyright (C) 1990, 1991, 1993, 1994, 1997, 2001 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-;;(provide 'vm-edit)
+;;; Code:
+;;;###autoload
(defun vm-edit-message (&optional prefix-argument)
"Edit the current message. Prefix arg means mark as unedited instead.
If editing, the current message is copied into a temporary buffer, and
@@ -83,7 +86,7 @@ replace the original, use C-c C-] and the edit will be aborted."
vm-system-state 'editing
buffer-offer-save t)
(run-hooks 'vm-edit-message-hook)
- (message
+ (message
(substitute-command-keys
"Type \\[vm-edit-message-end] to end edit, \\[vm-edit-message-abort] to abort with no change.")))
(set-buffer edit-buf))
@@ -101,6 +104,7 @@ replace the original, use C-c C-] and the edit will be aborted."
(vm-display edit-buf t '(vm-edit-message vm-edit-message-other-frame)
(list this-command 'editing-message)))))
+;;;###autoload
(defun vm-edit-message-other-frame (&optional prefix)
"Like vm-edit-message, but run in a newly created frame."
(interactive "P")
@@ -112,6 +116,7 @@ replace the original, use C-c C-] and the edit will be aborted."
(if (vm-multiple-frames-possible-p)
(vm-set-hooks-for-frame-deletion)))
+;;;###autoload
(defun vm-discard-cached-data (&optional count)
"Discard cached information about the current message.
When VM gathers information from the headers of a message, it stores it
@@ -187,6 +192,7 @@ data is discarded only from the marked messages in the current folder."
(vm-sort-messages "thread")))
buffers-needing-thread-sort))))
+;;;###autoload
(defun vm-edit-message-end ()
"End the edit of a message and copy the result to its folder."
(interactive)
@@ -296,3 +302,5 @@ data is discarded only from the marked messages in the current folder."
(message "Aborted, no change."))
(provide 'vm-edit)
+
+;;; vm-edit.el ends here
diff --git a/vm-folder.el b/lisp/vm-folder.el
index 5842caf..3cda9bf 100644
--- a/vm-folder.el
+++ b/lisp/vm-folder.el
@@ -1,22 +1,23 @@
-;;; VM folder related functions
-;;; Copyright (C) 1989-2001 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-folder)
+;;; vm-folder.el --- VM folder related functions
+;;
+;; Copyright (C) 1989-2001 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+;;; Code:
(defun vm-number-messages (&optional start-point end-point)
"Set the number-of and padded-number-of slots of messages
in vm-message-list.
@@ -35,7 +36,7 @@ before this cell. A nil value means numbering will be done until
the end of vm-message-list is reached."
(let ((n 1) (message-list (or start-point vm-message-list)))
(if (and start-point (vm-reverse-link-of (car start-point)))
- (setq n (1+ (string-to-int
+ (setq n (1+ (string-to-number
(vm-number-of
(car
(vm-reverse-link-of
@@ -89,10 +90,10 @@ and the message in the cons pointed to by vm-numbering-redo-end-point."
(cond ((eq end-point t)
(setq vm-numbering-redo-end-point t))
((and (consp end-point)
- (> (string-to-int
+ (> (string-to-number
(vm-number-of
(car end-point)))
- (string-to-int
+ (string-to-number
(vm-number-of
(car vm-numbering-redo-end-point)))))
(setq vm-numbering-redo-end-point end-point))
@@ -164,7 +165,7 @@ and thread indentation."
;; message that could appear in the summary has changed.
(vm-set-summary-of m nil))
(if (vm-su-start-of m)
- (setq vm-messages-needing-summary-update
+ (setq vm-messages-needing-summary-update
(cons m vm-messages-needing-summary-update)))
(intern (buffer-name (vm-buffer-of m))
vm-buffers-needing-display-update)
@@ -301,6 +302,7 @@ on its presentation buffer, if any."
'vm-ml-message-written
'vm-ml-message-deleted
'vm-ml-message-marked
+ 'vm-ml-message-redistributed
'vm-ml-message-number
'vm-ml-highest-message-number
'vm-folder-read-only
@@ -329,6 +331,7 @@ on its presentation buffer, if any."
'vm-ml-message-deleted
'vm-ml-message-marked
'vm-ml-message-number
+ 'vm-ml-message-redistributed
'vm-ml-highest-message-number
'vm-folder-read-only
'vm-folder-type
@@ -773,7 +776,7 @@ Returns non-nil if the separator is found, nil otherwise."
(if (re-search-forward reg1 nil 'no-error)
(progn
(goto-char (match-beginning 0))
- t )
+ t )
nil )))
((eq vm-folder-type 'From_-with-Content-Length)
(let ((reg1 "\\(^\\|\n+\\)From ")
@@ -822,7 +825,7 @@ Returns non-nil if the separator is found, nil otherwise."
(vm-match-header vm-content-length-header)))
(progn
(setq content-length
- (string-to-int (vm-matched-header-contents)))
+ (string-to-number (vm-matched-header-contents)))
;; if search fails, we'll be at point-max
;; if specified content-length is too long, go to point-max
(if (search-forward "\n\n" nil 0)
@@ -1073,7 +1076,7 @@ vm-folder-type is initialized here."
(setq work-buffer (vm-make-work-buffer))
(set-buffer work-buffer)
(insert-buffer-substring
- folder-buffer
+ folder-buffer
(vm-headers-of message)
(vm-text-of message))
(goto-char (point-min))))
@@ -1234,7 +1237,7 @@ vm-folder-type is initialized here."
(error "Bad x-vm-v5-data at %d in buffer %s"
oldpoint (buffer-name))))
data )
- (error
+ (error
(message "Bad x-vm-v5-data header at %d in buffer %s, ignoring"
oldpoint (buffer-name))
(setq data
@@ -1416,6 +1419,7 @@ vm-folder-type is initialized here."
vm-deleted-count)))))
(defun vm-emit-totals-blurb ()
+ (interactive)
(save-excursion
(vm-select-folder-buffer)
(if (not (equal (nth 0 vm-totals) vm-modification-counter))
@@ -1684,6 +1688,22 @@ vm-folder-type is initialized here."
(vm-startup-apply-message-order order)
(message "Reordering messages... done")))))))))
+(defun vm-has-message-order ()
+ (let ((case-fold-search t)
+ lim order)
+ (save-excursion
+ (save-restriction
+ (widen)
+ (goto-char (point-min))
+ (vm-skip-past-folder-header)
+ (vm-skip-past-leading-message-separator)
+ (search-forward "\n\n" nil t)
+ (setq lim (point))
+ (goto-char (point-min))
+ (vm-skip-past-folder-header)
+ (vm-skip-past-leading-message-separator)
+ (re-search-forward vm-message-order-header-regexp lim t)))))
+
(defun vm-startup-apply-message-order (order)
(let (list-length v (mp vm-message-list))
(setq list-length (length vm-message-list)
@@ -2346,7 +2366,10 @@ vm-folder-type is initialized here."
(set-buffer-modified-p old-buffer-modified-p))))))
(defun vm-make-index-file-name ()
- (concat buffer-file-name vm-index-file-suffix))
+ (concat (file-name-directory buffer-file-name)
+ "."
+ (file-name-nondirectory buffer-file-name)
+ vm-index-file-suffix))
(defun vm-read-index-file-maybe ()
(catch 'done
@@ -2543,7 +2566,7 @@ vm-folder-type is initialized here."
(prin1 vm-folder-type work-buffer)
(terpri work-buffer)
- (princ
+ (princ
";; timestamp + sample of folder bytes for consistency check\n"
work-buffer)
(prin1 (vm-generate-index-file-validity-check) work-buffer)
@@ -2691,6 +2714,7 @@ vm-folder-type is initialized here."
(vm-set-unread-flag (car mp) t)))
(setq mp (cdr mp)))))
+;;;###autoload
(defun vm-unread-message (&optional count)
"Set the `unread' attribute for the current message. If the message is
already new or unread, then it is left unchanged.
@@ -2716,6 +2740,7 @@ all marked messages are affected, other messages are ignored."
(vm-display nil nil '(vm-unread-message) '(vm-unread-message))
(vm-update-summary-and-mode-line))
+;;;###autoload
(defun vm-quit-just-bury ()
"Bury the current VM folder and summary buffers.
The folder is not altered and Emacs is still visiting it. You
@@ -2745,6 +2770,7 @@ Buffer Menu."
(vm-display (current-buffer) nil nil nil)
(vm-bury-buffer (current-buffer)))
+;;;###autoload
(defun vm-quit-just-iconify ()
"Iconify the frame and bury the current VM folder and summary buffers.
The folder is not altered and Emacs is still visiting it."
@@ -2770,11 +2796,13 @@ The folder is not altered and Emacs is still visiting it."
(vm-bury-buffer pres-buffer))
(vm-iconify-frame)))
+;;;###autoload
(defun vm-quit-no-change ()
"Quit visiting the current folder without saving changes made to the folder."
(interactive)
(vm-quit t))
+;;;###autoload
(defun vm-quit (&optional no-change)
"Quit visiting the current folder, saving changes. Deleted messages are not expunged."
(interactive)
@@ -2878,13 +2906,13 @@ The folder is not altered and Emacs is still visiting it."
(progn (require 'timer) t)
(error nil))
(let (timer)
- (and (natnump vm-flush-interval)
+ (and (natnump vm-flush-interval)
(not (vm-timer-using 'vm-flush-itimer-function))
(setq timer (run-at-time vm-flush-interval vm-flush-interval
'vm-flush-itimer-function nil))
(timer-set-function timer 'vm-flush-itimer-function
(list timer)))
- (and (natnump vm-mail-check-interval)
+ (and (natnump vm-mail-check-interval)
(not (vm-timer-using 'vm-check-mail-itimer-function))
(setq timer (run-at-time vm-mail-check-interval
vm-mail-check-interval
@@ -3079,6 +3107,7 @@ The folder is not altered and Emacs is still visiting it."
(vm-stuff-message-order))))
nil ))))
+;;;###autoload
(defun vm-save-buffer (prefix)
(interactive "P")
(vm-select-folder-buffer)
@@ -3094,6 +3123,7 @@ The folder is not altered and Emacs is still visiting it."
(vm-update-summary-and-mode-line)
(vm-write-index-file-maybe))
+;;;###autoload
(defun vm-write-file ()
(interactive)
(vm-select-folder-buffer)
@@ -3134,6 +3164,7 @@ The folder is not altered and Emacs is still visiting it."
(defun vm-unblock-new-mail ()
(setq vm-block-new-mail nil))
+;;;###autoload
(defun vm-save-folder (&optional prefix)
"Save current folder to disk.
Deleted messages are not expunged.
@@ -3225,6 +3256,7 @@ folder."
(error nil))))
(message "No changes need to be saved"))))
+;;;###autoload
(defun vm-save-and-expunge-folder (&optional prefix)
"Expunge folder, then save it to disk.
Prefix arg is handled the same as for the command save-buffer.
@@ -3243,11 +3275,13 @@ run vm-expunge-folder followed by vm-save-folder."
(vm-expunge-folder t)))
(vm-save-folder prefix))
+;;;###autoload
(defun vm-revert-buffer (&rest args)
(interactive)
(vm-select-folder-buffer-if-possible)
(call-interactively 'revert-buffer))
+;;;###autoload
(defun vm-recover-file (&rest args)
(interactive)
(vm-select-folder-buffer-if-possible)
@@ -3296,6 +3330,7 @@ run vm-expunge-folder followed by vm-save-folder."
(if (eq major-mode 'vm-mode)
(vm-handle-file-recovery-or-reversion nil)))
+;;;###autoload
(defun vm-help ()
"Display help for various VM activities."
(interactive)
@@ -3311,7 +3346,7 @@ run vm-expunge-folder followed by vm-save-folder."
((memq vm-system-state '(showing reading))
(message "SPC and b scroll, (d)elete, (s)ave, (n)ext, (r)eply (? gives more help)"))
((eq vm-system-state 'editing)
- (message
+ (message
(substitute-command-keys
"Type \\[vm-edit-message-end] to end edit, \\[vm-edit-message-abort] to abort with no change.")))
((eq major-mode 'mail-mode)
@@ -3320,6 +3355,7 @@ run vm-expunge-folder followed by vm-save-folder."
"Type \\[vm-mail-send-and-exit] to send message, \\[kill-buffer] to discard this composition")))
(t (describe-mode)))))
+;;;###autoload
(defun vm-spool-move-mail (source destination)
(let ((handler (and (fboundp 'find-file-name-handler)
(condition-case ()
@@ -3467,17 +3503,19 @@ run vm-expunge-folder followed by vm-save-folder."
(defun vm-compute-spool-files (&optional all)
(let ((fallback-triples nil)
+ (crash-box (or vm-crash-box
+ (concat vm-primary-inbox vm-crash-box-suffix)))
file file-list
triples)
(cond ((null (vm-spool-files))
(setq triples (list
(list vm-primary-inbox
(concat vm-spool-directory (user-login-name))
- vm-crash-box))))
+ crash-box))))
((stringp (car (vm-spool-files)))
(setq triples
(mapcar (function
- (lambda (s) (list vm-primary-inbox s vm-crash-box)))
+ (lambda (s) (list vm-primary-inbox s crash-box)))
(vm-spool-files))))
((consp (car (vm-spool-files)))
(setq triples (vm-spool-files))))
@@ -3558,7 +3596,7 @@ run vm-expunge-folder followed by vm-save-folder."
vm-grep-program file data)
(sleep-for 2)
(setq vm-grep-program nil)))
- (setq count (string-to-int (buffer-string)))
+ (setq count (string-to-number (buffer-string)))
(cond ((memq type '(From_ BellFrom_ From_-with-Content-Length))
t )
((eq type 'mmdf)
@@ -3760,6 +3798,7 @@ run vm-expunge-folder followed by vm-save-folder."
"]"))
"???"))
+;;;###autoload
(defun vm-get-new-mail (&optional arg)
"Move any new mail that has arrived in any of the spool files for the
current folder into the folder. New mail is appended to the disk
@@ -3857,7 +3896,8 @@ files."
(vm-build-message-list)
(if (or (null tail-cons) (cdr tail-cons))
(progn
- (setq vm-ml-sort-keys nil)
+ (if (not vm-assimilate-new-messages-sorted)
+ (setq vm-ml-sort-keys nil))
(if dont-read-attributes
(vm-set-default-attributes (cdr tail-cons))
(vm-read-attributes (cdr tail-cons)))
@@ -3910,7 +3950,7 @@ files."
(or vm-arrived-message-hook vm-arrived-messages-hook)
;; Run the hooks only if this is not the first
;; time vm-assimilate-new-messages has been called
- ;; in this folder.
+ ;; in this folder.
(not first-time))
(let ((new-messages new-messages))
;; seems wise to do this so that if the user runs VM
@@ -3936,7 +3976,8 @@ files."
(vm-build-virtual-message-list new-messages)
(if (or (null tail-cons) (cdr tail-cons))
(progn
- (setq vm-ml-sort-keys nil)
+ (if (not vm-assimilate-new-messages-sorted)
+ (setq vm-ml-sort-keys nil))
(if (vectorp vm-thread-obarray)
(vm-build-threads (cdr tail-cons)))
(vm-set-summary-redo-start-point
@@ -3953,37 +3994,42 @@ files."
(vm-update-summary-and-mode-line)
(vm-sort-messages "thread")))))))
(setq b-list (cdr b-list)))))
+ (if (and new-messages vm-ml-sort-keys)
+ (vm-sort-messages vm-ml-sort-keys))
new-messages ))
-;; return a list of all marked messages or the messages indicated by a
-;; prefix argument.
(defun vm-select-marked-or-prefixed-messages (prefix)
- (let (mlist)
- (if (eq last-command 'vm-next-command-uses-marks)
- (setq mlist (vm-marked-messages))
- (let ((direction (if (< prefix 0) 'backward 'forward))
- (count (vm-abs prefix))
- (vm-message-pointer vm-message-pointer))
- (if (not (eq vm-circular-folders t))
- (vm-check-count prefix))
- (while (not (zerop count))
- (setq mlist (cons (car vm-message-pointer) mlist))
- (vm-decrement count)
- (if (not (zerop count))
- (vm-move-message-pointer direction))))
+ "Return a list of all marked messages or the messages indicated by a
+prefix argument. If the prefix argument is supplied *and we are
+not in a vm-next-command-uses-marks context*, then return a number
+of messages around vm-message-pointer equal to (abs prefix),
+either backward (prefix is negative) or forward (positive)."
+ (if (eq last-command 'vm-next-command-uses-marks)
+ (vm-marked-messages)
+ (let (mlist
+ (direction (if (< prefix 0) 'backward 'forward))
+ (count (vm-abs prefix))
+ (vm-message-pointer vm-message-pointer))
+ (unless (eq vm-circular-folders t)
+ (vm-check-count prefix))
+ (while (not (zerop count))
+ (setq mlist (cons (car vm-message-pointer) mlist))
+ (vm-decrement count)
+ (unless (zerop count)
+ (vm-move-message-pointer direction)))
(nreverse mlist))))
(defun vm-display-startup-message ()
(if (sit-for 5)
(let ((lines vm-startup-message-lines))
- (message "VM %s, Copyright %s 2003 Kyle E. Jones; type ? for help"
- vm-version (if vm-xemacs-p "\251" "(C)"))
+ (message "VM %s. Type ? for help." (vm-version))
(setq vm-startup-message-displayed t)
(while (and (sit-for 4) lines)
(message (substitute-command-keys (car lines)))
(setq lines (cdr lines)))))
(message ""))
+;;;###autoload
(defun vm-toggle-read-only ()
(interactive)
(vm-select-folder-buffer)
@@ -4096,6 +4142,7 @@ files."
(setq b-list (cdr b-list)))
vbuffers )))
+;;;###autoload
(defun vm-change-folder-type (type)
"Change folder type to TYPE.
TYPE may be one of the following symbol values:
@@ -4267,3 +4314,5 @@ Interactively TYPE will be read from the minibuffer."
(setq after-revert-hook (list 'vm-after-revert-buffer-hook)))
(provide 'vm-folder)
+
+;;; vm-folder.el ends here
diff --git a/lisp/vm-grepmail.el b/lisp/vm-grepmail.el
new file mode 100644
index 0000000..3fe06ac
--- /dev/null
+++ b/lisp/vm-grepmail.el
@@ -0,0 +1,262 @@
+;;; vm-grepmail.el --- VM interface for grepmail
+;;
+;; Copyright (C) 2001-2005 Robert Widhopf-Fenk
+;;
+;; Author: Robert Widhopf-Fenk
+;; Status: Tested with XEmacs 21.4.15 & VM 7.19
+;; Keywords: VM helpers
+;; X-URL: http://www.robf.de/Hacking/elisp
+;; Version: $Id$
+
+;;
+;; This code is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 1, or (at your option)
+;; any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+;;; Commentary:
+;;
+;; Add the following line to your .vm
+;; (require 'vm-grepmail)
+;;
+
+;;; Bugs:
+;;
+;; Somehow/sometimes the parsing stuff might create a corrupted folder but
+;; sofar I have not been able to reproduce this problem!
+;;
+;; I would be thankful if you could provide me with an testing example.
+;;
+
+;;; Code:
+(eval-when-compile
+ (require 'cl))
+
+(eval-and-compile
+ (require 'vm-version)
+ (require 'vm-macro)
+ (require 'vm-misc)
+ (require 'vm-undo)
+ (require 'vm-startup)
+ (require 'vm-motion)
+ (require 'vm-summary)
+ (require 'vm-folder)
+ (require 'vm-window)
+ (require 'vm-vars))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defgroup vm nil
+ "VM"
+ :group 'mail)
+
+(defgroup vm-grepmail nil
+ "The VM grepmail lib"
+ :group 'vm)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defcustom vm-grepmail-command "grepmail"
+ "*Path to the program."
+ :group 'vm-grepmail
+ :type 'file)
+
+;;;###autoload
+(defcustom vm-grepmail-arguments (list "-q" "-m" "-R" "-e"
+ (format "%S" user-full-name))
+ "*Arguments for grepmail program."
+ :group 'vm-grepmail
+ :type '(repeat (string)))
+
+(defvar vm-grepmail-arguments-history
+ nil
+ "*History of previously used grepmail parameters.")
+
+(defvar vm-grepmail-folders-history nil
+ "*History for folders/directories for grepmail program.")
+
+(defvar vm-grepmail-folder-buffer nil)
+
+(if vm-fsfemacs-p
+ ;; For sixth arg of read-file-name in Emacs 21. cf vm-folder-history.
+ (defun vm-grepmail-folders-history (&rest ignored) t))
+
+;;;###autoload
+(defun vm-grepmail (arguments folders)
+ "A not so excellent interface to grepmail.
+Grepmail is a fast perl-script for finding mails which got lost in the
+folder jungle. End your input or folders and directories with an empty sting
+or the default folder.
+
+ARGUMENTS the command line aruments to grepmail.
+FOLDERS should be a list of files/directories to search in."
+ (interactive (list
+ (split-string
+ (read-string "grepmail arguments: "
+ (mapconcat 'identity vm-grepmail-arguments " ")
+ 'vm-grepmail-arguments-history))
+ (let ((default (or vm-folder-directory
+ "~/Mail"))
+ fd folders)
+ (while (or (not (string= fd (expand-file-name default)))
+ (string= fd ""))
+ (setq fd (vm-read-file-name
+ (format "Search folder/directory %s%s: "
+ (if (not folders)
+ "[end list with RET]" "")
+ (if folders
+ (concat "("
+ (mapconcat 'identity
+ folders ", ") ")")
+ ""))
+ default
+ default
+ t nil 'vm-grepmail-folders-history)
+ fd (expand-file-name fd))
+ (if (not (string= fd (expand-file-name default)))
+ (setq folders (add-to-list 'folders fd))))
+ (if (null folders)
+ (setq folders (add-to-list 'folders fd)))
+ folders)))
+
+ (setq vm-grepmail-arguments arguments)
+ (setq vm-grepmail-folders-history
+ (append folders vm-grepmail-folders-history))
+
+ (let ((folder-buffer (format "* VM folder: grepmail %s %s *"
+ arguments folders))
+ (process-buffer (get-buffer-create
+ (format "* grepmail %s %s *"
+ arguments folders)))
+ (vm-folder-directory (or vm-folder-directory "~/Mail"))
+ process)
+
+ (when (get-buffer folder-buffer)
+ (set-buffer folder-buffer)
+ (if vm-summary-buffer (kill-buffer vm-summary-buffer))
+ (if vm-presentation-buffer (kill-buffer vm-presentation-buffer))
+ (kill-buffer folder-buffer))
+
+ (setq folder-buffer (get-buffer-create folder-buffer))
+ (set-buffer folder-buffer)
+ (setq default-directory (expand-file-name vm-folder-directory))
+ (setq buffer-read-only nil)
+ (if (vm-multiple-frames-possible-p)
+ (vm-goto-new-frame 'folder))
+ (switch-to-buffer folder-buffer)
+ (set-buffer-modified-p nil)
+ (vm-mode)
+ (font-lock-mode -1)
+ (vm-update-summary-and-mode-line)
+ (vm-display (current-buffer) t
+ '(vm-scroll-forward vm-scroll-backward)
+ '(reading-message))
+
+ (vm-summarize t t)
+ (vm-display (current-buffer) nil nil '(reading-message))
+ (vm-display (current-buffer) t nil '(vm-next-message reading-message))
+
+ (save-excursion
+ (set-buffer process-buffer)
+ (setq default-directory (expand-file-name vm-folder-directory))
+ (erase-buffer)
+ (switch-to-buffer process-buffer)
+ (make-local-variable 'vm-grepmail-folder-buffer)
+ (setq vm-grepmail-folder-buffer folder-buffer)
+
+ (setq process
+ (apply 'start-process-shell-command "grepmail"
+ process-buffer
+ vm-grepmail-command
+ (append arguments folders)))
+
+ (if (null process)
+ (error "Cannot start grepmail"))
+ ;; set the send-filter
+ (if vm-fsfemacs-p
+ (set-buffer-process-coding-system 'raw-text-unix 'raw-text-unix))
+ (set-process-filter process 'vm-grepmail-process-filter)
+ (set-process-sentinel process 'vm-grepmail-process-done)
+ process)))
+
+(defun vm-grepmail-process-filter (process output)
+ "The PROCESS insert OUTPUT into an folder biuffer."
+ (condition-case nil ;err
+ (progn
+ (set-buffer (process-buffer process))
+ (goto-char (point-max))
+ (insert output)
+ (let (end)
+ (goto-char (1+ (point-min)))
+ (when (and (string-match "^\nFrom " output)
+ (setq end (and (re-search-forward "^\nFrom "
+ (point-max) t)
+ (match-beginning 0))))
+ (vm-grepmail-grab-message (current-buffer) (point-min) end)
+ (delete-region (point-min) end)))
+ (sit-for 0))
+ (error nil
+ ;; TODO: there are some problems here but we ignore them
+; (message "%S" err)
+; (backtrace)
+ ))
+ )
+
+(defun vm-grepmail-process-done (process state)
+ "Called when the grepmail PROCESS is finished returning STATE."
+ (message "grepmail cleanup.")
+ (setq state (process-status process))
+ (if (not (or (eq state 'exit) (eq state 'finished)
+ (not (= (process-exit-status process) 0))))
+ (error "Grepmail terminated abnormally with %S %d"
+ state (process-exit-status process)))
+
+ ;; grab the last message
+ (set-buffer (process-buffer process))
+ (goto-char (point-max))
+ (beginning-of-line)
+ (vm-grepmail-grab-message (current-buffer) (point-min) (point))
+
+ ;; cleanup
+ (let ((folder-buffer vm-grepmail-folder-buffer))
+ (kill-this-buffer)
+ (set-buffer folder-buffer)
+ (vm-next-message 1)
+ (vm-clear-modification-flag-undos)
+ (set-buffer-modified-p nil)
+ (setq major-mode 'vm-virtual-mode)
+ (if (vm-multiple-frames-possible-p)
+ (vm-set-hooks-for-frame-deletion)))
+ (message "grepmail is finished."))
+
+(defun vm-grepmail-grab-message (message-buffer start end)
+ "Assimilates a message after it is complete.
+MESSAGE-BUFFER is the buffer of the message.
+START the start position in the process output buffer.
+END the end position in the process output buffer."
+ (save-excursion
+ (set-buffer vm-grepmail-folder-buffer)
+ (let ((buffer-read-only nil))
+ (vm-save-restriction
+ (widen)
+ (goto-char (point-max))
+ (insert-buffer-substring message-buffer start end)
+ (cond ((eq major-mode 'vm-mode)
+ (vm-clear-modification-flag-undos)))
+ (vm-check-for-killed-summary)
+ (vm-assimilate-new-messages)
+ (vm-update-summary-and-mode-line)
+ (set-buffer-modified-p nil))))
+ (sit-for 0))
+
+(provide 'vm-grepmail)
+
+;;; vm-grepmail.el ends here
diff --git a/vm-imap.el b/lisp/vm-imap.el
index c3f5efc..07dcc98 100644
--- a/vm-imap.el
+++ b/lisp/vm-imap.el
@@ -1,21 +1,26 @@
-;;; Simple IMAP4 (RFC 2060) client for VM
-;;; Copyright (C) 1998, 2001, 2003 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-imap)
+;;; vm-imap.el --- Simple IMAP4 (RFC 2060) client for VM
+;;
+;; Copyright (C) 1998, 2001, 2003 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;; Copyright (C) 2006 Robert P. Goldman
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+;;; Code:
+(eval-when-compile
+ (require 'sendmail))
(if (fboundp 'define-error)
(progn
@@ -77,6 +82,8 @@
;; We remember which messages we have retrieved so that we can
;; leave the message in the mailbox, and yet not retrieve the
;; same messages again and again.
+
+;;;###autoload
(defun vm-imap-move-mail (source destination)
(let ((process nil)
(m-per-session vm-imap-messages-per-session)
@@ -193,6 +200,8 @@
"FETCH %d (RFC822.PEEK)" n))
(vm-imap-retrieve-to-target process destination
statblob nil)))
+ (message "Retrieving message %d (of %d) from %s...done"
+ n mailbox-count imapdrop)
(vm-increment retrieved)
(and b-per-session
(setq retrieved-bytes (+ retrieved-bytes message-size)))
@@ -427,6 +436,7 @@ on all the relevant IMAP servers and then immediately expunges."
(and process (vm-imap-end-session process)))
(or trouble (setq vm-imap-retrieved-messages nil))))
+;;;###autoload
(defun vm-imap-make-session (source)
(let ((process-to-shutdown nil)
(folder-type vm-folder-type)
@@ -472,7 +482,7 @@ on all the relevant IMAP servers and then immediately expunges."
(error "No port in IMAP maildrop specification, \"%s\""
source))
(if (string-match "^[0-9]+$" port)
- (setq port (string-to-int port)))
+ (setq port (string-to-number port)))
(if (null auth)
(error "No authentication method in IMAP maildrop specification, \"%s\"" source))
(if (null user)
@@ -491,7 +501,7 @@ on all the relevant IMAP servers and then immediately expunges."
(progn (message "Need password for %s" imapdrop)
(throw 'end-of-session nil))
(setq pass
- (vm-read-password
+ (read-passwd
(format "IMAP password for %s: "
imapdrop)))))))
;; save the password for the sake of
@@ -639,6 +649,7 @@ on all the relevant IMAP servers and then immediately expunges."
(vm-imap-end-session process-to-shutdown t))
(vm-tear-down-stunnel-random-data))))
+;;;###autoload
(defun vm-imap-end-session (process &optional keep-buffer)
(if (and (memq (process-status process) '(open run))
(buffer-live-p (process-buffer process)))
@@ -920,9 +931,9 @@ on all the relevant IMAP servers and then immediately expunges."
nil vm-visible-headers
vm-invisible-header-regexp)))
(set-window-point (selected-window) (point))
- (if (y-or-n-p (format "Message %d, size = %d, retrieve? " n size))
+ (if (y-or-n-p (format "Retrieve message %d (size = %d)? " n size))
'retrieve
- (if (y-or-n-p (format "Delete message %d from maildrop? " n size))
+ (if (y-or-n-p (format "Delete message %d from maildrop? " n))
'delete
'skip))))
(and work-buffer (kill-buffer work-buffer)))))
@@ -1217,7 +1228,7 @@ on all the relevant IMAP servers and then immediately expunges."
(setq obj (vm-imap-read-object process))
(if (not (eq (car obj) 'atom))
(vm-imap-protocol-error "number expected after {"))
- (setq n-octets (string-to-int
+ (setq n-octets (string-to-number
(buffer-substring (nth 1 obj)
(nth 2 obj))))
(setq obj (vm-imap-read-object process))
@@ -1508,6 +1519,19 @@ on all the relevant IMAP servers and then immediately expunges."
(setq need-ok nil))))
(vm-set-attribute-modflag-of m nil))))
+(defvar vm-imap-subst-char-in-string-buffer
+ (get-buffer-create " *subst-char-in-string*"))
+
+(defun vm-imap-subst-CRLF-for-LF (string)
+ (with-current-buffer vm-imap-subst-char-in-string-buffer
+ (erase-buffer)
+ (insert string)
+ (goto-char (point-min))
+ (while (search-forward "\n" nil t)
+ (replace-match "\r\n" nil t))
+ (buffer-substring-no-properties (point-min) (point-max))))
+
+;;;###autoload
(defun vm-imap-save-message (process m mailbox)
(let (need-ok need-plus flags response string)
;; save the message's flag along with it.
@@ -1520,7 +1544,8 @@ on all the relevant IMAP servers and then immediately expunges."
(set-buffer (vm-buffer-of (vm-real-message-of m)))
(save-restriction
(widen)
- (setq string (buffer-substring (vm-headers-of m) (vm-text-end-of m)))))
+ (setq string (buffer-substring (vm-headers-of m) (vm-text-end-of m))
+ string (vm-imap-subst-CRLF-for-LF string))))
(save-excursion
(set-buffer (process-buffer process))
(condition-case nil
@@ -1583,6 +1608,7 @@ on all the relevant IMAP servers and then immediately expunges."
there)
(list retrieve-list expunge-list)))
+;;;###autoload
(defun vm-imap-synchronize-folder (&optional interactive
do-remote-expunges
do-local-expunges
@@ -1694,6 +1720,7 @@ on all the relevant IMAP servers and then immediately expunges."
vm-imap-retrieved-messages))))
got-some)))
+;;;###autoload
(defun vm-imap-folder-check-for-mail (&optional interactive)
(if (or vm-global-block-new-mail
(null (vm-establish-new-folder-imap-session interactive)))
@@ -1702,6 +1729,7 @@ on all the relevant IMAP servers and then immediately expunges."
(vm-imap-end-session (vm-folder-imap-process))
result )))
+;;;###autoload
(defun vm-imap-find-spec-for-buffer (buffer)
(let ((list vm-imap-server-list)
(done nil))
@@ -1712,6 +1740,7 @@ on all the relevant IMAP servers and then immediately expunges."
(setq list (cdr list))))
(and list (car list))))
+;;;###autoload
(defun vm-imap-make-filename-for-spec (spec)
(let (md5 list)
(setq spec (vm-imap-normalize-spec spec))
@@ -1731,6 +1760,7 @@ on all the relevant IMAP servers and then immediately expunges."
(setq spec (mapconcat (function identity) list ":"))
spec ))
+;;;###autoload
(defun vm-imap-parse-spec-to-list (spec)
(vm-parse spec "\\([^:]+\\):?" 1 6))
@@ -1745,7 +1775,8 @@ on all the relevant IMAP servers and then immediately expunges."
spec-list (cdr spec-list)))
host-alist ))
-(defun vm-read-imap-folder-name (prompt spec-list selectable-only)
+;;;###autoload
+(defun vm-read-imap-folder-name (prompt spec-list &optional selectable-only newone)
"Read an IMAP server and mailbox, return an IMAP mailbox spec."
(let (host c-list spec process mailbox list
(vm-imap-ok-to-ask t)
@@ -1759,9 +1790,9 @@ on all the relevant IMAP servers and then immediately expunges."
process (vm-imap-make-session spec)
c-list (and process (vm-imap-mailbox-list process selectable-only)))
(vm-imap-end-session process)
- ;; evade the XEmacs dialog box.
- (let ((use-dialog-box nil))
- (setq mailbox (vm-read-string prompt c-list)))
+ (setq mailbox
+ (completing-read prompt (mapcar (lambda (c) (list c)) c-list)
+ nil (not newone)))
(setq list (vm-imap-parse-spec-to-list spec))
(setcar (nthcdr 3 list) mailbox)
(mapconcat 'identity list ":")))
@@ -1870,6 +1901,7 @@ on all the relevant IMAP servers and then immediately expunges."
(if (null (vm-imap-read-boolean-response process))
(error "IMAP RENAME of %s to %s failed" source dest)))
+;;;###autoload
(defun vm-create-imap-folder (folder)
"Create a folder on an IMAP server.
First argument FOLDER is read from the minibuffer if called
@@ -1884,7 +1916,7 @@ documentation for `vm-spool-files'."
(let ((this-command this-command)
(last-command last-command))
(list (vm-read-imap-folder-name "Create IMAP folder: "
- vm-imap-server-list nil)))))
+ vm-imap-server-list nil t)))))
(let ((vm-imap-ok-to-ask t)
process mailbox)
(save-excursion
@@ -1894,9 +1926,10 @@ documentation for `vm-spool-files'."
(vm-safe-imapdrop-string folder)))
(set-buffer (process-buffer process))
(setq mailbox (nth 3 (vm-imap-parse-spec-to-list folder)))
- (vm-imap-create-mailbox process mailbox)
+ (vm-imap-create-mailbox process mailbox t)
(message "Folder %s created" (vm-safe-imapdrop-string folder)))))
+;;;###autoload
(defun vm-delete-imap-folder (folder)
"Delete a folder on an IMAP server.
First argument FOLDER is read from the minibuffer if called
@@ -1924,6 +1957,7 @@ documentation for `vm-spool-files'."
(vm-imap-delete-mailbox process mailbox)
(message "Folder %s deleted" (vm-safe-imapdrop-string folder)))))
+;;;###autoload
(defun vm-rename-imap-folder (source dest)
"Rename a folder on an IMAP server.
Argument SOURCE and DEST are read from the minibuffer if called
@@ -1958,4 +1992,64 @@ documentation for `vm-spool-files'."
(message "Folder %s renamed to %s" (vm-safe-imapdrop-string source)
(vm-safe-imapdrop-string dest)))))
+;;; Robert Fenk's draft function for saving messages to IMAP folders.
+(defun vm-imap-save-composition ()
+ "Saves the current composition in the IMAP folder given by the IMAP-FCC header.
+
+Add this to your `mail-send-hook' and start composing from an IMAP folder."
+ (let (process flags response string
+ (mailbox (vm-mail-get-header-contents "IMAP-FCC:")))
+ (when mailbox
+ (save-excursion
+ (vm-select-folder-buffer)
+ (vm-establish-new-folder-imap-session)
+ (setq process (vm-folder-imap-process)))
+ (save-excursion
+ (vm-mail-mode-remove-header "IMAP-FCC:")
+ (goto-char (point-min))
+ (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$"))
+ (setq string (concat (buffer-substring (point-min) (match-beginning 0))
+ (buffer-substring
+ (match-end 0) (point-max))))
+ ;; this can go awry if the process has died...
+ (set-buffer (process-buffer process))
+ (condition-case nil
+ (vm-imap-create-mailbox process mailbox)
+ (error nil))
+ (vm-imap-send-command process
+ (format "APPEND %s %s {%d}"
+ (vm-imap-quote-string mailbox)
+ (if flags flags "()")
+ (length string)))
+ ;; could these be done with vm-imap-read-boolean-response?
+ (let ((need-plus t))
+ (while need-plus
+ (let ((response (vm-imap-read-response process)))
+ (cond ((vm-imap-response-matches response 'VM 'NO)
+ (error "server said NO to APPEND command"))
+ ((vm-imap-response-matches response 'VM 'BAD)
+ (vm-imap-protocol-error "server said BAD to APPEND command"))
+ ((vm-imap-response-matches response '* 'BYE)
+ (vm-imap-protocol-error "server said BYE to APPEND command"))
+ ((vm-imap-response-matches response '+)
+ (setq need-plus nil))))))
+ (vm-imap-send-command process string nil t)
+ (let ((need-ok t))
+ (while need-ok
+ (let ((response (vm-imap-read-response process)))
+ (cond ((vm-imap-response-matches response 'VM 'NO)
+ (error "server said NO to APPEND data"))
+ ((vm-imap-response-matches response 'VM 'BAD)
+ (vm-imap-protocol-error "server said BAD to APPEND data"))
+ ((vm-imap-response-matches response '* 'BYE)
+ (vm-imap-protocol-error "server said BYE to APPEND data"))
+ ((vm-imap-response-matches response 'VM 'OK)
+ (setq need-ok nil))))))
+ (when (and (processp process)
+ (memq (process-status process) '(open run)))
+ (vm-imap-end-session process))
+ ))))
+
(provide 'vm-imap)
+
+;;; vm-imap.el ends here
diff --git a/lisp/vm-license.el b/lisp/vm-license.el
new file mode 100644
index 0000000..682334c
--- /dev/null
+++ b/lisp/vm-license.el
@@ -0,0 +1,54 @@
+;;; vm-license.el --- Code to show VM's warranty and copying restrictions
+;;
+;; Copyright (C) 1989, 1994 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+;;; Code:
+
+;;;###autoload
+(defun vm-show-copying-restrictions (&optional warranty)
+ "Show VM's license, i.e. the GPL."
+ (interactive)
+ (require 'info)
+ (let ((pop-up-windows (eq vm-mutable-windows t))
+ (pop-up-frames (and vm-mutable-frames vm-frame-per-help)))
+ (or
+ (condition-case ()
+ (progn (Info-goto-node "(vm)License") t)
+ (error nil))
+ (condition-case ()
+ (progn (Info-goto-node "(vm.info)License") t)
+ (error nil))
+ (error "VM Info documentation appears not to be installed"))
+ (vm-display (current-buffer) t nil nil)
+ (vm-display nil nil '(vm-show-copying-restrictions vm-show-no-warranty)
+ (list this-command))
+ (if warranty
+ (let ((case-fold-search nil))
+ (search-forward "NO WARRANTY\n" nil t)
+ (forward-line -1)
+ (set-window-start (selected-window) (point))))))
+
+;;;###autoload
+(defun vm-show-no-warranty ()
+ "Display \"NO WARRANTY\" section of the GNU General Public License."
+ (interactive)
+ (vm-show-copying-restrictions t))
+
+(provide 'vm-license)
+
+;;; vm-license.el ends here
diff --git a/vm-macro.el b/lisp/vm-macro.el
index c30ac71..dd80fe0 100644
--- a/vm-macro.el
+++ b/lisp/vm-macro.el
@@ -1,22 +1,23 @@
-;;; Random VM macros
-;;; Copyright (C) 1989-1997 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-macro)
-
+;;; vm-macro.el --- Random VM macros
+;;
+;; Copyright (C) 1989-1997 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+;;; Code:
(defsubst vm-marker (pos &optional buffer)
(set-marker (make-marker) pos buffer))
@@ -56,7 +57,7 @@
(t 'raw-text)))
;;; can't use defsubst where quoting is needed in some places but
-;;; not others.
+;; not others.
;; save-restriction flubs restoring the clipping region if you
;; (widen) and modify text outside the old region.
@@ -108,3 +109,5 @@
(list 'setq variable (list '1- variable)))
(provide 'vm-macro)
+
+;;; vm-macro.el ends here
diff --git a/vm-mark.el b/lisp/vm-mark.el
index 2b40751..6f4e875 100644
--- a/vm-mark.el
+++ b/lisp/vm-mark.el
@@ -1,22 +1,25 @@
-;;; Commands for handling messages marks
-;;; Copyright (C) 1990, 1993, 1994 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+;;; vm-mark.el --- Commands for handling messages marks
+;;
+;; Copyright (C) 1990, 1993, 1994 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-;;(provide 'vm-mark)
+;;; Code:
+;;;###autoload
(defun vm-clear-all-marks ()
"Removes all message marks in the current folder."
(interactive)
@@ -36,6 +39,7 @@
(vm-update-summary-and-mode-line)
(message "Clearing all marks... done"))
+;;;###autoload
(defun vm-toggle-all-marks ()
"Toggles all message marks in the current folder.
Messages that are unmarked will become marked and messages that are
@@ -55,6 +59,7 @@ marked will become unmarked."
(vm-update-summary-and-mode-line)
(message "Toggling all marks... done"))
+;;;###autoload
(defun vm-mark-all-messages ()
"Mark all messages in the current folder."
(interactive)
@@ -72,6 +77,7 @@ marked will become unmarked."
(vm-update-summary-and-mode-line)
(message "Marking all messages... done"))
+;;;###autoload
(defun vm-mark-message (count)
"Mark the current message.
Numeric prefix argument N means mark the current message and the next
@@ -99,6 +105,7 @@ previous N-1 messages."
'(vm-mark-message marking-message))
(vm-update-summary-and-mode-line))
+;;;###autoload
(defun vm-unmark-message (count)
"Remove the mark from the current message.
Numeric prefix argument N means unmark the current message and the next
@@ -121,6 +128,7 @@ previous N-1 messages."
'(vm-unmark-message marking-message))
(vm-update-summary-and-mode-line))
+;;;###autoload
(defun vm-mark-summary-region ()
"Mark all messages with summary lines contained in the region."
(interactive)
@@ -137,6 +145,7 @@ previous N-1 messages."
'(vm-mark-summary-region marking-message))
(vm-update-summary-and-mode-line))
+;;;###autoload
(defun vm-unmark-summary-region ()
"Remove marks from messages with summary lines contained in the region."
(interactive)
@@ -205,6 +214,7 @@ previous N-1 messages."
(if (= 1 count) "" "s")
(if val "" "un"))))
+;;;###autoload
(defun vm-mark-matching-messages (selector &optional arg)
"Mark messages matching some criterion.
You can use any of the virtual folder selectors, except for the
@@ -220,6 +230,7 @@ variable vm-virtual-folder-alist for more information."
(vm-error-if-folder-empty)
(vm-mark-or-unmark-messages-with-selector t selector arg))
+;;;###autoload
(defun vm-unmark-matching-messages (selector &optional arg)
"Unmark messages matching some criterion.
You can use any of the virtual folder selectors, except for the
@@ -235,6 +246,7 @@ variable vm-virtual-folder-alist for more information."
(vm-error-if-folder-empty)
(vm-mark-or-unmark-messages-with-selector nil selector arg))
+;;;###autoload
(defun vm-mark-thread-subtree ()
"Mark all messages in the thread tree rooted at the current message."
(interactive)
@@ -244,6 +256,7 @@ variable vm-virtual-folder-alist for more information."
(vm-error-if-folder-empty)
(vm-mark-or-unmark-thread-subtree t))
+;;;###autoload
(defun vm-unmark-thread-subtree ()
"Unmark all messages in the thread tree rooted at the current message."
(interactive)
@@ -280,6 +293,7 @@ variable vm-virtual-folder-alist for more information."
(list this-command 'marking-message))
(vm-update-summary-and-mode-line))
+;;;###autoload
(defun vm-mark-messages-same-subject ()
"Mark all messages with the same subject as the current message."
(interactive)
@@ -289,6 +303,7 @@ variable vm-virtual-folder-alist for more information."
(vm-error-if-folder-empty)
(vm-mark-or-unmark-messages-same-subject t))
+;;;###autoload
(defun vm-unmark-messages-same-subject ()
"Unmark all messages with the same subject as the current message."
(interactive)
@@ -322,6 +337,7 @@ variable vm-virtual-folder-alist for more information."
(list this-command 'marking-message))
(vm-update-summary-and-mode-line))
+;;;###autoload
(defun vm-mark-messages-same-author ()
"Mark all messages with the same author as the current message."
(interactive)
@@ -331,6 +347,7 @@ variable vm-virtual-folder-alist for more information."
(vm-error-if-folder-empty)
(vm-mark-or-unmark-messages-same-author t))
+;;;###autoload
(defun vm-unmark-messages-same-author ()
"Unmark all messages with the same author as the current message."
(interactive)
@@ -405,6 +422,7 @@ variable vm-virtual-folder-alist for more information."
(if (= 1 count) "" "s")
(if val "" "un"))))
+;;;###autoload
(defun vm-mark-matching-messages-with-virtual-folder (name)
"Mark messages that are matched by the selectors of virtual folder NAME."
(interactive
@@ -419,6 +437,7 @@ variable vm-virtual-folder-alist for more information."
(vm-error-if-folder-empty)
(vm-mark-or-unmark-messages-with-virtual-folder t name))
+;;;###autoload
(defun vm-unmark-matching-messages-with-virtual-folder (name)
"Unmark messages that are matched by the selectors of virtual folder NAME."
(interactive
@@ -433,6 +452,7 @@ variable vm-virtual-folder-alist for more information."
(vm-error-if-folder-empty)
(vm-mark-or-unmark-messages-with-virtual-folder nil name))
+;;;###autoload
(defun vm-next-command-uses-marks ()
"Does nothing except insure that the next VM command will operate only
on the marked messages in the current folder. This only works for
@@ -444,6 +464,7 @@ not work."
(vm-display nil nil '(vm-next-command-uses-marks)
'(vm-next-command-uses-marks)))
+;;;###autoload
(defun vm-marked-messages ()
(let (list (mp vm-message-list))
(while mp
@@ -452,9 +473,12 @@ not work."
(setq mp (cdr mp)))
(nreverse list)))
+;;;###autoload
(defun vm-mark-help ()
(interactive)
(vm-display nil nil '(vm-mark-help) '(vm-mark-help))
(message "MM = mark, MU = unmark, Mm = mark all, Mu = unmark all, MN = use marks, ..."))
(provide 'vm-mark)
+
+;;; vm-mark.el ends here
diff --git a/vm-menu.el b/lisp/vm-menu.el
index 6d997f4..14d8973 100644
--- a/vm-menu.el
+++ b/lisp/vm-menu.el
@@ -1,50 +1,58 @@
-;;; Menu related functions and commands
-;;; Copyright (C) 1995, 1997 Kyle E. Jones
-;;;
-;;; Folders menu derived from
-;;; vm-folder-menu.el
-;;; v1.10; 03-May-1994
-;;; Copyright (C) 1994 Heiko Muenkel
-;;; email: muenkel@tnt.uni-hannover.de
-;;; Used with permission and my thanks.
-;;; Changed 18-May-1995, Kyle Jones
-;;; Cosmetic string changes, changed some variable names
-;;; and interfaced it with FSF Emacs via easymenu.el.
-;;;
-;;; Tree menu code is essentially tree-menu.el with renamed functions
-;;; tree-menu.el
-;;; v1.20; 10-May-1994
-;;; Copyright (C) 1994 Heiko Muenkel
-;;; email: muenkel@tnt.uni-hannover.de
-;;;
-;;; Changed 18-May-1995, Kyle Jones
-;;; Removed the need for the utils.el package and references thereto.
-;;; Changed file-truename calls to tree-menu-file-truename so
-;;; the calls could be made compatible with FSF Emacs 19's
-;;; file-truename function.
-;;; Changed 30-May-1995, Kyle Jones
-;;; Renamed functions: tree- -> vm-menu-hm-tree.
-;;; Changed 5-July-1995, Kyle Jones
-;;; Removed the need for -A in ls flags.
-;;; Some systems' ls don't support -A.
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-menu)
-
-(defvar vm-menu-folders-menu
+;;; vm-menu.el --- Menu related functions and commands
+;;
+;; Copyright (C) 1994 Heiko Muenkel
+;; Copyright (C) 1995, 1997 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+;;
+;;; History:
+;;
+;; Folders menu derived from
+;; vm-folder-menu.el
+;; v1.10; 03-May-1994
+;; Copyright (C) 1994 Heiko Muenkel
+;; email: muenkel@tnt.uni-hannover.de
+;; Used with permission and my thanks.
+;; Changed 18-May-1995, Kyle Jones
+;; Cosmetic string changes, changed some variable names
+;; and interfaced it with FSF Emacs via easymenu.el.
+;;
+;; Tree menu code is essentially tree-menu.el with renamed functions
+;; tree-menu.el
+;; v1.20; 10-May-1994
+;; Copyright (C) 1994 Heiko Muenkel
+;; email: muenkel@tnt.uni-hannover.de
+;;
+;; Changed 18-May-1995, Kyle Jones
+;; Removed the need for the utils.el package and references thereto.
+;; Changed file-truename calls to tree-menu-file-truename so
+;; the calls could be made compatible with FSF Emacs 19's
+;; file-truename function.
+;; Changed 30-May-1995, Kyle Jones
+;; Renamed functions: tree- -> vm-menu-hm-tree.
+;; Changed 5-July-1995, Kyle Jones
+;; Removed the need for -A in ls flags.
+;; Some systems' ls don't support -A.
+
+(eval-when-compile
+ (defvar current-menubar nil))
+
+;;; Code:
+(defvar vm-menu-folders-menu
'("Manipulate Folders"
["Make Folders Menu" vm-menu-hm-make-folder-menu vm-folder-directory])
"VM folder menu list.")
@@ -128,7 +136,6 @@
"----"
["Expose/Hide Headers" vm-expose-hidden-headers vm-message-list]
"----"
- "----"
["Next Message" vm-next-message t]
["Previous Message" vm-previous-message t]
"---"
@@ -149,6 +156,8 @@
(defvar vm-menu-virtual-menu
'("Virtual"
["Visit Virtual Folder" vm-visit-virtual-folder t]
+ ["Visit Virtual Folder Same Author" vm-visit-virtual-folder-same-author t]
+ ["Visit Virtual Folder Same Subject" vm-visit-virtual-folder-same-subject t]
["Create Virtual Folder" vm-create-virtual-folder t]
["Apply Virtual Folder" vm-apply-virtual-folder t]
"---"
@@ -229,7 +238,9 @@
))
(defvar vm-menu-help-menu
- '("Help!"
+ '("Help"
+ ["Switch to Emacs Toolbar" vm-menu-toggle-menubar]
+ "---"
["What Now?" vm-help t]
["Describe Mode" describe-mode t]
["Revert Folder (back to disk version)" revert-buffer (vm-menu-can-revert-p)]
@@ -359,8 +370,7 @@
:selected (eq vm-mime-8bit-text-transfer-encoding 'base64)])
"----"
["Attach File..." vm-mime-attach-file vm-send-using-mime]
-;; ["Attach MIME Message..." vm-mime-attach-mime-file
-;; vm-send-using-mime]
+ ["Attach MIME Message..." vm-mime-attach-mime-file vm-send-using-mime]
["Encode MIME, But Don't Send" vm-mime-encode-composition
(and vm-send-using-mime
(null (vm-mail-mode-get-header-contents "MIME-Version:")))]
@@ -396,6 +406,8 @@
(car (vm-mm-layout-type
(vm-mime-get-button-layout e))))]))
"---"
+ ["Undo" vm-undo]
+ "---"
["Save to File" vm-mime-reader-map-save-file t]
["Save to Folder" vm-mime-reader-map-save-message
(let ((layout (vm-mime-run-display-function-at-point
@@ -410,10 +422,10 @@
(car (vm-mm-layout-type layout))))))]
["Send to Printer" (vm-mime-run-display-function-at-point
'vm-mime-send-body-to-printer) t]
- ["Feed to Shell Pipeline (display output)"
+ ["Pipe to Shell Command (display output)"
(vm-mime-run-display-function-at-point
'vm-mime-pipe-body-to-queried-command) t]
- ["Feed to Shell Pipeline (discard output)"
+ ["Pipe to Shell Command (discard output)"
(vm-mime-run-display-function-at-point
'vm-mime-pipe-body-to-queried-command-discard-output) t]
["Attach to Message Composition Buffer"
@@ -537,6 +549,39 @@
'attachment)])
(
,@(if (vm-menu-fsfemacs19-menus-p)
+ (list "Set Content Encoding..."
+ "Set Content Encoding..."
+ "---"
+ "---")
+ (list "Set Content Encoding..."))
+ ["Guess"
+ (vm-mime-set-attachment-encoding-at-point "guess")
+ :active vm-send-using-mime
+ :style radio
+ :selected (eq (vm-mime-attachment-encoding-at-point) nil)]
+ ["Binary"
+ (vm-mime-set-attachment-encoding-at-point "binary")
+ :active vm-send-using-mime
+ :style radio
+ :selected (string= (vm-mime-attachment-encoding-at-point) "binary")]
+ ["7bit"
+ (vm-mime-set-attachment-encoding-at-point "7bit")
+ :active vm-send-using-mime
+ :style radio
+ :selected (string= (vm-mime-attachment-encoding-at-point) "7bit")]
+ ["8bit"
+ (vm-mime-set-attachment-encoding-at-point "8bit")
+ :active vm-send-using-mime
+ :style radio
+ :selected (string= (vm-mime-attachment-encoding-at-point) "8bit")]
+ ["quoted-printable"
+ (vm-mime-set-attachment-encoding-at-point "quoted-printable")
+ :active vm-send-using-mime
+ :style radio
+ :selected (string= (vm-mime-attachment-encoding-at-point) "quoted-printable")]
+ )
+ (
+ ,@(if (vm-menu-fsfemacs19-menus-p)
(list "Forward Local External Bodies"
"Forward Local External Bodies"
"---"
@@ -552,6 +597,12 @@
:active vm-send-using-mime
:style radio
:selected (not (vm-mime-attachment-forward-local-refs-at-point))])
+ ["Delete"
+ (vm-mime-delete-attachment-button)
+ :style button]
+ ["Delete, but keep infos"
+ (vm-mime-delete-attachment-button-keep-infos)
+ :style button]
)))
(defvar vm-menu-image-menu
@@ -717,9 +768,9 @@ set to the command name so that window configuration will be done."
(interactive)
(vm-select-folder-buffer)
(setq this-command 'vm-create-virtual-folder)
- (vm-create-virtual-folder 'subject (regexp-quote
- (vm-so-sortable-subject
- (car vm-message-pointer)))))
+ (vm-create-virtual-folder 'sortable-subject (regexp-quote
+ (vm-so-sortable-subject
+ (car vm-message-pointer)))))
(defun vm-menu-create-author-virtual-folder ()
(interactive)
@@ -742,58 +793,58 @@ set to the command name so that window configuration will be done."
(dummy (make-sparse-keymap)))
;; initialize all the vm-menu-fsfemacs-*-menu variables
;; with the menus.
- (vm-easy-menu-define vm-menu-fsfemacs-help-menu (list dummy) nil
+ (easy-menu-define vm-menu-fsfemacs-help-menu (list dummy) nil
vm-menu-help-menu)
- (vm-easy-menu-define vm-menu-fsfemacs-dispose-menu (list dummy) nil
+ (easy-menu-define vm-menu-fsfemacs-dispose-menu (list dummy) nil
(cons "Dispose" (nthcdr 4 vm-menu-dispose-menu)))
- (vm-easy-menu-define vm-menu-fsfemacs-dispose-popup-menu (list dummy) nil
+ (easy-menu-define vm-menu-fsfemacs-dispose-popup-menu (list dummy) nil
vm-menu-dispose-menu)
-;; (vm-easy-menu-define vm-menu-fsfemacs-undo-menu (list dummy) nil
+;; (easy-menu-define vm-menu-fsfemacs-undo-menu (list dummy) nil
;; (list "Undo" vm-menu-undo-menu))
- (vm-easy-menu-define vm-menu-fsfemacs-virtual-menu (list dummy) nil
+ (easy-menu-define vm-menu-fsfemacs-virtual-menu (list dummy) nil
vm-menu-virtual-menu)
- (vm-easy-menu-define vm-menu-fsfemacs-sort-menu (list dummy) nil
+ (easy-menu-define vm-menu-fsfemacs-sort-menu (list dummy) nil
vm-menu-sort-menu)
- (vm-easy-menu-define vm-menu-fsfemacs-label-menu (list dummy) nil
+ (easy-menu-define vm-menu-fsfemacs-label-menu (list dummy) nil
vm-menu-label-menu)
- (vm-easy-menu-define vm-menu-fsfemacs-mark-menu (list dummy) nil
+ (easy-menu-define vm-menu-fsfemacs-mark-menu (list dummy) nil
vm-menu-mark-menu)
- (vm-easy-menu-define vm-menu-fsfemacs-send-menu (list dummy) nil
+ (easy-menu-define vm-menu-fsfemacs-send-menu (list dummy) nil
vm-menu-send-menu)
- (vm-easy-menu-define vm-menu-fsfemacs-motion-menu (list dummy) nil
+ (easy-menu-define vm-menu-fsfemacs-motion-menu (list dummy) nil
vm-menu-motion-menu)
-;; (vm-easy-menu-define vm-menu-fsfemacs-folders-menu (list dummy) nil
+;; (easy-menu-define vm-menu-fsfemacs-folders-menu (list dummy) nil
;; vm-menu-folders-menu)
- (vm-easy-menu-define vm-menu-fsfemacs-folder-menu (list dummy) nil
+ (easy-menu-define vm-menu-fsfemacs-folder-menu (list dummy) nil
vm-menu-folder-menu)
- (vm-easy-menu-define vm-menu-fsfemacs-vm-menu (list dummy) nil
+ (easy-menu-define vm-menu-fsfemacs-vm-menu (list dummy) nil
vm-menu-vm-menu)
;; for mail mode
- (vm-easy-menu-define vm-menu-fsfemacs-mail-menu (list dummy) nil
+ (easy-menu-define vm-menu-fsfemacs-mail-menu (list dummy) nil
vm-menu-mail-menu)
;; subject menu
- (vm-easy-menu-define vm-menu-fsfemacs-subject-menu (list dummy) nil
+ (easy-menu-define vm-menu-fsfemacs-subject-menu (list dummy) nil
vm-menu-subject-menu)
;; author menu
- (vm-easy-menu-define vm-menu-fsfemacs-author-menu (list dummy) nil
+ (easy-menu-define vm-menu-fsfemacs-author-menu (list dummy) nil
vm-menu-author-menu)
;; url browser menu
- (vm-easy-menu-define vm-menu-fsfemacs-url-browser-menu (list dummy) nil
+ (easy-menu-define vm-menu-fsfemacs-url-browser-menu (list dummy) nil
vm-menu-url-browser-menu)
;; mailto url browser menu
- (vm-easy-menu-define vm-menu-fsfemacs-mailto-url-browser-menu
+ (easy-menu-define vm-menu-fsfemacs-mailto-url-browser-menu
(list dummy) nil
vm-menu-url-browser-menu)
;; mime dispose menu
- (vm-easy-menu-define vm-menu-fsfemacs-mime-dispose-menu
+ (easy-menu-define vm-menu-fsfemacs-mime-dispose-menu
(list dummy) nil
vm-menu-mime-dispose-menu)
;; attachment menu
- (vm-easy-menu-define vm-menu-fsfemacs-attachment-menu
+ (easy-menu-define vm-menu-fsfemacs-attachment-menu
(list dummy) nil
vm-menu-attachment-menu)
;; image menu
- (vm-easy-menu-define vm-menu-fsfemacs-image-menu
+ (easy-menu-define vm-menu-fsfemacs-image-menu
(list dummy) nil
vm-menu-image-menu)
;; block the global menubar entries in the map so that VM
@@ -818,7 +869,7 @@ set to the command name so that window configuration will be done."
(folder
(cons "Folder" vm-menu-fsfemacs-folder-menu))
(help
- (cons "Help!" vm-menu-fsfemacs-help-menu))
+ (cons "Help" vm-menu-fsfemacs-help-menu))
(label
(cons "Label" vm-menu-fsfemacs-label-menu))
(mark
@@ -830,16 +881,11 @@ set to the command name so that window configuration will be done."
(sort
(cons "Sort" vm-menu-fsfemacs-sort-menu))
(virtual
- (cons "Virtual" vm-menu-fsfemacs-virtual-menu))
- (emacs
- (cons "[Emacs]" 'vm-menu-toggle-menubar))
- (undo
- (cons "[Undo]" 'vm-undo))))
- cons
- (vec (vector 'rootmenu 'vm nil))
+ (cons "Virtual" vm-menu-fsfemacs-virtual-menu))))
+ cons (vec (vector 'rootmenu 'vm nil))
;; menus appear in the opposite order that we
;; define-key them.
- (menu-list
+ (menu-list
(if (consp vm-use-menus)
(reverse vm-use-menus)
(list 'help nil 'dispose 'virtual 'sort
@@ -1162,7 +1208,7 @@ set to the command name so that window configuration will be done."
(vm-menu-set-menubar-dirty-flag)
(cond ((vm-menu-fsfemacs-menus-p)
(makunbound 'vm-menu-fsfemacs-virtual-menu)
- (vm-easy-menu-define vm-menu-fsfemacs-virtual-menu
+ (easy-menu-define vm-menu-fsfemacs-virtual-menu
(list (make-sparse-keymap))
nil
vm-menu-virtual-menu)
@@ -1224,7 +1270,7 @@ set to the command name so that window configuration will be done."
(vm-menu-set-menubar-dirty-flag)
(cond ((vm-menu-fsfemacs-menus-p)
(makunbound 'vm-menu-fsfemacs-folder-menu)
- (vm-easy-menu-define vm-menu-fsfemacs-folder-menu
+ (easy-menu-define vm-menu-fsfemacs-folder-menu
(list (make-sparse-keymap))
nil
vm-menu-folder-menu)
@@ -1279,7 +1325,7 @@ set to the command name so that window configuration will be done."
"Create a subdir in PARENT-DIR."
(interactive "DCreate new directory in: ")
(setq parent-dir (or parent-dir vm-folder-directory))
- (make-directory
+ (make-directory
(expand-file-name (read-file-name
(format "Create directory in %s called: "
parent-dir)
@@ -1302,19 +1348,19 @@ set to the command name so that window configuration will be done."
(setq vm-menu-folders-menu
(cons "Manipulate Folders"
(list (cons "Visit Inboxes "
- (vm-menu-hm-tree-make-menu
+ (vm-menu-hm-tree-make-menu
inbox-list
'vm-visit-folder
t))
(cons "Visit Folder "
- (vm-menu-hm-tree-make-menu
+ (vm-menu-hm-tree-make-menu
folder-list
'vm-visit-folder
t
vm-menu-hm-no-hidden-dirs
vm-menu-hm-hidden-file-list))
(cons "Save Message "
- (vm-menu-hm-tree-make-menu
+ (vm-menu-hm-tree-make-menu
folder-list
'vm-save-message
t
@@ -1322,7 +1368,7 @@ set to the command name so that window configuration will be done."
vm-menu-hm-hidden-file-list))
"----"
(cons "Delete Folder "
- (vm-menu-hm-tree-make-menu
+ (vm-menu-hm-tree-make-menu
folder-list
'vm-menu-hm-delete-folder
t
@@ -1331,7 +1377,7 @@ set to the command name so that window configuration will be done."
t
))
(cons "Rename Folder "
- (vm-menu-hm-tree-make-menu
+ (vm-menu-hm-tree-make-menu
folder-list
'vm-menu-hm-rename-folder
t
@@ -1340,7 +1386,7 @@ set to the command name so that window configuration will be done."
t
))
(cons "Make New Directory in..."
- (vm-menu-hm-tree-make-menu
+ (vm-menu-hm-tree-make-menu
(cons (list vm-folder-directory) folder-list)
'vm-menu-hm-create-dir
t
@@ -1364,7 +1410,7 @@ set to the command name so that window configuration will be done."
(add-menu '("Folder") "Manipulate Folders"
(cdr vm-menu-folders-menu) "Motion"))))
((vm-menu-fsfemacs-menus-p)
- (vm-easy-menu-define vm-menu-fsfemacs-folders-menu
+ (easy-menu-define vm-menu-fsfemacs-folders-menu
(list (make-sparse-keymap))
nil
vm-menu-folders-menu)
@@ -1374,11 +1420,11 @@ set to the command name so that window configuration will be done."
;;; Muenkel tree-menu code
-(defvar vm-menu-hm-tree-ls-flags "-aFLR"
+(defvar vm-menu-hm-tree-ls-flags "-aFLR"
"*A String with the flags used in the function
vm-menu-hm-tree-ls-in-temp-buffer for the ls command.
-Be careful if you want to change this variable.
-The ls command must append a / on all files which are directories.
+Be careful if you want to change this variable.
+The ls command must append a / on all files which are directories.
The original flags are -aFLR.")
@@ -1406,8 +1452,8 @@ The original flags are -aFLR.")
(end-of-line)
(point)))))
(while (not (string= filename ""))
- (setq
- list
+ (setq
+ list
(append
list
(list
@@ -1418,7 +1464,7 @@ The original flags are -aFLR.")
(search-forward (concat root filename ":"))
(forward-line)
(vm-menu-hm-tree-make-file-list-1 (concat root filename "/")
- (list (vm-menu-hm-tree-menu-file-truename
+ (list (vm-menu-hm-tree-menu-file-truename
filename
root)))))
((char-equal (char-after (- (point) 1)) ?*)
@@ -1438,7 +1484,7 @@ The original flags are -aFLR.")
(defun vm-menu-hm-tree-make-file-list (dir)
"Makes a list with the files and subdirectories of DIR.
-The list looks like: ((dirname1 file1 file2)
+The list looks like: ((dirname1 file1 file2)
file3
(dirname2 (dirname3 file4 file5) file6))"
(save-window-excursion
@@ -1448,7 +1494,7 @@ The list looks like: ((dirname1 file1 file2)
;; (while (string-match "/$" dir)
;; (setq dir (substring dir 0 -1)))
(vm-menu-hm-tree-ls-in-temp-buffer dir
- (generate-new-buffer-name
+ (generate-new-buffer-name
vm-menu-hm-tree-temp-buffername))
(let ((list nil))
(setq list (vm-menu-hm-tree-make-file-list-1 dir nil))
@@ -1459,22 +1505,22 @@ The list looks like: ((dirname1 file1 file2)
(defun vm-menu-hm-tree-hide-file-p (filename re-hidden-file-list)
"t, if one of the regexps in RE-HIDDEN-FILE-LIST matches the FILENAME."
(cond ((not re-hidden-file-list) nil)
- ((string-match (car re-hidden-file-list)
+ ((string-match (car re-hidden-file-list)
(vm-menu-hm-tree-menu-file-truename filename)))
(t (vm-menu-hm-tree-hide-file-p filename (cdr re-hidden-file-list)))))
-(defun vm-menu-hm-tree-make-menu (dirlist
- function
- selectable
- &optional
+(defun vm-menu-hm-tree-make-menu (dirlist
+ function
+ selectable
+ &optional
no-hidden-dirs
re-hidden-file-list
include-current-dir)
"Returns a menu list.
-Each item of the menu list has the form
+Each item of the menu list has the form
[\"subdir\" (FUNCTION \"dir\") SELECTABLE].
-Hidden directories (with a leading point) are suppressed,
+Hidden directories (with a leading point) are suppressed,
if NO-HIDDEN-DIRS are non nil. Also all files which are
matching a regexp in RE-HIDDEN-FILE-LIST are suppressed.
If INCLUDE-CURRENT-DIR non nil, then an additional command
@@ -1493,12 +1539,12 @@ for the current directory (.) is inserted."
selectable)))))
((and (listp subdir)
(or (not no-hidden-dirs)
- (not (char-equal
+ (not (char-equal
?.
- (string-to-char
+ (string-to-char
(file-name-nondirectory (car subdir))))))
(setq menulist
- (append
+ (append
menulist
(list
(cons (file-name-nondirectory (car subdir))
@@ -1528,3 +1574,5 @@ for the current directory (.) is inserted."
)
(provide 'vm-menu)
+
+;;; vm-menu.el ends here
diff --git a/lisp/vm-message-history.el b/lisp/vm-message-history.el
new file mode 100644
index 0000000..0deca4a
--- /dev/null
+++ b/lisp/vm-message-history.el
@@ -0,0 +1,203 @@
+;;; vm-message-history.el --- Move backward & forward through selected messages
+;; -*-unibyte: t; coding: iso-8859-1;-*-
+
+;; Copyright © 2003 Kevin Rodgers
+
+;; Author: Kevin Rodgers <ihs_4664@yahoo.com>
+;; Created: 6 Oct 2003
+;; Version: $Revision: 1.2 $
+;; Keywords: mail, history
+;; RCS: $Id: vm-message-history.el,v 1.2 2003/10/08 14:18:42 kevinr Exp $
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2 of
+;; the License, or (at your option) any later version.
+
+;; This program is distributed in the hope that it will be
+;; useful, but WITHOUT ANY WARRANTY; without even the implied
+;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+;; PURPOSE. See the GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public
+;; License along with this program; if not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+;; MA 02111-1307 USA
+
+;;; Commentary:
+
+;; VM defines the `vm-goto-message-last-seen' command (bound to TAB) to
+;; toggle between 2 messages, but doesn't provide a general history
+;; mechanism. This library allows the user to move backward and forward
+;; through the messages that have already been selected in each folder.
+;; It mimics a web browser in that selecting a message causes more
+;; recently selected messages in the history list to be forgotten
+;; (except when using `vm-goto-message-last-seen' or one of the
+;; vm-message-history.el commands).
+
+;; Usage:
+;; (require 'vm-message-history)
+;; M-x vm-visit-folder
+;; M-x vm-message-history-backward ; C-c b, Motion -> Backward in History
+;; M-x vm-message-history-forward ; C-c f, Motion -> Forward in History
+;; M-x vm-message-history-browse ; Motion -> Browse History
+
+;; To do:
+;; 1. Expunged messages in the history list?
+
+;;; Code:
+
+(require 'vm) ; vm-message-pointer, vm-message-list,
+ ; vm-select-folder-buffer,
+ ; vm-preview-current-message,
+ ; vm-record-and-change-message-pointer,
+ ; vm-summary-sprintf
+
+;; (or (fboundp 'define-key-after)
+;; (require 'fsf-compat)) ; XEmacs
+
+(defgroup vm-message-history nil
+ "Message history for VM folders."
+ :group 'vm)
+
+(defcustom vm-message-history-max 32
+ "The number of read or previewed messages in each folder's history."
+ :type 'integer
+ :group 'vm-message-history)
+
+(defvar vm-message-history nil
+ "A list of messages in the current folder.")
+
+(defvar vm-message-history-pointer nil
+ "The cons in `vm-message-history' whose car is the current message.")
+
+(defun vm-message-history-init ()
+ "Initialize `vm-message-history'.
+Also bind keys in `vm-mode-map' to `vm-message-history-backward' and
+`vm-message-history-forward'."
+ (set (make-local-variable 'vm-message-history-pointer)
+ (set (make-local-variable 'vm-message-history) '()))
+ ;; Bind keys and add menu items in vm-mode-map and vm-summary-mode-map:
+ (local-set-key "\C-cb" 'vm-message-history-backward)
+ (local-set-key "\C-cf" 'vm-message-history-forward)
+ (define-key-after (local-key-binding [menu-bar vm-menubar-motion]) [backward]
+ '("Backward in History" . vm-message-history-backward)
+ (car (where-is-internal 'vm-goto-message-last-seen
+ (local-key-binding
+ [menu-bar vm-menubar-motion]))))
+ (define-key-after (local-key-binding [menu-bar vm-menubar-motion]) [forward]
+ '("Forward in History" . vm-message-history-forward)
+ [backward])
+ (define-key-after (local-key-binding [menu-bar vm-menubar-motion]) [history]
+ '("Browse History" . vm-message-history-browse)
+ [forward]))
+
+(defun vm-message-history-add ()
+ "Add the selected message to `vm-message-history'.
+\(Unless the message was selected via \\[vm-message-history-backward] or
+\\[vm-message-history-forward].)"
+ (or (memq this-command '(vm-goto-message-last-seen
+ vm-message-history-backward
+ vm-message-history-forward
+ vm-message-history-browse))
+ (progn
+ (setq vm-message-history-pointer
+ ;; Discard messages selected after the current message:
+ (setq vm-message-history
+ (cons (car vm-message-pointer) vm-message-history-pointer)))
+ ;; Discard oldest messages:
+ (setcdr (or (nthcdr (1- vm-message-history-max) vm-message-history)
+ '(t)) ; hack!
+ nil))))
+
+;;;###autoload
+(defun vm-message-history-backward (&optional arg)
+ "Select the previous message in the current folder's history.
+With prefix ARG, select the ARG'th previous message."
+ (interactive "p")
+ (or arg (setq arg 1))
+ (vm-select-folder-buffer)
+ (or vm-message-history
+ (error "No message history"))
+ (cond ((> arg 0)
+ (setq vm-message-history-pointer
+ (or (nthcdr arg vm-message-history-pointer)
+ ;; wrap around to newest message:
+ vm-message-history)))
+ ((< arg 0)
+ (let ((pointer vm-message-history))
+ (while (and pointer
+ (not (eq (nthcdr (- arg) pointer)
+ vm-message-history-pointer)))
+ (setq pointer (cdr pointer)))
+ (setq vm-message-history-pointer
+ (or pointer
+ ;; wrap around to oldest message:
+ (if (fboundp 'last)
+ (last vm-message-history) ; Emacs 21, or cl.el
+ (progn
+ (setq pointer vm-message-history)
+ (while (consp (cdr pointer))
+ (setq pointer (cdr pointer)))
+ pointer)))))))
+ (if (eq (car vm-message-pointer) (car vm-message-history-pointer))
+ (vm-preview-current-message)
+ (vm-record-and-change-message-pointer vm-message-pointer
+ (memq (car vm-message-history-pointer)
+ vm-message-list))
+ (vm-preview-current-message)))
+
+;;;###autoload
+(defun vm-message-history-forward (&optional arg)
+ "Select the next message in the current folder's history.
+With prefix ARG, select the ARG'th next message."
+ (interactive "p")
+ (vm-message-history-backward (- arg)))
+
+(defvar vm-message-history-menu nil
+ "A popup menu of messages, generated from `vm-message-history'.")
+
+;;;###autoload
+(defun vm-message-history-browse ()
+ "Select a message from a popup menu of the current folder's history."
+ (interactive)
+ (vm-select-folder-buffer)
+ (funcall (or (lookup-key vm-message-history-menu
+ (vector (x-popup-menu t vm-message-history-menu)))
+ 'ignore)))
+
+(put 'vm-message-history-browse 'menu-enable '(vm-message-history-menu-enable))
+
+(defun vm-message-history-menu-enable ()
+ "Generate `vm-message-history-menu' from `vm-message-history'."
+ (vm-select-folder-buffer)
+ ;; Discard previous menu:
+ (setq vm-message-history-menu
+ (make-sparse-keymap "History"))
+ (let ((history vm-message-history)
+ symbol)
+ (while history
+ (setq symbol
+ (intern (format "vm-message-history-%d" (length history))))
+ (set symbol ; pointer into vm-message-list
+ history) ; (memq (car history) vm-message-list))
+ (fset symbol ; function to select message
+ `(lambda ()
+ (vm-record-and-change-message-pointer vm-message-pointer
+ ,symbol)
+ (vm-preview-current-message)))
+ (define-key vm-message-history-menu (vector symbol)
+ (cons (vm-summary-sprintf vm-summary-format (car history))
+ (if (eq (car history) (car vm-message-pointer)) ; selected
+ nil ; disabled
+ symbol))) ; function
+ (setq history (cdr history))))
+ vm-message-history)
+
+;; (add-hook 'vm-visit-folder-hook 'vm-message-history-init)
+(add-hook 'vm-mode-hook 'vm-message-history-init)
+(add-hook 'vm-select-message-hook 'vm-message-history-add)
+
+(provide 'vm-message-history)
+
+;;; vm-message-history.el ends here \ No newline at end of file
diff --git a/vm-message.el b/lisp/vm-message.el
index 8bf13fd..dc1c9fa 100644
--- a/vm-message.el
+++ b/lisp/vm-message.el
@@ -1,21 +1,23 @@
-;;; Macros and functions dealing with accessing VM message struct fields
-;;; Copyright (C) 1989-1997 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+;;; vm-message.el --- Macros and functions dealing with accessing VM message struct fields
+;;
+;; Copyright (C) 1989-1997 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-;;(provide 'vm-message)
+;;; Code:
;; data that is always shared with virtual folders
(defsubst vm-location-data-of (message)
@@ -180,6 +182,8 @@
(aref (aref message 3) 23))
(defsubst vm-imap-uid-validity-of (message)
(aref (aref message 3) 24))
+(defsubst vm-spam-score-of (message)
+ (aref (aref message 3) 25))
;; extra data shared by virtual messages if vm-virtual-mirror is non-nil
(defsubst vm-mirror-data-of (message) (aref message 4))
;; if message is being edited, this is the buffer being used.
@@ -317,6 +321,8 @@
(aset (aref message 3) 23 val))
(defsubst vm-set-imap-uid-validity-of (message val)
(aset (aref message 3) 24 val))
+(defsubst vm-set-spam-score-of (message val)
+ (aset (aref message 3) 25 val))
(defsubst vm-set-mirror-data-of (message data)
(aset message 4 data))
(defsubst vm-set-edit-buffer-of (message buf)
@@ -354,7 +360,7 @@
(setq sym (make-symbol "<v>"))
(set sym nil)
(vm-set-virtual-messages-sym-of v sym)
- ;; Another uninterned symbol for the reverse link
+ ;; Another uninterned symbol for the reverse link
;; into the message list.
(setq sym (make-symbol "<--"))
(vm-set-reverse-link-sym-of v sym)
@@ -373,3 +379,5 @@
(not (eq m (vm-real-message-of m))))
(provide 'vm-message)
+
+;;; vm-message.el ends here
diff --git a/vm-mime.el b/lisp/vm-mime.el
index 4ab659a..b47c17b 100644
--- a/vm-mime.el
+++ b/lisp/vm-mime.el
@@ -1,21 +1,25 @@
-;;; MIME support functions
-;;; Copyright (C) 1997-1998, 2000, 2001, 2003 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
+;;; vm-mime.el --- MIME support functions
+;;
+;; Copyright (C) 1997-2003 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-;;(provide 'vm-mime)
+;;; Code:
+(eval-when-compile
+ (require 'cl))
(defvar enable-multibyte-characters)
(defvar default-enable-multibyte-characters)
@@ -33,6 +37,74 @@
(put 'vm-mime-error 'error-conditions '(vm-mime-error error))
(put 'vm-mime-error 'error-message "MIME error"))
+;; A lot of the more complicated MIME character set processing is only
+;; practical under MULE.
+
+(when (or vm-xemacs-mule-p
+ (and vm-fsfemacs-mule-p enable-multibyte-characters)
+ )
+
+ ;; Load any unicode support that's available. (If we're running on 21.5,
+ ;; utf-8 is predefined as a coding system, so there's no need to load
+ ;; Mule-UCS.)
+ (and (not (coding-system-p (if vm-xemacs-mule-p (find-coding-system 'utf-8) 'utf-8)))
+ (locate-library "un-define")
+ (require 'un-define)
+ (require 'unicode))
+
+ ;; If we can use latin-unity for sane treatment of the 8859-? charsets
+ ;; under MULE, go for it.
+ (and (locate-library "latin-unity")
+ (require 'latin-unity))
+
+ (let ((haveu8 (coding-system-p (if vm-xemacs-mule-p (find-coding-system 'utf-8) 'utf-8))))
+
+ (if (featurep 'latin-unity)
+ (defvaralias 'vm-mime-ucs-list 'latin-unity-ucs-list)
+ (defcustom vm-mime-ucs-list
+ (or (and haveu8 '(utf-8 iso-2022-jp ctext escape-quoted))
+ '(iso-2022-jp ctext escape-quoted))
+ "*List of coding systems that can encode all characters known to emacs."
+ :group 'vm
+ ))
+
+ ;; Define a list of coding systems that are to be preferred when sending
+ ;; a mail using MIME. This defaults to including UTF-8 when utf-8 exists
+ ;; as a coding system; otherwise, iso-8859-1 is its only element.
+ ;;
+ ;; If we can't use some element from this list, we default to
+ ;; iso-2022-jp as a last resort in the code.
+
+ (defcustom vm-coding-system-priorities
+ (or (and haveu8 '(iso-8859-1 utf-8))
+ '(iso-8859-1))
+ "*List of coding systems for VM-MIME to use, in order of preference. "
+ :group 'vm)
+
+ ;; Add some extra charsets that may not have been defined onto the end
+ ;; of vm-mime-mule-charset-to-coding-alist.
+ (mapcar (lambda (x)
+ (and (coding-system-p (if vm-xemacs-mule-p (find-coding-system x) x))
+ ;; Not using vm-string-assoc because of some quoting
+ ;; weirdness it's doing.
+ (if (not (assoc
+ (format "%s" x)
+ vm-mime-mule-charset-to-coding-alist))
+ (add-to-list 'vm-mime-mule-charset-to-coding-alist
+ (list (format "%s" x) x)))))
+ '(utf-8 iso-8859-15 iso-8859-14 iso-8859-16))
+
+ ;; And make sure that the map back from coding-systems is good for
+ ;; those charsets.
+ (mapcar (lambda (x)
+ (or (assoc (car (cdr x)) vm-mime-mule-coding-to-charset-alist)
+ (add-to-list 'vm-mime-mule-coding-to-charset-alist
+ (list (car (cdr x)) (car x)))))
+ vm-mime-mule-charset-to-coding-alist)
+ ;; Whoops, doesn't get picked up for some reason.
+ (add-to-list 'vm-mime-mule-coding-to-charset-alist
+ '(iso-8859-1 "iso-8859-1"))))
+
(defun vm-make-layout (&rest plist)
(vector
(plist-get plist 'type)
@@ -72,7 +144,6 @@
;; if display of MIME part fails, error string will be here.
(defun vm-mm-layout-display-error (e) (aref e 14))
(defun vm-mm-layout-is-converted (e) (aref e 15))
-(defun vm-mm-layout-unconverted-layout (e) (aref e 16))
(defun vm-set-mm-layout-type (e type) (aset e 0 type))
(defun vm-set-mm-layout-qtype (e type) (aset e 1 type))
@@ -89,7 +160,6 @@
(defun vm-set-mm-layout-cache (e c) (aset e 12 c))
(defun vm-set-mm-layout-display-error (e c) (aset e 14 c))
(defun vm-set-mm-layout-is-converted (e c) (asef e 15 c))
-(defun vm-set-mm-layout-unconverted-layout (e layout) (aset e 16 layout))
(defun vm-mime-make-message-symbol (m)
(let ((s (make-symbol "<<m>>")))
@@ -124,6 +194,7 @@
(vm-mime-encoded-header-flag-of m))))
(defun vm-mime-Q-decode-region (start end)
+ (interactive "r")
(let ((buffer-read-only nil))
(subst-char-in-region start end ?_ (string-to-char " ") t)
(vm-mime-qp-decode-region start end)))
@@ -133,8 +204,9 @@
(defun vm-mime-Q-encode-region (start end)
(let ((buffer-read-only nil)
(val))
- (setq val (vm-mime-qp-encode-region start end t))
- (subst-char-in-region start end (string-to-char " ") ?_ t)
+ (setq val (vm-mime-qp-encode-region start end t)) ; may modify buffer
+ (subst-char-in-region start (min end (point-max))
+ (string-to-char " ") ?_ t)
val ))
(defun vm-mime-B-encode-region (start end)
@@ -236,6 +308,7 @@
(cond ((or vm-xemacs-mule-p vm-fsfemacs-mule-p)
(if (or (and vm-xemacs-p (memq (device-type) '(x gtk mswindows)))
vm-fsfemacs-p
+ (vm-mime-tty-can-display-mime-charset charset)
nil)
(let ((buffer-read-only nil)
(cell (cdr (vm-string-assoc
@@ -332,7 +405,7 @@
((> (skip-chars-forward vm-mime-base64-alphabet end) 0)
(setq lim (point))
(while (< inputpos lim)
- (setq bits (+ bits
+ (setq bits (+ bits
(aref vm-mime-base64-alphabet-decoding-vector
(char-after inputpos))))
(vm-increment counter)
@@ -378,6 +451,7 @@
(and (> (- end start) 200)
(message "Encoding base64..."))
(let ((work-buffer nil)
+ (buffer-undo-list t)
(counter 0)
(cols 0)
(bits 0)
@@ -562,6 +636,7 @@
(?8 . 8) (?9 . 9) (?A . 10) (?B . 11)
(?C . 12) (?D . 13) (?E . 14) (?F . 15)))
char inputpos)
+
(unwind-protect
(save-excursion
(setq work-buffer (vm-make-work-buffer))
@@ -617,7 +692,7 @@
(and (= cols 0) (= char ?.)
(looking-at "\\.\\(\n\\|\\'\\)")))
(vm-insert-char ?= 1 nil work-buffer)
- (vm-insert-char (car (rassq (lsh char -4)
+ (vm-insert-char (car (rassq (lsh (logand char 255) -4)
hex-digit-alist))
1 nil work-buffer)
(vm-insert-char (car (rassq (logand char 15)
@@ -694,16 +769,19 @@
(vm-error-free-call 'delete-file tempfile)))
(message "Decoding uuencoded stuff... done"))
-(defun vm-decode-mime-message-headers (m)
+(defun vm-decode-mime-message-headers (&optional m)
(let ((case-fold-search t)
(buffer-read-only nil)
- charset need-conversion encoding match-start match-end start end)
+ charset need-conversion encoding match-start match-end start end
+ previous-end)
(save-excursion
- (goto-char (vm-headers-of m))
- (while (re-search-forward vm-mime-encoded-word-regexp (vm-text-of m) t)
+ (if m (goto-char (vm-headers-of m)))
+ (while (re-search-forward vm-mime-encoded-word-regexp
+ (if m (vm-text-of m) (point-max)) t)
(setq match-start (match-beginning 0)
match-end (match-end 0)
charset (buffer-substring (match-beginning 1) (match-end 1))
+ need-conversion nil
encoding (buffer-substring (match-beginning 4) (match-end 4))
start (match-beginning 5)
end (vm-marker (match-end 5)))
@@ -713,6 +791,11 @@
(not (setq need-conversion
(vm-mime-can-convert-charset charset))))
nil
+ ;; suppress whitespace between encoded words.
+ (and previous-end
+ (string-match "\\`[ \t\n]*\\'"
+ (buffer-substring previous-end match-start))
+ (setq match-start previous-end))
(delete-region end match-end)
(condition-case data
(cond ((string-match "B" encoding)
@@ -730,6 +813,7 @@
charset start end)))
(vm-mime-charset-decode-region charset start end)
(goto-char end)
+ (setq previous-end end)
(delete-region match-start start))))))
(defun vm-decode-mime-encoded-words ()
@@ -742,6 +826,7 @@
(setq match-start (match-beginning 0)
match-end (match-end 0)
charset (buffer-substring (match-beginning 1) (match-end 1))
+ need-conversion nil
encoding (buffer-substring (match-beginning 4) (match-end 4))
start (match-beginning 5)
end (vm-marker (match-end 5)))
@@ -797,7 +882,7 @@
(encode-coding-region start pos coding)
(setq pos (+ pos (- (buffer-size) old-size)))))
(setq pos
- (+ start
+ (+ start
(if (setq q-encoding
(string-match "^iso-8859-\\|^us-ascii"
charset))
@@ -853,7 +938,7 @@
version (if (or version
vm-mime-require-mime-version-header)
version
- (if type "1.0" nil))
+ (if type "1.0" nil))
qtype (vm-mime-parse-content-header type ?\; t)
type (vm-mime-parse-content-header type ?\;)
encoding (vm-get-header-contents
@@ -861,7 +946,7 @@
version (if (or version
vm-mime-require-mime-version-header)
version
- (if encoding "1.0" nil))
+ (if encoding "1.0" nil))
encoding (or encoding "7bit")
encoding (or (car
(vm-mime-parse-content-header encoding))
@@ -1140,7 +1225,8 @@
'message-symbol (vm-mime-make-message-symbol m)
)))))
-(defun vm-mime-get-xxx-parameter (name param-list)
+(defun vm-mime-get-xxx-parameter-internal (name param-list)
+ "Return the parameter NAME from PARAM-LIST."
(let ((match-end (1+ (length name)))
(name-regexp (concat (regexp-quote name) "="))
(case-fold-search t)
@@ -1153,11 +1239,27 @@
(and (car param-list)
(substring (car param-list) match-end))))
+(defun vm-mime-get-xxx-parameter (name param-list)
+ "Return the parameter NAME from PARAM-LIST.
+
+If parameter value continuations was used, i.e. the parameter was split into
+shorter pieces, rebuilt it from them."
+ (or (vm-mime-get-xxx-parameter-internal name param-list)
+ (let ((n 0) content p)
+ (while (setq p (vm-mime-get-xxx-parameter-internal
+ (format "%s*%d" name n)
+ param-list))
+ (setq n (1+ n)
+ content (concat content p)))
+ content)))
+
(defun vm-mime-get-parameter (layout name)
- (vm-mime-get-xxx-parameter name (cdr (vm-mm-layout-type layout))))
+ (let ((string (vm-mime-get-xxx-parameter name (cdr (vm-mm-layout-type layout)))))
+ (if string (vm-decode-mime-encoded-words-in-string string))))
(defun vm-mime-get-disposition-parameter (layout name)
- (vm-mime-get-xxx-parameter name (cdr (vm-mm-layout-disposition layout))))
+ (let ((string (vm-mime-get-xxx-parameter name (cdr (vm-mm-layout-disposition layout)))))
+ (if string (vm-decode-mime-encoded-words-in-string string))))
(defun vm-mime-set-xxx-parameter (name value param-list)
(let ((match-end (1+ (length name)))
@@ -1294,34 +1396,156 @@
(defvar buffer-file-coding-system)
+;; TODO: Possible further work; integrate with the FSF's unify-8859-on-encoding-mode stuff.
(defun vm-determine-proper-charset (beg end)
+ "Work out what MIME character set to use for sending a message.
+
+Uses `us-ascii' if the message is entirely ASCII compatible. If MULE is not
+available, and the message contains contains non-ASCII characters, consults
+the variable `vm-mime-8bit-composition-charset' or uses `iso-8859-1.' if
+that is nil.
+
+Under MULE, `vm-coding-system-priorities' is searched, in order, for a coding
+system that will encode all the characters in the message. If none is found,
+consults the variable `vm-mime-8bit-composition-charset' or uses `iso-2022-jp',
+which will preserve information for all the character sets of which Emacs is
+aware--at the expense of being incompatible with the recipient's software, if
+that recipient is outside of East Asia."
(save-excursion
(save-restriction
(narrow-to-region beg end)
- (catch 'done
- (goto-char (point-min))
- (if (or vm-xemacs-mule-p
+ (if (or vm-xemacs-mule-p
(and vm-fsfemacs-mule-p enable-multibyte-characters))
- (let ((charsets (delq 'ascii (vm-charsets-in-region
- (point-min) (point-max)))))
- (cond ((null charsets)
- "us-ascii")
- ((cdr charsets)
- (or (car (cdr
- (assq (vm-coding-system-name
- buffer-file-coding-system)
- vm-mime-mule-coding-to-charset-alist)))
- "iso-2022-jp"))
- (t
- (or (car (cdr
- (assoc
- (car charsets)
- vm-mime-mule-charset-to-charset-alist)))
- "unknown"))))
- (and (re-search-forward "[^\000-\177]" nil t)
- (throw 'done (or vm-mime-8bit-composition-charset
- "iso-8859-1")))
- (throw 'done vm-mime-7bit-composition-charset))))))
+ ;; Okay, we're on a MULE build.
+ (let ((charsets (delq 'ascii
+ (vm-charsets-in-region (point-min)
+ (point-max)))))
+ (cond
+ ;; No non-ASCII chars? Right, that makes it easy for us.
+ ((null charsets) "us-ascii")
+
+ ;; Check whether the buffer can be encoded using one of the
+ ;; vm-coding-system-priorities coding systems.
+ ((catch 'done
+
+ ;; We can't really do this intelligently unless latin-unity
+ ;; is available.
+ (if (featurep 'latin-unity)
+ (let ((csetzero charsets)
+ ;; Check what latin character sets are in the
+ ;; buffer.
+ (csets (latin-unity-representations-feasible-region
+ beg end))
+ (psets (latin-unity-representations-present-region
+ beg end))
+ (systems vm-coding-system-priorities))
+
+ ;; If one of the character sets is outside of latin
+ ;; unity's remit, check for a universal character
+ ;; set in vm-coding-system-priorities, and pass back
+ ;; the first one.
+ ;;
+ ;; Otherwise, there's no remapping that latin unity
+ ;; can do for us, and we should default to something
+ ;; iso-2022 based. (Since we're not defaulting to
+ ;; Unicode, at the moment.)
+
+ (while csetzero
+ (if (not (memq (car csetzero)
+ latin-unity-character-sets))
+ (let ((preapproved vm-coding-system-priorities))
+ (while preapproved
+ (if (memq (car preapproved) vm-mime-ucs-list)
+ (throw 'done
+ (car (cdr (assq
+ (car preapproved)
+ vm-mime-mule-coding-to-charset-alist)))))
+ (setq preapproved (cdr preapproved)))
+ ;; Nothing universal in the preapproved list.
+ (throw 'done nil)))
+ (setq csetzero (cdr csetzero)))
+
+ ;; Okay, we're able to remap using latin-unity. Do so.
+ (while systems
+ (let ((sys (latin-unity-massage-name (car systems)
+ 'buffer-default)))
+ (when (latin-unity-maybe-remap (point-min)
+ (point-max) sys
+ csets psets t)
+ (throw 'done (second (assq
+ sys
+ vm-mime-mule-coding-to-charset-alist)))))
+ (setq systems (cdr systems)))
+ (throw 'done nil))
+
+ ;; Right, latin-unity isn't available. If there's only
+ ;; one non-ASCII character set in the region, and the
+ ;; corresponding coding system is on the preapproved
+ ;; list before the first universal character set, pass
+ ;; it back. Otherwise, if a universal character set is
+ ;; on the preapproved list, pass the first one of them
+ ;; back. Otherwise, pass back nil and use the
+ ;; "iso-2022-jp" entry below.
+
+ (let ((csetzero charsets)
+ (preapproved vm-coding-system-priorities))
+ (if (null (cdr csetzero))
+ (while preapproved
+ ;; If we encounter a universal character set on
+ ;; the preapproved list, pass it back.
+ (if (memq (car preapproved) vm-mime-ucs-list)
+ (throw 'done (second (assq
+ preapproved
+ vm-mime-mule-coding-to-charset-alist))))
+
+ ;; The preapproved entry isn't universal. Check if
+ ;; it's related to the single non-ASCII MULE
+ ;; charset in the buffer (that is, if the
+ ;; conceptually unordered MULE list of characters
+ ;; is based on a corresponding ISO character set,
+ ;; and thus the ordered ISO character set can
+ ;; encode all the characters in the MIME charset.)
+ ;;
+ ;; The string equivalence test is used because we
+ ;; don't have another mapping that is useful
+ ;; here. Nnngh.
+
+ (if (string=
+ (car (cdr (assoc (car csetzero)
+ vm-mime-mule-charset-to-charset-alist)))
+ (car (cdr (assoc (car preapproved)
+ vm-mime-mule-coding-to-charset-alist))))
+ (throw 'done
+ (car (cdr (assoc (car csetzero)
+ vm-mime-mule-charset-to-charset-alist)))))
+ (setq preapproved (cdr preapproved)))
+
+ ;; Okay, there's more than one MULE character set in
+ ;; the buffer. Check for a universal entry in the
+ ;; preapproved list; if it exists pass it back,
+ ;; otherwise fall through to the iso-2022-jp below,
+ ;; because nothing on the preapproved list is
+ ;; appropriate.
+
+ (while preapproved
+ ;; If we encounter a universal character set on
+ ;; the preapproved list, pass it back.
+ (when (memq (car preapproved) vm-mime-ucs-list)
+ (throw 'done (second (assq preapproved
+ vm-mime-mule-coding-to-charset-alist))))
+ (setq preapproved (cdr preapproved)))))
+ (throw 'done nil))))
+ ;; Couldn't do any magic with vm-coding-system-priorities. Pass
+ ;; back a Japanese iso-2022 MIME character set.
+ (t (or vm-mime-8bit-composition-charset "iso-2022-jp"))))
+ ;; If we're non-MULE and there are eight bit characters, use a
+ ;; sensible default.
+ (goto-char (point-min))
+ (if (re-search-forward "[^\000-\177]" nil t)
+ (or vm-mime-8bit-composition-charset "iso-8859-1")
+ ;; We're non-MULE and there are purely 7bit characters in the
+ ;; region. Return vm-mime-7bit-c-c.
+ vm-mime-7bit-composition-charset)))))
(defun vm-determine-proper-content-transfer-encoding (beg end)
(save-excursion
@@ -1450,14 +1674,22 @@
(setq selective-display nil)
(vm-mime-insert-mime-body layout)
(vm-mime-transfer-decode-region layout (point-min) (point-max))
+ ;; It is annoying to use cat for conversion of a mime type which
+ ;; is just plain text. Therefore we do not call it ...
+ (setq ex 0)
+ (if (= (length ooo) 2)
+ (if (search-forward-regexp "\n\n" (point-max) t)
+ (delete-region (point-min) (match-beginning 0)))
(setq ex (call-process-region (point-min) (point-max) shell-file-name
- t t nil shell-command-switch (nth 2 ooo)))
+ t t nil shell-command-switch (nth 2 ooo))))
(if (not (eq ex 0))
(progn
+ (switch-to-buffer work-buffer)
(message "Conversion from %s to %s failed (exit code %s)"
(car (vm-mm-layout-type layout))
(nth 1 ooo)
ex)
+ (sit-for 5)
(throw 'done nil)))
(goto-char (point-min))
(insert "Content-Type: " (nth 1 ooo) "\n")
@@ -1466,24 +1698,21 @@
(message "Converting %s to %s... done"
(car (vm-mm-layout-type layout))
(nth 1 ooo))
- (vm-make-layout
- 'type (append (list (nth 1 ooo)) (cdr (vm-mm-layout-type layout)))
- 'qtype (append (list (nth 1 ooo)) (cdr (vm-mm-layout-type layout)))
- 'encoding "binary"
- 'id (vm-mm-layout-id layout)
- 'description (vm-mm-layout-description layout)
- 'disposition (vm-mm-layout-disposition layout)
- 'qdisposition (vm-mm-layout-qdisposition layout)
- 'header-start (vm-marker (point-min))
- 'header-end (vm-marker (1- (point)))
- 'body-start (vm-marker (point))
- 'body-end (vm-marker (point-max))
- 'cache (vm-mime-make-cache-symbol)
- 'message-symbol (vm-mime-make-message-symbol
- (vm-mm-layout-message layout))
- 'layout-is-converted t
- 'unconverted-layout layout
- )))))
+ (vector (append (list (nth 1 ooo)) (cdr (vm-mm-layout-type layout)))
+ (append (list (nth 1 ooo)) (cdr (vm-mm-layout-type layout)))
+ "binary"
+ (vm-mm-layout-id layout)
+ (vm-mm-layout-description layout)
+ (vm-mm-layout-disposition layout)
+ (vm-mm-layout-qdisposition layout)
+ (vm-marker (point-min))
+ (vm-marker (1- (point)))
+ (vm-marker (point))
+ (vm-marker (point-max))
+ nil
+ (vm-mime-make-cache-symbol)
+ (vm-mime-make-message-symbol (vm-mm-layout-message layout))
+ nil t )))))
(defun vm-mime-can-convert-charset (charset)
(vm-mime-can-convert-charset-0 charset vm-mime-charset-converter-alist))
@@ -1648,6 +1877,7 @@
(vm-extent-end-position extent))
(vm-detach-extent extent)))))
+;;;###autoload
(defun vm-decode-mime-message ()
"Decode the MIME objects in the current message.
@@ -1711,10 +1941,12 @@ in the buffer. The function is expected to make the message
(error "Invalid MIME message: %s" layout)))
(if (vm-mime-plain-message-p m)
(error "Message needs no decoding."))
- (or vm-presentation-buffer
- ;; maybe user killed it
- (error "No presentation buffer."))
- (set-buffer vm-presentation-buffer)
+ (if (not vm-presentation-buffer)
+ ;; maybe user killed it - make a new one
+ (progn
+ (vm-make-presentation-copy (car vm-message-pointer))
+ (vm-expose-hidden-headers))
+ (set-buffer vm-presentation-buffer))
(if (and (interactive-p) (eq vm-system-state 'previewing))
(let ((vm-display-using-mime nil))
(vm-show-current-message)))
@@ -1757,7 +1989,9 @@ in the buffer. The function is expected to make the message
(setq type (downcase (car (vm-mm-layout-type layout)))
type-no-subtype (car (vm-parse type "\\([^/]+\\)")))
(cond ((and vm-infer-mime-types
- (vm-mime-types-match "application/octet-stream" type)
+ (or (and vm-mime-attachment-infer-type-for-text-attachments
+ (vm-mime-types-match "text/plain" type))
+ (vm-mime-types-match "application/octet-stream" type))
(setq file
(or
(vm-mime-get-disposition-parameter layout
@@ -1770,6 +2004,7 @@ in the buffer. The function is expected to make the message
(list (concat "\"" type2 "\"")))
(setq type (downcase (car (vm-mm-layout-type layout)))
type-no-subtype (car (vm-parse type "\\([^/]+\\)")))))
+
(cond ((and (vm-mime-should-display-button layout dont-honor-c-d)
(or (condition-case nil
(funcall (intern
@@ -2003,6 +2238,10 @@ in the buffer. The function is expected to make the message
(write-region start end tempfile nil 0)
(delete-region start end))))
+ ;; quote file name for shell command only
+ (or (cdr program-list)
+ (setq tempfile (shell-quote-argument tempfile)))
+
;; expand % specs
(let ((p program-list)
(vm-mf-attachment-file tempfile))
@@ -2103,6 +2342,12 @@ in the buffer. The function is expected to make the message
t ))
(defun vm-mime-display-internal-multipart/alternative (layout)
+ (if vm-mime-show-alternatives
+ (let ((vm-mime-show-alternatives 'mixed))
+ (vm-mime-display-internal-multipart/mixed layout))
+ (vm-mime-display-internal-show-multipart/alternative layout)))
+
+(defun vm-mime-display-internal-show-multipart/alternative (layout)
(let (best-layout)
(cond ((eq vm-mime-alternative-select-method 'best)
(let ((done nil)
@@ -2190,7 +2435,12 @@ in the buffer. The function is expected to make the message
(defun vm-mime-display-button-multipart/parallel (layout)
(vm-mime-insert-button
- (vm-mime-sprintf (vm-mime-find-format-for-layout layout) layout)
+ (concat
+ ;; display the file name or disposition
+ (let ((file (or (vm-mime-get-disposition-parameter layout "filename")
+ (vm-mime-get-parameter layout "name"))))
+ (if file (format " %s " file) ""))
+ (vm-mime-sprintf (vm-mime-find-format-for-layout layout) layout) )
(function
(lambda (layout)
(save-excursion
@@ -2237,6 +2487,7 @@ in the buffer. The function is expected to make the message
(vm-display (or vm-presentation-buffer (current-buffer)) t
(list this-command) '(vm-mode startup)))
t )
+
(fset 'vm-mime-display-button-multipart/digest
'vm-mime-display-internal-multipart/digest)
@@ -2249,6 +2500,7 @@ in the buffer. The function is expected to make the message
(save-excursion
(vm-mime-display-internal-message/rfc822 layout))))
layout nil)))
+
(fset 'vm-mime-display-button-message/news
'vm-mime-display-button-message/rfc822)
@@ -2597,7 +2849,7 @@ LAYOUT is the MIME layout struct for the message/external-body object."
(setq p-total (vm-mime-get-parameter (car p-list) "total"))
(if (null p-total)
nil
- (setq p-total (string-to-int p-total))
+ (setq p-total (string-to-number p-total))
(if (< p-total 1)
(vm-mime-error "message/partial specified part total < 1, %d" p-total))
(if total
@@ -2608,7 +2860,7 @@ LAYOUT is the MIME layout struct for the message/external-body object."
(if (null p-number)
(vm-mime-error
"message/partial message missing number parameter"))
- (setq p-number (string-to-int p-number))
+ (setq p-number (string-to-number p-number))
(if (< p-number 1)
(vm-mime-error "message/partial part number < 1, %d"
p-number))
@@ -2696,7 +2948,7 @@ LAYOUT is the MIME layout struct for the message/external-body object."
(vm-mime-display-internal-image-xemacs-xxxx layout image-type name))
((and vm-fsfemacs-p (fboundp 'image-type-available-p))
(vm-mime-display-internal-image-fsfemacs-21-xxxx layout image-type name))
- (vm-fsfemacs-p
+ (vm-fsfemacs-p
(vm-mime-display-internal-image-fsfemacs-19-xxxx layout image-type name))))
(defun vm-mime-display-internal-image-xemacs-xxxx (layout image-type name)
@@ -3105,8 +3357,8 @@ LAYOUT is the MIME layout struct for the message/external-body object."
(if (not (re-search-forward "\\b\\([0-9]+\\)x\\([0-9]+\\)\\b" nil t))
(error "file dimensions missing from 'identify' output: %s"
(buffer-string)))
- (setq width (string-to-int (match-string 1))
- height (string-to-int (match-string 2))))
+ (setq width (string-to-number (match-string 1))
+ height (string-to-number (match-string 2))))
(and work-buffer (kill-buffer work-buffer)))
(list width height)))
@@ -3284,7 +3536,7 @@ LAYOUT is the MIME layout struct for the message/external-body object."
(defun vm-process-filter-display-some-image-strips (process output)
(let (which-strips (i 0))
(while (string-match "XZXX\\([0-9]+\\)XZXX" output i)
- (setq which-strips (cons (string-to-int (match-string 1 output))
+ (setq which-strips (cons (string-to-number (match-string 1 output))
which-strips)
i (match-end 0)))
(save-excursion
@@ -3537,8 +3789,7 @@ LAYOUT is the MIME layout struct for the message/external-body object."
(vm-mime-insert-button
(vm-mime-sprintf (vm-mime-find-format-for-layout layout) layout)
(function vm-mime-display-generic)
- layout disposable)
- t )
+ layout disposable))
(defun vm-find-layout-extent-at-point ()
(cond (vm-fsfemacs-p
@@ -3553,6 +3804,7 @@ LAYOUT is the MIME layout struct for the message/external-body object."
(vm-xemacs-p
(extent-at (point) nil 'vm-mime-layout))))
+;;;###autoload
(defun vm-mime-run-display-function-at-point (&optional function dispose)
"Display the MIME object at point according to its type."
(interactive)
@@ -3570,6 +3822,7 @@ LAYOUT is the MIME layout struct for the message/external-body object."
(funcall (or function (extent-property e 'vm-mime-function))
e))))))
+;;;###autoload
(defun vm-mime-reader-map-save-file ()
"Write the MIME object at point to a file."
(interactive)
@@ -3587,6 +3840,7 @@ LAYOUT is the MIME layout struct for the message/external-body object."
(error nil))))
file ))
+;;;###autoload
(defun vm-mime-reader-map-save-message ()
"Save the MIME object at point to a folder."
(interactive)
@@ -3603,28 +3857,33 @@ LAYOUT is the MIME layout struct for the message/external-body object."
(vm-delete-mime-object folder)
(error nil))))))
+;;;###autoload
(defun vm-mime-reader-map-pipe-to-command ()
"Pipe the MIME object at point to a shell command."
(interactive)
(vm-mime-run-display-function-at-point
'vm-mime-pipe-body-to-queried-command))
+;;;###autoload
(defun vm-mime-reader-map-pipe-to-printer ()
"Print the MIME object at point."
(interactive)
(vm-mime-run-display-function-at-point 'vm-mime-send-body-to-printer))
+;;;###autoload
(defun vm-mime-reader-map-display-using-external-viewer ()
"Display the MIME object at point with an external viewer."
(interactive)
(vm-mime-run-display-function-at-point
'vm-mime-display-body-using-external-viewer))
+;;;###autoload
(defun vm-mime-reader-map-display-using-default ()
"Display the MIME object at point using the `default' face."
(interactive)
(vm-mime-run-display-function-at-point 'vm-mime-display-body-as-text))
+;;;###autoload
(defun vm-mime-reader-map-display-object-as-type ()
"Display the MIME object at point as some other type."
(interactive)
@@ -3640,21 +3899,21 @@ LAYOUT is the MIME layout struct for the message/external-body object."
(vm-fsfemacs-p
(vm-mime-fsfemacs-set-image-stamp-for-type e type))))
+(defvar vm-mime-type-images
+ '(("text" "text.xpm")
+ ("image" "image.xpm")
+ ("audio" "audio.xpm")
+ ("video" "video.xpm")
+ ("message" "message.xpm")
+ ("application" "application.xpm")
+ ("multipart" "multipart.xpm")))
+
(defun vm-mime-xemacs-set-image-stamp-for-type (e type)
(if (and (vm-images-possible-here-p)
(vm-image-type-available-p 'xpm)
(> (device-bitplanes) 7))
- (let ((dir vm-image-directory)
- (colorful (> (device-bitplanes) 15))
- (tuples
- '(("text" "document-simple.xpm" "document-colorful.xpm")
- ("image" "mona_stamp-simple.xpm" "mona_stamp-colorful.xpm")
- ("audio" "audio_stamp-simple.xpm" "audio_stamp-colorful.xpm")
- ("video" "film-simple.xpm" "film-colorful.xpm")
- ("message" "message-simple.xpm" "message-colorful.xpm")
- ("application" "gear-simple.xpm" "gear-colorful.xpm")
- ("multipart" "stuffed_box-simple.xpm"
- "stuffed_box-colorful.xpm")))
+ (let ((dir (expand-file-name "mime" (vm-image-directory)))
+ (tuples vm-mime-type-images)
glyph file sym p)
(setq file (catch 'done
(while tuples
@@ -3662,7 +3921,7 @@ LAYOUT is the MIME layout struct for the message/external-body object."
(throw 'done (car tuples))
(setq tuples (cdr tuples))))
nil)
- file (and file (if colorful (nth 2 file) (nth 1 file)))
+ file (and file (nth 1 file))
sym (and file (intern file vm-image-obarray))
glyph (and sym (boundp sym) (symbol-value sym))
glyph (or glyph
@@ -3678,29 +3937,16 @@ LAYOUT is the MIME layout struct for the message/external-body object."
(defun vm-mime-fsfemacs-set-image-stamp-for-type (e type)
(if (and (vm-images-possible-here-p)
(vm-image-type-available-p 'xpm))
- (let ((dir vm-image-directory)
- ;; no display-planes function under FSF Emacs before
- ;; v21, so only try to use it if present.
- (colorful (if (fboundp 'display-planes)
- (> (display-planes) 15)
- t))
- (tuples
- '(("text" "document-simple.xpm" "document-colorful.xpm")
- ("image" "mona_stamp-simple.xpm" "mona_stamp-colorful.xpm")
- ("audio" "audio_stamp-simple.xpm" "audio_stamp-colorful.xpm")
- ("video" "film-simple.xpm" "film-colorful.xpm")
- ("message" "message-simple.xpm" "message-colorful.xpm")
- ("application" "gear-simple.xpm" "gear-colorful.xpm")
- ("multipart" "stuffed_box-simple.xpm"
- "stuffed_box-colorful.xpm")))
- file)
+ (let ((dir (expand-file-name "mime" (vm-image-directory)))
+ (tuples vm-mime-type-images)
+ file)
(setq file (catch 'done
(while tuples
(if (vm-mime-types-match (car (car tuples)) type)
(throw 'done (car tuples))
(setq tuples (cdr tuples))))
nil)
- file (and file (if colorful (nth 2 file) (nth 1 file)))
+ file (and file (nth 1 file))
file (and file (expand-file-name file dir)))
(if file
(save-excursion
@@ -3756,7 +4002,15 @@ LAYOUT is the MIME layout struct for the message/external-body object."
(vm-set-extent-property e 'vm-mime-disposable disposable)
(vm-set-extent-property e 'face vm-mime-button-face)
(vm-set-extent-property e 'vm-mime-layout layout)
- (vm-set-extent-property e 'vm-mime-function action)))
+ (vm-set-extent-property e 'vm-mime-function action)
+ ;; for vm-continue-postponed-message
+ (if vm-xemacs-p
+ (vm-set-extent-property e 'duplicable t)
+ (put-text-property (overlay-start e)
+ (overlay-end e)
+ 'vm-mime-layout layout))
+ ;; return t as decoding worked
+ t))
(defun vm-mime-rewrite-failed-button (button error-string)
(let* ((buffer-read-only nil)
@@ -3766,12 +4020,34 @@ LAYOUT is the MIME layout struct for the message/external-body object."
(vm-set-extent-endpoints button start (vm-extent-end-position button))
(delete-region (point) (vm-extent-end-position button))))
+
+;; From: Eric E. Dors
+;; Date: 1999/04/01
+;; Newsgroups: gnu.emacs.vm.info
+;; example filter-alist variable
+(defvar vm-mime-write-file-filter-alist
+ '(("application/mac-binhex40" . "hexbin -s "))
+ "*A list of filter used when writing attachements to files!"
+ )
+
+;; function to parse vm-mime-write-file-filter-alist
+(defun vm-mime-find-write-filter (type)
+ (let ((e-alist vm-mime-write-file-filter-alist)
+ (matched nil))
+ (while (and e-alist (not matched))
+ (if (and (vm-mime-types-match (car (car e-alist)) type)
+ (cdr (car e-alist)))
+ (setq matched (cdr (car e-alist)))
+ (setq e-alist (cdr e-alist))))
+ matched))
+
(defun vm-mime-send-body-to-file (layout &optional default-filename file)
(if (not (vectorp layout))
(setq layout (vm-extent-property layout 'vm-mime-layout)))
(or default-filename
(setq default-filename
- (vm-mime-get-disposition-parameter layout "filename")))
+ (or (vm-mime-get-disposition-parameter layout "filename")
+ (vm-mime-get-parameter layout "name"))))
(and default-filename
(setq default-filename (file-name-nondirectory default-filename)))
(let ((work-buffer nil)
@@ -3820,8 +4096,13 @@ LAYOUT is the MIME layout struct for the message/external-body object."
;; that jka-compr won't compress already compressed
;; data. This is a crock, but as usual I'm getting
;; the bug reports for somebody else's bad code.
- (let ((jka-compr-compression-info-list nil))
- (write-region (point-min) (point-max) file nil nil))
+ (let ((jka-compr-compression-info-list nil)
+ (command (vm-mime-find-write-filter
+ (car (vm-mm-layout-type layout)))))
+ (if command (shell-command-on-region (point-min) (point-max)
+ (concat command " > " file))
+ (write-region (point-min) (point-max) file nil nil)))
+
file )
(and work-buffer (kill-buffer work-buffer))))))
@@ -4077,7 +4358,40 @@ LAYOUT is the MIME layout struct for the message/external-body object."
(or (vm-mime-types-match "text" (car (vm-mm-layout-type layout)))
(vm-mime-types-match "message" (car (vm-mm-layout-type layout)))))
+
+(defun vm-mime-tty-can-display-mime-charset (name)
+ "Can the current TTY correctly display the given MIME character set?"
+ (and (fboundp 'console-tty-output-coding-system)
+ ;; Is this check too paranoid?
+ (coding-system-p (console-tty-output-coding-system))
+ (fboundp 'coding-system-get)
+ (let
+ ;; Nnngh, latin-unity-base-name isn't doing the right thing for
+ ;; me with MULE-UCS and UTF-8 as the terminal coding system. Of
+ ;; course, it's not evident that it _can_ do the right thing.
+ ;;
+ ;; The intention is that ourtermcs is the version of the
+ ;; coding-system without line-ending information attached to its
+ ;; end.
+ ((ourtermcs (or (car
+ (coding-system-get
+ (console-tty-output-coding-system)
+ 'alias-coding-systems))
+ (console-tty-output-coding-system))))
+ (or (eq ourtermcs (car
+ (cdr
+ (vm-string-assoc
+ name vm-mime-mule-charset-to-coding-alist))))
+ ;; The vm-mime-mule-charset-to-coding-alist check is to make
+ ;; sure it does the right thing with a nonsense MIME character
+ ;; set name.
+ (and (memq ourtermcs vm-mime-ucs-list)
+ (vm-string-assoc name vm-mime-mule-charset-to-coding-alist)
+ t)
+ (vm-mime-default-face-charset-p name)))))
+
(defun vm-mime-charset-internally-displayable-p (name)
+ "Can the given MIME charset be displayed within emacs by by VM?"
(cond ((and vm-xemacs-mule-p (memq (device-type) '(x gtk mswindows)))
(or (vm-string-assoc name vm-mime-mule-charset-to-coding-alist)
(vm-mime-default-face-charset-p name)))
@@ -4087,6 +4401,13 @@ LAYOUT is the MIME layout struct for the message/external-body object."
((vm-multiple-fonts-possible-p)
(or (vm-mime-default-face-charset-p name)
(vm-string-assoc name vm-mime-charset-font-alist)))
+
+ ;; If the terminal-coding-system variable is set to something that
+ ;; can encode all the characters of the given MIME character set,
+ ;; then we can display any message in the given MIME character set
+ ;; internally.
+
+ ((vm-mime-tty-can-display-mime-charset name))
(t
(vm-mime-default-face-charset-p name))))
@@ -4190,6 +4511,7 @@ LAYOUT is the MIME layout struct for the message/external-body object."
(setq alist (cdr alist))))
suffix ))
+;;;###autoload
(defun vm-mime-attach-file (file type &optional charset description
no-suggested-filename)
"Attach a file to a VM composition buffer to be sent along with the message.
@@ -4222,11 +4544,14 @@ this case and not prompt you for it in the minibuffer."
;; protect value of last-command and this-command
(let ((last-command last-command)
(this-command this-command)
+ (completion-ignored-extensions nil)
(charset nil)
description file default-type type)
(if (null vm-send-using-mime)
(error "MIME attachments disabled, set vm-send-using-mime non-nil to enable."))
- (setq file (vm-read-file-name "Attach file: " nil nil t)
+ (setq file (vm-read-file-name "Attach file: "
+ vm-mime-attachment-source-directory
+ nil t)
default-type (or (vm-mime-default-type-from-filename file)
"application/octet-stream")
type (completing-read
@@ -4254,6 +4579,7 @@ this case and not prompt you for it in the minibuffer."
(and description (setq description (vm-mime-scrub-description description)))
(vm-mime-attach-object file type charset description nil))
+;;;###autoload
(defun vm-mime-attach-mime-file (file type)
"Attach a MIME encoded file to a VM composition buffer to be sent
along with the message.
@@ -4278,10 +4604,12 @@ should use vm-mime-attach-file to attach the file."
;; protect value of last-command and this-command
(let ((last-command last-command)
(this-command this-command)
- file type)
+ file type default-type)
(if (null vm-send-using-mime)
(error "MIME attachments disabled, set vm-send-using-mime non-nil to enable."))
- (setq file (vm-read-file-name "Attach file: " nil nil t)
+ (setq file (vm-read-file-name "Attach file: "
+ vm-mime-attachment-source-directory
+ nil t)
default-type (or (vm-mime-default-type-from-filename file)
"application/octet-stream")
type (completing-read
@@ -4300,6 +4628,7 @@ should use vm-mime-attach-file to attach the file."
(error "You don't have permission to read %s" file))
(vm-mime-attach-object file type nil nil t))
+;;;###autoload
(defun vm-mime-attach-buffer (buffer type &optional charset description)
"Attach a buffer to a VM composition buffer to be sent along with
the message.
@@ -4360,6 +4689,7 @@ this case and not prompt you for it in the minibuffer."
(and description (setq description (vm-mime-scrub-description description)))
(vm-mime-attach-object buffer type charset description nil))
+;;;###autoload
(defun vm-mime-attach-message (message &optional description)
"Attach a message from a folder to a VM composition buffer
to be sent along with the message.
@@ -4397,6 +4727,11 @@ minibuffer if the command is run interactively."
mlist mp default prompt description folder)
(if (null vm-send-using-mime)
(error "MIME attachments disabled, set vm-send-using-mime non-nil to enable."))
+ (if current-prefix-arg
+ (setq vm-mail-buffer (vm-read-folder-name)
+ vm-mail-buffer (if (string= vm-mail-buffer "") nil
+ (setq current-prefix-arg nil)
+ (get-buffer vm-mail-buffer))))
(cond ((or current-prefix-arg (null vm-mail-buffer)
(not (buffer-live-p vm-mail-buffer)))
(let ((dir (if vm-folder-directory
@@ -4431,7 +4766,7 @@ minibuffer if the command is run interactively."
(while (zerop result)
(setq result (read-string prompt))
(and (string= result "") default (setq result default))
- (setq result (string-to-int result)))
+ (setq result (string-to-number result)))
(if (null (setq mp (nthcdr (1- result) vm-message-list)))
(error "No such message."))))
(setq description (read-string "Description: "))
@@ -4495,6 +4830,7 @@ minibuffer if the command is run interactively."
(list 'if (list 'eq (current-buffer) '(current-buffer))
(list 'kill-buffer buf)))))))
+;;;###autoload
(defun vm-mime-attach-object-from-message (composition)
"Attach a object from the current message to a VM composition buffer.
@@ -4567,9 +4903,11 @@ COMPOSITION's name will be read from the minibuffer."
(fb (list vm-mime-forward-local-external-bodies)))
(if (< (point) (save-excursion (mail-text) (point)))
(mail-text))
- (setq start (point)
- tag-string (format "[ATTACHMENT %s, %s]" object
- (or type "MIME file")))
+ (setq start (point))
+ (if (listp object)
+ (setq tag-string (format "[ATTACHMENT %s, %s]" (nth 4 object) type))
+ (setq tag-string (format "[ATTACHMENT %s, %s]" object
+ (or type "MIME file"))))
(insert tag-string "\n")
(setq end (1- (point)))
(if (and (stringp object) (not mimed))
@@ -4579,12 +4917,15 @@ COMPOSITION's name will be read from the minibuffer."
(setq disposition (list "attachment"))
(setq disposition (list "inline")))
(if (not no-suggested-filename)
- (setq disposition (nconc disposition
- (list
+ (setq type (concat type "; name=\"" (file-name-nondirectory object) "\"")
+ disposition (nconc disposition
+ (list
(concat "filename=\""
(file-name-nondirectory object)
"\""))))))
(setq disposition (list "unspecified")))
+ (if (listp object) (setq disposition (nth 3 object)))
+
(cond (vm-fsfemacs-p
(put-text-property start end 'front-sticky nil)
(put-text-property start end 'rear-nonsticky t)
@@ -4599,7 +4940,10 @@ COMPOSITION's name will be read from the minibuffer."
(put-text-property start end 'vm-mime-parameters params)
(put-text-property start end 'vm-mime-description description)
(put-text-property start end 'vm-mime-disposition disposition)
- (put-text-property start end 'vm-mime-encoded mimed))
+ (put-text-property start end 'vm-mime-encoding nil)
+ (put-text-property start end 'vm-mime-encoded mimed)
+ (put-text-property start end 'duplicable t)
+ )
(vm-xemacs-p
(setq e (make-extent start end))
(vm-mime-set-image-stamp-for-type e (or type "text/plain"))
@@ -4610,6 +4954,7 @@ COMPOSITION's name will be read from the minibuffer."
(if vm-popup-menu-on-mouse-3
(define-key keymap 'button3
'vm-menu-popup-attachment-menu))
+ (define-key keymap [return] 'vm-mime-change-content-disposition)
(set-extent-property e 'keymap keymap)
(set-extent-property e 'balloon-help 'vm-mouse-3-help))
(set-extent-property e 'vm-mime-forward-local-refs fb)
@@ -4618,6 +4963,7 @@ COMPOSITION's name will be read from the minibuffer."
(set-extent-property e 'vm-mime-parameters params)
(set-extent-property e 'vm-mime-description description)
(set-extent-property e 'vm-mime-disposition disposition)
+ (set-extent-property e 'vm-mime-encoding nil)
(set-extent-property e 'vm-mime-encoded mimed)))))
(defun vm-mime-attachment-forward-local-refs-at-point ()
@@ -4638,6 +4984,38 @@ COMPOSITION's name will be read from the minibuffer."
(fb (extent-property e 'vm-mime-forward-local-refs)))
(setcar fb val) ))))
+(defun vm-mime-delete-attachment-button ()
+ (cond (vm-fsfemacs-p
+ ;; TODO
+ )
+ (vm-xemacs-p
+ (let ((e (extent-at (point) nil 'vm-mime-type)))
+ (delete-region (extent-start-position e)
+ (extent-end-position e))))))
+
+(defun vm-mime-delete-attachment-button-keep-infos ()
+ (cond (vm-fsfemacs-p
+ ;; TODO
+ )
+ (vm-xemacs-p
+ (let ((e (extent-at (point) nil 'vm-mime-type)))
+ (save-excursion
+ (goto-char (1+ (extent-start-position e)))
+ (insert " --- DELETED ")
+ (goto-char (extent-end-position e))
+ (insert " ---")
+ (delete-extent e))))))
+
+;;;###autoload
+(defun vm-mime-change-content-disposition ()
+ (interactive)
+ (vm-mime-set-attachment-disposition-at-point
+ (intern
+ (completing-read "Disposition-type: "
+ '(("unspecified") ("inline") ("attachment"))
+ nil
+ t))))
+
(defun vm-mime-attachment-disposition-at-point ()
(cond (vm-fsfemacs-p
(let ((disp (get-text-property (point) 'vm-mime-disposition)))
@@ -4656,6 +5034,21 @@ COMPOSITION's name will be read from the minibuffer."
(disp (extent-property e 'vm-mime-disposition)))
(setcar disp (symbol-name sym))))))
+
+(defun vm-mime-attachment-encoding-at-point ()
+ (cond (vm-fsfemacs-p
+ (get-text-property (point) 'vm-mime-encoding))
+ (vm-xemacs-p
+ (let ((e (extent-at (point) nil 'vm-mime-encoding)))
+ (if e (extent-property e 'vm-mime-encoding))))))
+
+(defun vm-mime-set-attachment-encoding-at-point (sym)
+ (cond (vm-fsfemacs-p
+ (set-text-property (point) 'vm-mime-encoding sym))
+ (vm-xemacs-p
+ (let ((e (extent-at (point) nil 'vm-mime-disposition)))
+ (set-extent-property e 'vm-mime-encoding sym)))))
+
(defun vm-disallow-overlay-endpoint-insertion (overlay after start end
&optional old-size)
(cond ((null after) nil)
@@ -4815,6 +5208,7 @@ COMPOSITION's name will be read from the minibuffer."
;; (ellipsis (concat description "..."))
;; (t description))))))
+;;;###autoload
(defun vm-delete-mime-object (&optional saved-file)
"Delete the contents of MIME object referred to by the MIME button at point.
The MIME object is replaced by a text/plain object that briefly
@@ -4831,7 +5225,7 @@ describes what was deleted."
(error "Can't edit unmirrored virtual messages."))
(and vm-presentation-buffer
(set-buffer vm-presentation-buffer))
- (let (layout)
+ (let (layout label)
(cond (vm-fsfemacs-p
(let (o-list o (found nil))
(setq o-list (overlays-at (point)))
@@ -4855,7 +5249,8 @@ describes what was deleted."
(save-excursion
(vm-save-restriction
(goto-char (overlay-start o))
- (insert "Deleted " (vm-mime-sprintf "%d\n" layout))
+ (setq label (vm-mime-sprintf vm-mime-deleted-object-label layout))
+ (insert label)
(delete-region (point) (overlay-end o)))))))
(vm-xemacs-p
(let ((e (extent-at (point) nil 'vm-mime-layout)))
@@ -4875,10 +5270,17 @@ describes what was deleted."
(vm-save-restriction
(goto-char (extent-start-position e))
(setq opos (point))
- (insert "Deleted " (vm-mime-sprintf "%d\n" layout))
+ (setq label (vm-mime-sprintf vm-mime-deleted-object-label layout))
+ (insert label)
(delete-region (point) (extent-end-position e))
(set-extent-endpoints e opos (point)))))
- (vm-mime-discard-layout-contents layout saved-file)))))))
+ (vm-mime-discard-layout-contents layout saved-file)))))
+ (when (interactive-p)
+ ;; make the change visible and place the cursor behind the removed object
+ (vm-discard-cached-data)
+ (when vm-presentation-buffer
+ (set-buffer vm-presentation-buffer)
+ (re-search-forward (regexp-quote label) (point-max) t)))))
(defun vm-mime-discard-layout-contents (layout &optional file)
(save-excursion
@@ -4895,7 +5297,7 @@ describes what was deleted."
(cond ((null file)
(insert "Content-Type: text/plain; charset=us-ascii\n\n")
(vm-set-mm-layout-body-start layout (point-marker))
- (insert "[Deleted " (vm-mime-sprintf "%d]\n" layout)))
+ (insert (vm-mime-sprintf vm-mime-deleted-object-label layout)))
(t
(insert "Content-Type: message/external-body; access-type=local-file; name=\"" file "\"\n")
(insert "Content-Transfer-Encoding: 7bit\n\n")
@@ -4958,8 +5360,8 @@ describes what was deleted."
(aset layout i (aref new-layout i))
(setq i (1- i))))))
(t
- (vm-set-mm-layout-type layout '("text/x-vm-deleted"))
- (vm-set-mm-layout-qtype layout '("text/x-vm-deleted"))
+ (vm-set-mm-layout-type layout '("text/plain"))
+ (vm-set-mm-layout-qtype layout '("text/plain"))
(vm-set-mm-layout-encoding layout "7bit")
(vm-set-mm-layout-id layout nil)
(vm-set-mm-layout-description
@@ -4970,11 +5372,15 @@ describes what was deleted."
(vm-set-mm-layout-parts layout nil)
(vm-set-mm-layout-display-error layout nil)))))))
+;;;###autoload
(defun vm-mime-encode-composition ()
"MIME encode the current mail composition buffer.
-Attachment tags added to the buffer with vm-mime-attach-file are expanded
+Attachment tags added to the buffer with `vm-mime-attach-file' are expanded
and the approriate content-type and boundary markup information is added."
(interactive)
+
+ (vm-disable-modes vm-disable-modes-before-encoding)
+
(buffer-enable-undo)
(let ((unwind-needed t)
(mybuffer (current-buffer)))
@@ -4994,9 +5400,31 @@ and the approriate content-type and boundary markup information is added."
(defvar enriched-mode)
-;; Non-XEmacs specific changes to this function should be
-;; made to vm-mime-fsfemacs-encode-composition as well.
+;; Non-XEmacs specific changes to this function should be made to
+;; vm-mime-fsfemacs-encode-composition as well.
+
(defun vm-mime-xemacs-encode-composition ()
+ "Encode the current message using MIME.
+
+The Multipurpose Internet Message Extensions extend the original format of
+Internet mail to allow non-US-ASCII textual messages, non-textual messages,
+multipart message bodies, and non-US-ASCII information in message headers.
+
+This function chooses the MIME character set(s) to use, and transforms the
+message content from the XEmacs-internal encoding to the corresponding
+octets in that MIME character set.
+
+It then applies some transfer encoding to the message. For details of the
+transfer encodings available, see the documentation for
+`vm-mime-8bit-text-transfer-encoding.'
+
+Finally, it creates the headers that are necessary to identify the message
+as one that uses MIME.
+
+Under MULE, it explicitly sets `buffer-file-coding-system' to a binary
+ (no-transformation) coding system, to avoid further transformation of the
+message content when it's passed to the MTA (that is, the mail transfer
+agent; under Unix, normally sendmail.)"
(save-restriction
(widen)
(if (not (eq major-mode 'mail-mode))
@@ -5009,8 +5437,11 @@ and the approriate content-type and boundary markup information is added."
(enriched (and (boundp 'enriched-mode) enriched-mode))
forward-local-refs already-mimed layout e e-list boundary
type encoding charset params description disposition object
- opoint-min)
- (mail-text)
+ opoint-min
+ postponed-attachment)
+ ;;Make sure we don't double encode UTF-8 (for example) text.
+ (setq buffer-file-coding-system (vm-binary-coding-system))
+ (goto-char (mail-text-start))
(setq e-list (extent-list nil (point) (point-max))
e-list (vm-delete (function
(lambda (e)
@@ -5041,8 +5472,24 @@ and the approriate content-type and boundary markup information is added."
(setq charset (vm-determine-proper-charset (point-min)
(point-max)))
(if vm-xemacs-mule-p
- (encode-coding-region (point-min) (point-max)
- buffer-file-coding-system))
+ (encode-coding-region
+ (point-min) (point-max)
+
+ ;; What about the case where vm-m-m-c-t-c-a doesn't have an
+ ;; entry for the given charset? That shouldn't happen, if
+ ;; vm-mime-mule-coding-to-charset-alist and
+ ;; vm-mime-mule-charset-to-coding-alist have complete and
+
+ ;; matching entries. Admittedly this last is not a
+ ;; given. Should we make it so on startup? (By setting the
+ ;; key for any missing entries in
+ ;; vm-mime-mule-coding-to-charset-alist to being (format
+ ;; "%s" coding-system), if necessary.)
+
+ (car (cdr (vm-string-assoc
+ charset vm-mime-mule-charset-to-coding-alist)))))
+
+ (enriched-mode -1)
(setq encoding (vm-determine-proper-content-transfer-encoding
(point-min)
(point-max))
@@ -5073,11 +5520,26 @@ and the approriate content-type and boundary markup information is added."
(if enriched
(let ((enriched-initial-annotation ""))
(enriched-encode (point-min) (point-max))))
+
(setq charset (vm-determine-proper-charset (point-min)
(point-max)))
(if vm-xemacs-mule-p
- (encode-coding-region (point-min) (point-max)
- buffer-file-coding-system))
+ (encode-coding-region
+ (point-min) (point-max)
+
+ ;; What about the case where vm-m-m-c-t-c-a doesn't have an
+ ;; entry for the given charset? That shouldn't happen, if
+ ;; vm-mime-mule-coding-to-charset-alist and
+ ;; vm-mime-mule-charset-to-coding-alist have complete and
+ ;; matching entries. Admittedly this last is not a
+ ;; given. Should we make it so on startup? (By setting the
+ ;; key for any missing entries in
+ ;; vm-mime-mule-coding-to-charset-alist to being (format
+ ;; "%s" coding-system), if necessary.)
+
+ (car (cdr (vm-string-assoc
+ charset vm-mime-mule-charset-to-coding-alist)))))
+
(setq encoding (vm-determine-proper-content-transfer-encoding
(point-min)
(point-max))
@@ -5098,15 +5560,29 @@ and the approriate content-type and boundary markup information is added."
(goto-char (extent-start-position e))
(narrow-to-region (point) (point))
(setq object (extent-property e 'vm-mime-object))
+
;; insert the object
(cond ((bufferp object)
(insert-buffer-substring object))
+ ((listp object)
+ (save-restriction
+ (save-excursion (set-buffer (nth 0 object))
+ (widen))
+ (setq boundary-positions (cons (point-marker)
+ boundary-positions))
+ (insert-buffer-substring (nth 0 object)
+ (nth 1 object)
+ (nth 2 object))
+ (setq postponed-attachment t)
+ ))
((stringp object)
(let ((coding-system-for-read
(if (vm-mime-text-type-p
(extent-property e 'vm-mime-type))
(vm-line-ending-coding-system)
(vm-binary-coding-system)))
+ ;; keep no undos
+ (buffer-undo-list t)
;; no transformations!
(format-alist nil)
;; no decompression!
@@ -5148,11 +5624,13 @@ and the approriate content-type and boundary markup information is added."
nil)))
(cond ((vm-mime-types-match "text" type)
(setq encoding
- (vm-determine-proper-content-transfer-encoding
- (if already-mimed
- (vm-mm-layout-body-start layout)
- (point-min))
- (point-max))
+ (or
+ (extent-property e 'vm-mime-encoding)
+ (vm-determine-proper-content-transfer-encoding
+ (if already-mimed
+ (vm-mm-layout-body-start layout)
+ (point-min))
+ (point-max)))
encoding (vm-mime-transfer-encode-region
encoding
(if already-mimed
@@ -5181,14 +5659,14 @@ and the approriate content-type and boundary markup information is added."
(goto-char (point-max))
(widen)
(narrow-to-region opoint-min (point)))
- (t
+ ((not postponed-attachment)
(and layout (not forward-local-refs)
(vm-mime-internalize-local-external-bodies layout))
(if already-mimed
(setq encoding (vm-mime-transfer-encode-layout layout))
(vm-mime-base64-encode-region (point-min) (point-max))
(setq encoding "base64"))))
- (if just-one
+ (if (or just-one postponed-attachment)
nil
(goto-char (point-min))
(setq boundary-positions (cons (point-marker) boundary-positions))
@@ -5238,8 +5716,22 @@ and the approriate content-type and boundary markup information is added."
(setq charset (vm-determine-proper-charset (point)
(point-max)))
(if vm-xemacs-mule-p
- (encode-coding-region (point) (point-max)
- buffer-file-coding-system))
+ (encode-coding-region
+ (point) (point-max)
+
+ ;; What about the case where vm-m-m-c-t-c-a doesn't have an
+ ;; entry for the given charset? That shouldn't happen, if
+ ;; vm-mime-mule-coding-to-charset-alist and
+ ;; vm-mime-mule-charset-to-coding-alist have complete and
+ ;; matching entries. Admittedly this last is not a
+ ;; given. Should we make it so on startup? (By setting the
+ ;; key for any missing entries in
+ ;; vm-mime-mule-coding-to-charset-alist to being (format "%s"
+ ;; coding-system), if necessary.)
+
+ (car (cdr (vm-string-assoc
+ charset vm-mime-mule-charset-to-coding-alist)))))
+
(setq encoding (vm-determine-proper-content-transfer-encoding
(point)
(point-max))
@@ -5282,9 +5774,10 @@ and the approriate content-type and boundary markup information is added."
(delete-char 1))
;; copy remainder to enclosing entity's header section
(goto-char (point-max))
+ (if (not just-one)
(insert-buffer-substring (current-buffer)
(vm-mm-layout-header-start layout)
- (vm-mm-layout-body-start layout))
+ (vm-mm-layout-body-start layout)))
(delete-region (vm-mm-layout-header-start layout)
(vm-mm-layout-body-start layout))))
(goto-char (point-min))
@@ -5337,8 +5830,8 @@ and the approriate content-type and boundary markup information is added."
(enriched (and (boundp 'enriched-mode) enriched-mode))
forward-local-refs already-mimed layout o o-list boundary
type encoding charset params description disposition object
- opoint-min delete-object)
- (mail-text)
+ opoint-min delete-object postponed-attachment)
+ (goto-char (mail-text-start))
(setq o-list (vm-mime-fake-attachment-overlays (point) (point-max))
o-list (vm-delete (function
(lambda (o)
@@ -5467,6 +5960,18 @@ and the approriate content-type and boundary markup information is added."
(vm-binary-coding-system)))
(write-region (point-min) (point-max) tempfile nil 0))
(setq object tempfile)))))
+ ;; insert attachment from postponed message
+ (cond ((listp object)
+ (save-restriction
+ (save-excursion (set-buffer (nth 0 object))
+ (widen))
+ (setq boundary-positions (cons (point-marker)
+ boundary-positions))
+ (insert-buffer-substring (nth 0 object)
+ (nth 1 object)
+ (nth 2 object))
+ (setq postponed-attachment t)
+ )))
;; insert the object
(cond ((stringp object)
;; as of FSF Emacs 19.34, even with the hooks
@@ -5483,6 +5988,8 @@ and the approriate content-type and boundary markup information is added."
(overlay-get o 'vm-mime-type))
(vm-line-ending-coding-system)
(vm-binary-coding-system)))
+ ;; keep no undos
+ (buffer-undo-list t)
;; no transformations!
(format-alist nil)
;; no decompression!
@@ -5542,11 +6049,12 @@ and the approriate content-type and boundary markup information is added."
nil)))
(cond ((vm-mime-types-match "text" type)
(setq encoding
- (vm-determine-proper-content-transfer-encoding
- (if already-mimed
- (vm-mm-layout-body-start layout)
- (point-min))
- (point-max))
+ (or (overlay-get o 'vm-mime-encoding)
+ (vm-determine-proper-content-transfer-encoding
+ (if already-mimed
+ (vm-mm-layout-body-start layout)
+ (point-min))
+ (point-max)))
encoding (vm-mime-transfer-encode-region
encoding
(if already-mimed
@@ -5575,14 +6083,14 @@ and the approriate content-type and boundary markup information is added."
(goto-char (point-max))
(widen)
(narrow-to-region opoint-min (point)))
- (t
+ ((not postponed-attachment)
(and layout (not forward-local-refs)
(vm-mime-internalize-local-external-bodies layout))
(if already-mimed
(setq encoding (vm-mime-transfer-encode-layout layout))
(vm-mime-base64-encode-region (point-min) (point-max))
(setq encoding "base64"))))
- (if just-one
+ (if (or just-one postponed-attachment)
nil
(goto-char (point-min))
(setq boundary-positions (cons (point-marker) boundary-positions))
@@ -5684,9 +6192,10 @@ and the approriate content-type and boundary markup information is added."
(delete-char 1))
;; copy remainder to enclosing entity's header section
(goto-char (point-max))
+ (if (not just-one)
(insert-buffer-substring (current-buffer)
(vm-mm-layout-header-start layout)
- (vm-mm-layout-body-start layout))
+ (vm-mm-layout-body-start layout)))
(delete-region (vm-mm-layout-header-start layout)
(vm-mm-layout-body-start layout))))
(goto-char (point-min))
@@ -5902,7 +6411,7 @@ and the approriate content-type and boundary markup information is added."
'vm-numeric-left-justify-string
'vm-left-justify-string)
(car sexp)
- (string-to-int
+ (string-to-number
(substring format
(match-beginning 2)
(match-end 2))))))
@@ -5913,14 +6422,14 @@ and the approriate content-type and boundary markup information is added."
'vm-numeric-right-justify-string
'vm-right-justify-string)
(car sexp)
- (string-to-int
+ (string-to-number
(substring format
(match-beginning 2)
(match-end 2)))))))
(cond ((match-beginning 3)
(setcar sexp
(list 'vm-truncate-string (car sexp)
- (string-to-int
+ (string-to-number
(substring format
(match-beginning 4)
(match-end 4)))))))
@@ -5962,7 +6471,7 @@ and the approriate content-type and boundary markup information is added."
(if (vm-mime-types-match (car (car p)) type)
(throw 'done (cdr (car p)))
(setq p (cdr p))))
- "%-35.35t [%k to %a]" )))
+ "%-25.25t [%k to %a]" )))
(defun vm-mf-content-type (layout)
(car (vm-mm-layout-type layout)))
@@ -6015,9 +6524,14 @@ and the approriate content-type and boundary markup information is added."
"Press RETURN"))
(defun vm-mf-default-action (layout)
+ (if (eq vm-mime-show-alternatives 'mixed)
+ (concat (vm-mf-default-action-orig layout) " alternative")
+ (vm-mf-default-action-orig layout)))
+
+(defun vm-mf-default-action-orig (layout)
(or vm-mf-default-action
(let (cons)
- (cond ((or (vm-mime-can-display-internal layout)
+ (cond ((or (vm-mime-can-display-internal layout)
(vm-mime-find-external-viewer
(car (vm-mm-layout-type layout))))
(let ((p vm-mime-default-action-string-alist)
@@ -6036,3 +6550,5 @@ and the approriate content-type and boundary markup information is added."
"burn in the raging fires of hell forever"))
(provide 'vm-mime)
+
+;;; vm-mime.el ends here
diff --git a/vm-minibuf.el b/lisp/vm-minibuf.el
index f023dd1..951ad4a 100644
--- a/vm-minibuf.el
+++ b/lisp/vm-minibuf.el
@@ -1,21 +1,23 @@
-;;; Minibuffer read functions for VM
-;;; Copyright (C) 1993, 1994 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+;;; vm-minibuf.el --- Minibuffer read functions for VM
+;;
+;; Copyright (C) 1993, 1994 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-;;(provide 'vm-minibuf)
+;;; Code:
(defun vm-minibuffer-complete-word (&optional exiting)
(interactive)
@@ -34,7 +36,7 @@
;; find the beginning and end of the word we're trying to complete
(if (or (eobp) (memq (following-char) '(?\t ?\n ?\ )))
(progn
- (skip-chars-backward " \t\n")
+ (skip-chars-backward " \t\n")
(and (not (eobp)) (forward-char))
(setq end (point)))
(skip-chars-forward "^ \t\n")
@@ -88,14 +90,16 @@
(setq diff (- (length completion) (length word)))
(cond
;; We have some completion chars. Insert them.
- ((or (> diff 0)
- (and (zerop diff) (not (string-equal completion word))))
+ ((or (> diff 0)
+ (and completion (zerop diff) (not (string-equal completion word))))
(goto-char end)
(delete-char (- (length word)))
(insert completion)
(if (and vm-completion-auto-space
(null (cdr trimmed-c-list)))
(insert " ")))
+ ((null completion)
+ (vm-minibuffer-completion-message "[No completion available]"))
;; The word prefixed more than one string, but we can't complete
;; any further. Either give help or say "Ambiguous".
((zerop diff)
@@ -246,7 +250,7 @@ default the local keymap of the current buffer is used."
;; find the beginning and end of the word we're trying to complete
(if (or (eobp) (memq (following-char) '(?\t ?\n ?\ )))
(progn
- (skip-chars-backward " \t\n")
+ (skip-chars-backward " \t\n")
(and (not (eobp)) (forward-char))
(setq end (point)))
(skip-chars-forward "^ \t\n")
@@ -305,73 +309,7 @@ default the local keymap of the current buffer is used."
(while
(null
(string-match "^[ \t]*-?[0-9]+" (setq result (read-string prompt)))))
- (string-to-int result)))
-
-(defun vm-read-password (prompt &optional confirm)
- "Read and return a password from the minibuffer, prompting with PROMPT.
-Optional second argument CONFIRM non-nil means that the user will be asked
- to type the password a second time for confirmation and if there is a
- mismatch, the process is repeated.
-
-Line editing keys are:
- C-h, DEL rubout
- C-u, C-x line kill
- C-q, C-v literal next"
- (catch 'return-value
- (save-excursion
- (let ((cursor-in-echo-area t)
- (echo-keystrokes 0)
- (input-buffer nil)
- (help-form nil)
- (xxx "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
- (string nil)
- char done form)
- (unwind-protect
- (save-excursion
- (setq input-buffer (get-buffer-create " *password*"))
- (set-buffer input-buffer)
- (while t
- (erase-buffer)
- (message "%s%s" prompt
- (vm-truncate-roman-string xxx (buffer-size)))
- (while (not (memq (setq char (read-char)) '(?\C-m ?\C-j)))
- (if (setq form
- (cdr
- (assq char
- '((?\C-h . (delete-char -1))
- (?\C-? . (delete-char -1))
- (?\C-u . (delete-region 1 (point)))
- (?\C-x . (delete-region 1 (point)))
- (?\C-q . (quoted-insert 1))
- (?\C-v . (quoted-insert 1))))))
- (condition-case error-data
- (eval form)
- (error t))
- (insert char))
- (message "%s%s" prompt
- (vm-truncate-roman-string xxx (buffer-size))))
- (cond ((and confirm string)
- (cond ((not (string= string (buffer-string)))
- (message
- (concat prompt
- (vm-truncate-roman-string
- xxx (buffer-size))
- " [Mismatch... try again.]"))
- (ding)
- (sit-for 2)
- (setq string nil))
- (t (throw 'return-value string))))
- (confirm
- (setq string (buffer-string))
- (message
- (concat prompt
- (vm-truncate-roman-string xxx (buffer-size))
- " [Retype to confirm...]"))
- (sit-for 2))
- (t
- (message "")
- (throw 'return-value (buffer-string))))))
- (and input-buffer (kill-buffer input-buffer)))))))
+ (string-to-number result)))
(defun vm-keyboard-read-file-name (prompt &optional dir default
must-match initial history)
@@ -413,5 +351,24 @@ click mouse triggered the current command."
(vm-keyboard-read-file-name prompt dir default
must-match initial history)))
+(defun vm-folder-list (&optional non-virtual)
+ (save-excursion
+ (let ((buffers (buffer-list))
+ (modes (if non-virtual '(vm-mode) '(vm-mode vm-virtual-mode)))
+ folders)
+ (while buffers
+ (set-buffer (car buffers))
+ (if (member major-mode modes)
+ (setq folders (cons (buffer-name) folders)))
+ (setq buffers (cdr buffers)))
+ folders)))
+
+(defun vm-read-folder-name ()
+ (completing-read
+ "VM Folder: "
+ (mapcar (lambda (f) (list f)) (vm-folder-list))
+ nil t nil nil))
(provide 'vm-minibuf)
+
+;;; vm-minibuf.el ends here
diff --git a/vm-misc.el b/lisp/vm-misc.el
index 813456e..b33389b 100644
--- a/vm-misc.el
+++ b/lisp/vm-misc.el
@@ -1,22 +1,23 @@
-;;; Miscellaneous functions for VM
-;;; Copyright (C) 1989-2001 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-misc)
-
+;;; vm-misc.el --- Miscellaneous functions for VM
+;;
+;; Copyright (C) 1989-2001 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+;;; Code:
(defun vm-delete-non-matching-strings (regexp list &optional destructively)
"Delete strings matching REGEXP from LIST.
Optional third arg non-nil means to destructively alter LIST, instead of
@@ -37,6 +38,13 @@ The new version of the list, minus the deleted strings, is returned."
list ))
(defun vm-parse (string regexp &optional matchn matches)
+ "Returns list of string by splitting STRING with REGEXP matches.
+REGEXP must match one item and MATCHN can be used to select a match
+group (default is 1). MATCHES is the number of time the match is
+applied (default until it does not match anymore).
+
+This function is similar to a spring-split, but a bit more complex
+and flexible."
(or matchn (setq matchn 1))
(let (list tem)
(store-match-data nil)
@@ -104,9 +112,20 @@ The new version of the list, minus the deleted strings, is returned."
(if (and (null (string-match "^[\t\f\n\r ]+$" s))
(not (string= s "")))
(setq list (cons s list)))
- (nreverse list)) ; jwz: fixed order
+ (mapcar 'vmrf-fix-quoted-address (reverse list)))
(and work-buffer (kill-buffer work-buffer)))))))
+(defun vmrf-fix-quoted-address (a)
+ "RF: evetually there are qp-encoded addresses not quoted by \" and thus we
+ need to add quotes or leave them undecoded."
+ (let ((da (vm-decode-mime-encoded-words-in-string a)))
+ (if (string= da a)
+ a
+ (if (or (string-match "^\\s-*\\([^\"']*,[^\"']*\\)\\b\\s-*\\(<.*\\)" da)
+ (string-match "^\\s-*\"'\\([^\"']+\\)'\"\\(.*\\)" da))
+ (concat "\"" (match-string 1 da) "\" " (match-string 2 da))
+ da))))
+
(defun vm-parse-structured-header (string &optional sepchar keep-quotes)
(if (null string)
()
@@ -618,6 +637,8 @@ If HACK-ADDRESSES is t, then the strings are considered to be mail addresses,
file ))
(defun vm-make-tempfile-name (&optional filename-suffix proposed-filename)
+ (if (stringp proposed-filename)
+ (setq proposed-filename (file-name-nondirectory proposed-filename)))
(let (filename)
(cond ((and (stringp proposed-filename)
(not (file-exists-p
@@ -635,8 +656,8 @@ If HACK-ADDRESSES is t, then the strings are considered to be mail addresses,
vm-tempfile-counter
proposed-filename)
vm-temp-file-directory))
- vm-tempfile-counter (1+ vm-tempfile-counter))
- done (not (file-exists-p filename)))))
+ vm-tempfile-counter (1+ vm-tempfile-counter)
+ done (not (file-exists-p filename))))))
(t
(let ((done nil))
(while (not done)
@@ -834,8 +855,8 @@ If HACK-ADDRESSES is t, then the strings are considered to be mail addresses,
(widen)
(or (markerp end) (setq end (vm-marker end)))
(goto-char start)
- (while (not done)
- (re-search-forward "$" end t)
+ (while (and (not done) (re-search-forward "[ \t]*$" end t))
+ (replace-match "")
(if (>= (current-column) len)
;; ignore errors
(condition-case nil
@@ -882,7 +903,7 @@ If HACK-ADDRESSES is t, then the strings are considered to be mail addresses,
(defvar enable-multibyte-characters)
(defvar buffer-display-table)
(defun vm-fsfemacs-nonmule-display-8bit-chars ()
- (cond ((and vm-fsfemacs-p
+ (cond ((and vm-fsfemacs-p
(or (not vm-fsfemacs-mule-p)
(and (boundp 'enable-multibyte-characters)
(not enable-multibyte-characters))))
@@ -935,4 +956,28 @@ If HACK-ADDRESSES is t, then the strings are considered to be mail addresses,
(scroll-bar-mode nil)
(setq vm-fsfemacs-cached-scroll-bar-width size))))
+(defvar vm-disable-modes-ignore nil
+ "List of modes ignored by `vm-disable-modes'.
+Any mode causing an error while trying to disable it will be added to this
+list. It still will try to diable it, but no error messages are generated
+anymore for it.")
+
+(defun vm-disable-modes (&optional modes)
+ "Disable the given minor modes.
+If MODES is nil the take the modes from the variable
+`vm-disable-modes-before-encoding'."
+ (let (m)
+ (while modes
+ (setq m (car modes) modes (cdr modes))
+ (condition-case errmsg
+ (if (functionp m)
+ (funcall m -1))
+ (error
+ (when (not (member m vm-disable-modes-ignore))
+ (message "Could not disable mode `%S': %S" m errmsg)
+ (setq vm-disable-modes-ignore (cons m vm-disable-modes-ignore)))
+ nil)))))
+
(provide 'vm-misc)
+
+;;; vm-misc.el ends here
diff --git a/vm-motion.el b/lisp/vm-motion.el
index 36f77ac..5de12f8 100644
--- a/vm-motion.el
+++ b/lisp/vm-motion.el
@@ -1,22 +1,23 @@
-;;; Commands to move around in a VM folder
-;;; Copyright (C) 1989-1997 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-motion)
+;;; vm-motion.el --- Commands to move around in a VM folder
+;;
+;; Copyright (C) 1989-1997 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+;;; Code:
(defun vm-record-and-change-message-pointer (old new)
(intern (buffer-name) vm-buffers-needing-display-update)
(vm-garbage-collect-message)
@@ -24,6 +25,7 @@
vm-message-pointer new
vm-need-summary-pointer-update t))
+;;;###autoload
(defun vm-goto-message (n)
"Go to the message numbered N.
Interactively N is the prefix argument. If no prefix arg is provided
@@ -56,6 +58,7 @@ given."
(vm-record-and-change-message-pointer vm-message-pointer cons)
(vm-preview-current-message)))))
+;;;###autoload
(defun vm-goto-message-last-seen ()
"Go to the message last previewed."
(interactive)
@@ -70,6 +73,7 @@ given."
vm-last-message-pointer)
(vm-preview-current-message))))
+;;;###autoload
(defun vm-goto-parent-message ()
"Go to the parent of the current message."
(interactive)
@@ -136,6 +140,7 @@ given."
(and (eq last-command 'vm-next-command-uses-marks)
(null (vm-mark-of (car mp)))))))
+;;;###autoload
(defun vm-next-message (&optional count retry signal-errors)
"Go forward one message and preview it.
With prefix arg (optional first argument) COUNT, go forward COUNT
@@ -257,6 +262,7 @@ this command 'sees' marked messages as it moves."
(and error signal-errors
(signal error nil))))
+;;;###autoload
(defun vm-previous-message (&optional count retry signal-errors)
"Go back one message and preview it.
With prefix arg COUNT, go backward COUNT messages. A negative COUNT
@@ -271,6 +277,7 @@ ignored."
(vm-display nil nil '(vm-previous-message) '(vm-previous-message))
(vm-next-message (- count) retry signal-errors))
+;;;###autoload
(defun vm-next-message-no-skip (&optional count)
"Like vm-next-message but will not skip deleted or read messages."
(interactive "p")
@@ -285,6 +292,7 @@ ignored."
;; backward compatibility
(fset 'vm-Next-message 'vm-next-message-no-skip)
+;;;###autoload
(defun vm-previous-message-no-skip (&optional count)
"Like vm-previous-message but will not skip deleted or read messages."
(interactive "p")
@@ -299,6 +307,7 @@ ignored."
;; backward compatibility
(fset 'vm-Previous-message 'vm-previous-message-no-skip)
+;;;###autoload
(defun vm-next-unread-message ()
"Move forward to the nearest new or unread message, if there is one."
(interactive)
@@ -315,6 +324,7 @@ ignored."
(and (eq vm-message-pointer oldmp) (signal 'end-of-folder nil)))
(end-of-folder (message "No next unread message"))))
+;;;###autoload
(defun vm-previous-unread-message ()
"Move backward to the nearest new or unread message, if there is one."
(interactive)
@@ -332,6 +342,7 @@ ignored."
(and (eq vm-message-pointer oldmp) (signal 'beginning-of-folder nil)))
(beginning-of-folder (message "No previous unread message"))))
+;;;###autoload
(defun vm-next-message-same-subject ()
"Move forward to the nearest message with the same subject.
vm-subject-ignored-prefix and vm-subject-ignored-suffix will apply
@@ -361,6 +372,7 @@ to the subject comparisons."
(setq vm-message-pointer oldmp)
(message "No next message with the same subject")))))
+;;;###autoload
(defun vm-previous-message-same-subject ()
"Move backward to the nearest message with the same subject.
vm-subject-ignored-prefix and vm-subject-ignored-suffix will apply
@@ -444,7 +456,7 @@ to the subject comparisons."
;; return non-nil so the caller will know that
;; a new message was selected.
t ))
- (t
+ (t
(if (< point (vm-su-start-of (car message-pointer)))
(setq mp message-list)
(setq mp (cdr message-pointer) message-pointer nil))
@@ -462,3 +474,5 @@ to the subject comparisons."
t )))))))
(provide 'vm-motion)
+
+;;; vm-motion.el ends here
diff --git a/vm-mouse.el b/lisp/vm-mouse.el
index 2a0353f..72f2f63 100644
--- a/vm-mouse.el
+++ b/lisp/vm-mouse.el
@@ -1,22 +1,23 @@
-;;; Mouse related functions and commands
-;;; Copyright (C) 1995-1997 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-mouse)
-
+;;; vm-mouse.el --- Mouse related functions and commands
+;;
+;; Copyright (C) 1995-1997 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+;;; Code:
(defun vm-mouse-set-mouse-track-highlight (start end &optional overlay)
(if (null overlay)
(cond (vm-fsfemacs-p
@@ -34,6 +35,7 @@
(vm-xemacs-p
(set-extent-endpoints overlay start end)))))
+;;;###autoload
(defun vm-mouse-button-2 (event)
(interactive "e")
;; go to where the event occurred
@@ -59,6 +61,7 @@
((memq major-mode '(vm-mode vm-virtual-mode vm-presentation-mode))
(vm-mouse-popup-or-select event))))
+;;;###autoload
(defun vm-mouse-button-3 (event)
(interactive "e")
(if vm-use-menus
@@ -114,6 +117,7 @@
nil)))
(t nil))))
+;;;###autoload
(defun vm-mouse-popup-or-select (event)
(interactive "e")
(cond ((vm-mouse-fsfemacs-mouse-p)
@@ -146,6 +150,7 @@
(funcall (extent-property e 'vm-mime-function) e))
(t (vm-menu-popup-context-menu event)))))))
+;;;###autoload
(defun vm-mouse-send-url-at-event (event)
(interactive "e")
(cond ((vm-mouse-xemacs-mouse-p)
@@ -182,6 +187,8 @@
(vm-mouse-send-url url browser)))))))
(defun vm-mouse-send-url (url &optional browser switches)
+ (if (string-match "^[A-Za-z0-9._-]+@[A-Za-z0-9._-]+$" url)
+ (setq url (concat "mailto:" url)))
(if (string-match "^mailto:" url)
(vm-mail-to-mailto-url url)
(let ((browser (or browser vm-url-browser))
@@ -211,9 +218,49 @@
(vm-mouse-send-url-to-netscape url t new-window)))
(message "Sending URL to Netscape... done"))
+(defun vm-mouse-send-url-to-opera (url &optional new-opera new-window)
+ ;; Change commas to %2C to avoid confusing Netscape -remote.
+ (while (string-match "," url)
+ (setq url (replace-match "%2C" nil t url)))
+ (message "Sending URL to Opera...")
+ (if new-opera
+ (apply 'vm-run-background-command vm-opera-program
+ (append vm-opera-program-switches (list url)))
+ (or (equal 0 (apply 'vm-run-command vm-opera-program
+ (append vm-opera-program-switches
+ (list "-remote"
+ (concat "openURL(" url
+ ")")))))
+ (vm-mouse-send-url-to-opera url t new-window)))
+ (message "Sending URL to Opera... done"))
+
+
+(defun vm-mouse-send-url-to-mozilla (url &optional new-mozilla new-window)
+ ;; Change commas to %2C to avoid confusing Netscape -remote.
+ (while (string-match "," url)
+ (setq url (replace-match "%2C" nil t url)))
+ (message "Sending URL to Mozilla...")
+ (if new-mozilla
+ (apply 'vm-run-background-command vm-mozilla-program
+ (append vm-mozilla-program-switches (list url)))
+ (or (equal 0 (apply 'vm-run-command vm-mozilla-program
+ (append vm-mozilla-program-switches
+ (list "-remote"
+ (concat "openURL(" url
+ (if new-window ",new-window" "")
+ ")")))))
+ (vm-mouse-send-url-to-mozilla url t new-window)))
+ (message "Sending URL to Mozilla... done"))
+
(defun vm-mouse-send-url-to-netscape-new-window (url)
(vm-mouse-send-url-to-netscape url nil t))
+(defun vm-mouse-send-url-to-opera-new-window (url)
+ (vm-mouse-send-url-to-opera url nil t))
+
+(defun vm-mouse-send-url-to-mozilla-new-window (url)
+ (vm-mouse-send-url-to-mozilla url nil t))
+
(defvar buffer-file-type)
(defun vm-mouse-send-url-to-mosaic (url &optional new-mosaic new-window)
@@ -240,7 +287,7 @@
(setq selective-display nil)
(erase-buffer)
(insert-file-contents pid-file)
- (setq pid (int-to-string (string-to-int (buffer-string))))
+ (setq pid (int-to-string (string-to-number (buffer-string))))
(erase-buffer)
(insert (if new-window "newwin" "goto") ?\n)
(insert url ?\n)
@@ -281,6 +328,17 @@
(vm-mouse-send-url-to-konqueror url t)))
(message "Sending URL to Konqueror... done"))
+(defun vm-mouse-send-url-to-firefox (url &optional new-window)
+ (message "Sending URL to Mozilla Firebird...")
+ (if new-window
+ (apply 'vm-run-background-command vm-firefox-program
+ (append vm-firefox-program-switches (list url)))
+ (or (equal 0 (apply 'vm-run-command vm-firefox-client-program
+ (append vm-firefox-client-program-switches
+ (list (format "openURL(%s)" url)))))
+ (vm-mouse-send-url-to-firefox url t)))
+ (message "Sending URL to Mozilla Firefox... done"))
+
(defun vm-mouse-send-url-to-konqueror-new-browser (url)
(vm-mouse-send-url-to-konqueror url t))
@@ -294,19 +352,7 @@
(x-own-selection-internal 'CLIPBOARD url)))
(message "Sending URL to X Clipboard... done"))
-;; this code courtesy Thomas F. Burdick
-(defun vm-mouse-send-url-to-safari (url)
- "Sends URL to Safari, using Apple's Open Scripting Architecture."
- (message "Sending URL to Safari...")
- (with-temp-buffer
- (insert "tell application \"Safari\"\n")
- (insert " activate\n")
- (insert " make new document at the beginning of documents\n")
- (insert (format " set the URL of the front document to \"%s\"\n" url))
- (insert "end tell\n")
- (call-process-region (point-min) (point-max) "/usr/bin/osascript"))
- (message "Sending URL to Safari... done"))
-
+;;;###autoload
(defun vm-mouse-install-mouse ()
(cond ((vm-mouse-xemacs-mouse-p)
(if (null (lookup-key vm-mode-map 'button2))
@@ -320,10 +366,18 @@
(define-key vm-mode-map [down-mouse-3] 'vm-mouse-button-3))))))
(defun vm-run-background-command (command &rest arg-list)
- (apply (function call-process) command nil 0 nil arg-list))
+ (message "vm-run-background-command: %S %S" command arg-list)
+ (apply (function call-process) command
+ nil
+ 0
+ nil arg-list))
(defun vm-run-command (command &rest arg-list)
- (apply (function call-process) command nil nil nil arg-list))
+ (message "vm-run-command: %S %S" command arg-list)
+ (apply (function call-process) command
+ nil
+ (get-buffer-create (concat " *" command "*"))
+ nil arg-list))
;; return t on zero exit status
;; return (exit-status . stderr-string) on nonzero exit status
@@ -333,6 +387,7 @@
;; use binary coding system in FSF Emacs/MULE
(coding-system-for-read (vm-binary-coding-system))
(coding-system-for-write (vm-binary-coding-system))
+ (buffer-file-format nil)
;; for DOS/Windows command to tell it that its input is
;; binary.
(binary-process-input t)
@@ -461,9 +516,22 @@ HISTORY argument is ignored."
(vm-delete-auto-save-file-names
(vm-delete-index-file-names
(directory-files default-directory)))))
+
+ ;; delete dot files
+ (setq list (vm-delete (lambda (file)
+ (string-match "^\\.\\([^.].*\\)?$" file))
+ list))
+ ;; append a "/" to directories
+ (setq list (mapcar (lambda (file)
+ (if (file-directory-p file)
+ (concat file "/")
+ file))
+ list))
+
(vm-show-list list 'vm-mouse-read-file-name-event-handler)
(setq buffer-read-only t)))
+;;;###autoload
(defun vm-mouse-read-file-name-quit-handler (&optional normal-exit)
(interactive)
(if vm-mouse-read-file-name-should-delete-frame
@@ -568,6 +636,7 @@ HISTORY argument is ignored."
'vm-mouse-read-string-event-handler)
(setq buffer-read-only t)))
+;;;###autoload
(defun vm-mouse-read-string-quit-handler (&optional normal-exit)
(interactive)
(if vm-mouse-read-string-should-delete-frame
@@ -577,3 +646,5 @@ HISTORY argument is ignored."
(throw 'exit t)))
(provide 'vm-mouse)
+
+;;; vm-mouse.el ends here
diff --git a/vm-page.el b/lisp/vm-page.el
index 14e218b..0350155 100644
--- a/vm-page.el
+++ b/lisp/vm-page.el
@@ -1,22 +1,25 @@
-;;; Commands to move around within a VM message
-;;; Copyright (C) 1989-1997 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+;;; vm-page.el --- Commands to move around within a VM message
+;
+;; Copyright (C) 1989-1997 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-;;(provide 'vm-page)
+;;; Code:
+;;;###autoload
(defun vm-scroll-forward (&optional arg)
"Scroll forward a screenful of text.
If the current message is being previewed, the message body is revealed.
@@ -220,6 +223,7 @@ Prefix argument N means scroll forward N lines."
(vm-emit-eom-blurb))))
(defun vm-emit-eom-blurb ()
+ (interactive)
(let ((vm-summary-uninteresting-senders-arrow "")
(case-fold-search nil))
(message (if (and (stringp vm-summary-uninteresting-senders)
@@ -230,6 +234,7 @@ Prefix argument N means scroll forward N lines."
(vm-number-of (car vm-message-pointer))
(vm-summary-sprintf "%F" (car vm-message-pointer)))))
+;;;###autoload
(defun vm-scroll-backward (&optional arg)
"Scroll backward a screenful of text.
Prefix N scrolls backward N lines."
@@ -240,6 +245,7 @@ Prefix N scrolls backward N lines."
((symbolp arg) nil)
(t arg))))
+;;;###autoload
(defun vm-scroll-forward-one-line (&optional count)
"Scroll forward one line.
Prefix arg N means scroll forward N lines.
@@ -247,6 +253,7 @@ Negative arg means scroll backward."
(interactive "p")
(vm-scroll-forward count))
+;;;###autoload
(defun vm-scroll-backward-one-line (&optional count)
"Scroll backward one line.
Prefix arg N means scroll backward N lines.
@@ -301,7 +308,9 @@ Negative arg means scroll forward."
(overlay-put p 'vm-highlight t)))
(goto-char (vm-matched-header-end)))))))
-(defun vm-energize-urls ()
+;;;###autoload
+(defun vm-energize-urls (&optional clean-only)
+ (interactive "P")
;; Don't search too long in large regions. If the region is
;; large, search just the head and the tail of the region since
;; they tend to contain the interesting text.
@@ -322,6 +331,7 @@ Negative arg means scroll forward."
(delete-extent e))
nil))
(current-buffer) (point-min) (point-max))
+ (if clean-only (message "Energy from urls removed!")
(while search-pairs
(goto-char (car (car search-pairs)))
(while (re-search-forward vm-url-regexp (cdr (car search-pairs)) t)
@@ -349,8 +359,11 @@ Negative arg means scroll forward."
(set-extent-property e 'vm-button t)
(set-extent-property e 'keymap keymap)
(set-extent-property e 'balloon-help 'vm-url-help)
- (set-extent-property e 'highlight t))))
- (setq search-pairs (cdr search-pairs)))))
+ (set-extent-property e 'highlight t)
+ ;; for vm-continue-postponed-message
+; (set-extent-property e 'duplicable t)
+ )))
+ (setq search-pairs (cdr search-pairs))))))
((and vm-fsfemacs-p
(fboundp 'overlay-put))
(let (o-lists o p)
@@ -599,7 +612,9 @@ Use mouse button 3 to choose a Web browser for the URL."
"Netscape")
(t (symbol-name vm-url-browser)))))
+;;;###autoload
(defun vm-energize-urls-in-message-region (&optional start end)
+ (interactive "r")
(save-excursion
(or start (setq start (vm-headers-of (car vm-message-pointer))))
(or end (setq end (vm-text-end-of (car vm-message-pointer))))
@@ -692,7 +707,6 @@ Use mouse button 3 to choose a Web browser for the URL."
;; run the message select hooks.
(save-excursion
(vm-select-folder-buffer)
- (vm-run-message-hook (car vm-message-pointer) 'vm-select-message-hook)
(and vm-select-new-message-hook (vm-new-flag (car vm-message-pointer))
(vm-run-message-hook (car vm-message-pointer)
'vm-select-new-message-hook))
@@ -702,9 +716,11 @@ Use mouse button 3 to choose a Web browser for the URL."
'vm-select-unread-message-hook)))
(vm-narrow-for-preview just-passing-through)
- (if (or vm-mime-display-function
- (natnump vm-fill-paragraphs-containing-long-lines)
- (and vm-display-using-mime
+ (if (or vm-always-use-presentation-buffer
+ vm-mime-display-function
+ (or (natnump vm-fill-paragraphs-containing-long-lines)
+ (eq 'window-width vm-fill-paragraphs-containing-long-lines))
+ (and vm-display-using-mime
(not (vm-mime-plain-message-p (car vm-message-pointer)))))
(let ((layout (vm-mm-layout (car vm-message-pointer))))
(vm-make-presentation-copy (car vm-message-pointer))
@@ -773,7 +789,9 @@ Use mouse button 3 to choose a Web browser for the URL."
(set-window-point w (vm-text-of (car vm-message-pointer))))))
(if just-passing-through
(vm-show-current-message)
- (vm-update-summary-and-mode-line)))))
+ (vm-update-summary-and-mode-line))))
+
+ (vm-run-message-hook (car vm-message-pointer) 'vm-select-message-hook))
(defun vm-show-current-message ()
(and vm-display-using-mime
@@ -787,7 +805,8 @@ Use mouse button 3 to choose a Web browser for the URL."
(vm-mime-error (vm-set-mime-layout-of (car vm-message-pointer)
(car (cdr data)))
(message "%s" (car (cdr data))))))
- (if (and (natnump vm-fill-paragraphs-containing-long-lines)
+ (if (and (or (natnump vm-fill-paragraphs-containing-long-lines)
+ (eq 'window-width vm-fill-paragraphs-containing-long-lines))
(vm-mime-plain-message-p (car vm-message-pointer)))
(let ((needmsg (> (- (vm-text-end-of (car vm-message-pointer))
(vm-text-of (car vm-message-pointer)))
@@ -829,11 +848,16 @@ Use mouse button 3 to choose a Web browser for the URL."
(cond ((vm-new-flag (car vm-message-pointer))
(vm-set-new-flag (car vm-message-pointer) nil)))
(cond ((vm-unread-flag (car vm-message-pointer))
- (vm-set-unread-flag (car vm-message-pointer) nil))))
+ (vm-set-unread-flag (car vm-message-pointer) nil)))
+
+ (vm-run-message-hook (car vm-message-pointer)
+ 'vm-showing-message-hook)
+ )
(vm-update-summary-and-mode-line)
(vm-howl-if-eom))
(vm-update-summary-and-mode-line))))
+;;;###autoload
(defun vm-expose-hidden-headers ()
"Toggle exposing and hiding message headers that are normally not visible."
(interactive)
@@ -912,6 +936,7 @@ Use mouse button 3 to choose a Web browser for the URL."
(setq max (point))
(narrow-to-region min max))))
+;;;###autoload
(defun vm-beginning-of-message ()
"Moves to the beginning of the current message."
(interactive)
@@ -937,6 +962,7 @@ Use mouse button 3 to choose a Web browser for the URL."
(if vm-honor-page-delimiters
(vm-narrow-to-page)))
+;;;###autoload
(defun vm-end-of-message ()
"Moves to the end of the current message, exposing and flagging it read
as necessary."
@@ -966,6 +992,7 @@ as necessary."
(if vm-honor-page-delimiters
(vm-narrow-to-page)))
+;;;###autoload
(defun vm-move-to-next-button (count)
"Moves to the next button in the current message.
Prefix argument N means move to the Nth next button.
@@ -995,6 +1022,7 @@ exposed and marked as read."
(if vm-honor-page-delimiters
(vm-narrow-to-page))))
+;;;###autoload
(defun vm-move-to-previous-button (count)
"Moves to the previous button in the current message.
Prefix argument N means move to the Nth previous button.
@@ -1056,3 +1084,5 @@ exposed and marked as read."
(error "No more buttons"))))
(provide 'vm-page)
+
+;;; vm-page.el ends here
diff --git a/lisp/vm-pcrisis.el b/lisp/vm-pcrisis.el
new file mode 100644
index 0000000..1b32a85
--- /dev/null
+++ b/lisp/vm-pcrisis.el
@@ -0,0 +1,1482 @@
+;;; vm-pcrisis.el --- wide-ranging auto-setup for personalities in VM
+;;
+;; Copyright (C) 1999 Rob Hodges,
+;; 2006 Robert Widhopf, Robert P. Goldman
+;;
+;; Package: Personality Crisis for VM
+;; Author: Rob Hodges
+;;
+;; Maintainer: Robert Widhopf-Fenk <hack@robf.de>
+;; X-URL: http://www.robf.de/Hacking/elisp
+;; Revision $Id$
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, you can either send email to this
+;; program's maintainer or write to: The Free Software Foundation,
+;; Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.
+
+
+;; DOCUMENTATION:
+;; -------------
+;;
+;; Documentation is now in Texinfo and HTML formats. You should have
+;; downloaded one or the other along with this package at the URL
+;; above.
+
+;;; Code:
+
+(eval-when-compile
+ (require 'vm-version)
+ (require 'vm-message)
+ (require 'vm-macro)
+ (require 'vm-reply)
+ ;; get the macros we need.
+ (require 'cl)
+ (require 'advice)
+ (condition-case e
+ (progn
+ (require 'regexp-opt)
+ (require 'bbdb))
+ (error
+ (message "%S" e)
+ (message "Could not load bbdb.el. Related functions may not work correctly!")
+ (sit-for 5))))
+
+;; -------------------------------------------------------------------
+;; Variables:
+;; -------------------------------------------------------------------
+(defconst vmpc-version "0.9.1"
+ "Version of pcrisis.")
+
+(defgroup vmpc nil
+ "Manage personalities and more in VM."
+ :group 'vm)
+
+(defcustom vmpc-conditions ()
+ "*List of conditions which will be checked by pcrisis."
+ :group 'vmpc)
+
+(defcustom vmpc-actions ()
+ "*List of actions.
+Actions are associated with conditions from `vmpc-conditions' by one of
+`vmpc-actions-alist', `vmpc-reply-alist', `', `vmpc-forward-alist',
+`vmpc-resend-alist', `vmpc-newmail-alist' or `vmpc-automorph-alist'.
+
+These are also the actions from which you can choose when using the newmail
+features of Personality Crisis, or the `vmpc-prompt-for-profile' action."
+ :type '(repeat (list (string :tag "Action name")
+ (sexp :tag "Condition")))
+ :group 'vmpc)
+
+(defun vmpc-alist-set (symbol value)
+ "Used as :set for vmpc-*-alist variables.
+Checks if the condition and all the actions exist."
+ (while value
+ (let ((condition (caar value))
+ (actions (cdar value)))
+ (if (and condition (not (assoc condition vmpc-conditions)))
+ (error "Condition '%s' does not exist!" condition))
+ (while actions
+ (if (not (assoc (car actions) vmpc-actions))
+ (error "Action '%s' does not exist!" (car actions)))
+ (setq actions (cdr actions))))
+ (setq value (cdr value)))
+ (set symbol value))
+
+(defun vmpc-defcustom-alist-type ()
+ "Generate :type for vmpc-*-alist variables."
+ (list 'repeat
+ (list 'list
+ (append '(choice :tag "Condition")
+ (mapcar (lambda (c) (list 'const (car c))) vmpc-conditions)
+ '((string)))
+ (list 'repeat :tag "Actions to run"
+ (append '(choice :tag "Action")
+ (mapcar (lambda (a) (list 'const (car a))) vmpc-actions)
+ '(string))))))
+
+(defcustom vmpc-actions-alist ()
+ "*An alist associating conditions with actions from `vmpc-actions'.
+If you do not want to map actions for each state, e.g. for replying, forwarding,
+resending, composing or automorphing, then set this one."
+ :type (vmpc-defcustom-alist-type)
+; :set 'vmpc-alist-set
+ :group 'vmpc)
+
+(defcustom vmpc-reply-alist ()
+ "*An alist associating conditions with actions from `vmpc-actions' when replying."
+ :type (vmpc-defcustom-alist-type)
+; :set 'vmpc-alist-set
+ :group 'vmpc)
+
+(defcustom vmpc-forward-alist ()
+ "*An alist associating conditions with actions from `vmpc-actions' when forwarding."
+ :type (vmpc-defcustom-alist-type)
+; :set 'vmpc-alist-set
+ :group 'vmpc)
+
+(defcustom vmpc-automorph-alist ()
+ "*An alist associating conditions with actions from `vmpc-actions' when automorphing."
+ :type (vmpc-defcustom-alist-type)
+; :set 'vmpc-alist-set
+ :group 'vmpc)
+
+(defcustom vmpc-newmail-alist ()
+ "*An alist associating conditions with actions from `vmpc-actions' when composing."
+ :type (vmpc-defcustom-alist-type)
+; :set 'vmpc-alist-set
+ :group 'vmpc)
+
+(defcustom vmpc-resend-alist ()
+ "*An alist associating conditions with actions from `vmpc-actions' when resending."
+ :type (vmpc-defcustom-alist-type)
+; :set 'vmpc-alist-set
+ :group 'vmpc)
+
+(defcustom vmpc-auto-profiles-file "~/.vmpc-auto-profiles"
+ "*File in which to save information used by `vmpc-prompt-for-profile'.
+When set to the symbol 'BBDB, profiles will be stored there."
+ :type '(choice (file)
+ (const BBDB))
+ :group 'vmpc)
+
+(defcustom vmpc-auto-profiles-expunge-days 100
+ "*Number of days after which to expunge old address-profile associations.
+Performance may suffer noticeably if this file becomes enormous, but in other
+respects it is preferable for this value to be fairly high. The value that is
+right for you will depend on how often you send email to new addresses using
+`vmpc-prompt-for-profile' (with the REMEMBER flag set to 'always or 'prompt)."
+ :type 'integer
+ :group 'vmpc)
+
+(defvar vmpc-current-state nil
+ "The current state of pcrisis.
+It is one of 'reply, 'forward, 'resend, 'automorph or 'newmail.
+It controls which actions/functions can/will be run.")
+
+(defvar vmpc-current-buffer nil
+ "The current buffer, i.e. 'none or 'composition.
+It is 'none before running an adviced VM function and 'composition afterward,
+i.e. when within the composition buffer.")
+
+(defvar vmpc-saved-headers-alist nil
+ "Alist of headers from the original message saved for later use.")
+
+(defvar vmpc-actions-to-run nil
+ "The actions to run.")
+
+(defvar vmpc-true-conditions nil
+ "The true conditions.")
+
+(defvar vmpc-auto-profiles nil
+ "The auto profiles as stored in `vmpc-auto-profiles-file'.")
+
+;; An "exerlay" is an overlay in FSF Emacs and an extent in XEmacs.
+;; It's not a real type; it's just the way I'm dealing with the damn
+;; things to produce containers for the signature and pre-signature
+;; which can be highlighted etc. and work on both platforms.
+
+(defvar vmpc-pre-sig-exerlay ()
+ "Don't mess with this.")
+
+(make-variable-buffer-local 'vmpc-pre-sig-exerlay)
+
+(defvar vmpc-sig-exerlay ()
+ "Don't mess with this.")
+
+(make-variable-buffer-local 'vmpc-sig-exerlay)
+
+(defvar vmpc-pre-sig-face (progn (make-face 'vmpc-pre-sig-face
+ "Face used for highlighting the pre-signature.")
+ (set-face-foreground
+ 'vmpc-pre-sig-face "forestgreen")
+ 'vmpc-pre-sig-face)
+ "Face used for highlighting the pre-signature.")
+
+(defvar vmpc-sig-face (progn (make-face 'vmpc-sig-face
+ "Face used for highlighting the signature.")
+ (set-face-foreground 'vmpc-sig-face
+ "steelblue")
+ 'vmpc-sig-face)
+ "Face used for highlighting the signature.")
+
+(defvar vmpc-intangible-pre-sig 'nil
+ "Whether to forbid the cursor from entering the pre-signature.")
+
+(defvar vmpc-intangible-sig 'nil
+ "Whether to forbid the cursor from entering the signature.")
+
+(defvar vmpc-expect-default-signature 'nil
+ "*Set this to 't if you have a signature-inserting function.
+It will ensure that pcrisis correctly handles the signature .")
+
+
+;; -------------------------------------------------------------------
+;; Some easter-egg functionality:
+;; -------------------------------------------------------------------
+
+(defun vmpc-my-identities (&rest identities)
+ "Setup pcrisis with the given IDENTITIES."
+ (setq vmpc-conditions '(("always true" t))
+ vmpc-actions-alist '(("always true" "prompt for a profile"))
+ vmpc-actions '(("prompt for a profile" (vmpc-prompt-for-profile 'always))))
+ (setq vmpc-actions
+ (append (mapcar
+ (lambda (i)
+ (list i (list 'vmpc-substitute-header "From" i)))
+ identities)
+ vmpc-actions)))
+
+(defun vmpc-header-field-for-point ()
+ "*Return a string indicating the mail header field point is in.
+If point is not in a header field, returns nil."
+ (save-excursion
+ (unless (save-excursion
+ (re-search-backward (regexp-quote mail-header-separator)
+ (point-min) t))
+ (re-search-backward "^\\([^ \t\n:]+\\):")
+ (match-string 1))))
+
+(defun vmpc-tab-header-or-tab-stop (&optional backward)
+ "*If in a mail header field, moves to next useful header or body.
+When moving to the message body, calls the `vmpc-automorph' function.
+If within the message body, runs `tab-to-tab-stop'.
+If BACKWARD is specified and non-nil, moves to previous useful header
+field, whether point is in the body or the headers.
+\"Useful header fields\" are currently, in order, \"To\" and
+\"Subject\"."
+ (interactive)
+ (let ((curfield) (nextfield) (useful-headers '("To" "Subject")))
+ (if (or (setq curfield (vmpc-header-field-for-point))
+ backward)
+ (progn
+ (setq nextfield
+ (- (length useful-headers)
+ (length (member curfield useful-headers))))
+ (if backward
+ (setq nextfield (nth (1- nextfield) useful-headers))
+ (setq nextfield (nth (1+ nextfield) useful-headers)))
+ (if nextfield
+ (mail-position-on-field nextfield)
+ (mail-text)
+ (vmpc-automorph))
+ )
+ (tab-to-tab-stop)
+ )))
+
+(defun vmpc-backward-tab-header-or-tab-stop ()
+ "*Wrapper for `vmpc-tab-header-or-tab-stop' with BACKWARD set."
+ (interactive)
+ (vmpc-tab-header-or-tab-stop t))
+
+
+;; -------------------------------------------------------------------
+;; Stuff for dealing with exerlays:
+;; -------------------------------------------------------------------
+
+(defun vmpc-set-overlay-insertion-types (overlay start end)
+ "Set insertion types for OVERLAY from START to END.
+In fact a new copy of OVERLAY with different insertion types at START and END
+is created and returned.
+
+START and END should be nil or t -- the marker insertion types at the start
+and end. This seems to be the only way you of changing the insertion types
+for an overlay -- save the overlay properties that we care about, create a new
+overlay with the new insertion types, set its properties to the saved ones.
+Overlays suck. Extents rule. XEmacs got this right."
+ (let* ((useful-props (list 'face 'intangible 'evaporate)) (saved-props)
+ (i 0) (len (length useful-props)) (startpos) (endpos) (new-ovl))
+ (while (< i len)
+ (setq saved-props (append saved-props (cons
+ (overlay-get overlay (nth i useful-props)) ())))
+ (setq i (1+ i)))
+ (setq startpos (overlay-start overlay))
+ (setq endpos (overlay-end overlay))
+ (delete-overlay overlay)
+ (if (and startpos endpos)
+ (setq new-ovl (make-overlay startpos endpos (current-buffer)
+ start end))
+ (setq new-ovl (make-overlay 1 1 (current-buffer) start end))
+ (vmpc-forcefully-detach-exerlay new-ovl))
+ (setq i 0)
+ (while (< i len)
+ (overlay-put new-ovl (nth i useful-props) (nth i saved-props))
+ (setq i (1+ i)))
+ new-ovl))
+
+
+(defun vmpc-set-extent-insertion-types (extent start end)
+ "Set the insertion types of EXTENT from START to END.
+START and END should be either nil or t, indicating the desired value
+of the 'start-open and 'end-closed properties of the extent
+respectively.
+This is the XEmacs version of `vmpc-set-overlay-insertion-types'."
+ ;; pretty simple huh?
+ (set-extent-property extent 'start-open start)
+ (set-extent-property extent 'end-closed end))
+
+
+(defun vmpc-set-exerlay-insertion-types (exerlay start end)
+ "Set the insertion types for EXERLAY from START to END.
+In other words, EXERLAY is the name of the overlay or extent with a quote in
+front. START and END are the equivalent of the marker insertion types for the
+start and end of the overlay/extent."
+ (if vm-xemacs-p
+ (vmpc-set-extent-insertion-types (symbol-value exerlay) start end)
+ (set exerlay (vmpc-set-overlay-insertion-types (symbol-value exerlay)
+ start end))))
+
+
+(defun vmpc-exerlay-start (exerlay)
+ "Return buffer position of the start of EXERLAY."
+ (if vm-xemacs-p
+ (extent-start-position exerlay)
+ (overlay-start exerlay)))
+
+
+(defun vmpc-exerlay-end (exerlay)
+ "Return buffer position of the end of EXERLAY."
+ (if vm-xemacs-p
+ (extent-end-position exerlay)
+ (overlay-end exerlay)))
+
+
+(defun vmpc-move-exerlay (exerlay new-start new-end)
+ "Change EXERLAY to cover region from NEW-START to NEW-END."
+ (if vm-xemacs-p
+ (set-extent-endpoints exerlay new-start new-end (current-buffer))
+ (move-overlay exerlay new-start new-end (current-buffer))))
+
+
+(defun vmpc-set-exerlay-detachable-property (exerlay newval)
+ "Set the 'detachable or 'evaporate property for EXERLAY to NEWVAL."
+ (if vm-xemacs-p
+ (set-extent-property exerlay 'detachable newval)
+ (overlay-put exerlay 'evaporate newval)))
+
+
+(defun vmpc-set-exerlay-intangible-property (exerlay newval)
+ "Set the 'intangible or 'atomic property for EXERLAY to NEWVAL."
+ (if vm-xemacs-p
+ (progn
+ (require 'atomic-extents)
+ (set-extent-property exerlay 'atomic newval))
+ (overlay-put exerlay 'intangible newval)))
+
+
+(defun vmpc-set-exerlay-face (exerlay newface)
+ "Set the face used by EXERLAY to NEWFACE."
+ (if vm-xemacs-p
+ (set-extent-face exerlay newface)
+ (overlay-put exerlay 'face newface)))
+
+
+(defun vmpc-forcefully-detach-exerlay (exerlay)
+ "Leave EXERLAY in memory but detaches it from the buffer."
+ (if vm-xemacs-p
+ (detach-extent exerlay)
+ (delete-overlay exerlay)))
+
+
+(defun vmpc-make-exerlay (startpos endpos)
+ "Create a new exerlay spanning from STARTPOS to ENDPOS."
+ (if vm-xemacs-p
+ (make-extent startpos endpos (current-buffer))
+ (make-overlay startpos endpos (current-buffer))))
+
+
+(defun vmpc-create-sig-and-pre-sig-exerlays ()
+ "Create the extents in which the pre-sig and sig can reside.
+Or overlays, in the case of GNU Emacs. Thus, exerlays."
+ (setq vmpc-pre-sig-exerlay (vmpc-make-exerlay 1 2))
+ (setq vmpc-sig-exerlay (vmpc-make-exerlay 3 4))
+
+ (vmpc-set-exerlay-detachable-property vmpc-pre-sig-exerlay t)
+ (vmpc-set-exerlay-detachable-property vmpc-sig-exerlay t)
+ (vmpc-forcefully-detach-exerlay vmpc-pre-sig-exerlay)
+ (vmpc-forcefully-detach-exerlay vmpc-sig-exerlay)
+
+ (vmpc-set-exerlay-face vmpc-pre-sig-exerlay 'vmpc-pre-sig-face)
+ (vmpc-set-exerlay-face vmpc-sig-exerlay 'vmpc-sig-face)
+
+ (vmpc-set-exerlay-intangible-property vmpc-pre-sig-exerlay
+ vmpc-intangible-pre-sig)
+ (vmpc-set-exerlay-intangible-property vmpc-sig-exerlay
+ vmpc-intangible-sig)
+
+ (vmpc-set-exerlay-insertion-types 'vmpc-pre-sig-exerlay t nil)
+ (vmpc-set-exerlay-insertion-types 'vmpc-sig-exerlay t nil)
+
+ ;; deal with signatures inserted by other things than vm-pcrisis:
+ (if vmpc-expect-default-signature
+ (save-excursion
+ (let ((p-max (point-max))
+ (body-start (save-excursion (mail-text) (point)))
+ (sig-start nil))
+ (goto-char p-max)
+ (setq sig-start (re-search-backward "\n-- \n" body-start t))
+ (if sig-start
+ (vmpc-move-exerlay vmpc-sig-exerlay sig-start p-max))))))
+
+
+;; -------------------------------------------------------------------
+;; Functions for vmpc-actions:
+;; -------------------------------------------------------------------
+
+(defmacro vmpc-composition-buffer (&rest form)
+ "Evaluate FORM if in the composition buffer.
+That is to say, evaluates the form if you are really in a composition
+buffer. This function should not be called directly, only from within
+the `vmpc-actions' list."
+ (list 'if '(eq vmpc-current-buffer 'composition)
+ (list 'eval (cons 'progn form))))
+
+(put 'vmpc-composition-buffer 'lisp-indent-hook 'defun)
+
+(defmacro vmpc-pre-function (&rest form)
+ "Evaluate FORM if in pre-function state.
+That is to say, evaluates the FORM before VM does its thing, whether
+that be creating a new mail or a reply. This function should not be
+called directly, only from within the `vmpc-actions' list."
+ (list 'if '(and (eq vmpc-current-buffer 'none)
+ (not (eq vmpc-current-state 'automorph)))
+ (list 'eval (cons 'progn form))))
+
+(put 'vmpc-pre-function 'lisp-indent-hook 'defun)
+
+(defun vmpc-delete-header (hdrfield &optional entire)
+ "Delete the contents of a HDRFIELD in the current mail message.
+If ENTIRE is specified and non-nil, deletes the header field as well."
+ (if (eq vmpc-current-buffer 'composition)
+ (save-excursion
+ (let ((start) (end))
+ (mail-position-on-field hdrfield)
+ (if entire
+ (setq end (+ (point) 1))
+ (setq end (point)))
+ (re-search-backward ": ")
+ (if entire
+ (setq start (progn (beginning-of-line) (point)))
+ (setq start (+ (point) 2)))
+ (delete-region start end)))))
+
+
+(defun vmpc-insert-header (hdrfield content)
+ "Insert to HDRFIELD the new CONTENT.
+Both arguments are strings. The field can either be present or not,
+but if present, HDRCONT will be appended to the current header
+contents."
+ (if (eq vmpc-current-buffer 'composition)
+ (save-excursion
+ (mail-position-on-field hdrfield)
+ (insert content))))
+
+(defun vmpc-substitute-header (hdrfield content)
+ "Substitute HDRFIELD with new CONTENT.
+Both arguments are strings. The field can either be present or not.
+If the header field is present and already contains something, the
+contents will be replaced, otherwise a new header is created."
+ (if (eq vmpc-current-buffer 'composition)
+ (save-excursion
+ (vmpc-delete-header hdrfield)
+ (vmpc-insert-header hdrfield content))))
+
+(defun vmpc-add-header (hdrfield content)
+ "Add HDRFIELD with CONTENT if it is not present already.
+Both arguments are strings.
+If a header field with the same CONTENT is present already nothing will be
+done, otherwise a new field with the same name and the new CONTENT will be
+added to the message.
+
+This is suitable for FCC, which can be specified multiple times."
+ (unless (eq vmpc-current-buffer 'composition)
+ (error "attempting to insert a header into a non-composition buffer."))
+ (let ((prev-contents (vmpc-get-header-contents hdrfield "\n")))
+ (setq prev-contents (vmpc-split prev-contents "\n"))
+ ;; don't add this new header if it's already there
+ (unless (member content prev-contents)
+ (save-excursion
+ (or (mail-position-on-field hdrfield t) ; Put new field after existing one
+ (mail-position-on-field "to"))
+ (unless (eq (aref hdrfield (1- (length hdrfield))) ?:)
+ (setq hdrfield (concat hdrfield ":")))
+ (insert "\n" hdrfield " ")
+ (insert content)))))
+
+(defun vmpc-get-current-header-contents (hdrfield &optional clump-sep)
+ "Return the contents of HDRFIELD in the current mail message.
+Returns an empty string if the header doesn't exist. HDRFIELD should
+be a string. If the string CLUMP-SEP is specified, it means to return
+the contents of all headers matching the regexp HDRFIELD, separated by
+CLUMP-SEP."
+ ;; This code is based heavily on vm-get-header-contents and vm-match-header.
+ ;; Thanks Kyle :)
+ (if (eq vmpc-current-state 'automorph)
+ (save-excursion
+ (let ((contents nil) (header-name-regexp "\\([^ \t\n:]+\\):")
+ (case-fold-search t) (temp-contents) (end-of-headers) (regexp))
+ (if (not (listp hdrfield))
+ (setq hdrfield (list hdrfield)))
+ ;; find the end of the headers:
+ (goto-char (point-min))
+ (or (re-search-forward
+ (concat "^\\(" (regexp-quote mail-header-separator) "\\)$")
+ nil t)
+ (error "Cannot find mail-header-separator %S in buffer %S"
+ mail-header-separator (current-buffer)))
+ (setq end-of-headers (match-beginning 0))
+ ;; now rip through finding all the ones we want:
+ (while hdrfield
+ (setq regexp (concat "^\\(" (car hdrfield) "\\)"))
+ (goto-char (point-min))
+ (while (and (or (null contents) clump-sep)
+ (re-search-forward regexp end-of-headers t)
+ (save-excursion
+ (goto-char (match-beginning 0))
+ (let (header-cont-start header-cont-end)
+ (if (if (not clump-sep)
+ (and (looking-at (car hdrfield))
+ (looking-at header-name-regexp))
+ (looking-at header-name-regexp))
+ (save-excursion
+ (goto-char (match-end 0))
+ ;; skip leading whitespace
+ (skip-chars-forward " \t")
+ (setq header-cont-start (point))
+ (forward-line 1)
+ (while (looking-at "[ \t]")
+ (forward-line 1))
+ ;; drop the trailing newline
+ (setq header-cont-end (1- (point)))))
+ (setq temp-contents
+ (buffer-substring header-cont-start
+ header-cont-end)))))
+ (if contents
+ (setq contents
+ (concat contents clump-sep temp-contents))
+ (setq contents temp-contents)))
+ (setq hdrfield (cdr hdrfield)))
+
+ (if (null contents)
+ (setq contents ""))
+ contents ))))
+
+(defun vmpc-get-current-body-text ()
+ "Return the body text of the mail message in the current buffer."
+ (if (eq vmpc-current-state 'automorph)
+ (save-excursion
+ (goto-char (point-min))
+ (let ((start (re-search-forward
+ (concat "^" (regexp-quote mail-header-separator) "$")))
+ (end (point-max)))
+ (buffer-substring start end)))))
+
+
+(defun vmpc-get-replied-header-contents (hdrfield &optional clump-sep)
+ "Return the contents of HDRFIELD in the message being replied to.
+If that header does not exist, returns an empty string. If the string
+CLUMP-SEP is specified, treat HDRFIELD as a regular expression and
+return the contents of all header fields which match that regexp,
+separated from each other by CLUMP-SEP."
+ (if (and (eq vmpc-current-buffer 'none)
+ (memq vmpc-current-state '(reply forward resend)))
+ (let ((mp (car (vm-select-marked-or-prefixed-messages 1)))
+ content c)
+ (if (not (listp hdrfield))
+ (setq hdrfield (list hdrfield)))
+ (while hdrfield
+ (setq c (vm-get-header-contents mp (car hdrfield) clump-sep))
+ (if c (setq content (cons c content)))
+ (setq hdrfield (cdr hdrfield)))
+ (or (mapconcat 'identity content "\n") ""))))
+
+(defun vmpc-get-header-contents (hdrfield &optional clump-sep)
+ "Return the contents of HDRFIELD."
+ (cond ((and (eq vmpc-current-buffer 'none)
+ (memq vmpc-current-state '(reply forward resend)))
+ (vmpc-get-replied-header-contents hdrfield clump-sep))
+ ((eq vmpc-current-state 'automorph)
+ (vmpc-get-current-header-contents hdrfield clump-sep))))
+
+(defun vmpc-get-replied-body-text ()
+ "Return the body text of the message being replied to."
+ (if (and (eq vmpc-current-buffer 'none)
+ (memq vmpc-current-state '(reply forward resend)))
+ (save-excursion
+ (let* ((mp (car (vm-select-marked-or-prefixed-messages 1)))
+ (message (vm-real-message-of mp))
+ start end)
+ (set-buffer (vm-buffer-of message))
+ (save-restriction
+ (widen)
+ (setq start (vm-text-of message))
+ (setq end (vm-end-of message))
+ (buffer-substring start end))))))
+
+(defun vmpc-save-replied-header (hdrfield)
+ "Save the contents of HDRFIELD in `vmpc-saved-headers-alist'.
+Does nothing if that header doesn't exist."
+ (let ((hdrcont (vmpc-get-replied-header-contents hdrfield)))
+ (if (and (eq vmpc-current-buffer 'none)
+ (memq vmpc-current-state '(reply forward resend))
+ (not (equal hdrcont "")))
+ (add-to-list 'vmpc-saved-headers-alist (cons hdrfield hdrcont)))))
+
+(defun vmpc-get-saved-header (hdrfield)
+ "Return the contents of HDRFIELD from `vmpc-saved-headers-alist'.
+The alist in question is created by `vmpc-save-replied-header'."
+ (if (and (eq vmpc-current-buffer 'composition)
+ (memq vmpc-current-state '(reply forward resend)))
+ (cdr (assoc hdrfield vmpc-saved-headers-alist))))
+
+(defun vmpc-substitute-replied-header (dest src)
+ "Substitute header DEST with content from SRC.
+For example, if the address you want to send your reply to is the same
+as the contents of the \"From\" header in the message you are replying
+to, use (vmpc-substitute-replied-header \"To\" \"From\"."
+ (if (memq vmpc-current-state '(reply forward resend))
+ (progn
+ (if (eq vmpc-current-buffer 'none)
+ (vmpc-save-replied-header src))
+ (if (eq vmpc-current-buffer 'composition)
+ (vmpc-substitute-header dest (vmpc-get-saved-header src))))))
+
+(defun vmpc-get-header-extents (hdrfield)
+ "Return buffer positions (START . END) for the contents of HDRFIELD.
+If HDRFIELD does not exist, return nil."
+ (if (eq vmpc-current-buffer 'composition)
+ (save-excursion
+ (let ((header-name-regexp "^\\([^ \t\n:]+\\):") (start) (end))
+ (setq end
+ (if (mail-position-on-field hdrfield t)
+ (point)
+ nil))
+ (setq start
+ (if (re-search-backward header-name-regexp (point-min) t)
+ (match-end 0)
+ nil))
+ (and start end (<= start end) (cons start end))))))
+
+(defun vmpc-substitute-within-header
+ (hdrfield regexp to-string &optional append-if-no-match sep)
+ "Replace in HDRFIELD strings matched by REGEXP with TO-STRING.
+HDRFIELD need not exist. TO-STRING may contain references to groups
+within REGEXP, in the same manner as `replace-regexp'. If REGEXP is
+not found in the header contents, and APPEND-IF-NO-MATCH is t,
+TO-STRING will be appended to the header contents (with HDRFIELD being
+created if it does not exist). In this case, if the string SEP is
+specified, it will be used to separate the previous header contents
+from TO-STRING, unless HDRFIELD has just been created or was
+previously empty."
+ (if (eq vmpc-current-buffer 'composition)
+ (save-excursion
+ (let ((se (vmpc-get-header-extents hdrfield)) (found))
+ (if se
+ ;; HDRFIELD exists
+ (save-restriction
+ (narrow-to-region (car se) (cdr se))
+ (goto-char (point-min))
+ (while (re-search-forward regexp nil t)
+ (setq found t)
+ (replace-match to-string))
+ (if (and (not found) append-if-no-match)
+ (progn
+ (goto-char (cdr se))
+ (if (and sep (not (equal (car se) (cdr se))))
+ (insert sep))
+ (insert to-string))))
+ ;; HDRFIELD does not exist
+ (if append-if-no-match
+ (progn
+ (mail-position-on-field hdrfield)
+ (insert to-string))))))))
+
+
+(defun vmpc-replace-or-add-in-header (hdrfield regexp hdrcont &optional sep)
+ "Replace in HDRFIELD the match of REGEXP with HDRCONT.
+All arguments are strings. The field can either be present or not.
+If the header field is present and already contains something, HDRCONT
+will be appended and if SEP is none nil it will be used as separator.
+
+I use this function to modify recipients in the TO-header.
+e.g.
+ (vmpc-replace-or-add-in-header \"To\" \"[Rr]obert Fenk[^,]*\"
+ \"Robert Fenk\" \", \"))"
+ (if (eq vmpc-current-buffer 'composition)
+ (let ((hdr (vmpc-get-current-header-contents hdrfield))
+ (old-point (point)))
+ (if hdr
+ (progn
+ (vmpc-delete-header hdrfield)
+ (if (string-match regexp hdr)
+ (setq hdr (replace-in-string hdr regexp hdrcont))
+ (setq hdr (if sep (concat hdr sep hdrcont)
+ (concat hdr hdrcont))))
+ (vmpc-insert-header hdrfield hdr)
+ (goto-char old-point))
+ ))))
+
+(defun vmpc-insert-signature (sig &optional pos)
+ "Insert SIG at the end of `vmpc-sig-exerlay'.
+SIG is a string. If it is the name of a file, its contents is inserted --
+otherwise the string itself is inserted. Optional parameter POS means insert
+the signature at POS if `vmpc-sig-exerlay' is detached."
+ (if (eq vmpc-current-buffer 'composition)
+ (progn
+ (let ((end (or (vmpc-exerlay-end vmpc-sig-exerlay) pos)))
+ (save-excursion
+ (vmpc-set-exerlay-insertion-types 'vmpc-sig-exerlay nil t)
+ (vmpc-set-exerlay-detachable-property vmpc-sig-exerlay nil)
+ (vmpc-set-exerlay-intangible-property vmpc-sig-exerlay nil)
+ (unless end
+ (setq end (point-max))
+ (vmpc-move-exerlay vmpc-sig-exerlay end end))
+ (if (and pos (not (vmpc-exerlay-end vmpc-sig-exerlay)))
+ (vmpc-move-exerlay vmpc-sig-exerlay pos pos))
+ (goto-char end)
+ (insert "\n-- \n")
+ (if (and (file-exists-p sig)
+ (file-readable-p sig)
+ (not (equal sig "")))
+ (insert-file-contents sig)
+ (insert sig)))
+ (vmpc-set-exerlay-intangible-property vmpc-sig-exerlay
+ vmpc-intangible-sig)
+ (vmpc-set-exerlay-detachable-property vmpc-sig-exerlay t)
+ (vmpc-set-exerlay-insertion-types 'vmpc-sig-exerlay t nil)))))
+
+
+(defun vmpc-delete-signature ()
+ "Deletes the contents of `vmpc-sig-exerlay'."
+ (when (and (eq vmpc-current-buffer 'composition)
+ ;; make sure it's not detached first:
+ (vmpc-exerlay-start vmpc-sig-exerlay))
+ (delete-region (vmpc-exerlay-start vmpc-sig-exerlay)
+ (vmpc-exerlay-end vmpc-sig-exerlay))
+ (vmpc-forcefully-detach-exerlay vmpc-sig-exerlay)))
+
+
+(defun vmpc-signature (sig)
+ "Remove a current signature if present, and replace it with SIG.
+If the string SIG is the name of a readable file, its contents are
+inserted as the signature; otherwise SIG is inserted literally. If
+SIG is the empty string (\"\"), the current signature is deleted if
+present, and that's all."
+ (if (eq vmpc-current-buffer 'composition)
+ (let ((pos (vmpc-exerlay-start vmpc-sig-exerlay)))
+ (save-excursion
+ (vmpc-delete-signature)
+ (if (not (equal sig ""))
+ (vmpc-insert-signature sig pos))))))
+
+
+(defun vmpc-insert-pre-signature (pre-sig &optional pos)
+ "Insert PRE-SIG at the end of `vmpc-pre-sig-exerlay'.
+PRE-SIG is a string. If it's the name of a file, the file's contents
+are inserted; otherwise the string itself is inserted. Optional
+parameter POS means insert the pre-signature at position POS if
+`vmpc-pre-sig-exerlay' is detached."
+ (if (eq vmpc-current-buffer 'composition)
+ (progn
+ (let ((end (or (vmpc-exerlay-end vmpc-pre-sig-exerlay) pos))
+ (sigstart (vmpc-exerlay-start vmpc-sig-exerlay)))
+ (save-excursion
+ (vmpc-set-exerlay-insertion-types 'vmpc-pre-sig-exerlay nil t)
+ (vmpc-set-exerlay-detachable-property vmpc-pre-sig-exerlay nil)
+ (vmpc-set-exerlay-intangible-property vmpc-pre-sig-exerlay nil)
+ (unless end
+ (if sigstart
+ (setq end sigstart)
+ (setq end (point-max)))
+ (vmpc-move-exerlay vmpc-pre-sig-exerlay end end))
+ (if (and pos (not (vmpc-exerlay-end vmpc-pre-sig-exerlay)))
+ (vmpc-move-exerlay vmpc-pre-sig-exerlay pos pos))
+ (goto-char end)
+ (insert "\n")
+ (if (and (file-exists-p pre-sig)
+ (file-readable-p pre-sig)
+ (not (equal pre-sig "")))
+ (insert-file-contents pre-sig)
+ (insert pre-sig))))
+ (vmpc-set-exerlay-intangible-property vmpc-pre-sig-exerlay
+ vmpc-intangible-pre-sig)
+ (vmpc-set-exerlay-detachable-property vmpc-pre-sig-exerlay t)
+ (vmpc-set-exerlay-insertion-types 'vmpc-pre-sig-exerlay t nil))))
+
+
+(defun vmpc-delete-pre-signature ()
+ "Deletes the contents of `vmpc-pre-sig-exerlay'."
+ ;; make sure it's not detached first:
+ (if (eq vmpc-current-buffer 'composition)
+ (if (vmpc-exerlay-start vmpc-pre-sig-exerlay)
+ (progn
+ (delete-region (vmpc-exerlay-start vmpc-pre-sig-exerlay)
+ (vmpc-exerlay-end vmpc-pre-sig-exerlay))
+ (vmpc-forcefully-detach-exerlay vmpc-pre-sig-exerlay)))))
+
+
+(defun vmpc-pre-signature (pre-sig)
+ "Insert PRE-SIG at the end of `vmpc-pre-sig-exerlay' removing last pre-sig."
+ (if (eq vmpc-current-buffer 'composition)
+ (let ((pos (vmpc-exerlay-start vmpc-pre-sig-exerlay)))
+ (save-excursion
+ (vmpc-delete-pre-signature)
+ (if (not (equal pre-sig ""))
+ (vmpc-insert-pre-signature pre-sig pos))))))
+
+
+(defun vmpc-gregorian-days ()
+ "Return the number of days elapsed since December 31, 1 B.C."
+ ;; this code stolen from gnus-util.el :)
+ (let ((tim (decode-time (current-time))))
+ (timezone-absolute-from-gregorian
+ (nth 4 tim) (nth 3 tim) (nth 5 tim))))
+
+
+(defun vmpc-load-auto-profiles ()
+ "Initialise `vmpc-auto-profiles' from `vmpc-auto-profiles-file'."
+ (interactive)
+ (setq vmpc-auto-profiles nil)
+ (if (eq vmpc-auto-profiles-file 'BBDB)
+ (let ((records (bbdb-with-db-buffer bbdb-records))
+ profile rec nets)
+ (while records
+ (setq rec (car records)
+ profile (bbdb-get-field rec 'vmpc-profile))
+ (when (and profile (> (length profile) 0))
+ (setq nets (bbdb-record-net rec))
+ (while nets
+ (setq vmpc-auto-profiles (cons (cons (car nets) (read profile))
+ vmpc-auto-profiles)
+ nets (cdr nets))))
+ (setq records (cdr records)))
+ (setq vmpc-auto-profiles (reverse vmpc-auto-profiles)))
+ (when (and (file-exists-p vmpc-auto-profiles-file) ;
+ (file-readable-p vmpc-auto-profiles-file))
+ (save-excursion
+ (set-buffer (get-buffer-create "*pcrisis-temp*"))
+ (buffer-disable-undo (current-buffer))
+ (erase-buffer)
+ (insert-file-contents vmpc-auto-profiles-file)
+ (goto-char (point-min))
+ (setq vmpc-auto-profiles (read (current-buffer)))
+ (kill-buffer (current-buffer))))))
+
+
+(defun vmpc-save-auto-profiles ()
+ "Save `vmpc-auto-profiles' to `vmpc-auto-profiles-file'."
+ (when (not (eq vmpc-auto-profiles-file 'BBDB))
+ (if (not (file-writable-p vmpc-auto-profiles-file))
+ ;; if file is not writable, signal an error:
+ (error "Error: P-Crisis could not write to file %s"
+ vmpc-auto-profiles-file))
+ (save-excursion
+ (set-buffer (get-buffer-create "*pcrisis-temp*"))
+ (buffer-disable-undo (current-buffer))
+ (erase-buffer)
+ (goto-char (point-min))
+; (prin1 vmpc-auto-profiles (current-buffer))
+ (pp vmpc-auto-profiles (current-buffer))
+ (write-region (point-min) (point-max)
+ vmpc-auto-profiles-file nil 'quietly)
+ (kill-buffer (current-buffer)))))
+
+(defun vmpc-fix-auto-profiles-file ()
+ "Change `vmpc-auto-profiles-file' to the format used by v0.82+."
+ (interactive)
+ (vmpc-load-auto-profiles)
+ (let ((len (length vmpc-auto-profiles)) (i 0) (day))
+ (while (< i len)
+ (setq day (cddr (nth i vmpc-auto-profiles)))
+ (if (consp day)
+ (setcdr (cdr (nth i vmpc-auto-profiles)) (car day)))
+ (setq i (1+ i))))
+ (vmpc-save-auto-profiles)
+ (setq vmpc-auto-profiles ()))
+
+
+(defun vmpc-migrate-profiles-to-BBDB ()
+ "Migrate the profiles stored in `vmpc-auto-profiles-file' to the BBDB.
+
+This will automatically create records if they do not exist and add the new
+field `vmpc-profile' to the records which is a sexp not meant to be edited."
+ (interactive)
+ (if (eq vmpc-auto-profiles-file 'BBDB)
+ (error "`vmpc-auto-profiles-file' has been migrated already."))
+ (unless vmpc-auto-profiles
+ (vmpc-load-auto-profiles))
+ ;; create a BBDB backup
+ (bbdb-save-db)
+ (copy-file (expand-file-name bbdb-file)
+ (concat (expand-file-name bbdb-file) "-vmpc-profile-migration-backup"))
+ ;; now migrate the profiles
+ (let ((profiles vmpc-auto-profiles)
+ (records (bbdb-with-db-buffer bbdb-records))
+ p addr rec)
+ (while profiles
+ (setq p (car profiles)
+ addr (car p)
+ rec (car (bbdb-search records nil nil addr)))
+ (when (not rec)
+ (setq rec (bbdb-create-internal "?" nil addr nil nil nil)))
+ (bbdb-record-putprop rec 'vmpc-profile (format "%S" (cdr p)))
+ (setq profiles (cdr profiles))))
+ ;; move old profiles file out of the way
+ (rename-file vmpc-auto-profiles-file
+ (concat vmpc-auto-profiles-file "-migrated-to-BBDB"))
+ ;; switch to BBDB mode
+ (customize-save-variable 'vmpc-auto-profiles-file 'BBDB)
+ (message "`vmpc-auto-profiles-file' has been set to 'BBDB"))
+
+(defun vmpc-get-profile-for-address (addr)
+ "Return profile for ADDR."
+ (unless vmpc-auto-profiles
+ (vmpc-load-auto-profiles))
+ ;; TODO: BBDB "normalizes" email addresses, i.e. before we had a one-to-one
+ ;; mapping of address=>actions, now multiple actions may point to the same
+ ;; list of actions. So either we should update vmpc-auto-profiles upon
+ ;; storing a new profile or directly search BBDB for it, which might be
+ ;; slower!
+ (let ((prof (cadr (assoc addr vmpc-auto-profiles))))
+ (when prof
+ ;; we found a profile for this address and we are still
+ ;; using it -- so "touch" the record to ensure it stays
+ ;; newer than vmpc-auto-profiles-expunge-days
+ (setcdr (cdr (assoc addr vmpc-auto-profiles)) (vmpc-gregorian-days))
+ (vmpc-save-auto-profiles))
+ prof))
+
+
+(defun vmpc-save-profile-for-address (addr actions)
+ "Save the association ADDR => ACTIONS."
+ (let ((today (vmpc-gregorian-days))
+ (old-association (assoc addr vmpc-auto-profiles))
+ profile)
+
+ ;; we store the actions list and the durrent date
+ (setq profile (append (list addr actions) today))
+
+ ;; remove old profile
+ (when old-association
+ ;; now possibly delete it from the BBDB
+ (setq vmpc-auto-profiles (delete old-association vmpc-auto-profiles))
+ (when (and (eq vmpc-auto-profiles-file 'BBDB) (not actions))
+ (let ((records (bbdb-with-db-buffer bbdb-records)) rec)
+ (setq rec (bbdb-search records nil nil addr))
+ (when rec
+ (bbdb-record-putprop (car rec) 'vmpc-profile nil)))))
+
+ ;; add new profile
+ (when actions
+ (setq vmpc-auto-profiles (cons profile vmpc-auto-profiles))
+ ;; now possibly add it to the BBDB
+ (when (eq vmpc-auto-profiles-file 'BBDB)
+ (let ((records (bbdb-with-db-buffer bbdb-records)) rec)
+ (setq rec (car (bbdb-search records nil nil addr)))
+ (when (not rec)
+ (setq rec (bbdb-create-internal "?" nil addr nil nil nil)))
+ (bbdb-record-putprop rec 'vmpc-profile (format "%S" (cdr profile))))))
+
+ ;; expunge old stuff from the list:
+ (when vmpc-auto-profiles-expunge-days
+ (setq vmpc-auto-profiles
+ (mapcar (lambda (p)
+ (if (> (- today (cddr p)) vmpc-auto-profiles-expunge-days)
+ nil
+ p))
+ vmpc-auto-profiles))
+ (setq vmpc-auto-profiles (delete nil vmpc-auto-profiles)))
+
+ ;; save the file
+ (vmpc-save-auto-profiles)))
+
+
+(defun vmpc-string-extract-address (str)
+ "Find the first email address in the string STR and return it.
+If no email address in found in STR, returns nil."
+ (if (string-match "[^ \t,<]+@[^ \t,>]+" str)
+ (match-string 0 str)))
+
+(defun vmpc-split (string separators)
+ "Return a list by splitting STRING at SEPARATORS and trimming all whitespace."
+ (let (result
+ (not-separators (concat "^" separators)))
+ (save-excursion
+ (set-buffer (get-buffer-create " *split*"))
+ (erase-buffer)
+ (insert string)
+ (goto-char (point-min))
+ (while (progn
+ (skip-chars-forward separators)
+ (skip-chars-forward " \t\n\r")
+ (not (eobp)))
+ (let ((begin (point))
+ p)
+ (skip-chars-forward not-separators)
+ (setq p (point))
+ (skip-chars-backward " \t\n\r")
+ (setq result (cons (buffer-substring begin (point)) result))
+ (goto-char p)))
+ (erase-buffer))
+ (nreverse result)))
+
+(defun vmpc-read-actions (prompt)
+ "Read a list of actions to run and store it in `vmpc-actions-to-run'."
+ (interactive (list "VMPC actions %s:"))
+ (let ((actions ()) a)
+ (while (not (string-equal
+ (setq a (completing-read
+ (format prompt (or actions ""))
+ ;; omit those starting with (vmpc-prompt-for-profile ...
+ (mapcar
+ (lambda (a)
+ (if (not (or (eq (caadr a) 'vmpc-prompt-for-profile)
+ (member (car a) actions)))
+ a))
+ vmpc-actions)
+ nil t nil nil ""))
+ ""))
+ (setq actions (cons a actions)))
+ (setq actions (reverse actions))
+ (when (interactive-p)
+ (setq vmpc-actions-to-run actions)
+ (message "VMPC actions to run: %S" actions))
+ actions))
+
+(defcustom vmpc-prompt-for-profile-headers
+ '((composition ("To" "CC" "BCC"))
+ (default ("From" "Sender" "Reply-To" "From" "Resent-From")))
+ "*List of headers to check for email addresses.
+
+`vmpc-prompt-for-profile' will scan the given headers in the given order."
+ :type '(repeat (list (choice (const default)
+ (const composition)
+ (const reply)
+ (const forward)
+ (const resent)
+ (const newmail))
+ (repeat (string :tag "Header"))))
+ :group 'vmpc)
+
+(defun vmpc-prompt-for-profile (&optional remember prompt)
+ "Find a profile or prompt for it and add its actions to the list of actions.
+
+A profile is an association between a recipient address and a set of the
+actions named in `vmpc-actions'. When entering the list of actions, one has
+to press ENTER after each action and finish adding action by pressing ENTER
+without an action.
+
+The association is stored in `vmpc-auto-profiles-file' and in the future the
+stored actions will automatically run for messages to that address.
+
+REMEMBER can be set to 'always or 'prompt. When set to 'prompt you will
+be asked if you want to store the association. When set to 'always a new
+profile will be stored without asking.
+
+If you want to change the profile late call this function interactively in a
+composition buffer. Set PROFILE to 'never and you will never ever be prompted
+for anything, i.e. only existing profiles will be applied."
+ (interactive (progn (setq vmpc-current-state 'automorph)
+ (list 'prompt 'again)))
+
+ (if (or (and (eq vmpc-current-buffer 'none)
+ (not (eq vmpc-current-state 'automorph)))
+ (eq vmpc-current-state 'automorph))
+ (let ((headers (or (assoc vmpc-current-buffer vmpc-prompt-for-profile-headers)
+ (assoc vmpc-current-state vmpc-prompt-for-profile-headers)
+ (assoc 'default vmpc-prompt-for-profile-headers)))
+ addrs a actions dest)
+ (setq headers (car (cdr headers)))
+ ;; search also other headers fro known addresses
+ (while (and headers (not actions))
+ (setq addrs (vmpc-get-header-contents (car headers)))
+ (if addrs (setq addrs (vmpc-split addrs ",")))
+ (while addrs
+ (setq a (vmpc-string-extract-address (car addrs)))
+ (if (vm-ignored-reply-to a)
+ (setq a nil))
+ (setq actions (append (vmpc-get-profile-for-address a) actions))
+ (if actions (setq remember 'already))
+ (if (not dest) (setq dest a))
+ (setq addrs (cdr addrs)))
+ (setq headers (cdr headers)))
+
+ (when dest
+ ;; figure out which actions to run
+ (when (if prompt (not (eq prompt 'never)) (not actions))
+ (setq actions (vmpc-read-actions
+ (format "Actions for \"%s\" %%s (end with RET): " dest))))
+
+ ;; fixed old style format where there was only a single action
+ (unless (listp actions)
+ (setq remember 'again)
+ (setq actions (list actions)))
+
+ ;; save the association of this profile with these actions if applicable
+ (if (or (and (eq remember 'prompt)
+ (not (eq prompt 'never))
+ (if actions
+ (y-or-n-p (format "Always run %s for \"%s\"? "
+ actions dest))
+ (if (vmpc-get-profile-for-address dest)
+ (yes-or-no-p (format "Delete profile for \"%s\"? "
+ dest)))))
+ (eq remember 'always))
+ (vmpc-save-profile-for-address dest actions))
+
+ ;; TODO: understand when vmpc-prompt-for-profile has to run actions
+ ;; if we are in automorph (actually being called from within an action)
+ (if (eq vmpc-current-state 'automorph)
+ (let ((vmpc-actions-to-run actions))
+ (vmpc-run-actions))
+ ;; otherwise add the actions to the end of the list as a side effect
+ (setq vmpc-actions-to-run (append vmpc-actions-to-run actions)))
+
+ ;; return the actions, which makes the condition true if a profile exists
+ actions))))
+
+;; -------------------------------------------------------------------
+;; Functions for vmpc-conditions:
+;; -------------------------------------------------------------------
+
+(defun vmpc-none-true-yet (&optional &rest exceptions)
+ "True if none of the previous evaluated conditions was true.
+This is a condition that can appear in `vmpc-conditions'. If EXCEPTIONS are
+specified, it means none were true except those. For example, if you wanted
+to check whether no conditions had yet matched with the exception of the two
+conditions named \"default\" and \"blah\", you would make the call like this:
+ (vmpc-none-true-yet \"default\" \"blah\")
+Then it will return true regardless of whether \"default\" and \"blah\" had
+matched."
+ (let ((lenex (length exceptions)) (lentc (length vmpc-true-conditions)))
+ (cond
+ ((> lentc lenex)
+ 'nil)
+ ((<= lentc lenex)
+ (let ((i 0) (j 0) (k 0))
+ (while (< i lenex)
+ (setq k 0)
+ (while (< k lentc)
+ (if (equal (nth i exceptions) (nth k vmpc-true-conditions))
+ (setq j (1+ j)))
+ (setq k (1+ k)))
+ (setq i (1+ i)))
+ (if (equal j lentc)
+ 't
+ 'nil))))))
+
+(defun vmpc-other-cond (condition)
+ "Return true if the specified CONDITION in `vmpc-conditions' matched.
+CONDITION can only be the name of a condition specified earlier in
+`vmpc-conditions' -- that is to say, any conditions which follow the one
+containing `vmpc-other-cond' will show up as not having matched, because they
+haven't yet been checked when this one is checked."
+ (member condition vmpc-true-conditions))
+
+(defun vmpc-folder-match (regexp)
+ "Return true if the current folder name matches REGEXP."
+ (string-match regexp (buffer-name)))
+
+(defun vmpc-header-match (hdrfield regexp &optional clump-sep num)
+ "Return true if the contents of specified header HDRFIELD match REGEXP.
+For automorph, this means the header in your message, when replying it means
+the header in the message being replied to.
+
+CLUMP-SEP is specified, treat HDRFIELD as a regular expression and
+return the contents of all header fields which match that regexp,
+separated from each other by CLUMP-SEP.
+
+If NUM is specified return the match string NUM."
+ (cond ((memq vmpc-current-state '(reply forward resend))
+ (let ((hdr (vmpc-get-replied-header-contents hdrfield clump-sep)))
+ (and hdr (string-match regexp hdr)
+ (if num (match-string num hdr) t))))
+ ((eq vmpc-current-state 'automorph)
+ (let ((hdr (vmpc-get-current-header-contents hdrfield clump-sep)))
+ (and (string-match regexp hdr)
+ (if num (match-string num hdr) t))))))
+
+(defun vmpc-body-match (regexp)
+ "Return non-nil if the contents of the message body match REGEXP.
+For automorph, this means the body of your message; when replying it means the
+body of the message being replied to."
+ (cond ((and (memq vmpc-current-state '(reply forward resend))
+ (eq vmpc-current-buffer 'none))
+ (string-match regexp (vmpc-get-replied-body-text)))
+ ((eq vmpc-current-state 'automorph)
+ (string-match regexp (vmpc-get-current-body-text)))))
+
+
+(defun vmpc-xor (&rest args)
+ "Return true if one and only one argument in ARGS is true."
+ (= 1 (length (delete nil args))))
+
+;; -------------------------------------------------------------------
+;; Support functions for the advices:
+;; -------------------------------------------------------------------
+
+(defun vmpc-true-conditions ()
+ "Return a list of all true conditions.
+Run this function in order to test/check your conditions."
+ (interactive)
+ (let (vmpc-true-conditions
+ vmpc-current-state
+ vmpc-current-buffer)
+ (if (eq major-mode 'vm-mail-mode)
+ (setq vmpc-current-state 'automorph
+ vmpc-current-buffer 'composition)
+ (setq vmpc-current-state (intern (completing-read
+ "VMPC state (default is 'reply): "
+ '(("reply") ("forward") ("resend")
+ ("newmail") ("automorph"))
+ nil t nil nil "reply"))
+ vmpc-current-buffer 'none))
+ (vm-follow-summary-cursor)
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-error-if-folder-empty)
+ (vmpc-build-true-conditions-list)
+ (message "VMPC true conditions: %S" vmpc-true-conditions)
+ vmpc-true-conditions))
+
+(defun vmpc-build-true-conditions-list ()
+ "Built list of true conditions and store it in variable `vmpc-true-conditions'."
+ (setq vmpc-true-conditions nil)
+ (mapcar (lambda (c)
+ (if (save-excursion (eval (cons 'progn (cdr c))))
+ (setq vmpc-true-conditions (cons (car c) vmpc-true-conditions))))
+ vmpc-conditions)
+ (setq vmpc-true-conditions (reverse vmpc-true-conditions)))
+
+(defun vmpc-build-actions-to-run-list ()
+ "Built a list of the actions to run.
+These are the true conditions mapped to actions. Duplicates will be
+eliminated. You may run it in a composition buffer in order to see what
+actions will be run."
+ (interactive)
+ (if (and (interactive-p) (not (member major-mode '(vm-mail-mode mail-mode))))
+ (error "Run `vmpc-build-actions-to-run-list' in a composition buffer!"))
+ (let ((alist (or (symbol-value (intern (format "vmpc-%s-alist"
+ vmpc-current-state)))
+ vmpc-actions-alist))
+ (old-vmpc-actions-to-run vmpc-actions-to-run)
+ actions)
+ (setq vmpc-actions-to-run nil)
+ (mapcar (lambda (c)
+ (setq actions (cdr (assoc c alist)))
+ ;; TODO: warn about unbound conditions?
+ (while actions
+ (if (not (member (car actions) vmpc-actions-to-run))
+ (setq vmpc-actions-to-run (cons (car actions) vmpc-actions-to-run)))
+ (setq actions (cdr actions))))
+ vmpc-true-conditions)
+ (setq vmpc-actions-to-run (reverse vmpc-actions-to-run))
+ (setq vmpc-actions-to-run (append vmpc-actions-to-run old-vmpc-actions-to-run)))
+ (if (interactive-p)
+ (message "VMPC actions to run: %S" vmpc-actions-to-run))
+ vmpc-actions-to-run)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vmpc-run-action (&optional action-regexp)
+ "Run all actions with names matching the ACTION-REGEXP.
+If called interactivly it promts for the regexp. You may also use
+completion."
+ (interactive)
+ (let ((action-names (mapcar '(lambda (a)
+ (list (regexp-quote (car a)) 1))
+ vmpc-actions)))
+ (if (not action-regexp)
+ (setq action-regexp (completing-read "VMPC action-regexp: "
+ action-names)))
+ (mapcar '(lambda (action)
+ (if (string-match action-regexp (car action))
+ (mapcar '(lambda (action-command)
+ (eval action-command))
+ (cdr action))))
+ vmpc-actions)))
+
+
+(defun vmpc-run-actions (&optional actions verbose)
+ "Run the argument actions, or the actions stored in `vmpc-actions-to-run'.
+If verbose is supplied, it should be a STRING, indicating the name of a
+buffer to which to write diagnostic output."
+ (interactive)
+
+ (if (and (not vmpc-actions-to-run) (not actions) (interactive-p))
+ (setq vmpc-actions-to-run (vmpc-read-actions "VMPC actions %%s")))
+
+ (let ((actions (or actions vmpc-actions-to-run)) form)
+ (while actions
+ (setq form (or (assoc (car actions) vmpc-actions)
+ (error "Action %S does not exist!" (car actions)))
+ actions (cdr actions))
+ (let ((form (cons 'progn (cdr form)))
+ (results (eval (cons 'progn (cdr form)))))
+ (when verbose
+ (save-excursion
+ (set-buffer verbose)
+ (insert (format "Action form is:\n%S\nResults are:\n%S\n"
+ form results))))))))
+
+;; ------------------------------------------------------------------------
+;; The main functions and advices -- these are the entry points to pcrisis:
+;; ------------------------------------------------------------------------
+(defun vmpc-init-vars (&optional state buffer)
+ "Initialize pcrisis variables and optionally set STATE and BUFFER."
+ (setq vmpc-saved-headers-alist nil
+ vmpc-actions-to-run nil
+ vmpc-true-conditions nil
+ vmpc-current-state state
+ vmpc-current-buffer (or buffer 'none)))
+
+(defun vmpc-make-vars-local ()
+ "Make the pcrisis vars buffer local.
+
+When the vars are first set they cannot be made buffer local as we are not in
+the composition buffer then.
+
+Unfortunately making them buffer local while they are bound by a `let' does
+not work, see the info for `make-local-variable'. So we are using the global
+ones and make them buffer local when in the composition buffer. At least for
+`saved-headers-alist' this should fix the bug that another composition
+overwrites the stored headers for subsequent morphs.
+
+The current solution is not reentrant save, but there also should be no
+recursion nor concurrent calls."
+ ;; make the variables buffer local
+ (let ((tc vmpc-true-conditions)
+ (sha vmpc-saved-headers-alist)
+ (atr vmpc-actions-to-run)
+ (cs vmpc-current-state))
+ (make-local-variable 'vmpc-true-conditions)
+ (make-local-variable 'vmpc-saved-headers-alist)
+ (make-local-variable 'vmpc-actions-to-run)
+ (make-local-variable 'vmpc-current-state)
+ (make-local-variable 'vmpc-current-buffer)
+ ;; now set them again to make sure the contain the right value
+ (setq vmpc-true-conditions tc)
+ (setq vmpc-saved-headers-alist sha)
+ (setq vmpc-actions-to-run atr)
+ (setq vmpc-current-state cs))
+ ;; mark, that we are in the composition buffer now
+ (setq vmpc-current-buffer 'composition)
+ ;; BUGME why is the global value resurrected after making the variable
+ ;; buffer local? Is this related to defadvice? I have no idea what is
+ ;; going on here! Thus we clear it afterwards now!
+ (save-excursion
+ (set-buffer (get-buffer-create " *vmpc-cleanup*"))
+ (vmpc-init-vars)
+ (setq vmpc-current-buffer nil)))
+
+(defadvice vm-do-reply (around vmpc-reply activate)
+ "*Reply to a message with pcrisis voodoo."
+ (vmpc-init-vars 'reply)
+ (vmpc-build-true-conditions-list)
+ (vmpc-build-actions-to-run-list)
+ (vmpc-run-actions)
+ ad-do-it
+ (vmpc-create-sig-and-pre-sig-exerlays)
+ (vmpc-make-vars-local)
+ (vmpc-run-actions))
+
+(defadvice vm-mail (around vmpc-newmail activate)
+ "*Start a new message with pcrisis voodoo."
+ (vmpc-init-vars 'newmail)
+ (vmpc-build-true-conditions-list)
+ (vmpc-build-actions-to-run-list)
+ (vmpc-run-actions)
+ ad-do-it
+ (vmpc-create-sig-and-pre-sig-exerlays)
+ (vmpc-make-vars-local)
+ (vmpc-run-actions))
+
+(defadvice vm-compose-mail (around vmpc-compose-newmail activate)
+ "*Start a new message with pcrisis voodoo."
+ (vmpc-init-vars 'newmail)
+ (vmpc-build-true-conditions-list)
+ (vmpc-build-actions-to-run-list)
+ (vmpc-run-actions)
+ ad-do-it
+ (vmpc-create-sig-and-pre-sig-exerlays)
+ (vmpc-make-vars-local)
+ (vmpc-run-actions))
+
+(defadvice vm-forward-message (around vmpc-forward activate)
+ "*Forward a message with pcrisis voodoo."
+ ;; this stuff is already done when replying, but not here:
+ (vm-follow-summary-cursor)
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-error-if-folder-empty)
+ ;; the rest is almost exactly the same as replying:
+ (vmpc-init-vars 'forward)
+ (vmpc-build-true-conditions-list)
+ (vmpc-build-actions-to-run-list)
+ (vmpc-run-actions)
+ ad-do-it
+ (vmpc-create-sig-and-pre-sig-exerlays)
+ (vmpc-make-vars-local)
+ (vmpc-run-actions))
+
+(defadvice vm-resend-message (around vmpc-resend activate)
+ "*Resent a message with pcrisis voodoo."
+ ;; this stuff is already done when replying, but not here:
+ (vm-follow-summary-cursor)
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-error-if-folder-empty)
+ ;; the rest is almost exactly the same as replying:
+ (vmpc-init-vars 'resend)
+ (vmpc-build-true-conditions-list)
+ (vmpc-build-actions-to-run-list)
+ (vmpc-run-actions)
+ ad-do-it
+ (vmpc-create-sig-and-pre-sig-exerlays)
+ (vmpc-make-vars-local)
+ (vmpc-run-actions))
+
+(defvar vmpc-no-automorph nil
+ "When true automorphing will be disabled.")
+
+(make-variable-buffer-local 'vmpc-no-automorph)
+
+;;;###autoload
+(defun vmpc-toggle-no-automorph ()
+ "Disable automorph for the current buffer.
+When automorph is not doing the right thing and you want to disable it for the
+current composition, then call this function."
+ (interactive)
+ (setq vmpc-no-automorph (not vmpc-no-automorph))
+ (message (if vmpc-no-automorph
+ "Automorphing has been enabled"
+ "Automorphing has been disabled")))
+
+;;;###autoload
+(defun vmpc-automorph ()
+ "*Change contents of the current mail message based on its own headers.
+Unless `vmpc-current-state' is 'no-automorph, headers and signatures can be
+changed; pre-signatures added; functions called.
+
+Call `vmpc-no-automorph' to disable it for the current buffer."
+ (interactive)
+ (unless vmpc-no-automorph
+ (vmpc-make-vars-local)
+ (vmpc-init-vars 'automorph 'composition)
+ (vmpc-build-true-conditions-list)
+ (vmpc-build-actions-to-run-list)
+ (vmpc-run-actions)))
+
+(provide 'vm-pcrisis)
+
+;;; vm-pcrisis.el ends here
diff --git a/lisp/vm-pgg.el b/lisp/vm-pgg.el
new file mode 100644
index 0000000..cff6db5
--- /dev/null
+++ b/lisp/vm-pgg.el
@@ -0,0 +1,1298 @@
+;;; vm-pgg.el --- PGP/MIME support for VM by pgg.el
+;;
+;; Copyright (C) 2006 Robert Widhopf-Fenk
+;;
+;; Author: Robert Widhopf-Fenk, Jens Gustedt
+;; Status: Tested with XEmacs 21.4.19 & VM 7.19
+;; Keywords: VM helpers
+;; X-URL: http://www.robf.de/Hacking/elisp
+;; Version: $Id$
+
+;;
+;; This code is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 1, or (at your option)
+;; any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+;;; Commentary:
+;;
+;; This is a replacement for mailcrypt adding PGP/MIME support to VM.
+;;
+;; It requires PGG which is a standard package for XEmacs and is a part
+;; of Gnus for GNU Emacs. On Debian "apt-get install gnus" should do the
+;; trick.
+;;
+;; It is still in BETA state thus you must explicitly load it by
+;;
+;; (and (locate-library "vm-pgg") (require 'vm-pgg))
+;;
+;; If you set `vm-auto-displayed-mime-content-types' and/or
+;; `vm-mime-internal-content-types' make sure that they contain
+;; "application/pgp-keys" or set them before loading vm-pgg.
+;; Otherwise public keys are not detected automatically .
+;;
+;; To customize vm-pgg use: M-x customize-group RET vm-pgg RET
+;;
+;; Displaying of messages in the PGP(/MIME) format will automatically trigger:
+;; * decrypted of encrypted MIME parts
+;; * verification of signed MIME parts
+;; * snarfing of public keys
+;;
+;; The status of the current message will also be displayed in the modeline.
+;;
+;; To create messages according to PGP/MIME you should use:
+;; * M-x vm-pgg-encrypt for encrypting
+;; * M-x vm-pgg-sign for signing
+;; * C-u M-x vm-pgg-encrypt for encrypting + signing
+;;
+;; All these commands are also available in the menu PGP/MIME which is
+;; activated by the minor mode `vm-pgg-compose-mode'. There are also
+;; commands for the old style clear text format as MC had them.
+;;
+;; If you get annoyed by answering password prompts you might want to set the
+;; variable `pgg-cache-passphrase' to t and `pgg-passphrase-cache-expiry' to a
+;; higher value or nil!
+;;
+
+;;; References:
+;;
+;; Code partially stems from the sources:
+;; * mml2015.el (Gnus)
+;; * mc-toplev.el (Mailcrypt)
+;;
+;; For PGP/MIME see:
+;; * http://www.faqs.org/rfcs/rfc2015.html
+;; * http://www.faqs.org/rfcs/rfc2440.html
+;; * http://www.faqs.org/rfcs/rfc3156.html
+;;
+
+;;; TODO:
+;;
+;; * add annotation see to signed/encrypted regions. XEmacs has annotations
+;; and GNU Emacs? Maybe I simply use overlays at the line start without eys
+;; candy.
+;; * allow attaching of other keys from key-ring
+;;
+
+;;; Code:
+
+;; handle missing pgg.el gracefully
+(eval-and-compile
+ (if (and (boundp 'byte-compile-current-file) byte-compile-current-file)
+ (condition-case nil
+ (require 'pgg)
+ (error (message "WARNING: Cannot load pgg.el, related functions may not work!")))
+ (require 'pgg))
+
+ (require 'easymenu)
+ (require 'vm-version)
+ (require 'vm-misc)
+ (require 'vm-page)
+ (require 'vm-vars)
+ (require 'vm-mime)
+ (require 'vm-reply)
+
+ (require 'advice))
+
+
+(eval-when-compile
+ (require 'cl)
+ ;; avoid warnings
+ (defvar vm-mode-line-format)
+ (defvar vm-message-pointer)
+ (defvar vm-presentation-buffer)
+ (defvar vm-summary-buffer)
+ ;; avoid bytecompile warnings
+ (defvar vm-pgg-cleartext-state nil "For interfunction communication.")
+)
+
+(defgroup vm nil
+ "VM"
+ :group 'mail)
+
+(defgroup vm-pgg nil
+ "PGP and PGP/MIME support for VM by PGG."
+ :group 'vm)
+
+(defface vm-pgg-bad-signature
+ '((((type tty) (class color))
+ (:foreground "red" :bold t))
+ (((type tty))
+ (:bold t))
+ (((background light))
+ (:foreground "red" :bold t))
+ (((background dark))
+ (:foreground "red" :bold t)))
+ "The face used to highlight bad signature messages."
+ :group 'vm-pgg
+ :group 'faces)
+
+(defface vm-pgg-good-signature
+ '((((type tty) (class color))
+ (:foreground "green" :bold t))
+ (((type tty))
+ (:bold t))
+ (((background light))
+ (:foreground "green4"))
+ (((background dark))
+ (:foreground "green")))
+ "The face used to highlight good signature messages."
+ :group 'vm-pgg
+ :group 'faces)
+
+(defface vm-pgg-unknown-signature-type
+ '((((type tty) (class color))
+ (:bold t))
+ (((type tty))
+ (:bold t)))
+ "The face used to highlight unknown signature types."
+ :group 'vm-pgg
+ :group 'faces)
+
+(defface vm-pgg-error
+ '((((type tty) (class color))
+ (:foreground "red" :bold t))
+ (((type tty))
+ (:bold t))
+ (((background light))
+ (:foreground "red" :bold t))
+ (((background dark))
+ (:foreground "red" :bold t)))
+ "The face used to highlight error messages."
+ :group 'vm-pgg
+ :group 'faces)
+
+(defface vm-pgg-bad-signature-modeline
+ '((((type tty) (class color))
+ (:inherit modeline :foreground "red" :bold t))
+ (((type tty))
+ (:inherit modeline :bold t))
+ (((background light))
+ (:inherit modeline :foreground "red" :bold t))
+ (((background dark))
+ (:inherit modeline :foreground "red" :bold t)))
+ "The face used to highlight bad signature messages."
+ :group 'vm-pgg
+ :group 'faces)
+
+(defface vm-pgg-good-signature-modeline
+ '((((type tty) (class color))
+ (:inherit modeline :foreground "green" :bold t))
+ (((type tty))
+ (:inherit modeline :bold t))
+ (((background light))
+ (:inherit modeline :foreground "green4"))
+ (((background dark))
+ (:inherit modeline :foreground "green")))
+ "The face used to highlight good signature messages."
+ :group 'vm-pgg
+ :group 'faces)
+
+(defface vm-pgg-unknown-signature-type-modeline
+ '((((type tty) (class color))
+ (:inherit modeline :bold t))
+ (((type tty))
+ (:inherit modeline :bold t)))
+ "The face used to highlight unknown signature types."
+ :group 'vm-pgg
+ :group 'faces)
+
+(defface vm-pgg-error-modeline
+ '((((type tty) (class color))
+ (:inherit modeline :foreground "red" :bold t))
+ (((type tty))
+ (:inherit modeline :bold t))
+ (((background light))
+ (:inherit modeline :foreground "red"))
+ (((background dark))
+ (:inherit modeline :foreground "red")))
+ "The face used to highlight error messages."
+ :group 'vm-pgg
+ :group 'faces)
+
+;; hack to work around the missing support for :inherit in XEmacs
+(when (featurep 'xemacs)
+ (let ((faces '(vm-pgg-bad-signature-modeline
+ vm-pgg-good-signature-modeline
+ vm-pgg-unknown-signature-type-modeline
+ vm-pgg-error-modeline))
+ (faces-list (face-list))
+ f)
+ (while faces
+ (setq f (car faces))
+ (set-face-parent f 'modeline)
+ (face-display-set f (custom-face-get-spec f) nil '(custom))
+ (setq faces (cdr faces)))))
+
+(defcustom vm-pgg-fetch-missing-keys t
+ "*If t, PGP will try to fetch missing keys from `pgg-default-keyserver-address'."
+ :group 'vm-pgg
+ :type 'boolean)
+
+(defcustom vm-pgg-auto-snarf t
+ "*If t, snarfing of keys will happen automatically."
+ :group 'vm-pgg
+ :type 'boolean)
+
+(defcustom vm-pgg-auto-decrypt t
+ "*If t, decrypting will happen automatically."
+ :group 'vm-pgg
+ :type 'boolean)
+
+(defcustom vm-pgg-get-author-headers '("From:" "Sender:")
+ "*The list of headers to get the author of a mail that is to be send.
+If nil, `pgg-default-user-id' is used as a fallback."
+ :group 'vm-pgg
+ :type '(repeat string))
+
+(defcustom vm-pgg-sign-text-transfer-encoding 'quoted-printable
+ "*The encoding used for signed MIME parts of type text.
+See `vm-pgg-sign' for details."
+ :group 'vm-pgg
+ :type '(choice (const quoted-printable) (const base64)))
+
+(defvar vm-pgg-compose-mode-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map "\C-c#s" 'vm-pgg-sign)
+ (define-key map "\C-c#e" 'vm-pgg-encrypt)
+ (define-key map "\C-c#E" 'vm-pgg-sign-and-encrypt)
+ (define-key map "\C-c#a" 'vm-pgg-ask-hook)
+ (define-key map "\C-c#k" 'vm-pgg-attach-public-key)
+ map))
+
+(defvar vm-pgg-compose-mode-menu nil
+ "The composition menu of vm-pgg.")
+
+(easy-menu-define
+ vm-pgg-compose-mode-menu (if (featurep 'xemacs) nil (list vm-pgg-compose-mode-map))
+ "PGP/MIME compose mode menu."
+ '("PGP/MIME"
+ ["Sign" vm-pgg-sign t]
+ ["Encrypt" vm-pgg-encrypt t]
+ ["Sign+Encrypt" vm-pgg-sign-and-encrypt t]
+ ["Ask For An Action" vm-pgg-ask-hook t]
+ "----"
+ ["Attach Public Key" vm-pgg-attach-public-key t]
+ ["Insert Public Key" pgg-insert-key t]))
+
+(defvar vm-pgg-compose-mode nil
+ "None-nil means PGP/MIME composition mode key bindings and menu are available.")
+
+(make-variable-buffer-local 'vm-pgg-compose-mode)
+
+(defun vm-pgg-compose-mode (&optional arg)
+ "\nMinor mode for interfacing with cryptographic functions.
+
+Switch mode on/off according to ARG.
+
+\\<vm-pgg-compose-mode-map>"
+ (interactive)
+ (setq vm-pgg-compose-mode
+ (if (null arg) (not vm-pgg-compose-mode)
+ (> (prefix-numeric-value arg) 0)))
+ (if vm-pgg-compose-mode
+ (easy-menu-add vm-pgg-compose-mode-menu)
+ (easy-menu-remove vm-pgg-compose-mode-menu)))
+
+(defvar vm-pgg-compose-mode-string " vm-pgg"
+ "*String to put in mode line when function `vm-pgg-compose-mode' is active.")
+
+(defcustom vm-pgg-ask-function 'vm-pgg-prompt-for-action
+ "*The function to use in `vm-pgg-ask-hook'."
+ :group 'vm-pgg
+ :type '(choice
+ (const
+ :tag "do nothing"
+ :doc "Disable `vm-pgg-ask-hook'"
+ nil)
+ (const
+ :tag "sign"
+ :doc "Ask whether to sign the message before sending"
+ sign)
+ (const
+ :tag "encrypt"
+ :doc "Ask whether to encryt the message before sending"
+ encrypt)
+ (const
+ :tag "encrypt and sign"
+ :doc "Ask whether to encrypt and sign the message before sending"
+ encrypt-and-sign)
+ (function
+ :tag "ask for the action"
+ :doc "Will prompt for an action by calling `vm-pgg-prompt-for-action'"
+ vm-pgg-prompt-for-action)
+ (function
+ :tag "your own function"
+ :doc "It should returning one of the other const values.")))
+
+
+(if (not (assq 'vm-pgg-compose-mode minor-mode-map-alist))
+ (setq minor-mode-map-alist
+ (cons (cons 'vm-pgg-compose-mode vm-pgg-compose-mode-map)
+ minor-mode-map-alist)))
+
+(if (not (assq 'vm-pgg-compose-mode minor-mode-alist))
+ (setq minor-mode-alist
+ (cons '(vm-pgg-compose-mode vm-pgg-compose-mode-string) minor-mode-alist)))
+
+(defun vm-pgg-compose-mode-activate ()
+ "Activate function `vm-pgg-compose-mode'."
+ (vm-pgg-compose-mode 1))
+
+(add-hook 'vm-mail-mode-hook 'vm-pgg-compose-mode-activate t)
+
+(defun vm-pgg-get-emails (headers)
+ "Return email addresses found in the given HEADERS."
+ (let (content recipients)
+ (while headers
+ (setq content (vm-mail-mode-get-header-contents (car headers)))
+ (when content
+ (setq recipients (append (rfc822-addresses content) recipients)))
+ (setq headers (cdr headers)))
+ recipients))
+
+(defvar vm-pgg-get-recipients-headers '("To:" "CC:" "BCC:")
+ "The list of headers to get recipients from.")
+
+(defun vm-pgg-get-recipients ()
+ "Return a list of recipients."
+ (vm-pgg-get-emails vm-pgg-get-recipients-headers))
+
+(defun vm-pgg-get-author ()
+ "Return the author of the message."
+ (car (vm-pgg-get-emails vm-pgg-get-author-headers)))
+
+(defun vm-pgp-goto-body-start ()
+ "Goto the start of the body and return point."
+ (goto-char (point-min))
+ (search-forward (concat "\n" mail-header-separator "\n"))
+ (goto-char (match-end 0))
+ (point))
+
+(defun vm-pgp-prepare-composition ()
+ "Prepare the composition for encrypting or signing."
+ ;; encode message
+ (unless (vm-mail-mode-get-header-contents "MIME-Version:")
+ (vm-mime-encode-composition))
+ ;; ensure newline at the end
+ (goto-char (point-max))
+ (skip-chars-backward " \t\r\n\f")
+ (delete-region (point) (point-max))
+ (insert "\n")
+ ;; skip headers
+ (vm-pgp-goto-body-start)
+ ;; guess the author
+ (make-local-variable 'pgg-default-user-id)
+ (setq pgg-default-user-id
+ (or
+ (and vm-pgg-get-author-headers (vm-pgg-get-author))
+ pgg-default-user-id)))
+
+;;; ###autoload
+(defun vm-pgg-cleartext-encrypt (sign)
+ "*Encrypt the composition as cleartext and with a prefix also SIGN it."
+ (interactive "P")
+ (save-excursion
+ (vm-pgp-prepare-composition)
+ (let ((start (point)) (end (point-max)))
+ (unless (pgg-encrypt-region start end (vm-pgg-get-recipients) sign)
+ (pop-to-buffer pgg-errors-buffer)
+ (error "Encrypt error"))
+ (delete-region start end)
+ (insert-buffer-substring pgg-output-buffer))))
+
+(defun vm-pgg-make-presentation-copy ()
+ "Make a presentation copy also for cleartext PGP messages."
+ ;; make a presentation copy
+ (vm-make-presentation-copy (car vm-message-pointer))
+ (vm-save-buffer-excursion
+ (vm-replace-buffer-in-windows (current-buffer)
+ vm-presentation-buffer))
+ (set-buffer vm-presentation-buffer)
+
+ (let ((buffer-read-only nil))
+ ;; remove From line
+ (goto-char (point-min))
+ (forward-line 1)
+ (delete-region (point-min) (point))
+ (goto-char (point-min))
+ (vm-reorder-message-headers nil vm-visible-headers
+ vm-invisible-header-regexp)
+ (vm-decode-mime-message-headers (car vm-message-pointer))
+ (vm-energize-urls-in-message-region)
+ (vm-highlight-headers-maybe)
+ (vm-energize-headers-and-xfaces)))
+
+(defvar vm-pgg-state nil
+ "State of the currently viewed message.")
+
+(make-variable-buffer-local 'vm-pgg-state)
+
+(defvar vm-pgg-state-message nil
+ "The message for `vm-pgg-state'.")
+
+(make-variable-buffer-local 'vm-pgg-state-message)
+
+(defvar vm-pgg-mode-line-items
+ (let ((items '((error " ERROR" vm-pgg-error-modeline)
+ (unknown " unknown" vm-pgg-unknown-signature-type-modeline)
+ (verified " verified" vm-pgg-good-signature-modeline)))
+ mode-line-items
+ x i s f)
+ (while (and (featurep 'xemacs) items)
+ (setq x (car items)
+ i (car x)
+ s (cadr x)
+ f (caddr x)
+ x (vm-make-extent 0 (length s) s))
+ (vm-set-extent-property x 'face f)
+ (setq items (cdr items))
+ (setq mode-line-items (append mode-line-items (list (list i x s)))))
+ mode-line-items)
+ "An alist mapping states to modeline strings.")
+
+(if (not (member'vm-pgg-state vm-mode-line-format))
+ (setq vm-mode-line-format (append '("" vm-pgg-state) vm-mode-line-format)))
+
+(defun vm-pgg-state-set (&rest states)
+ "Set the message state displayed in the modeline acording to STATES.
+If STATES is nil, clear it."
+ ;; clear state for a new message
+ (save-excursion
+ (vm-select-folder-buffer-if-possible)
+ (when (not (equal (car vm-message-pointer) vm-pgg-state-message))
+ (setq vm-pgg-state-message (car vm-message-pointer))
+ (setq vm-pgg-state nil)
+ (when vm-presentation-buffer
+ (save-excursion
+ (set-buffer vm-presentation-buffer)
+ (setq vm-pgg-state nil)))
+ (when vm-summary-buffer
+ (save-excursion
+ (set-buffer vm-summary-buffer)
+ (setq vm-pgg-state nil))))
+ ;; add prefix
+ (if (and states (not vm-pgg-state))
+ (setq vm-pgg-state '("PGP:")))
+ ;; add new states
+ (let (s)
+ (while states
+ (setq s (car states)
+ vm-pgg-state (append vm-pgg-state
+ (list (or (cdr (assoc s vm-pgg-mode-line-items))
+ (format " %s" s))))
+ states (cdr states))))
+ ;; propagate state
+ (setq states vm-pgg-state)
+ (when vm-presentation-buffer
+ (save-excursion
+ (set-buffer vm-presentation-buffer)
+ (setq vm-pgg-state states)))
+ (when vm-summary-buffer
+ (save-excursion
+ (set-buffer vm-summary-buffer)
+ (setq vm-pgg-state states)))))
+
+(defvar vm-pgg-cleartext-begin-regexp
+ "^-----BEGIN PGP \\(\\(SIGNED \\)?MESSAGE\\|PUBLIC KEY BLOCK\\)-----$"
+ "Regexp used to match PGP armor.")
+
+(defvar vm-pgg-cleartext-end-regexp
+ "^-----END PGP %s-----$"
+ "Regexp used to match PGP armor.")
+
+(defcustom vm-pgg-cleartext-search-limit 4096
+ "Number of bytes to peek into the message for a PGP clear text armor."
+ :group 'vm-pgg
+ :group 'faces)
+
+(defun vm-pgg-cleartext-automode-button (label action)
+ "Cleartext thing by a button with text LABEL and associate ACTION with it.
+When the button is pressed ACTION is called."
+ (save-excursion
+ (unless (eq major-mode 'vm-presentation-mode)
+ (vm-pgg-make-presentation-copy))
+ (goto-char (match-beginning 0))
+ (let ((buffer-read-only nil)
+ (start (point))
+ o)
+ (if (re-search-forward (format vm-pgg-cleartext-end-regexp
+ (match-string 0))
+ (point-max) t)
+ (delete-region start (match-end 0)))
+ (insert label)
+ (setq o (make-overlay start (point)))
+ (overlay-put o 'vm-pgg t)
+ (overlay-put o 'face vm-mime-button-face)
+ (overlay-put o 'vm-button t)
+ (overlay-put o 'mouse-face 'highlight)
+ (let ((keymap (make-sparse-keymap)))
+ (define-key keymap [mouse-2] action)
+ (define-key keymap "\r" action)
+ (overlay-put o 'local-map keymap)))))
+
+(defvar vm-pgg-cleartext-decoded nil
+ "State of the cleartext message.")
+(make-variable-buffer-local 'vm-pgg-cleartext-decoded)
+
+(defun vm-pgg-set-cleartext-decoded ()
+ (save-excursion
+ (vm-select-folder-buffer)
+ (setq vm-pgg-cleartext-decoded (car vm-message-pointer))))
+
+(defun vm-pgg-cleartext-automode ()
+ "Check for PGP ASCII armor and triggers automatic verification/decryption."
+ (save-excursion
+ (vm-select-folder-buffer-if-possible)
+ (if (equal vm-pgg-cleartext-decoded (car vm-message-pointer))
+ (setq vm-pgg-cleartext-decoded nil)
+ (setq vm-pgg-cleartext-decoded nil)
+ (if vm-presentation-buffer
+ (set-buffer vm-presentation-buffer))
+ (goto-char (point-min))
+ (when (and (vm-mime-plain-message-p (car vm-message-pointer))
+ (re-search-forward vm-pgg-cleartext-begin-regexp
+ (+ (point) vm-pgg-cleartext-search-limit)
+ t))
+ (condition-case e
+ (cond ((string= (match-string 1) "SIGNED MESSAGE")
+ (vm-pgg-set-cleartext-decoded)
+ (vm-pgg-cleartext-verify))
+ ((string= (match-string 1) "MESSAGE")
+ (vm-pgg-set-cleartext-decoded)
+ (if vm-pgg-auto-decrypt
+ (vm-pgg-cleartext-decrypt)
+ (vm-pgg-cleartext-automode-button
+ "Decrypt PGP message\n"
+ (lambda ()
+ (interactive)
+ (let ((vm-pgg-auto-decrypt t))
+ (vm-pgg-cleartext-decrypt))))))
+ ((string= (match-string 1) "PUBLIC KEY BLOCK")
+ (vm-pgg-set-cleartext-decoded)
+ (if vm-pgg-auto-snarf
+ (vm-pgg-snarf-keys)
+ (vm-pgg-cleartext-automode-button
+ "Snarf PGP key\n"
+ (lambda ()
+ (interactive)
+ (let ((vm-pgg-auto-snarf t))
+ (vm-pgg-snarf-keys))))))
+ (t
+ (error "This should never happen!")))
+ (error (message "%S" e)))))))
+
+(defadvice vm-preview-current-message (after vm-pgg-cleartext-automode activate)
+ "Decode or check signature on clear text messages."
+ (vm-pgg-state-set)
+ (when (and vm-pgg-cleartext-decoded
+ (not (equal vm-pgg-cleartext-decoded (car vm-message-pointer))))
+ (setq vm-pgg-cleartext-decoded nil))
+ (when (and (not (eq vm-system-state 'previewing))
+ (not vm-mime-decoded))
+ (vm-pgg-cleartext-automode)))
+
+(defadvice vm-scroll-forward (around vm-pgg-cleartext-automode activate)
+ "Decode or check signature on clear text messages."
+ (let ((vm-system-state-was
+ (save-excursion
+ (vm-select-folder-buffer-if-possible)
+ vm-system-state)))
+ ad-do-it
+ (vm-pgg-state-set)
+ (when (and (eq vm-system-state-was 'previewing)
+ (not vm-mime-decoded))
+ (vm-pgg-cleartext-automode))))
+
+;;; ###autoload
+(defun vm-pgg-cleartext-sign ()
+ "*Sign the message."
+ (interactive)
+ (save-excursion
+ (vm-pgp-prepare-composition)
+ (let ((start (point)) (end (point-max)))
+ (unless (pgg-sign-region start end t)
+ (pop-to-buffer pgg-errors-buffer)
+ (error "Signing error"))
+ (delete-region start end)
+ (insert-buffer-substring pgg-output-buffer))))
+
+(defun vm-pgg-cleartext-cleanup (status)
+ "Removed ASCII armor and insert PGG output depending on STATUS."
+ (let (start end)
+ (setq start (and (re-search-forward "^-----BEGIN PGP SIGNED MESSAGE-----$")
+ (match-beginning 0))
+ end (and (search-forward "\n\n")
+ (match-end 0)))
+ (delete-region start end)
+ (setq start (and (re-search-forward "^-----BEGIN PGP SIGNATURE-----$")
+ (match-beginning 0))
+ end (and (re-search-forward "^-----END PGP SIGNATURE-----$")
+ (match-end 0)))
+ (delete-region start end)
+ ;; add output from PGP
+ (insert "\n")
+ (let ((start (point)) end)
+ (if (eq status 'error)
+ (insert-buffer-substring pgg-errors-buffer)
+ (insert-buffer-substring pgg-output-buffer)
+ (vm-pgg-crlf-cleanup start (point)))
+ (setq end (point))
+ (put-text-property start end 'face
+ (if (eq status 'error)
+ 'vm-pgg-bad-signature
+ 'vm-pgg-good-signature)))))
+
+(defadvice vm-mime-transfer-decode-region (around vm-pgg-cleartext-automode activate)
+ "Decode or check signature on clear text messages parts."
+ (let ((vm-pgg-part-start (point)))
+ ad-do-it
+ ;; BUGME should we use marks here?
+ (when (and (vm-mime-text-type-layout-p (ad-get-arg 0))
+ (< vm-pgg-part-start (point)))
+ (save-excursion
+ (save-restriction
+ (narrow-to-region vm-pgg-part-start (point))
+ (vm-pgg-cleartext-automode)
+ (widen)
+; (set-window-start (selected-window) 0)
+ ;(scroll-down 1000)
+ )))))
+
+(defadvice vm-mime-display-internal-text/plain (around vm-pgg-cleartext-automode activate)
+ "Decode or check signature on clear text messages parts.
+We use the advice here in order to avoid overwriting VMs internal text display
+function. Faces will get lost if a charset conversion happens thus we do the
+cleanup here after verification and decoding took place."
+ (let ((vm-pgg-cleartext-state nil)
+ (start (point))
+ end)
+ ad-do-it
+ (when vm-pgg-cleartext-state
+ (setq end (point))
+ (save-restriction
+ (narrow-to-region start end)
+ (goto-char (point-min))
+ (vm-pgg-cleartext-cleanup vm-pgg-cleartext-state)
+ (widen)))))
+
+;;; ###autoload
+(defun vm-pgg-cleartext-verify ()
+ "*Verify the signature in the current message."
+ (interactive)
+ (message "Verifying PGP cleartext message...")
+ (when (interactive-p)
+ (vm-follow-summary-cursor)
+ (vm-select-folder-buffer-if-possible)
+ (vm-check-for-killed-summary)
+ (vm-error-if-folder-empty))
+
+ ;; create a presentation copy
+ (unless (eq major-mode 'vm-presentation-mode)
+ (vm-pgg-make-presentation-copy))
+
+ ;; verify
+ (save-excursion
+ (goto-char (point-min))
+ (let ((buffer-read-only nil)
+ (status (pgg-verify-region (point) (point-max) nil
+ vm-pgg-fetch-missing-keys)))
+
+ (vm-pgg-state-set 'signed)
+ (setq status (if (not status) 'error 'verified))
+ (vm-pgg-state-set status)
+ (if (boundp 'vm-pgg-cleartext-state)
+ (setq vm-pgg-cleartext-state status)
+ (vm-pgg-cleartext-cleanup status)))))
+
+;;; ###autoload
+(defun vm-pgg-cleartext-decrypt ()
+ "*Decrypt the contents of the current message."
+ (interactive)
+ (if (interactive-p)
+ (vm-follow-summary-cursor))
+ (vm-select-folder-buffer-if-possible)
+ (vm-check-for-killed-summary)
+ (vm-error-if-folder-read-only)
+ (vm-error-if-folder-empty)
+
+ ;; skip headers
+ (goto-char (point-min))
+ (search-forward "\n\n")
+ (goto-char (match-end 0))
+
+ ;; decrypt
+ (let ((state
+ (condition-case nil
+ (pgg-decrypt-region (point) (point-max))
+ (error nil)))
+ start end)
+ (vm-pgg-state-set 'encrypted)
+
+ ;; make a presentation copy
+ (unless (eq major-mode 'vm-presentation-mode)
+ (vm-pgg-make-presentation-copy))
+
+ (goto-char (point-min))
+ (search-forward "\n\n")
+ (setq start (point))
+
+ (if (not state)
+ ;; insert the error message
+ (let ((buffer-read-only nil))
+ (vm-pgg-state-set 'error)
+ (insert-buffer-substring pgg-errors-buffer)
+ (put-text-property start (point) 'face 'vm-pgg-error))
+ ;; replace it with decrypted message
+ (setq start (and (re-search-forward "^-----BEGIN PGP MESSAGE-----$")
+ (match-beginning 0))
+ end (and (re-search-forward "^-----END PGP MESSAGE-----$")
+ (match-end 0)))
+ (let ((buffer-read-only nil))
+ (delete-region start end)
+ (insert-buffer-substring pgg-output-buffer))
+ ;; if it signed then also verify it
+ (goto-char start)
+ (if (looking-at "^-----BEGIN PGP \\(SIGNED \\)?MESSAGE-----$")
+ (vm-pgg-cleartext-verify)))))
+
+(defun vm-pgg-crlf-cleanup (start end)
+ "Convert CRLF to LF in region from START to END."
+ (save-excursion
+ (goto-char start)
+ (while (search-forward "\r\n" end t)
+ (replace-match "\n" t t))))
+
+(defun vm-pgg-make-crlf (start end)
+ "Convert CRLF to LF in region from START to END."
+ (save-excursion
+ (goto-char end)
+ (while (search-backward "\n" start t)
+ (replace-match "\r\n" t t)
+ (backward-char))))
+
+(defvar vm-pgg-mime-decoded nil
+ "Saves decoded state for later use, i.e. decoding to buttons.")
+(make-variable-buffer-local 'vm-pgg-mime-decoded)
+
+(defun vm-pgg-get-mime-decoded ()
+ "Return `vm-pgg-mime-decoded'."
+ (save-excursion
+ (vm-select-folder-buffer)
+ vm-pgg-mime-decoded))
+
+(defvar vm-pgg-recursion nil
+ "Detect recursive calles.")
+
+(defadvice vm-decode-mime-message (around vm-pgg-clear-state activate)
+ "Clear the modeline state before decoding."
+ (vm-select-folder-buffer)
+ (when (not vm-pgg-recursion)
+ (setq vm-pgg-mime-decoded vm-mime-decoded))
+ (setq vm-pgg-state-message nil)
+ (setq vm-pgg-state nil)
+ (if (vm-mime-plain-message-p (car vm-message-pointer))
+ (if vm-pgg-cleartext-decoded
+ (vm-preview-current-message))
+ (let ((vm-pgg-recursion t))
+ ad-do-it)))
+
+(defun vm-pgg-mime-decrypt (button)
+ "Replace the BUTTON with the output from `pgg-snarf-keys'."
+ (let ((vm-pgg-auto-decrypt t)
+ (layout (copy-sequence (vm-extent-property button 'vm-mime-layout))))
+ (vm-set-extent-property button 'vm-mime-disposable t)
+ (vm-set-extent-property button 'vm-mime-layout layout)
+ (goto-char (vm-extent-start-position button))
+ (let ((buffer-read-only nil))
+ (vm-decode-mime-layout button t))))
+
+;;; ###autoload
+(defun vm-mime-display-internal-multipart/encrypted (layout)
+ "Display multipart/encrypted LAYOUT."
+ (vm-pgg-state-set 'encrypted)
+ (let* ((part-list (vm-mm-layout-parts layout))
+ (header (car part-list))
+ (message (car (cdr part-list)))
+ status)
+ (cond ((eq (vm-pgg-get-mime-decoded) 'decoded)
+ ;; after decode the state of vm-mime-decoded is 'buttons
+ nil)
+ ((not (and (= (length part-list) 2)
+ (vm-mime-types-match (car (vm-mm-layout-type header))
+ "application/pgp-encrypted")
+ ;; TODO: check version and protocol here?
+ (vm-mime-types-match (car (vm-mm-layout-type message))
+ "application/octet-stream")))
+ (insert "Unknown multipart/encrypted format."))
+ ((not vm-pgg-auto-decrypt)
+ ;; add a button
+ (let ((buffer-read-only nil))
+ (vm-mime-insert-button
+ (vm-mime-sprintf (vm-mime-find-format-for-layout layout) layout)
+ 'vm-pgg-mime-decrypt
+ layout nil)))
+ (t
+ ;; decode the message now
+ (save-excursion
+ (set-buffer (vm-buffer-of (vm-mm-layout-message message)))
+ (save-restriction
+ (widen)
+ (setq status (pgg-decrypt-region (vm-mm-layout-body-start message)
+ (vm-mm-layout-body-end message)))))
+ (if (not status)
+ (let ((start (point)))
+ (vm-pgg-state-set 'error)
+ (insert-buffer-substring pgg-errors-buffer)
+ (put-text-property start (point) 'face 'vm-pgg-error))
+ (save-excursion
+ (set-buffer pgg-output-buffer)
+ (vm-pgg-crlf-cleanup (point-min) (point-max))
+ (setq message (vm-mime-parse-entity-safe nil nil nil t)))
+ (if message
+ (vm-decode-mime-layout message)
+ (insert-buffer-substring pgg-output-buffer))
+ (setq status (save-excursion
+ (set-buffer pgg-errors-buffer)
+ (goto-char (point-min))
+ ;; TODO: care for BADSIG
+ (when (re-search-forward "GOODSIG [^\n\r]+" (point-max) t)
+ (vm-pgg-state-set 'signed 'verified)
+ (buffer-substring (match-beginning 0) (match-end 0)))))
+ (if status
+ (let ((start (point)))
+ (insert "\n" status "\n")
+ (put-text-property start (point) 'face 'vm-pgg-good-signature))))
+ t))))
+
+;;; ###autoload
+(defun vm-mime-display-internal-multipart/signed (layout)
+ "Display multipart/signed LAYOUT."
+ (vm-pgg-state-set 'signed)
+ (let* ((part-list (vm-mm-layout-parts layout))
+ (message (car part-list))
+ (signature (car (cdr part-list)))
+ status signature-file start end)
+ (cond ((eq (vm-pgg-get-mime-decoded) 'decoded)
+ ;; after decode the state of vm-mime-decoded is 'buttons
+ nil)
+ ((not (and (= (length part-list) 2)
+ ;; TODO: check version and protocol here?
+ (vm-mime-types-match (car (vm-mm-layout-type signature))
+ "application/pgp-signature")))
+ ;; insert the message
+ (vm-decode-mime-layout message)
+ (let (start end)
+ (vm-pgg-state-set 'unknown)
+ (setq start (point))
+ (insert
+ (format
+ "******* unknown signature type %s *******\n"
+ (car (vm-mm-layout-type signature))))
+ (setq end (point))
+ (vm-decode-mime-layout signature)
+ (put-text-property start end 'face 'vm-pgg-unknown-signature-type))
+ t)
+ (t
+ ;; insert the message
+ (vm-decode-mime-layout message)
+ ;; write signature to a temp file
+ (setq start (point))
+ (vm-mime-insert-mime-body signature)
+ (setq end (point))
+ (write-region start end
+ (setq signature-file (pgg-make-temp-file "vm-pgg-signature")))
+ (delete-region start end)
+ (setq start (point))
+ (vm-insert-region-from-buffer (marker-buffer (vm-mm-layout-header-start
+ message))
+ (vm-mm-layout-header-start message)
+ (vm-mm-layout-body-end message))
+ (setq end (point-marker))
+ (vm-pgg-make-crlf start end)
+ (setq status (pgg-verify-region start end signature-file
+ vm-pgg-fetch-missing-keys))
+ (delete-file signature-file)
+ (delete-region start end)
+ ;; now insert the content
+ (insert "\n")
+ (let ((start (point)) end)
+ (if (not status)
+ (progn
+ (vm-pgg-state-set 'error)
+ (insert-buffer-substring pgg-errors-buffer))
+ (vm-pgg-state-set 'verified)
+ (insert-buffer-substring
+ (if vm-fsfemacs-p pgg-errors-buffer pgg-output-buffer))
+ (vm-pgg-crlf-cleanup start (point)))
+ (setq end (point))
+ (put-text-property start end 'face
+ (if status 'vm-pgg-good-signature
+ 'vm-pgg-bad-signature)))
+ t))))
+
+;; we must add these in order to force VM to call our handler
+(eval-and-compile
+;; (if (listp vm-auto-displayed-mime-content-types)
+;; (add-to-list 'vm-auto-displayed-mime-content-types "application/pgp-keys"))
+ (if (listp vm-mime-internal-content-types)
+ (add-to-list 'vm-mime-internal-content-types "application/pgp-keys"))
+ (add-to-list 'vm-mime-button-format-alist
+ '("application/pgp-keys" . "Snarf %d"))
+ (add-to-list 'vm-mime-button-format-alist
+ '("multipart/encrypted" . "Decrypt PGP/MIME message")))
+
+(defun vm-pgg-mime-snarf-keys (button)
+ "Replace the BUTTON with the output from `pgg-snarf-keys'."
+ (let ((vm-pgg-auto-snarf t)
+ (layout (copy-sequence (vm-extent-property button 'vm-mime-layout))))
+ (vm-set-extent-property button 'vm-mime-disposable t)
+ (vm-set-extent-property button 'vm-mime-layout layout)
+ (goto-char (vm-extent-start-position button))
+ (let ((buffer-read-only nil))
+ (vm-decode-mime-layout button t))))
+
+;;; ###autoload
+(defun vm-mime-display-internal-application/pgp-keys (layout)
+ "Snarf keys in LAYOUT and display result of snarfing."
+ (vm-pgg-state-set 'public-key)
+ ;; insert the keys
+ (if vm-pgg-auto-snarf
+ (let ((start (point)) end status)
+ (vm-mime-insert-mime-body layout)
+ (setq end (point-marker))
+ (vm-mime-transfer-decode-region layout start end)
+ (save-excursion
+ (setq status (pgg-snarf-keys-region start end)))
+ (delete-region start end)
+ ;; now insert the result of snafing
+ (if status
+ (insert-buffer-substring pgg-output-buffer)
+ (insert-buffer-substring pgg-errors-buffer)))
+ (let ((buffer-read-only nil))
+ (vm-mime-insert-button
+ (vm-mime-sprintf (vm-mime-find-format-for-layout layout) layout)
+ 'vm-pgg-mime-snarf-keys
+ layout nil)))
+ t)
+
+;;; ###autoload
+(defun vm-pgg-snarf-keys ()
+ "*Snarf keys from the current message."
+ (interactive)
+ (if (interactive-p)
+ (vm-follow-summary-cursor))
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-error-if-folder-empty)
+ (save-restriction
+ ;; ensure we are in the right buffer
+ (if vm-presentation-buffer
+ (set-buffer vm-presentation-buffer))
+ ;; skip headers
+ (goto-char (point-min))
+ (search-forward "\n\n")
+ (goto-char (match-end 0))
+ ;; verify
+ (unless (pgg-snarf-keys)
+ (error "Snarfing failed"))
+ (save-excursion
+ (set-buffer (if vm-fsfemacs-p pgg-errors-buffer pgg-output-buffer))
+ (message (buffer-substring (point-min) (point-max))))))
+
+;;; ###autoload
+(defun vm-pgg-attach-public-key ()
+ "Attach your public key to a composition."
+ (interactive)
+ (let* ((pgg-default-user-id
+ (or
+ (and vm-pgg-get-author-headers (vm-pgg-get-author))
+ pgg-default-user-id))
+ (description (concat "public key of " pgg-default-user-id))
+ (buffer (get-buffer-create (concat " *" description "*")))
+ start)
+ (save-excursion
+ (set-buffer buffer)
+ (erase-buffer)
+ (setq start (point))
+ (pgg-insert-key)
+ (if (= start (point))
+ (error "%s has no public key!" pgg-default-user-id)))
+ (save-excursion
+ (goto-char (point-max))
+ (insert "\n")
+ (setq start (point))
+ (vm-mime-attach-object buffer
+ "application/pgp-keys"
+ (list (concat "name=\"" pgg-default-user-id ".asc\""))
+ description
+ nil)
+ ;; a crude hack to set the disposition
+ (let ((disposition (list "attachment"
+ (concat "filename=\"" pgg-default-user-id ".asc\"")))
+ (end (point)))
+ (if (featurep 'xemacs)
+ (set-extent-property (extent-at start nil 'vm-mime-disposition)
+ 'vm-mime-disposition disposition)
+ (put-text-property start end 'vm-mime-disposition disposition))))))
+
+(defun vm-pgg-make-multipart-boundary (word)
+ "Create a mime part boundery starting with WORD and return it.
+
+We cannot use `vm-mime-make-multipart-boundary' as it uses the current time as
+seed and thus creates the same boundery when called twice in a short period."
+ (if word (setq word (concat word "+")))
+ (let ((boundary (concat word (make-string 15 ?a)))
+ (i (length word)))
+ (random)
+ (while (< i (length boundary))
+ (aset boundary i (aref vm-mime-base64-alphabet
+ (% (vm-abs (lsh (random) -8))
+ (length vm-mime-base64-alphabet))))
+ (vm-increment i))
+ boundary))
+
+(defun vm-pgg-save-work (function &rest args)
+ "Call FUNCTION with ARGS without messing up the composition in case of an error."
+ (let ((composition-buffer (current-buffer))
+ (undo-list-backup buffer-undo-list)
+ (work-buffer (get-buffer-create " *VM-PGG-WORK*")))
+ (save-excursion
+ (set-buffer work-buffer)
+ (buffer-disable-undo)
+ (erase-buffer)
+ (insert-buffer-substring composition-buffer)
+ (setq major-mode 'mail-mode)
+ (apply function args))
+ (erase-buffer)
+ (insert-buffer-substring work-buffer)
+ (kill-buffer work-buffer)))
+
+;;; ###autoload
+(defun vm-pgg-sign ()
+ "Sign the composition with PGP/MIME.
+
+If the composition is not encoded so far, it is encoded before signing.
+Signing of already encoded messages is discouraged.
+
+RFC 2015 and its successor 3156 forbid the use of 8bit encoding for signed
+messages, but require to use quoted-printable or base64 instead. Also lines
+starting with \"From \" cause trouble and should be quoted.
+
+Thus signing of encoded messages may cause an error. To avoid this you must
+set `vm-mime-8bit-text-transfer-encoding' to something different than 8bit and
+`vm-mime-composition-armor-from-lines' to t.
+
+The transfer encoding done by `vm-pgg-sign' can be controlled by the variable
+`vm-pgg-sign-text-transfer-encoding'."
+ (interactive)
+
+ (when (vm-mail-mode-get-header-contents "MIME-Version:")
+ ;; do a simple sanity check ... too simple as we should walk the MIME part
+ ;; hierarchy and only check the MIME headers ...
+ (goto-char (point-min))
+ (when (re-search-forward "Content-Transfer-Encoding:\\s-*8bit" nil t)
+ (describe-function 'vm-pgg-sign)
+ (error "Signing is broken for 8bit encoding!"))
+ (goto-char (point-min))
+ (when (re-search-forward "^From\\s-+" nil t)
+ (describe-function 'vm-pgg-sign)
+ (error "Signing is broken for lines starting with \"From \"!")))
+
+ (vm-pgg-save-work 'vm-pgg-sign-internal))
+
+(defun vm-pgg-sign-internal ()
+ "Do the signing."
+ ;; prepare composition
+ (let ((vm-mime-8bit-text-transfer-encoding
+ vm-pgg-sign-text-transfer-encoding)
+ (vm-mime-composition-armor-from-lines t))
+ (vm-pgp-prepare-composition))
+
+ (let ((content-type (vm-mail-mode-get-header-contents "Content-Type:"))
+ (encoding (vm-mail-mode-get-header-contents "Content-Transfer-Encoding:"))
+ (boundary (vm-pgg-make-multipart-boundary "pgp+signed"))
+ (pgg-text-mode t) ;; For GNU Emacs PGG
+ (micalg "sha1")
+ entry
+ body-start)
+ ;; fix the body
+ (setq body-start (vm-marker (vm-pgp-goto-body-start)))
+ (insert "Content-Type: " (or content-type "text/plain") "\n")
+ (insert "Content-Transfer-Encoding: " (or encoding "7bit") "\n")
+ (if (not (looking-at "\n"))
+ (insert "\n"))
+ ;; now create the signature
+ (save-excursion
+ ;; BUGME do we need the CRLF conversion?
+; (vm-pgg-make-crlf (point) (point-max))
+ (unless (pgg-sign-region body-start (point-max) nil)
+ (pop-to-buffer pgg-errors-buffer)
+ (error "Signing error"))
+ (and (setq entry (assq 2 (pgg-parse-armor
+ (with-current-buffer pgg-output-buffer
+ (buffer-string)))))
+ (setq entry (assq 'hash-algorithm (cdr entry)))
+ (if (cdr entry)
+ (setq micalg (downcase (format "%s" (cdr entry)))))))
+ ;; insert mime part bounderies
+ (goto-char body-start)
+ (insert "This is an OpenPGP/MIME signed message (RFC 2440 and 3156)\n")
+ (insert "--" boundary "\n")
+ (goto-char (point-max))
+ (insert "\n--" boundary "\n")
+ ;; insert the signature
+ (insert "Content-Type: application/pgp-signature\n\n")
+ (goto-char (point-max))
+ (insert-buffer-substring pgg-output-buffer)
+ (insert "\n--" boundary "--\n")
+ ;; fix the headers
+ (vm-mail-mode-remove-header "MIME-Version:")
+ (vm-mail-mode-remove-header "Content-Type:")
+ (vm-mail-mode-remove-header "Content-Transfer-Encoding:")
+ (mail-position-on-field "MIME-Version")
+ (insert "1.0")
+ (mail-position-on-field "Content-Type")
+ (insert "multipart/signed; boundary=\"" boundary "\";\n"
+ "\tmicalg=pgg-" micalg "; protocol=\"application/pgp-signature\"")))
+
+;;; ###autoload
+(defun vm-pgg-encrypt (&optional sign)
+ "Encrypt the composition as PGP/MIME. With a prefix arg SIGN also sign it."
+ (interactive "P")
+ (vm-pgg-save-work 'vm-pgg-encrypt-internal sign))
+
+(defun vm-pgg-encrypt-internal (sign)
+ "Do the encrypting, if SIGN is t also sign it."
+ (unless (vm-mail-mode-get-header-contents "MIME-Version:")
+ (vm-mime-encode-composition))
+ (let ((content-type (vm-mail-mode-get-header-contents "Content-Type:"))
+ (encoding (vm-mail-mode-get-header-contents "Content-Transfer-Encoding:"))
+ (boundary (vm-pgg-make-multipart-boundary "pgp+encrypted"))
+ (pgg-text-mode t) ;; For GNU Emacs PGG
+ body-start)
+ ;; fix the body
+ (setq body-start (vm-marker (vm-pgp-goto-body-start)))
+ (insert "Content-Type: " (or content-type "text/plain") "\n")
+ (insert "Content-Transfer-Encoding: " (or encoding "7bit") "\n")
+ (insert "\n")
+ (goto-char (point-max))
+ (insert "\n")
+ (vm-pgg-cleartext-encrypt sign)
+ (goto-char body-start)
+ (insert "This is an OpenPGP/MIME encrypted message (RFC 2440 and 3156)\n")
+ (insert "--" boundary "\n")
+ (insert "Content-Type: application/pgp-encrypted\n\n")
+ (insert "Version: 1\n\n")
+ (insert "--" boundary "\n")
+ (insert "Content-Type: application/octet-stream\n\n")
+ (goto-char (point-max))
+ (insert "\n--" boundary "--\n")
+ ;; fix the headers
+ (vm-mail-mode-remove-header "MIME-Version:")
+ (vm-mail-mode-remove-header "Content-Type:")
+ (vm-mail-mode-remove-header "Content-Transfer-Encoding:")
+ (mail-position-on-field "MIME-Version")
+ (insert "1.0")
+ (mail-position-on-field "Content-Type")
+ (insert "multipart/encrypted; boundary=\"" boundary "\";\n"
+ "\tprotocol=\"application/pgp-encrypted\"")))
+
+(defun vm-pgg-sign-and-encrypt ()
+ "*Sign and encrypt the composition as PGP/MIME."
+ (interactive)
+ (vm-pgg-encrypt t))
+
+(defvar vm-pgg-prompt-last-action nil
+ "The action last taken in `vm-pgg-prompt-for-action'.")
+
+(defvar vm-pgg-prompt-action-alist
+ '((?s sign "Sign")
+ (?e encrypt "encrypt")
+ (?E sign-and-encrypt "both")
+ (?n nil "nothing")
+ (?q quit "quit"))
+ "Alist of (KEY ACTION LABEL) elements.")
+
+(defun vm-pgg-prompt-for-action ()
+ "Prompt for an action and return it. See also `vm-pgg-prompt-action-alist'."
+ (interactive)
+ (let (prompt event action)
+ (setq prompt (mapconcat (lambda (a)
+ (format "%s (%c)" (nth 2 a) (car a)))
+ vm-pgg-prompt-action-alist ", ")
+ action (mapcar (lambda (a)
+ (if (eq (nth 1 a)
+ vm-pgg-prompt-last-action)
+ (downcase (nth 2 a))))
+ vm-pgg-prompt-action-alist)
+ prompt (format "%s (default %s)?"
+ prompt
+ (car (delete nil action)))
+ action nil)
+ (while (not event)
+ (setq event (read-key-sequence prompt))
+ (if (featurep 'xemacs)
+ (setq event (event-to-character (aref event 0)))
+ (setq event (if (stringp event) (aref event 0))))
+ (if (eq event ?\r)
+ (setq action vm-pgg-prompt-last-action)
+ (setq action (assoc event vm-pgg-prompt-action-alist))
+ (if action
+ (setq action (nth 1 action))
+ (setq event nil))))
+ (when (eq action 'quit)
+ (error "Sending aborted!"))
+ (if action
+ (message "Action is %s." action)
+ (message "No action selected."))
+ (setq vm-pgg-prompt-last-action action)
+ action))
+
+;;; ###autoload
+(defun vm-pgg-ask-hook ()
+ "Hook to automatically ask for signing or encrypting outgoing messages with PGP/MIME.
+
+Put this function into `vm-mail-send-hook' to be asked each time you
+send a message whether or not you want to sign or encrypt the
+message. See `vm-pgg-ask-function' to determine which function is
+proposed.
+
+This hook should probably be the last of your hooks if you have several
+other functions there. Signing crucially relies on the fact that the
+message is not altered afterwards. To put it into `vm-mail-send-hook'
+put something like
+
+ (add-hook 'vm-mail-send-hook 'vm-pgg-ask-hook t)
+
+into your VM init file."
+ (interactive)
+
+ ;; ensure we are the last hook
+ (when (and (member 'vm-pgg-ask-hook vm-mail-send-hook)
+ (cdr (member 'vm-pgg-ask-hook vm-mail-send-hook)))
+ (describe-function 'vm-pgg-ask-hook)
+ (error "`vm-pgg-ask-function' must be the last hook in `vm-mail-send-hook'!"))
+
+ (let ((handler vm-pgg-ask-function)
+ action)
+ (when handler
+ (setq action (if (fboundp handler)
+ (funcall handler)
+ (if (y-or-n-p (format "%s the composition? " handler))
+ handler)))
+ (when action
+ (funcall (intern (format "vm-pgg-%s" action)))))))
+
+(provide 'vm-pgg)
+
+;;; vm-pgg.el ends here
diff --git a/lisp/vm-pine.el b/lisp/vm-pine.el
new file mode 100644
index 0000000..c0033c6
--- /dev/null
+++ b/lisp/vm-pine.el
@@ -0,0 +1,1245 @@
+;;; vm-pine.el --- draft handling and other neat functions for VM
+;;
+;; Copyright (C) 1998-2006 Robert Fenk
+;;
+;; Author: Robert Fenk
+;; Status: Tested with XEmacs 21.4.19 & VM 7.19
+;; Keywords: vm draft handling
+;; X-URL: http://www.robf.de/Hacking/elisp
+;; Version: $Id$
+
+;;
+;; This code is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 1, or (at your option)
+;; any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+;;
+;;; Commentary:
+;;
+;; This package provides the following new features for VM:
+;;
+;; A Pine-like postpone message function and folder. There are two new
+;; functions. `vm-postpone-message' bound to [C-c C-d] in
+;; the `vm-mail-mode' and the function `vm-continue-postponed-message'
+;; is bound to [C] in a folder buffer.
+;;
+;; Typical usage: If you are writing a mail message, and you wish to
+;; postpone it for a while, hit C-c C-d. The message will be saved in
+;; a folder called "postponed" by default. Later, when you wish to
+;; resume editing that file, visit the "postponed" folder, find the
+;; message you wish to continue editing, and then hit C to resume
+;; editing.
+;;
+;; Furthermore, this facility can be configured, using
+;; `vm-continue-what-message' to imitate Pine's message composing.
+;; You can set `vm-mode-map' in the following way to get Pine-like
+;; behaviour:
+;;
+;; (define-key vm-mode-map "m" 'vm-continue-what-message)
+;; (setq vm-zero-drafts-start-compose t)
+;;
+;; If you have postponed messages you will be asked if you want to continue
+;; composing them, if you say "yes" you will visit the `vm-postponed-folder'
+;; and you can select the message you would like to continue and press "m"
+;; again! However be aware this works currently only if you expunge all
+;; messages marked for deletion and save the postponed folder.
+;;
+;; You can also bind it to "C-x m" in order to check for postponed messages
+;; when composing a message without starting VM.
+;;
+;; (autoload 'vm-continue-what-message-other-window "vm-pine" "" t)
+;; (global-set-key "\C-xm" 'vm-continue-what-message-other-window)
+;;
+;;
+;; Three new mail header insertion functions make life easier. The
+;; bindings and names are:
+;; "\C-c\C-f\C-a" vm-mail-return-receipt-to
+;; "\C-c\C-f\C-p" vm-mail-priority
+;; "\C-c\C-f\C-f" vm-mail-fcc
+;; The variables `vm-mail-return-receipt-to' and `vm-mail-priority'
+;; can be used to configure the inserted headers.
+;; `vm-mail-fcc' can be configured by setting the variable
+;; `vm-mail-folder-alist' which has the same syntax and default
+;; value as `vm-auto-folder-alist'.
+;; You may also add `vm-mail-auto-fcc' to `vm-reply-hook' in order to
+;; automatically setup the FCC header according to the variable
+;; `vm-mail-folder-alist'.
+;; There is another fcc-function `vm-mail-to-fcc' which set the FCC
+;; according to the recipients email-address.
+;;
+;;; Bug reports and feature requests:
+;; Please send a backtrace and the version number of vm-pine.el!
+;; Feature requests are welcome!
+
+;;; Code:
+
+;; Attempt to handle older/other emacs.
+(eval-and-compile
+ (require 'vm-version)
+ (require 'vm-message)
+ (require 'vm-macro)
+ (require 'vm-vars))
+
+(eval-when-compile
+ (require 'cl))
+
+(if (not (boundp 'user-mail-address))
+ (if (functionp 'user-mail-address)
+ (setq user-mail-address (user-mail-address))
+ (setq user-mail-address "unknown")
+ (message "Please set the variable `user-mail-address'!!!")
+ (sit-for 2)))
+
+(defgroup vm nil
+ "VM"
+ :group 'mail)
+
+(defgroup vm-pine nil
+ "Pine inspired extensions to VM."
+ :group 'vm)
+
+;;-----------------------------------------------------------------------------
+;;;###autoload
+(defun vm-summary-function-f (m)
+ "Return the recipient or newsgroup for uninteresting senders.
+If the \"From:\" header contains the user login or full name then
+this function returns the \"To:\" or \"Newsgroups:\" header field with a
+\"To:\" as prefix.
+
+For example the outgoing message box will now list to whom you sent the
+messages. Use `vm-fix-summary!!!' to update the summary of a folder! With
+loaded BBDB it uses `vm-summary-function-B' to obtain the full name of the
+sender. The only difference to VMs default behavior is the honoring of
+messages sent to news groups. ;c)
+
+See also: `vm-summary-uninteresting-senders'"
+ (interactive)
+ (let ((case-fold-search t)
+ (headers '(("From:" "")
+ ("Newsgroups:" "News:")
+ "To:" "CC:" "BCC:"
+ "Resent-To:" "Resent-CC:" "Resent-BCC:"
+ ("Sender:" "") ("Resent-From:" "Resent:")))
+ header-name arrow
+ addresses
+ address
+ first)
+
+ (while (and (not address) headers)
+ (if (listp (car headers))
+ (setq header-name (caar headers) arrow (cadar headers))
+ (setq header-name (car headers) arrow (concat header-name " ")))
+ (setq addresses (vm-get-header-contents m header-name))
+ (if addresses
+ (setq addresses (vm-decode-mime-encoded-words-in-string addresses)
+ addresses
+ (or (if (functionp 'bbdb-extract-address-components)
+ (bbdb-extract-address-components addresses t))
+ (list (mail-extract-address-components addresses))
+ addresses)))
+ (if (not first) (setq first (car addresses)))
+ (while addresses
+ (if (or (not vm-summary-uninteresting-senders)
+ (and vm-summary-uninteresting-senders
+ (not (string-match vm-summary-uninteresting-senders
+ (format "%s" (car addresses))))))
+ (setq address (car addresses) addresses nil))
+ (setq addresses (cdr addresses)))
+ (setq headers (cdr headers)))
+
+ (if (and (null address) (null first))
+ ""
+ (if (and (null address) first)
+ (setq address first))
+ (concat arrow
+ (cond ((functionp 'bbdb/vm-alternate-full-name)
+ (or (bbdb/vm-alternate-full-name (cadr address))
+ (car address)
+ (cadr address)))
+ (t (or (car address) (cadr address))))))))
+
+;;-----------------------------------------------------------------------------
+;;;###autoload
+(defcustom vm-postponed-header "X-VM-postponed-data: "
+ "Additional header which is inserted to postponed messages.
+It is used for internal things and should not be modified.
+It is a lisp list which currently contains the following items:
+ <date of the postponing>
+ <reply references list>
+ <forward references list>
+ <redistribute references list>
+while the last three are set by `vm-get-persistent-message-ids-for'."
+ :type 'string
+ :group 'vm-pine)
+
+;;;###autoload
+(defcustom vm-postponed-attribute "P"
+ "Summary string that will be inserted by `vm-summary-function-p' for
+postponed messages."
+ :type 'string
+ :group 'vm-pine)
+
+;;;###autoload
+(defun vm-summary-function-p (m)
+ "Return 'P' for postponed messages."
+ (interactive)
+ (if (vm-get-header-contents m vm-postponed-header)
+ "P"
+ ""))
+
+;;-----------------------------------------------------------------------------
+;; A Pine-like postponed folder handling
+;;;###autoload
+(defcustom vm-postponed-folder "postponed"
+ "The name of the folder where postponed messages are saved."
+ :type 'string
+ :group 'vm-pine)
+
+;;;###autoload
+(defcustom vm-postponed-message-headers '("From:" "Organization:"
+ "Reply-To:"
+ "To:" "Newsgroups:"
+ "CC:" "BCC:" "FCC:"
+ "In-Reply-To:"
+ "References:"
+ "Subject:"
+ "X-Priority:" "Priority:")
+ "Similar to `vm-forwarded-headers'.
+A list of headers that should be kept, when continuing a postponed message.
+
+The following mime headers should not be kept, since this breaks things:
+Mime-Version, Content-Type, Content-Transfer-Encoding."
+ :type '(repeat (string))
+ :group 'vm-pine)
+
+;;;###autoload
+(defcustom vm-postponed-message-discard-header-regexp nil
+ "Similar to `vm-unforwarded-header-regexp'.
+A regular expression matching all headers that should be discard when
+when continuing a postponed message."
+ :type 'regexp
+ :group 'vm-pine)
+
+;;;###autoload
+(defcustom vm-continue-postponed-message-hook nil
+ "List of hook functions to be run after continuing a postponed message."
+ :type 'hook
+ :group 'vm-pine)
+
+;;;###autoload
+(defcustom vm-postpone-message-hook nil
+ "List of hook functions to be run before postponing a message."
+ :type 'hook
+ :group 'vm-pine)
+
+(defvar vm-postponed-message-folder-buffer nil
+ "Buffer of source folder.
+This is only for internal use of vm-pine.el!!!")
+
+;;-----------------------------------------------------------------------------
+(define-key vm-mode-map "C" 'vm-continue-what-message)
+
+;;-----------------------------------------------------------------------------
+(defun vm-get-persistent-message-ids-for (mlist)
+ "Return a list of message id and folder name of all messages in MLIST."
+ (let (mp midlist folder mid f)
+ (while mlist
+ (setq mp (car mlist)
+ folder (buffer-file-name (vm-buffer-of (vm-real-message-of mp)))
+ mid (vm-message-id-of mp)
+ f (assoc folder midlist))
+ (if mid
+ (if f
+ (setcdr f (cons mid (cdr f)))
+ (add-to-list 'midlist (list folder mid))))
+ (setq mlist (cdr mlist)))
+ midlist))
+
+(defun vm-get-message-pointers-for (msgidlist)
+ "Return the message pointers belonging to the messages listed in MSGIDLIST.
+MSGIDLIST is a list as returned by `vm-get-persistent-message-ids-for'."
+ (let (folder vm-message-pointers)
+ (while msgidlist
+ (setq folder (caar msgidlist))
+ (save-excursion
+ (when (cond ((get-buffer folder)
+ (set-buffer (get-buffer folder)))
+ ((get-file-buffer folder)
+ (set-buffer (get-file-buffer folder)))
+ ((file-exists-p folder)
+ (vm-visit-folder folder))
+ (t
+ (message "The folder '%s' does not exist anymore. Maybe it was virtual or closed before postponing." folder)
+ nil))
+ (vm-select-folder-buffer)
+ (save-restriction
+ (widen)
+ (goto-char (point-min))
+ (let ((msgid-regexp (concat "^Message-Id:\\s-*"
+ (regexp-opt (cdar msgidlist))))
+ (point-max (point-max))
+ (case-fold-search t))
+
+ (while (re-search-forward msgid-regexp point-max t)
+ (let ((point (point))
+ (mp vm-message-list))
+ (while mp
+ (if (and (>= point (vm-start-of (car mp)))
+ (<= point (vm-end-of (car mp))))
+ (setq vm-message-pointers (cons (car mp)
+ vm-message-pointers)
+ mp nil)
+ (setq mp (cdr mp)))))))))
+ (setq msgidlist (cdr msgidlist))))
+ vm-message-pointers))
+
+;;-----------------------------------------------------------------------------
+;;;###autoload
+(defun vm-continue-postponed-message (&optional silent)
+ "Continue composing of the currently selected message.
+Before continuing the composition you may decode the presentation as
+you like, by pressing [D] and viewing part of the message!
+Then current message is copied to a new buffer and the vm-mail-mode is
+entered. When every thing is finished the hook functions in
+`vm-mail-mode-hook' and `vm-continue-postponed-message-hook' are
+executed. When called with a prefix argument it will not switch to
+the composition buffer, this may be used for automatic editing of
+messages.
+
+The variables `vm-postponed-message-headers' and
+`vm-postponed-message-discard-header-regexp' control which
+headers are copied to the composition buffer.
+
+In `vm-mail-mode' this is bound to [C].
+If optional argument SILENT is positive then act in background (no frame
+creation)."
+ (interactive "P")
+
+ (vm-session-initialization)
+ (vm-follow-summary-cursor)
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-check-for-killed-presentation)
+ (vm-error-if-folder-empty)
+
+ (if (eq vm-system-state 'previewing)
+ (vm-show-current-message))
+
+ (save-restriction
+ (widen)
+ (let* ((folder-buffer (current-buffer))
+ (presentation-buffer vm-presentation-buffer)
+ (vmp vm-message-pointer)
+ (is-decoded vm-mime-decoded)
+ (hstart (vm-headers-of (car vmp)))
+ (tstart (vm-text-of (car vmp)))
+ (tend (- (vm-end-of (car vmp)) 1))
+ (to (format "mail to %s" (vm-get-header-contents (car vmp)
+ "To:" ",")))
+ (vm-pp-data (vm-get-header-contents (car vmp)
+ vm-postponed-header)))
+
+ ;; Prepare the composition buffer
+ (if (and to (string-match "[^,\n<(]+" to))
+ (setq to (match-string 0 to)))
+
+ (if (not silent)
+ (let ((vm-mail-hook nil)
+ (vm-mail-mode-hook nil)
+ (this-command 'vm-mail))
+ (vm-mail-internal to))
+ (set-buffer (generate-new-buffer to))
+ (setq default-directory (expand-file-name
+ (or vm-folder-directory "~/")))
+ (auto-save-mode (if auto-save-default 1 -1))
+ (let ((mail-mode-hook nil)
+ (mail-setup-hook nil))
+ (mail-mode))
+ (setq vm-mail-buffer folder-buffer))
+
+ (make-local-variable 'vm-postponed-message-folder-buffer)
+ (setq vm-postponed-message-folder-buffer
+ (vm-buffer-of (vm-real-message-of (car vmp))))
+ (make-local-variable 'vm-message-pointer)
+ (setq vm-message-pointer vmp)
+ (make-local-hook 'mail-send-hook)
+ (add-hook 'mail-send-hook 'vm-delete-postponed-message t t)
+ (erase-buffer)
+
+ ;; set the VM variables for setting source message attributes
+ (when vm-pp-data
+ (make-local-variable 'vm-reply-list)
+ (make-local-variable 'vm-forward-list)
+ (make-local-variable 'vm-redistribute-list)
+ (setq vm-pp-data (read vm-pp-data)
+ vm-reply-list
+ (and (nth 1 vm-pp-data) (vm-get-message-pointers-for (nth 1 vm-pp-data)))
+ vm-forward-list
+ (and (nth 2 vm-pp-data) (vm-get-message-pointers-for (nth 2 vm-pp-data)))
+ vm-redistribute-list
+ (and (nth 3 vm-pp-data) (vm-get-message-pointers-for (nth 3 vm-pp-data))))
+ (if vm-reply-list (setq vm-system-state 'replying))
+ (if vm-forward-list (setq vm-system-state 'forwarding))
+ (if vm-redistribute-list (setq vm-system-state 'redistributing)))
+
+ ;; Prepare headers
+ (insert-buffer-substring folder-buffer hstart tstart)
+ (goto-char (point-min))
+ (cond ((or (vm-mime-plain-message-p (car vmp)) is-decoded)
+ (vm-reorder-message-headers nil
+ vm-postponed-message-headers
+ vm-postponed-message-discard-header-regexp))
+ (t ; copy undecoded messages with mime headers
+ (vm-reorder-message-headers nil
+ (append '("MIME-Version:" "Content-type:")
+ vm-postponed-message-headers)
+ vm-postponed-message-discard-header-regexp)))
+ (vm-decode-mime-encoded-words)
+ (search-forward-regexp "\n\n")
+ (replace-match (concat "\n" mail-header-separator "\n") t t)
+
+ ;; Add message body as previewed
+ (goto-char (point-max))
+ (if presentation-buffer
+ ;; when using presentation buffer we have to
+ (save-excursion
+ (set-buffer presentation-buffer)
+ (goto-char (point-min))
+ (search-forward-regexp "\n\n")
+ (setq tstart (match-end 0)
+ tend (point-max)))
+ (setq presentation-buffer folder-buffer))
+
+ (insert-buffer-substring presentation-buffer tstart tend)
+ ;; in order to show headers hidden by vm-shrunken-headers
+ (put-text-property (point-min) (point-max) 'invisible nil)
+
+ ;; and add the buttons for attachments
+ (vm-decode-postponed-mime-message)))
+
+ (when (not silent)
+ (run-hooks 'mail-setup-hook)
+ (run-hooks 'vm-mail-hook)
+ (run-hooks 'vm-mail-mode-hook))
+
+ (run-hooks 'vm-continue-postponed-message-hook))
+
+;;-----------------------------------------------------------------------------
+;;;###autoload
+(defun vm-reply-by-continue-postponed-message ()
+ "Like `vm-reply' but preserves attachments."
+ (interactive)
+ (let ((vm-continue-postponed-message-hook)
+ (vm-reply-hook nil)
+ (vm-mail-mode-hook nil)
+ (mail-setup-hook nil)
+ (mail-signature nil)
+ reply-buffer
+ start end)
+ (vm-reply 1)
+ (save-excursion
+ (vm-continue-postponed-message t)
+ (goto-char (point-min))
+ (re-search-forward (regexp-quote mail-header-separator) (point-max))
+ (forward-char 1)
+ (setq reply-buffer (current-buffer)
+ start (point)
+ end (point-max)))
+ (goto-char (point-max))
+ (insert-buffer-substring reply-buffer start end)
+ (vm-add-reply-subject-prefix (car vm-message-pointer)))
+ (run-hooks 'mail-setup-hook)
+ (run-hooks 'vm-mail-hook)
+ (run-hooks 'vm-mail-mode-hook)
+ (run-hooks 'vm-reply-hook))
+
+;;-----------------------------------------------------------------------------
+(defun vm-delete-postponed-message ()
+ "Delete the source message belonging to the continued composition."
+ (interactive)
+ (if vm-message-pointer
+ (condition-case nil
+ (let* ((msg (car vm-message-pointer))
+ (buffer (vm-buffer-of msg)))
+ ;; only delete messages which have been postponed by us before
+ (when (vm-get-header-contents msg vm-postponed-header)
+ (vm-set-deleted-flag msg t)
+ (vm-update-summary-and-mode-line))
+ ;; in the postponded folder expunge them right now
+ (when (string= (buffer-name buffer)
+ (file-name-nondirectory vm-postponed-folder))
+ (if (frames-of-buffer buffer t)
+ (iconify-frame (car (frames-of-buffer buffer))))
+ (save-excursion
+ (switch-to-buffer buffer)
+ (vm-expunge-folder)
+ (vm-save-folder)
+ (when (not vm-message-list)
+ (let ((this-command 'vm-quit))
+ (vm-quit))))))
+ (error "Folder buffer closed before deletion of source message."))))
+
+;;-----------------------------------------------------------------------------
+(defun vm-decode-postponed-mime-message ()
+ "Replace the mime buttons by attachment buttons."
+ (interactive)
+ (cond (vm-xemacs-p
+ (let ((e-list (extent-list nil (point-min) (point-max))))
+ ;; First collect the extents
+ (setq e-list
+ (sort (vm-delete
+ (function (lambda (e)
+ (extent-property e 'vm-mime-layout)))
+ e-list t)
+ (function (lambda (e1 e2)
+ (< (extent-end-position e1)
+ (extent-end-position e2))))))
+ ;; Then replace the buttons, because doing it at once will result in
+ ;; problems since the new buttons are from the same extent.
+ (while e-list
+ (vm-decode-postponed-mime-button (car e-list))
+ (setq e-list (cdr e-list)))))
+ (vm-fsfemacs-p
+ (let ((o-list (vm-pine-fake-attachment-overlays (point-min)
+ (point-max))))
+ (setq o-list (sort (vm-delete
+ (function (lambda (o)
+ (overlay-get o 'vm-mime-layout)))
+ o-list t)
+ (function
+ (lambda (e1 e2)
+ (< (overlay-end e1)
+ (overlay-end e2))))))
+ (while o-list
+ (vm-decode-postponed-mime-button (car o-list))
+ (setq o-list (cdr o-list)))))
+ (t
+ (error "don't know how to MIME dencode composition for %s"
+ (emacs-version)))))
+
+(defun vm-pine-fake-attachment-overlays (start end)
+ (let ((o-list nil)
+ (done nil)
+ (pos start)
+ object props o)
+ (save-excursion
+ (save-restriction
+ (narrow-to-region start end)
+ (while (not done)
+ (setq object (get-text-property pos 'vm-mime-layout))
+ (setq pos (next-single-property-change pos 'vm-mime-layout))
+ (or pos (setq pos (point-max) done t))
+ (if object
+ (progn
+ (setq o (make-overlay start pos))
+ (overlay-put o 'insert-in-front-hooks
+ '(vm-disallow-overlay-endpoint-insertion))
+ (overlay-put o 'insert-behind-hooks
+ '(vm-disallow-overlay-endpoint-insertion))
+ (setq props (append (list 'vm-mime-object t)
+ (text-properties-at start)))
+ (while props
+ (overlay-put o (car props) (car (cdr props)))
+ (setq props (cdr (cdr props))))
+ (setq o-list (cons o o-list))))
+ (setq start pos))
+ o-list ))))
+
+;;-----------------------------------------------------------------------------
+(defun vm-decode-postponed-mime-button (x)
+ "Replace the mime button specified by X."
+
+ (save-excursion
+ (let (layout
+ xstart
+ xend)
+
+ (if vm-fsfemacs-p
+ (setq layout (overlay-get x 'vm-mime-layout)
+ xstart (overlay-start x)
+ xend (overlay-end x))
+ (setq layout (extent-property x 'vm-mime-layout)
+ xstart (extent-start-position x)
+ xend (extent-end-position x)))
+
+ (let* ((start (vm-mm-layout-header-start layout))
+ (end (vm-mm-layout-body-end layout))
+ (b (marker-buffer start))
+ (desc (or (vm-mm-layout-description layout)
+ "message body text"))
+ (disp (or (vm-mm-layout-disposition layout)
+ '("inline")))
+ (file (vm-mime-get-disposition-parameter layout "filename"))
+ filename
+ (type (vm-mm-layout-type layout)))
+
+ (if (and type
+ (string= (car type) "message/external-body")
+ (string= (cadr type) "access-type=local-file"))
+ (save-excursion
+ (setq filename (substring (caddr type) 5))
+ (vm-select-folder-buffer)
+ (save-restriction
+ (let ((start (vm-mm-layout-body-start layout))
+ (end (vm-mm-layout-body-end layout)))
+ (set-buffer (marker-buffer (vm-mm-layout-body-start layout)))
+ (widen)
+ (goto-char start)
+ (if (not (re-search-forward
+ "Content-Type: \"?\\([^ ;\" \n\t]+\\)\"?;?"
+ end t))
+ (error "No `Content-Type' header found in: %s"
+ (buffer-substring start end))
+ (setq type (list (match-string 1))))))))
+
+ ;; delete the mime-button
+ (goto-char xstart)
+ (delete-region xstart xend)
+ ;; and insert an attached-object-button
+ (if filename
+ (vm-mime-attach-file filename (car type))
+ (if file
+ (vm-mime-attach-object (list b start end disp file)
+ (car type) nil desc t)
+ (vm-mime-attach-object (list b start end disp)
+ (car type) nil desc t)))))))
+
+;;-----------------------------------------------------------------------------
+(define-key vm-mail-mode-map "\C-c\C-d" 'vm-postpone-message)
+
+(defvar vm-postpone-message-modes-to-disable
+ '(font-lock-mode ispell-minor-mode filladapt-mode auto-fill-mode)
+ "A list of modes to disable before postponing a message.")
+
+;;-----------------------------------------------------------------------------
+;;;###autoload
+(defun vm-postpone-message (&optional folder dont-kill no-postpone-header)
+ "Save the current composition as a draft.
+Before saving the composition the `vm-postpone-message-hook' functions
+are executed and it is written into the FOLDER `vm-postponed-folder'.
+When called with a prefix argument you will be asked for
+the folder.
+Optional argument DONT-KILL is positive, then do not kill source message."
+ (interactive "P")
+
+ (let ((message-buffer (current-buffer))
+ folder-buffer
+ target-type)
+
+ (let (m (modes vm-postpone-message-modes-to-disable))
+ (while modes
+ (setq m (car modes) modes (cdr modes))
+ (if (and (boundp m) (symbol-value m))
+ (funcall m 0))))
+
+ (if (and folder (not (stringp folder)))
+ (setq folder (vm-read-file-name
+ (format "Postpone to folder (%s): " vm-postponed-folder)
+ (or vm-folder-directory default-directory)
+ vm-postponed-folder nil nil
+ 'vm-folder-history)))
+
+ ;; there is no explicit folder given ...
+ (if (not folder)
+ (if vm-postponed-message-folder-buffer
+ (setq folder (buffer-file-name vm-postponed-message-folder-buffer))
+ (setq folder (expand-file-name vm-postponed-folder
+ (or vm-folder-directory
+ default-directory)))))
+
+ (if (not folder)
+ (error "I could not find a folder for postponing messages!"))
+
+ ;; if it is no absolute folder path then prepend the folder directory
+ (if (not (file-name-absolute-p folder))
+ (setq folder (expand-file-name folder
+ (or vm-folder-directory
+ default-directory))))
+
+ ;; Now add possibly missing headers
+ (goto-char (point-min))
+ (if (not (vm-mail-mode-get-header-contents "From:"))
+ (let* ((login user-mail-address)
+ (fullname (user-full-name)))
+ (cond ((and (eq mail-from-style 'angles) login fullname)
+ (insert (format "From: %s <%s>\n" fullname login)))
+ ((and (eq mail-from-style 'parens) login fullname)
+ (insert (format "From: %s (%s)\n" login fullname)))
+ (t
+ (insert (format "From: %s\n" login))))))
+
+ ;; mime-encode the message if necessary
+ (let ((vm-do-fcc-before-mime-encode nil))
+ (condition-case nil (vm-mime-encode-composition) (error t)))
+
+ ;; add the current date
+ (if (not (vm-mail-mode-get-header-contents "Date:"))
+ (insert "Date: "
+ (format-time-string "%a, %d %b %Y %H:%M:%S %Z"
+ (current-time))
+ "\n"))
+ ;; add the postponed header
+ (vm-mail-mode-remove-header vm-postponed-header)
+
+ (if no-postpone-header nil
+ (insert vm-postponed-header " "
+ (format
+ "(\"%s\" %S %S %S)\n"
+ (format-time-string "%a, %d %b %Y %T %Z" (current-time))
+ (vm-get-persistent-message-ids-for vm-reply-list)
+ (vm-get-persistent-message-ids-for vm-forward-list)
+ (vm-get-persistent-message-ids-for vm-redistribute-list))))
+
+ ;; ensure that the message ends with an empty line!
+ (goto-char (point-max))
+ (skip-chars-backward " \t\n")
+ (delete-region (point) (point-max))
+ (insert "\n\n\n")
+
+ ;; run the hooks
+ (run-hooks 'vm-postpone-message-hook)
+
+ ;; delete mail header separator
+ (goto-char (point-min))
+ (if (re-search-forward (regexp-quote mail-header-separator) nil t)
+ (delete-region (match-beginning 0) (match-end 0)))
+
+
+ (setq folder-buffer (vm-get-file-buffer folder))
+ (if folder-buffer
+ ;; o.k. the folder is already opened
+ (save-excursion
+ (set-buffer folder-buffer)
+ (vm-error-if-folder-read-only)
+ (let ((buffer-read-only nil))
+ (vm-save-restriction
+ (widen)
+ (goto-char (point-max))
+ (vm-write-string (current-buffer) (vm-leading-message-separator))
+ (insert-buffer-substring message-buffer)
+ (vm-write-string (current-buffer) (vm-trailing-message-separator))
+
+ (cond ((eq major-mode 'vm-mode)
+ (vm-increment vm-messages-not-on-disk)
+ (vm-clear-modification-flag-undos)))
+
+ (vm-check-for-killed-summary)
+ (vm-assimilate-new-messages)
+ (vm-update-summary-and-mode-line))))
+ ;; well the folder is not visited, so we write to the file
+ (setq target-type (or (vm-get-folder-type folder)
+ vm-default-folder-type))
+
+ (if (eq target-type 'unknown)
+ (error "Folder `%s' type is unrecognized" folder))
+
+ (vm-write-string folder (vm-leading-message-separator target-type))
+ (write-region (point-min) (point-max) folder t 'quiet)
+ (vm-write-string folder (vm-trailing-message-separator target-type)))
+
+ ;; delete source message
+ (vm-delete-postponed-message)
+
+ ;; mess arounf with the window configuration
+ (let ((b (current-buffer))
+ (this-command 'vm-mail-send-and-exit))
+ (cond ((null (buffer-name b));; dead buffer
+ ;; This improves window configuration behavior in
+ ;; XEmacs. It avoids taking the folder buffer from
+ ;; one frame and attaching it to the selected frame.
+ (set-buffer (window-buffer (selected-window)))
+ (vm-display nil nil '(vm-mail-send-and-exit)
+ '(vm-mail-send-and-exit
+ reading-message
+ startup)))
+ (t
+ (vm-display b nil '(vm-mail-send-and-exit)
+ '(vm-mail-send-and-exit reading-message startup)))))
+
+ ;; and kill this buffer?
+ (if dont-kill
+ (insert (concat "FCC: " folder "\n" mail-header-separator))
+ (kill-this-buffer))
+
+ (if (interactive-p)
+ (message "Message postponed to folder `%s'" folder))))
+
+;;-----------------------------------------------------------------------------
+(defun vm-buffer-in-vm-mode ()
+ (member major-mode '(vm-mode vm-virtual-mode
+ vm-presentation-mode
+ vm-summary-mode
+ vm-mail-mode)))
+
+(defcustom vm-continue-what-message 'ask
+ "Whether to never continue, ask or always continue postponed messages."
+ :type '(choice (const :tag "never" nil)
+ (const ask)
+ (const continue))
+ :group 'vm-pine)
+
+(defcustom vm-zero-drafts-start-compose nil
+ "When t and there are no drafts, `vm-continue-what-message' call `vm-mail'."
+ :type '(choice (const :tag "do nothing" nil)
+ (const :tag "start new message" t))
+ :group 'vm-pine)
+
+(defun vm-continue-what-message-composing ()
+ "Decide whether to compose a new message or continue a draft.
+This checks if the postponed folder contains drafts.
+Drafts in other folders are not recognized!"
+ (save-excursion
+ (vm-session-initialization)
+
+ (let* ((ppfolder (and vm-postponed-folder
+ (expand-file-name vm-postponed-folder
+ (or vm-folder-directory
+ default-directory))))
+ action
+ buffer)
+
+ (when current-prefix-arg
+ (setq action 'force-continue))
+
+ (when (vm-find-composition-buffer)
+ (setq action 'continue))
+
+ ;; postponed message in current folder
+ (when (vm-buffer-in-vm-mode)
+ (vm-check-for-killed-folder)
+ (vm-select-folder-buffer)
+
+ (if (and vm-message-pointer
+ (vm-get-header-contents (vm-real-message-of
+ (car vm-message-pointer))
+ (regexp-quote vm-postponed-header))
+ (not (vm-deleted-flag (car vm-message-pointer))))
+ (setq action 'continue)))
+
+ ;; postponed message in postponed folder
+ (when (and (not action) (setq buffer (vm-get-file-buffer ppfolder)))
+ (if (and (get-buffer-window-list buffer nil 0))
+ (when (save-excursion
+ (set-buffer buffer)
+ (not (vm-deleted-flag (car vm-message-pointer))))
+ (message "Please select a draft!")
+ (select-window (car (get-buffer-window-list buffer nil 0)))
+ (if (frames-of-buffer buffer)
+ (deiconify-frame (car (frames-of-buffer buffer))))
+ (setq action 'none))
+ (setq action 'visit)))
+
+ ;; visit postponed folder
+ (when (and (not action) (file-exists-p ppfolder)
+ (> (nth 7 (file-attributes ppfolder)) 0))
+ (setq action 'visit))
+
+ (if (not action) (setq action 'new))
+
+ ;; decide what to do
+ (setq action
+ (cond ((eq vm-continue-what-message nil)
+ 'new)
+ ((eq vm-continue-what-message 'ask)
+ (if (equal action 'visit)
+ (if (y-or-n-p
+ "Continue composition of postponed messages? ")
+ 'visit
+ 'new)
+ action))
+ ((eq vm-continue-what-message 'continue)
+ action)
+ (t
+ action))))))
+
+;;;###autoload
+(defun vm-continue-what-message (&optional where)
+ "Continue compositions or postponed messages if there are some.
+
+With a prefix arg, call `vm-continue-postponed-message', i.e. continue the
+currently selected message.
+
+See `vm-continue-what-message' and `vm-zero-drafts-start-compose' for
+configuration."
+ (interactive)
+ (if where (setq where (concat "-" where)))
+ (let ((action (vm-continue-what-message-composing))
+ (visit (intern (concat "vm-visit-folder" (or where ""))))
+ (mail (intern (concat "vm-mail" (or where "")))))
+ (cond ((equal action 'force-continue)
+ (vm-continue-postponed-message))
+ ((equal action 'continue)
+ (if (vm-find-composition-buffer)
+ (vm-continue-composing-message)
+ (vm-continue-postponed-message)))
+ ((equal action 'visit)
+ (funcall visit vm-postponed-folder)
+ (vm-select-folder-buffer)
+ (make-local-hook 'vm-quit-hook)
+ (add-hook 'vm-quit-hook 'vm-expunge-folder nil t)
+ (vm-expunge-folder)
+ (cond ((= (length vm-message-list) 0)
+ (let ((this-command 'vm-quit))
+ (vm-quit))
+ (let ((this-command mail))
+ (funcall mail)))
+ ((= (length vm-message-list) 1)
+ (vm-continue-postponed-message))))
+ ((and vm-zero-drafts-start-compose (equal action 'new))
+ (let ((this-command mail))
+ (funcall mail)))
+ (t
+ (message "There are no known drafts.")))))
+
+;;;###autoload
+(defun vm-continue-what-message-other-window ()
+ "Ask for continuing of postponed messages if there are some."
+ (interactive)
+ (vm-continue-what-message "other-window"))
+
+;;;###autoload
+(defun vm-continue-what-message-other-frame ()
+ "Ask for continuing of postponed messages if there are some."
+ (interactive)
+ (vm-continue-what-message "other-frame"))
+
+;;-----------------------------------------------------------------------------
+;; And now do some cool stuff when killing a mail buffer
+;; This was inspired by Uwe Brauer
+(defcustom vm-save-killed-message
+ 'ask
+ "How `vm-save-killed-message-hook' handles saving of a mail as a draft.
+If set to 'ask it will ask whether to save the mail as draft or not.
+If set to 'always it will save without asking.
+If set to nil it will never save them nor it will ask."
+ :type '(choice (const ask)
+ (const always)
+ (const :tag "never" nil))
+ :group 'vm-pine)
+
+(defcustom vm-save-killed-messages-folder
+ vm-postponed-folder
+ "The name of the folder where killed messages are saved."
+ :type 'string
+ :group 'vm-pine)
+
+(defun vm-add-save-killed-message-hook ()
+ (make-local-hook 'kill-buffer-hook)
+ (add-hook 'kill-buffer-hook 'vm-save-killed-message-hook nil t))
+
+(defun vm-remove-save-killed-message-hook ()
+ (remove-hook 'kill-buffer-hook 'vm-save-killed-message-hook t))
+
+(defun vm-save-killed-message-hook ()
+ (if (or (and (equal vm-save-killed-message 'ask)
+ (y-or-n-p (format "Save `%s' as draft in folder `%s'? "
+ (buffer-name)
+ vm-save-killed-messages-folder)))
+ (equal vm-save-killed-message 'always))
+ (vm-postpone-message vm-save-killed-messages-folder t)
+ (message "`%s' is gone forever!" (buffer-name))))
+
+(add-hook 'vm-mail-mode-hook 'vm-add-save-killed-message-hook)
+(add-hook 'mail-send-hook 'vm-remove-save-killed-message-hook)
+(add-hook 'vm-postpone-message-hook 'vm-remove-save-killed-message-hook)
+
+;;-----------------------------------------------------------------------------
+;; New header fields
+(define-key vm-mail-mode-map "\C-c\C-f\C-a" 'vm-mail-return-receipt-to)
+(define-key vm-mail-mode-map "\C-c\C-f\C-p" 'vm-mail-priority)
+(define-key vm-mail-mode-map "\C-c\C-f\C-f" 'vm-mail-fcc)
+(define-key vm-mail-mode-map "\C-c\C-f\C-n" 'vm-mail-notice-requested-upon-delivery-to)
+
+;;;###autoload
+(defcustom vm-mail-return-receipt-to
+ (concat (user-full-name) " <" user-mail-address ">")
+ "The address where return receipts should be sent to."
+ :type 'string
+ :group 'vm-pine)
+
+;;;###autoload
+(defun vm-mail-return-receipt-to ()
+ "Insert the \"Return-Receipt-To\" header into a `vm-mail-mode' buffer.
+See the variable `vm-mail-return-receipt-to'."
+ (interactive)
+ (expand-abbrev)
+ (save-excursion
+ (or (mail-position-on-field "Return-Receipt-To" t)
+ (progn (mail-position-on-field "Subject")
+ (insert "\nReturn-Receipt-To: " vm-mail-return-receipt-to
+ "\nRead-Receipt-To: " vm-mail-return-receipt-to
+ "\nDelivery-Receipt-To: " vm-mail-return-receipt-to))))
+ (message "Remove those headers you do not require!"))
+
+;;;###autoload
+(defun vm-mail-notice-requested-upon-delivery-to ()
+ "Notice-Requested-Upon-Delivery-To:"
+ (interactive)
+ (expand-abbrev)
+ (save-excursion
+ (or (mail-position-on-field "Notice-Requested-Upon-Delivery-To" t)
+ (progn (mail-position-on-field "Subject")
+ (insert "\nNotice-Requested-Upon-Delivery-To: "
+ (let ((to (vm-mail-get-header-contents
+ "\\(.*-\\)?To:")))
+ (if to to "")))))))
+
+;;;###autoload
+(defcustom vm-mail-priority
+ "Priority: urgent\nImportance: High\nX-Priority: 1"
+ "The priority headers."
+ :type 'string
+ :group 'vm-pine)
+
+;;;###autoload
+(defun vm-mail-priority ()
+ "Insert priority headers into a `vm-mail-mode' buffer.
+See the variable `vm-mail-priority'."
+ (interactive)
+ (expand-abbrev)
+ (save-excursion
+ (or (mail-position-on-field "Priority" t)
+ (progn (mail-position-on-field "Subject")
+ (insert "\n" vm-mail-priority)))))
+
+;;-----------------------------------------------------------------------------
+(if (not vm-xemacs-p)
+ (defun user-home-directory ()
+ (getenv "HOME")))
+
+(defun vm-mail-fcc-file-join (dir file)
+ "Returns a nice path to a folder."
+ (let* ((path (expand-file-name file dir)))
+ (if path
+ (if vm-xemacs-p
+ (abbreviate-file-name path t)
+ (abbreviate-file-name path))
+ dir)))
+
+;;;###autoload
+(defcustom vm-mail-folder-alist (if (boundp 'vm-auto-folder-alist)
+ vm-auto-folder-alist)
+ "Like `vm-auto-folder-alist' but for outgoing messages.
+It should be fed to `vm-mail-select-folder'!"
+ :type 'list
+ :group 'vm-pine)
+
+;;;###autoload
+(defcustom vm-mail-fcc-default
+ '(or (vm-mail-select-folder vm-mail-folder-alist)
+ (vm-mail-to-fcc nil t)
+ mail-archive-file-name)
+ "A list which is evaluated to return a folder name.
+By reordering the elements of this list or adding own functions you
+can control the behavior of vm-mail-fcc and `vm-mail-auto-fcc'.
+You may allow a sophisticated decision for the right folder for your
+outgoing message."
+ :type 'list
+ :group 'vm-pine)
+
+;;;###autoload
+(defun vm-mail-fcc (&optional arg)
+ "Insert the FCC-header into a `vm-mail-mode' buffer.
+Like `mail-fcc', but honors VM variables and offers a default folder
+according to `vm-mail-folder-alist'.
+Called with prefix ARG it just removes the FCC-header."
+ (interactive "P")
+ (expand-abbrev)
+
+ (let ((dir (or vm-folder-directory default-directory))
+ (fcc nil)
+ (folder (vm-mail-mode-get-header-contents "FCC:"))
+ (prompt nil))
+
+ (if arg (progn (vm-mail-mode-remove-header "FCC:")
+ (message "FCC header removed!"))
+ (save-excursion
+ (setq fcc (eval vm-mail-fcc-default))
+
+ ;; cleanup the name
+ (setq fcc (if fcc (vm-mail-fcc-file-join dir fcc)))
+
+ (setq prompt (if fcc
+ (format "FCC to folder (%s): " fcc)
+ "FCC to folder: "))
+
+ (setq folder (if (and folder (not (file-directory-p folder)))
+ (file-relative-name folder dir)))
+
+ ;; we got the name so insert it
+ (vm-mail-mode-remove-header "FCC:")
+ (setq fcc (vm-read-file-name prompt
+ dir fcc
+ nil folder
+ 'vm-folder-history))
+ (setq fcc (vm-mail-fcc-file-join dir fcc))
+ (if (file-directory-p fcc)
+ (error "Folder `%s' in no file, but a directory!" fcc)
+ (mail-position-on-field "FCC")
+ (insert fcc))))))
+
+;;;###autoload
+(defun vm-mail-auto-fcc ()
+ "Add a new FCC field, with file name guessed by `vm-mail-folder-alist'.
+You likely want to add it to `vm-reply-hook' by
+ (add-hook 'vm-reply-hook 'vm-mail-auto-fcc)
+or if sure about what you are doing you can add it to mail-send-hook!"
+ (interactive "")
+ (expand-abbrev)
+ (save-excursion
+ (let ((dir (or vm-folder-directory default-directory))
+ (fcc nil))
+
+ (vm-mail-mode-remove-header "FCC:")
+ (setq fcc (eval vm-mail-fcc-default))
+ (if fcc
+ (if (file-directory-p fcc)
+ (error "Folder `%s' in no file, but a directory!" fcc)
+ (progn (mail-position-on-field "FCC")
+ (insert (vm-mail-fcc-file-join dir fcc))))))))
+
+;;;###autoload
+(defun vm-mail-get-header-contents (header-name-regexp &optional clump-sep)
+ "Return the contents of the header(s) matching HEADER-NAME-REGEXP.
+This function is a slightly changed version of `vm-get-header-contents'.
+Optional argument CLUMP-SEP usually a \",\"."
+ (let ((contents nil)
+ (text-of-message 0)
+ (regexp (concat "^\\(" header-name-regexp "\\)")))
+ (save-excursion
+ (goto-char (point-min))
+ (if (re-search-forward (regexp-quote mail-header-separator)
+ (point-max) t)
+ (setq text-of-message (match-end 0))
+ (error "No mail header separator found!"))
+
+ (goto-char (point-min))
+ (let ((case-fold-search t))
+ (while (and (or (null contents) clump-sep)
+ (re-search-forward regexp text-of-message t)
+ (save-excursion (goto-char (match-beginning 0))
+ (vm-match-header)))
+ (if contents
+ (setq contents
+ (concat contents clump-sep (vm-matched-header-contents)))
+ (setq contents (vm-matched-header-contents)))))
+ contents)))
+
+;;;###autoload
+(defun vm-mail-select-folder (folder-alist)
+ "Return a folder according to FOLDER-ALIST for the current message.
+This function is a slightly changed version of `vm-auto-select-folder'."
+ (interactive)
+ (condition-case error-data
+ (catch 'match
+ (let (header tuple-list)
+ (while folder-alist
+ (setq header (vm-mail-get-header-contents
+ (car (car folder-alist)) ", "))
+ (if (null header)
+ ()
+ (setq tuple-list (cdr (car folder-alist)))
+ (while tuple-list
+ (if (let ((case-fold-search vm-auto-folder-case-fold-search))
+ (string-match (car (car tuple-list)) header))
+ ;; Don't waste time eval'ing an atom.
+ (if (stringp (cdr (car tuple-list)))
+ (throw 'match (cdr (car tuple-list)))
+ (let* ((match-data (vm-match-data))
+ ;; allow this buffer to live forever
+ (buf (get-buffer-create " *vm-auto-folder*"))
+ (result))
+ ;; Set up a buffer that matches our cached
+ ;; match data.
+ (save-excursion
+ (set-buffer buf)
+ (if vm-fsfemacs-mule-p
+ (set-buffer-multibyte nil))
+ (widen)
+ (erase-buffer)
+ (insert header)
+ ;; It appears that get-buffer-create clobbers the
+ ;; match-data.
+ ;;
+ ;; The match data is off by one because we matched
+ ;; a string and Emacs indexes strings from 0 and
+ ;; buffers from 1.
+ ;;
+ ;; Also store-match-data only accepts MARKERS!!
+ ;; AUGHGHGH!!
+ (store-match-data
+ (mapcar
+ (function (lambda (n) (and n (vm-marker n))))
+ (mapcar
+ (function (lambda (n) (and n (1+ n))))
+ match-data)))
+ (setq result (eval (cdr (car tuple-list))))
+ (while (consp result)
+ (setq result (vm-mail-select-folder result)))
+ (if result
+ (throw 'match result))))))
+ (setq tuple-list (cdr tuple-list))))
+ (setq folder-alist (cdr folder-alist)))
+ nil ))
+ (error "Error processing folder-alist: %s"
+ (prin1-to-string error-data))))
+
+;;;###autoload
+(defcustom vm-mail-to-regexp "\\([^<\t\n ]+\\)@"
+ "A regexp matching the part of an email address to use as FCC-folder.
+The string enclosed in \"\\\\(\\\\)\" is used as folder name."
+ :type 'regexp
+ :group 'vm-pine)
+
+;;;###autoload
+(defcustom vm-mail-to-headers '("To:" "CC:" "BCC:")
+ "A list of headers for finding the email address to use as FCC-folder."
+ :type '(repeat (string))
+ :group 'vm-pine)
+
+;;;###autoload
+(defun vm-mail-to-fcc (&optional arg return-only)
+ "Insert a FCC-header into a `vm-mail-mode' buffer.
+Like `mail-fcc', but honors VM variables and inserts the first email
+address (or the like matched by `vm-mail-to-regexp') found in the headers
+listed in `vm-mail-to-headers'.
+Called with prefix ARG it just removes the FCC-header.
+If optional argument RETURN-ONLY is t just returns FCC."
+ (interactive "P")
+ (expand-abbrev)
+ (let ((fcc nil)
+ (headers vm-mail-to-headers))
+ (if arg (progn (vm-mail-mode-remove-header "FCC:")
+ (message "FCC header removed!"))
+ (progn
+ (while (and (not fcc) headers)
+ (setq fcc (vm-mail-get-header-contents (car headers)))
+ (if (and fcc (string-match vm-mail-to-regexp fcc))
+ (setq fcc (match-string 1 fcc))
+ (setq fcc nil))
+ (setq headers (cdr headers)))
+ (setq fcc (or fcc mail-archive-file-name))
+ (if return-only
+ fcc
+ (if fcc
+ (if (file-directory-p fcc)
+ (error "Folder `%s' in no file, but a directory!" fcc)
+ (vm-mail-mode-remove-header "FCC:")
+ (mail-position-on-field "FCC")
+ (insert (vm-mail-fcc-file-join (or vm-folder-directory
+ default-directory)
+ fcc)))))))))
+
+;;-----------------------------------------------------------------------------
+(provide 'vm-pine)
+
+;;; vm-pine.el ends here
diff --git a/vm-pop.el b/lisp/vm-pop.el
index e2f9d79..3680613 100644
--- a/vm-pop.el
+++ b/lisp/vm-pop.el
@@ -1,22 +1,23 @@
-;;; Simple POP (RFC 1939) client for VM
-;;; Copyright (C) 1993, 1994, 1997, 1998 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-pop)
+;;; vm-pop.el --- Simple POP (RFC 1939) client for VM
+;;
+;; Copyright (C) 1993, 1994, 1997, 1998 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+;;; Code:
(if (fboundp 'define-error)
(progn
(define-error 'vm-cant-uidl "Can't use UIDL")
@@ -44,6 +45,8 @@
;; We remember which messages we have retrieved so that we can
;; leave the message in the mailbox, and yet not retrieve the
;; same messages again and again.
+
+;;;###autoload
(defun vm-pop-move-mail (source destination)
(let ((process nil)
(m-per-session vm-pop-messages-per-session)
@@ -165,6 +168,8 @@
(and (null (vm-pop-retrieve-to-target process destination
statblob))
(throw 'done (not (equal retrieved 0))))
+ (message "Retrieving message %d (of %d) from %s...done"
+ n mailbox-count popdrop)
(vm-increment retrieved)
(and b-per-session
(setq retrieved-bytes (+ retrieved-bytes message-size)))
@@ -239,6 +244,7 @@
(not (equal 0 (car response))))))
(and process (vm-pop-end-session process nil vm-pop-ok-to-ask)))))
+;;;###autoload
(defun vm-expunge-pop-messages ()
"Deletes all messages from POP mailbox that have already been retrieved
into the current folder. VM sends POP DELE commands to all the
@@ -399,7 +405,7 @@ relevant POP servers to remove the messages."
(error "No port in POP maildrop specification, \"%s\""
source))
(if (string-match "^[0-9]+$" port)
- (setq port (string-to-int port)))
+ (setq port (string-to-number port)))
(if (null auth)
(error
"No authentication method in POP maildrop specification, \"%s\""
@@ -418,7 +424,7 @@ relevant POP servers to remove the messages."
(progn (message "Need password for %s" popdrop)
(throw 'done nil))
(setq pass
- (vm-read-password
+ (read-passwd
(format "POP password for %s: "
popdrop)))))))
;; save the password for the sake of
@@ -681,12 +687,12 @@ relevant POP servers to remove the messages."
(if (null response)
nil
(setq list (vm-parse response "\\([^ ]+\\) *"))
- (list (string-to-int (nth 1 list)) (string-to-int (nth 2 list))))))
+ (list (string-to-number (nth 1 list)) (string-to-int (nth 2 list))))))
(defun vm-pop-read-list-response (process)
(let ((response (vm-pop-read-response process t)))
(and response
- (string-to-int (nth 2 (vm-parse response "\\([^ ]+\\) *"))))))
+ (string-to-number (nth 2 (vm-parse response "\\([^ ]+\\) *"))))))
(defun vm-pop-read-uidl-long-response (process)
(vm-pop-check-connection process)
@@ -759,9 +765,9 @@ relevant POP servers to remove the messages."
nil vm-visible-headers
vm-invisible-header-regexp)))
(set-window-point (selected-window) (point))))
- (if (y-or-n-p (format "Message %d, size = %d, retrieve? " n size))
+ (if (y-or-n-p (format "Retrieve message %d (size = %d)? " n size))
'retrieve
- (if (y-or-n-p (format "Delete message %d from popdrop? " n size))
+ (if (y-or-n-p (format "Delete message %d from popdrop? " n))
'delete
'skip))))
(and work-buffer (kill-buffer work-buffer)))))
@@ -865,26 +871,31 @@ popdrop
(defun vm-pop-cleanup-region (start end)
(setq end (vm-marker end))
(save-excursion
- (goto-char start)
;; CRLF -> LF
- (while (and (< (point) end) (search-forward "\r\n" end t))
- (replace-match "\n" t t))
+ (if vm-xemacs-mule-p
+ (progn
+ ;; we need this otherwise the end marker gets corrupt and
+ ;; unfortunately decode-coding-region does not return the
+ ;; length to the decoded region
+ (decode-coding-region start (1- end) 'undecided-dos)
+ (goto-char (- end 2))
+ (delete-char 1))
(goto-char start)
+ (while (and (< (point) end) (search-forward "\r\n" end t))
+ (replace-match "\n" t t)))
;; chop leading dots
+ (goto-char start)
(while (and (< (point) end) (re-search-forward "^\\." end t))
(replace-match "" t t)
(forward-char)))
(set-marker end nil))
(defun vm-popdrop-sans-password (source)
- (let (source-list)
- (setq source-list (vm-parse source "\\([^:]+\\):?"))
- (if (= 6 (length source-list))
- (setq source-list (cdr source-list)))
- (concat (nth 0 source-list) ":"
- (nth 1 source-list) ":"
- (nth 2 source-list) ":"
- (nth 3 source-list) ":*")))
+ "Return popdrop SOURCE, but replace the password by a \"*\"."
+ (mapconcat 'identity
+ (append (reverse (cdr (reverse (vm-parse source "\\([^:]+\\):?"))))
+ '("*"))
+ ":"))
(defun vm-establish-new-folder-pop-session (&optional interactive)
(let ((process (vm-folder-pop-process))
@@ -960,6 +971,7 @@ popdrop
there)
(list retrieve-list expunge-list)))
+;;;###autoload
(defun vm-pop-synchronize-folder (&optional interactive
do-remote-expunges
do-local-expunges
@@ -1051,6 +1063,7 @@ popdrop
vm-pop-retrieved-messages))))
got-some)))
+;;;###autoload
(defun vm-pop-folder-check-for-mail (&optional interactive)
(if (or vm-global-block-new-mail
(null (vm-establish-new-folder-pop-session interactive)))
@@ -1059,6 +1072,7 @@ popdrop
(vm-pop-end-session (vm-folder-pop-process))
result )))
+;;;###autoload
(defun vm-pop-find-spec-for-name (name)
(let ((list vm-pop-folder-alist)
(done nil))
@@ -1068,6 +1082,7 @@ popdrop
(setq list (cdr list))))
(and list (car (car list)))))
+;;;###autoload
(defun vm-pop-find-name-for-spec (spec)
(let ((list vm-pop-folder-alist)
(done nil))
@@ -1077,6 +1092,7 @@ popdrop
(setq list (cdr list))))
(and list (nth 1 (car list)))))
+;;;###autoload
(defun vm-pop-find-name-for-buffer (buffer)
(let ((list vm-pop-folder-alist)
(done nil))
@@ -1087,6 +1103,7 @@ popdrop
(setq list (cdr list))))
(and list (nth 1 (car list)))))
+;;;###autoload
(defun vm-pop-make-filename-for-spec (spec &optional scrub-password scrub-spec)
(let (md5 list)
(if (and (null scrub-password) (null scrub-spec))
@@ -1116,3 +1133,5 @@ popdrop
(vm-parse spec "\\([^:]+\\):?" 1 4)))
(provide 'vm-pop)
+
+;;; vm-pop.el ends here
diff --git a/lisp/vm-ps-print.el b/lisp/vm-ps-print.el
new file mode 100644
index 0000000..e1e6e09
--- /dev/null
+++ b/lisp/vm-ps-print.el
@@ -0,0 +1,448 @@
+;;; vm-ps-print.el --- PS-printing functions for VM
+;;
+;; Copyright (C) 1999 Robert Fenk
+;;
+;; Author: Robert Fenk
+;; Status: Tested with XEmacs 21.4.15 & VM 7.18
+;; Keywords: extensions, vm, ps-print
+;; X-URL: http://www.robf.de/Hacking/elisp
+;; Version: $Id$
+;;
+;; This code is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 1, or (at your option)
+;; any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+;;; Commentary:
+;;
+;; There are three new user functions for generating postscript output:
+;; vm-ps-print-message
+;; vm-ps-print-each-message
+;; vm-ps-print-message-preview
+;; The first one prints like vm-ps-print, but multiple messages are
+;; concatenated to one printout. In contrast to this the second
+;; function creates one print job for each message. Finally the the
+;; third one prints the current message as displayed in the
+;; presentation buffer -- the other two functions do their own MIME
+;; decoding therefore messages are always display in their default
+;; appearance.
+;;
+;; To use these functions you should put this file into your load-path
+;; and add the following lines to your .vm file:
+;;
+;; (require 'vm-ps-print)
+;;
+;; To redefine the default VM settings for the tool bar and menu add
+;; the following line. The default is to use `vm-ps-print-message',
+;; but if you use an optional non nil argument you will get
+;; `vm-ps-print-each-message' as print function.
+;;
+;; (vm-ps-print-message-infect-vm)
+;;
+;; This will refine the default VM settings and from now on you should
+;; be able to print to your postscript printer by using the usual VM
+;; commands.
+;; Of course you still have to set `lpr-command' and `lpr-switches' or
+;; `ps-lpr-command' and `ps-lpr-switches' to reasonable values!
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Code:
+
+(eval-when-compile
+ (require 'vm-version)
+ (require 'vm-message)
+ (require 'vm-macro)
+ (require 'vm-vars))
+
+(require 'vm-save)
+(require 'ps-print)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defgroup vm nil
+ "VM"
+ :group 'mail)
+
+(defgroup vm-psprint nil
+ "The VM ps-print lib"
+ :group 'vm)
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;;###autoload
+(defcustom vm-ps-print-message-function 'ps-print-buffer-with-faces
+ "*This should point to the function which is used for ps-printing.
+The function should accept one optional argument which is a filename."
+ :group 'vm-psprint
+ :type 'function)
+
+;;;###autoload
+(defcustom vm-ps-print-message-separater "\n"
+ "*The separator between messages when printing multiple messages."
+ :group 'vm-psprint
+ :type 'string)
+
+;;;###autoload
+(defcustom vm-ps-print-message-font-size 10
+ "*The font size for the PS-output of the message text."
+ :group 'vm-psprint
+ :type 'integer)
+
+;;----------------------------------------------------------------------------
+
+;;;###autoload
+(defcustom vm-ps-print-message-header-lines 2
+ "*See `ps-header-lines'."
+ :group 'vm-psprint
+ :type 'integer)
+
+;;;###autoload
+(defcustom vm-ps-print-message-left-header
+ '(list (format "(Folder `%s')" folder-name)
+ (format "(%d message%s printed)" mcount (if (= mcount 1) "" "s")))
+ "*This variable should contain a command returning a valid `ps-left-header'."
+ :group 'vm-psprint
+ :type 'sexp)
+
+;;;###autoload
+(defcustom vm-ps-print-message-right-header
+ '(list"/pagenumberstring load" 'dd-mon-yyyy)
+ "*This variable should contain a command returning a valid `ps-right-header'.
+The defaults to the number of pages and the date of the printout."
+ :group 'vm-psprint
+ :type 'sexp)
+
+;;;###autoload
+(defcustom vm-ps-print-message-summary-format
+ (concat "******************************************************************************\n"
+ (if (boundp 'vm-summary-format)
+ vm-summary-format
+ "%n %*%a %-17.17F %-3.3m %2d %4l/%-5c %I\"%s\"\n")
+ "******************************************************************************\n")
+ "*The summary line before a message.
+See `vm-summary-format' for a description of the conversion specifiers."
+ :group 'vm-psprint
+ :type 'string)
+
+;;----------------------------------------------------------------------------
+;;;###autoload
+(defcustom vm-ps-print-each-message-header-lines 2
+ "*See `ps-header-lines'."
+ :group 'vm-psprint
+ :type 'integer)
+
+;;;###autoload
+(defcustom vm-ps-print-each-message-left-header
+ '(list (format "(Folder `%s')" folder-name)
+ (format "(%s)" (vm-ps-print-tokenized-summary msg (vm-summary-sprintf vm-ps-print-each-message-summary-format msg t))))
+ "*This command should return a valid `ps-left-header'.
+The default is to have the folder name and a summary according to the
+variable `vm-ps-print-each-message-summary-format' in the left header."
+ :group 'vm-psprint
+ :type 'sexp)
+
+;;;###autoload
+(defcustom vm-ps-print-each-message-right-header
+ '(list "/pagenumberstring load" 'dd-mon-yyyy)
+ "*This variable should contain a command returning a valid `ps-right-header'.
+The defaults to the number of pages and the date of the printout."
+ :group 'vm-psprint
+ :type 'sexp)
+
+;;;###autoload
+(defcustom vm-ps-print-each-message-summary-format
+ "Message# %n, Lines %l, Characters %c"
+ "*The summary line for the postscript header.
+See `vm-summary-format' for a description of the conversion specifiers."
+ :group 'vm-psprint
+ :type 'string)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defun vm-ps-print-message-internal (filename each folder-name mcount msg)
+ "This function does the actual call to the ps-printing function.
+This is not a function to call interactively!
+
+If the customization of headers is insufficient, then you may want
+to modify this function. If FILENAME is a string, then the output is
+written to that file. If EACH is t then create a new johb for each
+message. FOLDER-NAME specifies the folder name which is displayed in
+the header line and MCOUNT is the number of messages to print, while
+MSG is a VM message pointer.
+
+See: `vm-ps-print-message-function'"
+ (let* ((dd-mon-yyyy (format-time-string "%d %b %Y %T" (current-time)))
+ (ps-left-header (if each (eval vm-ps-print-each-message-left-header)
+ (eval vm-ps-print-message-left-header)))
+ (ps-right-header (if each (eval vm-ps-print-each-message-right-header)
+ (eval vm-ps-print-message-right-header)))
+ (ps-header-lines (if each vm-ps-print-each-message-header-lines
+ vm-ps-print-each-message-header-lines))
+ (ps-print-header-frame t)
+ (ps-font-size vm-ps-print-message-font-size))
+; (setq filename (expand-file-name "~/mail.ps"))
+ (funcall vm-ps-print-message-function filename)
+ ))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defun vm-ps-print-tokenized-summary (message tokens)
+ "Return the summary string for MESSAGE according to the format in TOKENS.
+Like `vm-tokenized-summary-insert'."
+ (if (stringp tokens)
+ tokens
+ (let (token summary)
+ (while tokens
+ (setq token (car tokens))
+ (cond ((stringp token)
+ (if vm-display-using-mime
+ (setq summary (concat summary
+ (vm-decode-mime-encoded-words-in-string token)))
+ (setq summary (concat summary token))))
+ ((eq token 'number)
+ (setq summary (concat summary (vm-padded-number-of message))))
+ ((eq token 'mark)
+ (setq summary (concat summary (vm-su-mark message))))
+ ((eq token 'thread-indent)
+ (if (and vm-summary-show-threads
+ (natnump vm-summary-thread-indent-level))
+ (setq summary (concat summary
+ ?\ (* vm-summary-thread-indent-level
+ (vm-th-thread-indentation message)))))))
+ (setq tokens (cdr tokens)))
+ summary)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defun vm-ps-print-message-folder-name ()
+ "Return a nice folder name, without complete path."
+ (let* ((folder-name (or (buffer-file-name) (buffer-name)))
+ (folder-name
+ (if (and vm-folder-directory
+ (string-match (concat (regexp-quote (expand-file-name
+ vm-folder-directory))
+ "/?\\(.+\\)")
+ folder-name))
+ (substring folder-name (match-beginning 1) (match-end 2))
+ folder-name)))
+ folder-name))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-ps-print-message (&optional count filename each)
+ "PS-Print the current message.
+
+A positive COUNT arg N means print the current message and the next
+N-1 messages and a negative one print the current message and the
+previous N-1 messages.
+
+If FILENAME is specified then write PS into that file.
+
+When printing a single message it acts like `vm-ps-print-each-message'.
+When printing multiple messages it will insert a summary line according
+to the variable `vm-ps-print-message-summary-format' and a separator
+according to the variable `vm-ps-print-message-separater' between
+messages. You might force the printing of one job per message, by
+giving a t EACH argument.
+
+See: `vm-ps-print-message-function'
+ `vm-ps-print-message-font-size'
+ `vm-ps-print-message-summary-format'
+ `vm-ps-print-message-separater'
+ `vm-ps-print-message-left-header'
+ `vm-ps-print-message-right-header'
+for customization of the output."
+ (interactive "p")
+ (vm-follow-summary-cursor)
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-error-if-folder-empty)
+ (or count (setq count 1))
+
+ (let* ((vm-summary-faces-mode nil)
+ (folder-name (vm-ps-print-message-folder-name))
+ (mstart nil)
+ (m nil)
+ (mlist (vm-select-marked-or-prefixed-messages count))
+ (mcount (length mlist))
+ (tmpbuf (get-buffer-create "*vm-ps-print*")))
+
+ (set-buffer tmpbuf)
+ (setq major-mode 'vm-mode)
+ (erase-buffer)
+ (if (= mcount 1) (setq each 1))
+
+ (while mlist
+ (setq m (vm-real-message-of (car mlist)))
+ (if (not each)
+ (vm-tokenized-summary-insert
+ m (vm-summary-sprintf vm-ps-print-message-summary-format m t)))
+ (setq mstart (point-max))
+ (vm-insert-region-from-buffer
+ (vm-buffer-of m) (vm-vheaders-of m) (vm-end-of m))
+ (vm-reorder-message-headers nil
+ vm-visible-headers
+ vm-invisible-header-regexp)
+ (vm-decode-mime-encoded-words)
+ (goto-char mstart)
+ (re-search-forward "\n\n") ;; skip headers
+ (if (not (vm-mime-plain-message-p m))
+ (progn (vm-decode-mime-layout (vm-mm-layout m))
+ (delete-region (point) (point-max))))
+ (narrow-to-region mstart (point-max))
+ (vm-energize-urls)
+ (vm-highlight-headers)
+ (widen)
+ (end-of-buffer)
+ (if each
+ (progn (save-excursion
+ (vm-ps-print-message-internal filename t folder-name
+ mcount m))
+ (set-buffer tmpbuf)
+ (erase-buffer))
+ (if (> (length mlist) 1) (insert vm-ps-print-message-separater)))
+ (setq mlist (cdr mlist)))
+
+ (if (not each)
+ (vm-ps-print-message-internal filename nil folder-name mcount nil))
+ (kill-buffer tmpbuf)
+ ))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-ps-print-each-message (&optional count filename)
+ "PS-Print the current message.
+A positive COUNT arg N means print the current message and the next
+N-1 messages and a negative one print the current message and the
+previous N-1 messages.
+
+If FILENAME is specified then write PS into that file.
+
+This function acts like `vm-ps-print-message', but it will generate a
+separate print job for each message and it does not generate the
+summary lines between messages.
+
+See: `vm-ps-print-message-function'
+ `vm-ps-print-message-font-size'
+ `vm-ps-print-each-message-separater'
+ `vm-ps-print-each-message-left-header'
+ `vm-ps-print-each-message-right-header'
+ `vm-ps-print-each-message-summary-format'
+for customization of the output."
+ (interactive "p")
+ (vm-ps-print-message count filename t))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-ps-print-message-presentation (&optional filename)
+ "PS-Print the currently presented message.
+When called with a numeric prefix argument, prompts the user for the
+name of a file to save the PostScript image in, instead of sending it
+to the printer.
+
+More specifically, the FILENAME argument is treated as follows: if it
+is nil, send the image to the printer. If FILENAME is a string, save
+the PostScript image in a file with that name. If FILENAME is a
+number, prompt the user for the name of the file to save in.
+
+See: `vm-ps-print-message-function'
+ `vm-ps-print-message-font-size'
+ `vm-ps-print-each-message-separater'
+ `vm-ps-print-each-message-left-header'
+ `vm-ps-print-each-message-right-header'
+ `vm-ps-print-each-message-summary-format'
+for customization of the output."
+ (interactive (list (ps-print-preprint current-prefix-arg)))
+ (save-excursion
+ (vm-follow-summary-cursor)
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-error-if-folder-empty)
+
+ (let ((folder-name (vm-ps-print-message-folder-name))
+ (mcount 1)
+ (msg (car vm-message-pointer)))
+
+ (if (and (boundp 'vm-mail-buffer) (symbol-value 'vm-mail-buffer))
+ (set-buffer (symbol-value 'vm-mail-buffer)))
+ (if vm-presentation-buffer
+ (set-buffer vm-presentation-buffer))
+ (vm-ps-print-message-internal filename t folder-name mcount msg)
+ )))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-ps-print-message-fix-menu (menu each)
+ "Fix VM-menu MENU.
+If EACH it t, then replace `vm-print-message' by
+'vm-ps-print-each-message', otherwise by `vm-ps-print-message'."
+ (let ((tmpbuf (get-buffer-create "*vm-ps-print*")))
+ (save-excursion
+ (set-buffer tmpbuf)
+ (erase-buffer)
+ (insert (format "(setq %s '%S)" (symbol-name menu) (symbol-value menu)))
+ (if (re-search-backward "vm-\\(ps-\\)?print-\\(each-\\)?message"
+ (point-min) t)
+ (if each (replace-match "vm-print-each-message")
+ (replace-match "vm-ps-print-message")))
+ (eval-buffer)
+ (kill-buffer tmpbuf)
+ )))
+
+;;;###autoload
+(defun vm-ps-print-message-infect-vm (&optional each)
+ "Call this function to hook the ps-printing functions into VM.
+Arranges that the usual VM printing commands in menus and the
+toolbar use `vm-ps-print-message' or `vm-ps-print-each-message'
+(when EACH is t) instead of `vm-print-message'."
+ (interactive)
+ (if each (fset 'vm-toolbar-print-command 'vm-ps-print-each-message)
+ (fset 'vm-toolbar-print-command 'vm-ps-print-message))
+ (require 'vm-version)
+ (require 'vm-menu)
+ (vm-ps-print-message-fix-menu 'vm-menu-dispose-menu each)
+ (vm-ps-print-message-fix-menu 'vm-menu-vm-menu each)
+ )
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; From: "Jeffrey J. Kosowsky" <jeff.kosowsky_ATsign_verizon_DOTsymbol_net>
+;;;###autoload
+(defun vm-ps-print-marked (&optional filename seperate nup color)
+ "Postscript print all marked emails in mail Summary. If no messages marked,
+print just the current message.
+Optionally write postscript output to FILENAME (default is to spool
+to printer).
+Optionally force SEPERATE printing of each message by setting to 't'.
+Optionally also print NUP pages per sheet.
+Optionally also print in COLOR by setting to non-nil.
+
+Note when run interactively setting a positive prefix number prints
+NUP pages per sheet to the printer, while negative number prints NUP
+pages per sheet to queried FILENAME. No prefix prints 1 page per sheet
+to printer while prefix without numerical argument simply queries for
+filename and formats 1 page per sheet. (JJK)"
+ (interactive
+ (if (and (integerp current-prefix-arg) (plusp current-prefix-arg))
+ nil
+ (list (ps-print-preprint current-prefix-arg))))
+ (let ((last-command)
+ (ps-print-color-p color)
+ (ps-n-up-printing
+ (cond
+ (nup nup)
+ ((integerp current-prefix-arg) (abs current-prefix-arg))
+ (t 1))) ; default 1 page per sheet
+ )
+ (and (vm-marked-messages)
+ (setq last-command 'vm-next-command-uses-marks))
+ (vm-ps-print-message nil filename seperate)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(provide 'vm-ps-print)
+
+;;; vm-ps-print.el ends here
diff --git a/vm-reply.el b/lisp/vm-reply.el
index 44232b8..59b1629 100644
--- a/vm-reply.el
+++ b/lisp/vm-reply.el
@@ -1,73 +1,96 @@
-;;; Mailing, forwarding, and replying commands for VM
-;;; Copyright (C) 1989-2001 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-reply)
+;;; vm-reply.el --- Mailing, forwarding, and replying commands
+;;
+;; Copyright (C) 1989-2001 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+
+;;; Code:
+
+(defun vm-add-reply-subject-prefix (message &optional start)
+ (when (not start)
+ (goto-char (point-min))
+ (re-search-forward (regexp-quote mail-header-separator) (point-max))
+ (forward-char 1)
+ (setq start (point)))
+ (goto-char start)
+ (if (and message vm-included-text-attribution-format)
+ (let ((vm-summary-uninteresting-senders nil))
+ (insert (vm-summary-sprintf
+ vm-included-text-attribution-format
+ message))))
+ (while (re-search-forward "^" (point-max) t)
+ (insert vm-included-text-prefix)))
+;;;###autoload
(defun vm-do-reply (to-all include-text count)
(let ((mlist (vm-select-marked-or-prefixed-messages count))
(dir default-directory)
(message-pointer vm-message-pointer)
(case-fold-search t)
- to cc subject mp in-reply-to references tmp tmp2 newsgroups)
+ to cc subject in-reply-to references
+ mp tmp tmp2 newsgroups)
(setq mp mlist)
- (while mp
- (cond
- ((eq mlist mp)
- (cond ((setq to
+ (while mp
+ (cond ((add-to-list 'to
(let ((reply-to
(vm-get-header-contents (car mp) "Reply-To:"
", ")))
(if (vm-ignored-reply-to reply-to)
nil
reply-to ))))
- ((setq to (vm-get-header-contents (car mp) "From:" ", ")))
+ ((add-to-list 'to (vm-get-header-contents (car mp) "From:"
+ ", ")))
;; bad, but better than nothing for some
- ((setq to (vm-grok-From_-author (car mp))))
+ ((add-to-list 'to (vm-grok-From_-author (car mp))))
(t (error "No From: or Reply-To: header in message")))
- (setq subject (vm-get-header-contents (car mp) "Subject:")
- in-reply-to
- (and vm-in-reply-to-format
+
+ (let ((this-subject (vm-get-header-contents (car mp) "Subject:"))
+ (this-reply-to (and vm-in-reply-to-format
(let ((vm-summary-uninteresting-senders nil))
- (vm-summary-sprintf vm-in-reply-to-format (car mp))))
- in-reply-to (and (not (equal "" in-reply-to)) in-reply-to))
- (and subject (stringp vm-reply-subject-prefix)
- (let ((case-fold-search t))
- (not
- (equal
- (string-match (regexp-quote vm-reply-subject-prefix)
- subject)
- 0)))
- (setq subject (concat vm-reply-subject-prefix subject))))
- (t (cond ((setq tmp (vm-get-header-contents (car mp) "Reply-To:"
- ", "))
- (setq to (concat to "," tmp)))
- ((setq tmp (vm-get-header-contents (car mp) "From:"
- ", "))
- (setq to (concat to "," tmp)))
+ (vm-summary-sprintf vm-in-reply-to-format
+ (car mp))))))
+ (if (and this-subject vm-reply-subject-prefix
+ (not (string-match vm-reply-subject-prefix this-subject)))
+ (setq this-subject (concat vm-reply-subject-prefix
+ this-subject)))
+
+ (unless subject
+ (setq subject (concat this-subject
+ (if (cdr mlist)
+ (format " [and %d more messages]"
+ (length (cdr mlist)))))))
+ (setq in-reply-to (if in-reply-to
+ (concat in-reply-to ",\n\t" this-reply-to)
+ this-reply-to)))
+
+ (cond ((setq tmp (vm-get-header-contents (car mp) "Reply-To:" ", "))
+ (if (not (vm-ignored-reply-to tmp))
+ (add-to-list 'to tmp)))
+ ((setq tmp (vm-get-header-contents (car mp) "From:" ", "))
+ (add-to-list 'to tmp))
;; bad, but better than nothing for some
((setq tmp (vm-grok-From_-author (car mp)))
- (setq to (concat to "," tmp)))
- (t (error "No From: or Reply-To: header in message")))))
+ (add-to-list 'to tmp))
+ (t (error "No From: or Reply-To: header in message")))
+
(if to-all
(progn
- (setq tmp (vm-get-header-contents (car mp) "To:"
- ", "))
- (setq tmp2 (vm-get-header-contents (car mp) "Cc:"
- ", "))
+ (setq tmp (vm-get-header-contents (car mp) "To:" ", "))
+ (setq tmp2 (vm-get-header-contents (car mp) "Cc:" ", "))
(if tmp
(if cc
(setq cc (concat cc "," tmp))
@@ -82,10 +105,21 @@
(cons (vm-get-header-contents (car mp) "Message-ID:" " ")
references)))
(setq newsgroups
- (cons (or (and to-all (vm-get-header-contents (car mp) "Followup-To:" ","))
+ (cons (or (and to-all
+ (vm-get-header-contents (car mp)
+ "Followup-To:" ","))
(vm-get-header-contents (car mp) "Newsgroups:" ","))
newsgroups))
(setq mp (cdr mp)))
+
+ (if (null to) nil
+ (setq tmp (car to))
+ (setq to (cdr to))
+ (while to
+ (setq tmp (concat tmp ", " (car to)))
+ (setq to (cdr to)))
+ (setq to tmp))
+
(if vm-strip-reply-headers
(let ((mail-use-rfc822 t))
(and to (setq to (mail-strip-quoted-names to)))
@@ -151,15 +185,16 @@
addresses )
(defun vm-ignored-reply-to (reply-to)
- (if reply-to
+ (if (and reply-to (not (string= reply-to "")))
(let (re-list result)
(setq re-list vm-reply-ignored-reply-tos)
(while re-list
(if (string-match (car re-list) reply-to)
(setq result t re-list nil)
(setq re-list (cdr re-list))))
- result )))
+ result)))
+;;;###autoload
(defun vm-mail-yank-default (&optional message)
(save-excursion
(vm-reorder-message-headers nil vm-included-text-headers
@@ -181,6 +216,7 @@
(insert vm-included-text-prefix)
(forward-line 1)))))
+;;;###autoload
(defun vm-yank-message-other-folder (folder)
"Like vm-yank-message except the message is yanked from a folder other
than the one that spawned the current Mail mode buffer. The name of the
@@ -217,7 +253,7 @@ Don't call this function from a program."
(while (zerop result)
(setq result (read-string prompt))
(and (string= result "") default (setq result default))
- (setq result (string-to-int result)))
+ (setq result (string-to-number result)))
(if (null (setq mp (nthcdr (1- result) vm-message-list)))
(error "No such message."))))
(set-buffer b)
@@ -227,6 +263,7 @@ Don't call this function from a program."
(vm-bury-buffer newbuf)
(vm-bury-buffer sumbuf))))
+;;;###autoload
(defun vm-yank-message (message)
"Yank message number N into the current buffer at point.
When called interactively N is always read from the minibuffer. When
@@ -251,14 +288,14 @@ vm-included-text-discard-header-regexp, and the value of
vm-included-text-prefix is prepended to every yanked line."
(interactive
(list
- ;; What we really want for the first argument is a message struct,
- ;; but if called interactively, we let the user type in a message
- ;; number instead.
+ ;; What we really want for the first argument is a message struct,
+ ;; but if called interactively, we let the user type in a message
+ ;; number instead.
(let (mp default
- (result 0)
- prompt
- (last-command last-command)
- (this-command this-command))
+ (result 0)
+ prompt
+ (last-command last-command)
+ (this-command this-command))
(save-excursion
(vm-select-folder-buffer)
(setq default (and vm-message-pointer
@@ -270,7 +307,7 @@ vm-included-text-prefix is prepended to every yanked line."
(while (zerop result)
(setq result (read-string prompt))
(and (string= result "") default (setq result default))
- (setq result (string-to-int result)))
+ (setq result (string-to-number result)))
(if (null (setq mp (nthcdr (1- result) vm-message-list)))
(error "No such message.")))
(car mp))))
@@ -281,82 +318,136 @@ vm-included-text-prefix is prepended to every yanked line."
(vm-number-of message)))
(vm-display nil nil '(vm-yank-message) '(vm-yank-message composing-message))
(setq message (vm-real-message-of message))
- (let ((b (current-buffer)) (start (point)) end)
+ (let ((b (current-buffer)) (start (point)) end insert-start)
(save-restriction
(widen)
(save-excursion
- (if (vectorp (vm-mm-layout message))
- (let* ((o (vm-mm-layout message))
- (type (car (vm-mm-layout-type o)))
- parts)
- (vm-insert-region-from-buffer (vm-buffer-of message)
- (vm-headers-of message)
- (vm-text-of message))
- ;; decode MIME encoded words so supercite and other
- ;; mail-citation-hook denizens won't have to eat 'em.
- (if vm-display-using-mime
- (save-restriction
- (narrow-to-region start (point))
- (vm-decode-mime-encoded-words)))
- (cond ((vm-mime-types-match "multipart" type)
- (setq parts (copy-sequence (vm-mm-layout-parts o))))
- (t (setq parts (list o))))
- (while parts
- (cond ((vm-mime-text-type-layout-p (car parts))
- (if (cond ((vm-mime-types-match
- "text/enriched"
- (car (vm-mm-layout-type (car parts))))
- (vm-mime-display-internal-text/enriched
- (car parts)))
+ (if vm-reply-include-presentation
+ (let ((text
+ (save-excursion
+ (vm-select-folder-buffer)
+ ;; ensure the current message is presented
+ (vm-show-current-message)
+ (vm-select-folder-buffer)
+ (if vm-presentation-buffer
+ (set-buffer vm-presentation-buffer))
+ (goto-char (point-min))
+ (re-search-forward "\n\n" (point-max) t)
+ (goto-char (point))
+ (vm-buffer-substring-no-properties (point) (point-max)))))
+ (insert text)
+ (setq end (point-marker)))
+ (if (vectorp (vm-mm-layout message))
+ (let* ((o (vm-mm-layout message))
+ layout new-layout
+ (type (car (vm-mm-layout-type o)))
+ (alternatives 0)
+ (parts (list o)))
+ (vm-insert-region-from-buffer (vm-buffer-of message)
+ (vm-headers-of message)
+ (vm-text-of message))
+ (while parts
+ (setq layout (car parts))
+ (cond ((vm-mime-text-type-layout-p layout)
+ (if (cond ((vm-mime-types-match
+ "text/enriched"
+ (car (vm-mm-layout-type layout)))
+ (vm-mime-display-internal-text/enriched
+ layout))
+ ((vm-mime-types-match
+ "message/rfc822"
+ (car (vm-mm-layout-type layout)))
+ (vm-mime-display-internal-message/rfc822
+ layout))
;; no text/html for now
;; ((vm-mime-types-match
;; "text/html"
-;; (car (vm-mm-layout-type (car parts))))
+;; (car (vm-mm-layout-type layout)))
;; (vm-mime-display-internal-text/html
-;; (car parts)))
- ((vm-mime-display-internal-text/plain
- (car parts) t)))
- nil
- ;; charset problems probably
- ;; just dump the raw bits
- (vm-mime-insert-mime-body (car parts))
- (vm-mime-transfer-decode-region (car parts)
- start (point)))
- (setq parts (cdr parts)))
- ((vm-mime-composite-type-p
- (car (vm-mm-layout-type (car parts))))
- (setq parts (nconc (copy-sequence
- (vm-mm-layout-parts
- (car parts)))
- (cdr parts))))
- (t (setq parts (cdr parts)))))
- (setq end (point-marker)))
- (set-buffer (vm-buffer-of message))
- (save-restriction
- (widen)
- ;; decode MIME encoded words so supercite and other
- ;; mail-citation-hook denizens won't have to eat 'em.
- (append-to-buffer b (vm-headers-of message)
- (vm-text-end-of message))
- (set-buffer b)
- (setq end (point-marker))
- (if vm-display-using-mime
- (progn
- (narrow-to-region start end)
- (vm-decode-mime-encoded-words))))))
+;; layout))
+ ((member (downcase (car (vm-mm-layout-type
+ layout)))
+ vm-included-mime-types-list)
+ (vm-mime-display-internal-text/plain
+ layout t))
+ ;; convert the layout if possible
+ ((and (not (vm-mm-layout-is-converted layout))
+ (vm-mime-can-convert (car (vm-mm-layout-type
+ layout)))
+ (setq new-layout
+ (vm-mime-convert-undisplayable-layout
+ layout)))
+ (vm-decode-mime-layout new-layout)))
+ ;; we have found a part to insert, thus skip the
+ ;; remaining alternatives
+ (while (> alternatives 1)
+ (setq parts (cdr parts)
+ alternatives (1- alternatives)))
+
+ (if (not (member (downcase (car (vm-mm-layout-type
+ layout)))
+ vm-included-mime-types-list))
+ nil
+ ;; charset problems probably
+ ;; just dump the raw bits
+ (setq insert-start (point))
+ (vm-mime-insert-mime-body layout)
+ (vm-mime-transfer-decode-region layout
+ insert-start
+ (point))))
+ (setq alternatives (1- alternatives))
+ (setq parts (cdr parts)))
+ ;; burst composite types
+ ((vm-mime-composite-type-p
+ (car (vm-mm-layout-type layout)))
+ (setq alternatives (length (vm-mm-layout-parts (car parts))))
+ (setq parts (nconc (copy-sequence
+ (vm-mm-layout-parts
+ (car parts)))
+ (cdr parts))))
+ ;; skip non-text parts
+ (t
+ (setq alternatives (1- alternatives))
+ (setq parts (cdr parts)))))
+ (setq end (point-marker)))
+ (set-buffer (vm-buffer-of message))
+ (save-restriction
+ (widen)
+ ;; decode MIME encoded words so supercite and other
+ ;; mail-citation-hook denizens won't have to eat 'em.
+ (append-to-buffer b (vm-headers-of message)
+ (vm-text-end-of message))
+ (set-buffer b)
+ (setq end (point-marker))
+ (if vm-display-using-mime
+ (progn
+ (narrow-to-region start end)
+ (vm-decode-mime-encoded-words)))))))
;; get rid of read-only text properties on the text, as
;; they will only cause trouble.
(let ((inhibit-read-only t))
- (remove-text-properties (point-min) (point-max) '(read-only nil)
+ (remove-text-properties (point-min) (point-max)
+ '(read-only nil invisible nil)
(current-buffer)))
- (push-mark end)
- (cond (mail-citation-hook (run-hooks 'mail-citation-hook))
- (mail-yank-hooks (run-hooks 'mail-yank-hooks))
- (t (vm-mail-yank-default message))))))
+
+ ;; decode MIME encoded words so supercite and other
+ ;; mail-citation-hook denizens won't have to eat 'em.
+ (if vm-display-using-mime
+ (save-restriction
+ (narrow-to-region start end)
+ (vm-decode-mime-encoded-words))))
+
+ (push-mark end)
+ (cond (mail-citation-hook (run-hooks 'mail-citation-hook))
+ (mail-yank-hooks (run-hooks 'mail-yank-hooks))
+ (t (vm-mail-yank-default message)))))
+;;;###autoload
(defun vm-mail-send-and-exit (&rest ignored)
"Send message and maybe delete the composition buffer.
-The value of `vm-keep-sent-mesages' determines whether the composition buffer is deleted. If the composition is a reply to a message ina currenttly visited folder, that message is marked as having been rpelied to."
+The value of `vm-keep-sent-mesages' determines whether the composition buffer
+is deleted. If the composition is a reply to a message in a currently visited
+folder, that message is marked as having been replied to."
(interactive "P")
(vm-check-for-killed-folder)
(if (and (boundp 'mail-alias-file)
@@ -435,18 +526,18 @@ The value of `vm-keep-sent-mesages' determines whether the composition buffer is
(goto-char (point-min))
(insert (format "%sDate: " (if resent "Resent-" ""))
(capitalize
- (car (nth (string-to-int (format-time-string "%w" time))
+ (car (nth (string-to-number (format-time-string "%w" time))
vm-weekday-alist)))
", "
;; %e generated " 2". Go from string to int
;; to string to get rid of the blank.
(int-to-string
- (string-to-int
+ (string-to-number
(format-time-string "%e" time)))
" "
(capitalize
(car (nth
- (1- (string-to-int (format-time-string "%m" time)))
+ (1- (string-to-number (format-time-string "%m" time)))
vm-month-alist)))
(format-time-string " %Y %H:%M:%S" time)
(format " %s%02d%02d"
@@ -496,6 +587,7 @@ The value of `vm-keep-sent-mesages' determines whether the composition buffer is
(defvar coding-system-for-write)
+;;;###autoload
(defun vm-mail-send ()
"Just like mail-send except that VM flags the appropriate message(s)
as replied to, forwarded, etc, if appropriate."
@@ -575,6 +667,7 @@ as replied to, forwarded, etc, if appropriate."
(vm-keep-mail-buffer (current-buffer))))
(vm-display nil nil '(vm-mail-send) '(vm-mail-send))))
+;;;###autoload
(defun vm-mail-mode-get-header-contents (header-name-regexp)
(let (regexp)
(setq regexp (concat "^\\(" header-name-regexp "\\)\\|\\(^"
@@ -591,6 +684,7 @@ as replied to, forwarded, etc, if appropriate."
(vm-matched-header-contents)
nil ))))))
+;;;###autoload
(defun vm-mail-mode-remove-header (header-name-regexp)
(let (regexp)
(setq regexp (concat "^\\(" header-name-regexp "\\)\\|\\(^"
@@ -672,11 +766,12 @@ as replied to, forwarded, etc, if appropriate."
(setq mp (cdr mp)))
(vm-update-summary-and-mode-line))))
+;;;###autoload
(defun vm-reply (count)
"Reply to the sender of the current message.
Numeric prefix argument N means to reply to the current message plus the
next N-1 messages. A negative N means reply to the current message and
-the previous N-1 messages.
+the previous N-1 messages.
If invoked on marked messages (via vm-next-command-uses-marks),
all marked messages will be replied to.
@@ -699,6 +794,7 @@ with C-c C-v."
(vm-error-if-folder-empty)
(vm-do-reply nil nil count))
+;;;###autoload
(defun vm-reply-include-text (count)
"Reply to the sender (only) of the current message and include text
from the message. See the documentation for function vm-reply for details."
@@ -709,6 +805,7 @@ from the message. See the documentation for function vm-reply for details."
(vm-error-if-folder-empty)
(vm-do-reply nil t count))
+;;;###autoload
(defun vm-followup (count)
"Reply to all recipients of the current message.
See the documentation for the function vm-reply for details."
@@ -719,6 +816,7 @@ See the documentation for the function vm-reply for details."
(vm-error-if-folder-empty)
(vm-do-reply t nil count))
+;;;###autoload
(defun vm-followup-include-text (count)
"Reply to all recipients of the current message and include text from
the message. See the documentation for the function vm-reply for details."
@@ -729,6 +827,7 @@ the message. See the documentation for the function vm-reply for details."
(vm-error-if-folder-empty)
(vm-do-reply t t count))
+;;;###autoload
(defun vm-forward-message-all-headers ()
"Like vm-forward-message but always forwards all the headers."
(interactive)
@@ -744,6 +843,7 @@ the message. See the documentation for the function vm-reply for details."
(vm-mime-digest-discard-header-regexp "only-drop-this-header"))
(vm-forward-message)))
+;;;###autoload
(defun vm-forward-message ()
"Forward the current message to one or more recipients.
You will be placed in a Mail mode buffer as you would with a
@@ -835,6 +935,7 @@ Subject: header manually."
(run-hooks 'vm-forward-message-hook)
(run-hooks 'vm-mail-mode-hook))))
+;;;###autoload
(defun vm-resend-bounced-message ()
"Extract the original text from a bounced message and resend it.
You will be placed in a Mail mode buffer with the extracted message and
@@ -899,6 +1000,7 @@ you can change the recipient address before resending the message."
(run-hooks 'vm-resend-bounced-message-hook)
(run-hooks 'vm-mail-mode-hook))
+;;;###autoload
(defun vm-resend-message ()
"Resend the current message to someone else.
The current message will be copied to a Mail mode buffer and you
@@ -961,6 +1063,7 @@ You may also create a Resent-Cc header."
(run-hooks 'vm-resend-message-hook)
(run-hooks 'vm-mail-mode-hook))))
+;;;###autoload
(defun vm-send-digest (&optional prefix)
"Send a digest of all messages in the current folder to recipients.
The type of the digest is specified by the variable vm-digest-send-type.
@@ -989,7 +1092,15 @@ only marked messages will be put into the digest."
start header-end boundary)
(save-restriction
(widen)
- (vm-mail-internal (format "digest from %s" (buffer-name)))
+ (vm-mail-internal
+ (format "digest from %s" (buffer-name))
+ nil
+ (and vm-forwarding-subject-format
+ (let ((vm-summary-uninteresting-senders nil))
+ (concat (vm-summary-sprintf vm-forwarding-subject-format (car mlist))
+ (if (cdr mlist)
+ (format " [and %d more messages]"
+ (length (cdr mlist))))))))
(make-local-variable 'vm-forward-list)
(setq vm-system-state 'forwarding
vm-forward-list mlist
@@ -1031,7 +1142,14 @@ only marked messages will be put into the digest."
((equal vm-digest-send-type "rfc1153")
(vm-rfc1153-encapsulate-messages
mlist vm-rfc1153-digest-headers
- vm-rfc1153-digest-discard-header-regexp)))
+ vm-rfc1153-digest-discard-header-regexp))
+ ((equal vm-digest-send-type nil)
+ (while mlist
+ (vm-no-frills-encapsulate-message
+ (car mlist) vm-forwarded-headers
+ vm-unforwarded-header-regexp)
+ (setq mlist (cdr mlist)))))
+
(goto-char start)
(setq mp mlist)
(if miming
@@ -1067,24 +1185,28 @@ only marked messages will be put into the digest."
(run-hooks 'vm-send-digest-hook)
(run-hooks 'vm-mail-mode-hook))
+;;;###autoload
(defun vm-send-rfc934-digest (&optional preamble)
"Like vm-send-digest but always sends an RFC 934 digest."
(interactive "P")
(let ((vm-digest-send-type "rfc934"))
(vm-send-digest preamble)))
+;;;###autoload
(defun vm-send-rfc1153-digest (&optional preamble)
"Like vm-send-digest but always sends an RFC 1153 digest."
(interactive "P")
(let ((vm-digest-send-type "rfc1153"))
(vm-send-digest preamble)))
+;;;###autoload
(defun vm-send-mime-digest (&optional preamble)
"Like vm-send-digest but always sends an MIME (multipart/digest) digest."
(interactive "P")
(let ((vm-digest-send-type "mime"))
(vm-send-digest preamble)))
+;;;###autoload
(defun vm-continue-composing-message (&optional not-picky)
"Find and select the most recently used mail composition buffer.
If the selected buffer is already a Mail mode buffer then it is
@@ -1172,12 +1294,28 @@ found, the current buffer remains selected."
(defvar mail-signature-file)
(defvar mail-personal-alias-file)
+(defun vm-drop-buffer-name-chars (buffer-name)
+ "Replace chars matching `vm-drop-buffer-name-chars' by an \"_\"."
+ (let ((r vm-drop-buffer-name-chars))
+ (if (eq r t) (setq r "[^\x0-\x80]"))
+ (if (and buffer-name r)
+ (replace-in-string buffer-name r "_" t)
+ buffer-name)))
+
+;;;###autoload
(defun vm-mail-internal
(&optional buffer-name to subject in-reply-to cc references newsgroups)
+ "Create a message buffer and set it up according to args.
+Fills in the headers as given by the arguments.
+Binds the `vm-mail-mode-map' and hooks"
(let ((folder-buffer nil))
(if (memq major-mode '(vm-mode vm-virtual-mode))
(setq folder-buffer (current-buffer)))
- (set-buffer (generate-new-buffer (or buffer-name "mail to ?")))
+ (setq buffer-name (if buffer-name
+ (vm-decode-mime-encoded-words-in-string buffer-name)
+ "mail to ?"))
+ (setq buffer-name (vm-drop-buffer-name-chars buffer-name))
+ (set-buffer (generate-new-buffer buffer-name))
;; FSF Emacs: try to prevent write-region (called to handle FCC) from
;; asking the user to choose a safe coding system.
(if (and vm-fsfemacs-mule-p (fboundp 'set-buffer-file-coding-system))
@@ -1216,15 +1354,33 @@ found, the current buffer remains selected."
(build-mail-aliases)))))
(if (stringp vm-mail-header-from)
(insert "From: " vm-mail-header-from "\n"))
+ (setq to (if to (vm-decode-mime-encoded-words-in-string to))
+ subject (if subject (vm-decode-mime-encoded-words-in-string subject))
+ cc (if cc (vm-decode-mime-encoded-words-in-string cc)))
(insert "To: " (or to "") "\n")
(and cc (insert "Cc: " cc "\n"))
(insert "Subject: " (or subject "") "\n")
(and newsgroups (insert "Newsgroups: " newsgroups "\n"))
(and in-reply-to (insert "In-Reply-To: " in-reply-to "\n"))
(and references (insert "References: " references "\n"))
- (insert "X-Mailer: VM " vm-version " under "
- (if vm-fsfemacs-p "Emacs " "")
- emacs-version "\n")
+ (insert "X-Mailer: VM " (vm-version) " under ")
+ (cond ((vm-fsfemacs-p)
+ (insert "Emacs " emacs-version))
+ ((featurep 'xemacs)
+ (insert
+ (format "XEmacs %d.%d.%d"
+ emacs-major-version
+ emacs-minor-version
+ emacs-major-version)))
+ ((boundp 'emacs-version)
+ (insert emacs-version))
+ (t
+ (insert "Unknown Emacs")))
+ (if (functionp 'emacsw32-version)
+ (insert " [" (emacsw32-version) "]"))
+ (if (boundp 'system-configuration)
+ (insert " (" system-configuration ")"))
+ (insert "\n")
;; REPLYTO environmental variable support
;; note that in FSF Emacs v19.29 we would initialize if the
;; value was t. nil is the trigger value used now.
@@ -1260,7 +1416,7 @@ found, the current buffer remains selected."
mail-signature-file)
"~/.signature")))
(t
- (let ((str (eval mail-signature)))
+ (let ((str (eval mail-signature)))
(if (stringp str)
(insert str)))))
(goto-char (point-min))
@@ -1321,6 +1477,7 @@ found, the current buffer remains selected."
(run-with-idle-timer 1.5 t 'vm-update-composition-buffer-name))))
(run-hooks 'mail-setup-hook)))
+;;;###autoload
(defun vm-reply-other-frame (count)
"Like vm-reply, but run in a newly created frame."
(interactive "p")
@@ -1332,6 +1489,7 @@ found, the current buffer remains selected."
(if (vm-multiple-frames-possible-p)
(vm-set-hooks-for-frame-deletion)))
+;;;###autoload
(defun vm-reply-include-text-other-frame (count)
"Like vm-reply-include-text, but run in a newly created frame."
(interactive "p")
@@ -1343,6 +1501,7 @@ found, the current buffer remains selected."
(if (vm-multiple-frames-possible-p)
(vm-set-hooks-for-frame-deletion)))
+;;;###autoload
(defun vm-followup-other-frame (count)
"Like vm-followup, but run in a newly created frame."
(interactive "p")
@@ -1354,6 +1513,7 @@ found, the current buffer remains selected."
(if (vm-multiple-frames-possible-p)
(vm-set-hooks-for-frame-deletion)))
+;;;###autoload
(defun vm-followup-include-text-other-frame (count)
"Like vm-followup-include-text, but run in a newly created frame."
(interactive "p")
@@ -1365,6 +1525,7 @@ found, the current buffer remains selected."
(if (vm-multiple-frames-possible-p)
(vm-set-hooks-for-frame-deletion)))
+;;;###autoload
(defun vm-forward-message-all-headers-other-frame ()
"Like vm-forward-message-all-headers, but run in a newly created frame."
(interactive)
@@ -1376,6 +1537,7 @@ found, the current buffer remains selected."
(if (vm-multiple-frames-possible-p)
(vm-set-hooks-for-frame-deletion)))
+;;;###autoload
(defun vm-forward-message-other-frame ()
"Like vm-forward-message, but run in a newly created frame."
(interactive)
@@ -1387,6 +1549,7 @@ found, the current buffer remains selected."
(if (vm-multiple-frames-possible-p)
(vm-set-hooks-for-frame-deletion)))
+;;;###autoload
(defun vm-resend-message-other-frame ()
"Like vm-resend-message, but run in a newly created frame."
(interactive)
@@ -1398,6 +1561,7 @@ found, the current buffer remains selected."
(if (vm-multiple-frames-possible-p)
(vm-set-hooks-for-frame-deletion)))
+;;;###autoload
(defun vm-resend-bounced-message-other-frame ()
"Like vm-resend-bounced-message, but run in a newly created frame."
(interactive)
@@ -1409,6 +1573,7 @@ found, the current buffer remains selected."
(if (vm-multiple-frames-possible-p)
(vm-set-hooks-for-frame-deletion)))
+;;;###autoload
(defun vm-send-digest-other-frame (&optional prefix)
"Like vm-send-digest, but run in a newly created frame."
(interactive "P")
@@ -1420,6 +1585,7 @@ found, the current buffer remains selected."
(if (vm-multiple-frames-possible-p)
(vm-set-hooks-for-frame-deletion)))
+;;;###autoload
(defun vm-send-rfc934-digest-other-frame (&optional prefix)
"Like vm-send-rfc934-digest, but run in a newly created frame."
(interactive "P")
@@ -1431,6 +1597,7 @@ found, the current buffer remains selected."
(if (vm-multiple-frames-possible-p)
(vm-set-hooks-for-frame-deletion)))
+;;;###autoload
(defun vm-send-rfc1153-digest-other-frame (&optional prefix)
"Like vm-send-rfc1153-digest, but run in a newly created frame."
(interactive "P")
@@ -1442,6 +1609,7 @@ found, the current buffer remains selected."
(if (vm-multiple-frames-possible-p)
(vm-set-hooks-for-frame-deletion)))
+;;;###autoload
(defun vm-send-mime-digest-other-frame (&optional prefix)
"Like vm-send-mime-digest, but run in a newly created frame."
(interactive "P")
@@ -1455,6 +1623,7 @@ found, the current buffer remains selected."
(defvar enriched-mode)
+;;;###autoload
(defun vm-preview-composition ()
"Show how the current composition buffer might be displayed
in a MIME-aware mail reader. VM copies and encodes the current
@@ -1538,8 +1707,10 @@ message."
newbufname (format fmt newbufname ellipsis))
(if (equal newbufname curbufname)
nil
+ (setq newbufname (vm-drop-buffer-name-chars newbufname))
(rename-buffer newbufname t)))))
+;;;###autoload
(defun vm-mail-mode-remove-tm-hooks ()
(remove-hook 'mail-setup-hook 'turn-on-mime-edit)
(remove-hook 'mail-setup-hook 'mime/decode-message-header)
@@ -1548,3 +1719,5 @@ message."
(remove-hook 'mail-send-hook 'mime-editor/maybe-translate))
(provide 'vm-reply)
+
+;;; vm-reply.el ends here
diff --git a/lisp/vm-revno.el b/lisp/vm-revno.el
new file mode 100644
index 0000000..c049461
--- /dev/null
+++ b/lisp/vm-revno.el
@@ -0,0 +1,9 @@
+;;; This is a generated file, do not edit it!
+(setq vm-version "vm-8.0.9")
+(setq vm-version-info '(
+ (revdate "2008-02-20 22:09:19 +0100")
+ (revno 544)
+ (revid "hack@robf.de-20080220210919-rmuc4io6w4qli7ae")
+ (branch_nick "vm-8.0.x-xemacs")
+ (author "Robert Widhopf-Fenk <hack@robf.de>")
+))
diff --git a/lisp/vm-rfaddons.el b/lisp/vm-rfaddons.el
new file mode 100644
index 0000000..5f910d1
--- /dev/null
+++ b/lisp/vm-rfaddons.el
@@ -0,0 +1,2436 @@
+;;; vm-rfaddons.el --- a collections of various useful VM helper functions
+;;
+;; Copyright (C) 1999-2006 Robert Widhopf-Fenk
+;;
+;; Author: Robert Widhopf-Fenk
+;; Status: Tested with XEmacs 21.4.19 & VM 7.19
+;; Keywords: VM helpers
+;; X-URL: http://www.robf.de/Hacking/elisp
+;; Version: $Id$
+
+;;
+;; This code is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 1, or (at your option)
+;; any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+;;; Commentary:
+;; Some of the functions should be unbundled into separate packages,
+;; but well I'm a lazy guy. And some of them are not tested well.
+;;
+;; In order to install this package you need to byte-compile it and put
+;; it into your load-path and add the following lines to the _end_ of your
+;; .vm file. It should be the _end_ in order to ensure that variable you had
+;; been setting are honored!
+;;
+;; (require 'vm-rfaddons)
+;; (vm-rfaddons-infect-vm)
+;;
+;; When using only a subset of the functions you should have a
+;; look at the documentation of `vm-rfaddons-infect-vm' and modify
+;; its call as desired.
+;;
+;; Additional packages you may need are:
+;;
+;; * Package: Personality Crisis for VM
+;; is a really cool package if you want to do automatic header rewriting,
+;; e.g. if you have various mail accounts and always want to use the right
+;; from header, then check it out!
+;;
+;; * Package: BBDB
+;; Homepage: http://bbdb.sourceforge.net
+;;
+;; All other packages should be included within standard (X)Emacs
+;; distributions.
+;;
+;; Feel free to sent me any comments or bug reports.
+;;
+;; As I am no active GNU Emacs user, I would be thankful for any patches to
+;; make things work with GNU Emacs!
+;;
+;;; Code:
+
+(defgroup vm nil
+ "VM"
+ :group 'mail)
+
+(defgroup vm-rfaddons nil
+ "Customize vm-rfaddons.el"
+ :group 'vm)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(eval-when-compile
+ (require 'vm-version)
+ (require 'vm-message)
+ (require 'vm-macro)
+ (require 'vm-vars)
+ (require 'cl)
+ (require 'advice)
+ (let ((feature-list '(regexp-opt bbdb bbdb-vm gnus-group)))
+ (while feature-list
+ (condition-case nil
+ (require (car feature-list))
+ (error
+ (if (load (format "%s" (car feature-list)) t)
+ (message "Library %s loaded!" (car feature-list))
+ (message "Could not load feature %S. Related functions may not work correctly!" (car feature-list)))))
+ (setq feature-list (cdr feature-list)))))
+
+(require 'sendmail)
+
+(if vm-xemacs-p (require 'overlay))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; GNU Emacs seems to miss some functions
+(if (not (functionp 'replace-in-string))
+ ;; actually this is dired-replace-in-string slightly modified
+ (defun replace-in-string (string regexp newtext &optional literal)
+ ;; Replace REGEXP with NEWTEXT everywhere in STRING and return result.
+ ;; NEWTEXT is taken literally---no \\DIGIT escapes will be recognized.
+ (let ((result "") (start 0) mb me)
+ (while (string-match regexp string start)
+ (setq mb (match-beginning 0)
+ me (match-end 0)
+ result (concat result (substring string start mb) newtext)
+ start me))
+ (concat result (substring string start)))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defmacro vm-rfaddons-check-option (option option-list &rest body)
+ "Evaluate body if option is in OPTION-LIST or OPTION-LIST is nil."
+ (list 'if (list 'member option option-list)
+ (cons 'progn
+ (cons (list 'setq option-list (list 'delq option option-list))
+ (cons (list 'message "Adding vm-rfaddons-option `%s'."
+ option)
+ body)))))
+
+;;;###autoload
+(defun vm-rfaddons-infect-vm (&optional sit-for
+ option-list exclude-option-list)
+ "This function will setup the key bindings, advices and hooks
+necessary to use all the function of vm-rfaddons.el!
+
+SIT-FOR specifies the number of seconds to display the infection message!
+The OPTION-LIST can be use to select individual option.
+The EXCLUDE-OPTION-LIST can be use to exclude individual option.
+
+The following options are possible.
+
+`general' options:
+ - rf-faces: change some faces
+
+`vm-mail-mode' options:
+ - attach-save-files: bind [C-c C-a] to `vm-mime-attach-files-in-directory'
+ - check-recipients: add `vm-mail-check-recipients' to `mail-send-hook' in
+ order to check if the recipients headers are correctly.
+ - encode-headers: add `vm-mime-encode-headers' to `mail-send-hook' in
+ order to encode the headers before sending.
+ - fake-date: if enabled allows you to fake the date of an outgoing message.
+
+`vm-mode' options:
+ - save-all-attachments: in vm-mail-mode and [C-c C-s] to the function
+ `vm-mime-save-all-attachments'
+ - shrunken-headers: enable shrunken-headers by advising several functions
+ - take-action-on-attachment: bind [.] to `vm-mime-take-action-on-attachment'
+
+Other EXPERIMENTAL options:
+ - auto-save-all-attachments: add `vm-mime-auto-save-all-attachments' to
+ `vm-select-new-message-hook' for automatic saving of attachments and define
+ an advice for `vm-set-deleted-flag-of' in order to automatically delete
+ the files corresponding to MIME objects of type message/external-body when
+ deleting the message.
+ - return-receipt-to
+
+If you want to use only a subset of the options then call
+`vm-rfaddons-infect-vm' like this:
+ (vm-rfaddons-infect-vm 2 '(general vm-mail-mode shrunken-headers)
+ '(fake-date))
+This will enable all `general' and `vm-mail-mode' options plus the
+`shrunken-headers' option, but it will exclude the `fake-date' option of the
+`vm-mail-mode' options.
+
+or do the binding and advising on your own."
+ (interactive "")
+
+ (if (eq option-list 'all)
+ (setq option-list (list 'general 'vm-mail-mode 'vm-mode
+ 'auto-save-all-attachments
+ 'auto-delete-message-external-body))
+ (if (eq option-list t)
+ (setq option-list (list 'vm-mail-mode 'vm-mode))))
+
+ (when (member 'general option-list)
+ (setq option-list (append '(rf-faces)
+ option-list))
+ (setq option-list (delq 'general option-list)))
+
+ (when (member 'vm-mail-mode option-list)
+ (setq option-list (append '(attach-save-files
+ check-recipients
+ check-for-empty-subject
+ encode-headers
+ clean-subject
+ fake-date
+ open-line)
+ option-list))
+ (setq option-list (delq 'vm-mail-mode option-list)))
+
+ (when (member 'vm-mode option-list)
+ (setq option-list (append '(
+ save-all-attachments
+ shrunken-headers
+ take-action-on-attachment)
+ option-list))
+ (setq option-list (delq 'vm-mode option-list)))
+
+ (while exclude-option-list
+ (if (member (car exclude-option-list) option-list)
+ (setq option-list (delq (car exclude-option-list) option-list))
+ (message "VM-RFADDONS: The option `%s' was not excluded, maybe it is unknown!"
+ (car exclude-option-list))
+ (ding)
+ (sit-for 3))
+ (setq exclude-option-list (cdr exclude-option-list)))
+
+ ;; general ----------------------------------------------------------------
+ ;; install my choice of faces
+ (vm-rfaddons-check-option
+ 'rf-faces option-list
+ (vm-install-rf-faces))
+
+ ;; vm-mail-mode -----------------------------------------------------------
+ (vm-rfaddons-check-option
+ 'attach-save-files option-list
+ (define-key vm-mail-mode-map "\C-c\C-a" 'vm-mime-attach-files-in-directory))
+
+ ;; check recipients headers for errors before sending
+ (vm-rfaddons-check-option
+ 'check-recipients option-list
+ (add-hook 'mail-send-hook 'vm-mail-check-recipients))
+
+ ;; check if the subjectline is empty
+ (vm-rfaddons-check-option
+ 'check-for-empty-subject option-list
+ (add-hook 'vm-mail-send-hook 'vm-mail-check-for-empty-subject))
+
+ ;; encode headers before sending
+ (vm-rfaddons-check-option
+ 'encode-headers option-list
+ (add-hook 'mail-send-hook 'vm-mime-encode-headers))
+
+ ;; This allows us to fake a date by advising vm-mail-mode-insert-date-maybe
+ (vm-rfaddons-check-option
+ 'fake-date option-list
+ (defadvice vm-mail-mode-insert-date-maybe (around vm-fake-date activate)
+ "Do not change an existing date if `vm-mail-mode-fake-date-p' is t."
+ (if (not (and vm-mail-mode-fake-date-p
+ (vm-mail-mode-get-header-contents "Date:")))
+ ad-do-it)))
+
+ (vm-rfaddons-check-option
+ 'open-line option-list
+ (add-hook 'vm-mail-mode-hook 'vm-mail-mode-install-open-line))
+
+ (vm-rfaddons-check-option
+ 'clean-subject option-list
+ (add-hook 'vm-mail-mode-hook 'vm-mail-subject-cleanup))
+
+ ;; vm-mode -----------------------------------------------------------
+
+ ;; Shrunken header handlers
+ (vm-rfaddons-check-option
+ 'shrunken-headers option-list
+ (if (not (boundp 'vm-always-use-presentation-buffer))
+ (message "Shrunken-headers do NOT work in standard VM!")
+ ;; We would corrupt the folder buffer for messages which are
+ ;; not displayed by a presentation buffer, thus we must ensure
+ ;; that a presentation buffer is used. The visibility-widget
+ ;; would cause "*"s to be inserted into the folder buffer.
+ (setq vm-always-use-presentation-buffer t)
+ (defadvice vm-preview-current-message
+ (after vm-shrunken-headers-pcm activate)
+ "Shrink headers when previewing a message."
+ (vm-shrunken-headers))
+ (defadvice vm-expose-hidden-headers
+ (after vm-shrunken-headers-ehh activate)
+ "Shrink headers when viewing hidden headers."
+ (vm-shrunken-headers))
+ (define-key vm-mode-map "T" 'vm-shrunken-headers-toggle)))
+
+ ;; take action on attachment binding
+ (vm-rfaddons-check-option
+ 'take-action-on-attachment option-list
+ (define-key vm-mode-map "." 'vm-mime-take-action-on-attachment))
+
+ (vm-rfaddons-check-option
+ 'save-all-attachments option-list
+ (define-key vm-mode-map "\C-c\C-s" 'vm-mime-save-all-attachments))
+
+ ;; other experimental options ---------------------------------------------
+ ;; Now take care of automatic saving of attachments
+ (vm-rfaddons-check-option
+ 'auto-save-all-attachments option-list
+ ;; In order to reflect MIME type changes when `vm-mime-delete-after-saving'
+ ;; is t we preview the message again.
+ (defadvice vm-mime-send-body-to-file
+ (after vm-do-preview-again activate)
+ (if vm-mime-delete-after-saving
+ (vm-preview-current-message)))
+ (add-hook 'vm-select-new-message-hook 'vm-mime-auto-save-all-attachments))
+
+ (vm-rfaddons-check-option
+ 'auto-delete-message-external-body option-list
+ ;; and their deletion when deleting a unfiled message,
+ ;; this is probably a problem, since actually we should delete it
+ ;; only if there remains no reference to it!!!!
+ (defadvice vm-set-deleted-flag-of
+ (before vm-mime-auto-save-all-attachments activate)
+ (if (and (eq (ad-get-arg 1) 'expunged)
+ (not (vm-filed-flag (ad-get-arg 0))))
+ (vm-mime-auto-save-all-attachments-delete-external (ad-get-arg 0)))))
+
+ (vm-rfaddons-check-option
+ 'return-receipt-to option-list
+ (add-hook 'vm-select-message-hook 'vm-handle-return-receipt))
+
+ (when option-list
+ (message "VM-RFADDONS: The following options are unknown: %s" option-list)
+ (ding)
+ (sit-for 3))
+
+ (message "VM-RFADDONS: VM is now infected. Please report bugs to Robert Widhopf-Fenk!")
+ (sit-for (or sit-for 2)))
+
+(defun rf-vm-su-labels (m)
+ "This version does some sanity checking."
+ (let ((labels (vm-label-string-of m)))
+ (if (and labels (stringp labels))
+ labels
+ (setq labels (vm-labels-of m))
+ (if (and labels (listp labels))
+ (vm-set-label-string-of
+ m
+ (setq labels (mapconcat 'identity labels ",")))
+ (vm-set-label-string-of m "")
+ (setq labels "")))
+ labels))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defvar vm-reply-include-presentation nil)
+
+;;;###autoload
+(defun vm-reply-include-presentation (count &optional to-all)
+ "Include presentation instead of text.
+This does only work with my modified VM, i.e. a hacked `vm-yank-message'."
+ (interactive "p")
+ (vm-follow-summary-cursor)
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-error-if-folder-empty)
+ (if (null vm-presentation-buffer)
+ (if to-all
+ (vm-followup-include-text count)
+ (vm-reply-include-text count))
+ (let ((vm-reply-include-presentation t))
+ (vm-do-reply to-all t count))))
+
+;;;###autoload
+(defun vm-followup-include-presentation (count)
+ "Include presentation instead of text.
+This does not work when replying to multiple messages."
+ (interactive "p")
+ (vm-reply-include-presentation count t))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-do-fcc-before-mime-encode ()
+ "The name says it all.
+Sometimes you may want to save a message unencoded, specifically not to waste
+storage for attachments which are stored on disk anyway."
+ (interactive)
+ (save-excursion
+ (goto-char (point-min))
+ (re-search-forward (regexp-quote mail-header-separator) (point-max))
+ (delete-region (match-beginning 0) (match-end 0))
+ (let ((header-end (point-marker)))
+ (mail-do-fcc header-end)
+ (goto-char header-end)
+ (insert mail-header-separator))))
+
+(defcustom vm-do-fcc-before-mime-encode nil
+ "*Non-nil means to FCC before encoding."
+ :type 'boolean
+ :group 'vm-rfaddons)
+
+(defadvice vm-mime-encode-composition
+ (before do-fcc-before-mime-encode activate)
+ "FCC before encoding attachments if `vm-do-fcc-before-mime-encode' is t."
+ (if vm-do-fcc-before-mime-encode
+ (vm-do-fcc-before-mime-encode)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defcustom vm-fill-paragraphs-containing-long-lines-faster nil
+ "*Do faster filling of long lines with code borrowed from Gnus.
+This is essentially faster than VMs functions."
+ :type 'boolean
+ :group 'vm-rfaddons)
+
+(defvar vm-unfill-paragraphs-containing-long-lines-faster nil
+ "Set by calling `vm-unfill-paragraphs-containing-long-lines'.")
+
+(defcustom vm-fill-long-lines-in-reply-column 70
+ "*Fill lines in replies up to this column."
+ :type 'integer
+ :group 'vm-rfaddons)
+
+(defadvice vm-fill-paragraphs-containing-long-lines
+ (around vm-rfaddons-better-filling activate)
+ "Do better filling if longlines.el is present otherwise if
+`vm-fill-paragraphs-containing-long-lines-faster' is 't do faster
+filling than VMs code."
+ (if (eq (ad-get-arg 0) 'window-width)
+ (ad-set-arg 0 (- (window-width (get-buffer-window (current-buffer))) 1)))
+ (cond
+ ;; use long lines when present
+ ((locate-library "longlines")
+ (require 'overlay)
+ (defvar fill-nobreak-predicate nil)
+ (defvar undo-in-progress nil)
+ (defvar longlines-mode-hook nil)
+ (defvar longlines-mode-on-hook nil)
+ (defvar longlines-mode-off-hook nil)
+ (unless (functionp 'replace-regexp-in-string)
+ (defun replace-regexp-in-string (regexp rep string
+ &optional fixedcase literal)
+ (replace-in-string string regexp rep literal)))
+ (unless (functionp 'line-end-position)
+ (defun line-end-position ()
+ (save-excursion (end-of-line) (point))))
+ (unless (functionp 'line-beginning-position)
+ (defun line-beginning-position (&optional n)
+ (save-excursion
+ (if n (forward-line n))
+ (beginning-of-line)
+ (point)))
+ (unless (functionp 'replace-regexp-in-string)
+ (defun replace-regexp-in-string (regexp rep string
+ &optional fixedcase literal)
+ (replace-in-string string regexp rep literal))))
+ (require 'longlines)
+ (vm-fill-paragraphs-containing-long-lines-by-longlines
+ (ad-get-arg 0) (ad-get-arg 1) (ad-get-arg 2)))
+ ((eq t vm-fill-paragraphs-containing-long-lines-faster)
+ (vm-fill-paragraphs-containing-long-lines-faster
+ (ad-get-arg 0) (ad-get-arg 1) (ad-get-arg 2)))
+ (t
+ ad-do-it)))
+
+;;;###autoload
+(defun vm-fill-long-lines-in-reply ()
+ (interactive)
+ (rf-vm-fill-paragraphs-containing-long-lines-faster
+ vm-fill-long-lines-in-reply-column
+ (save-excursion
+ (goto-char (point-min))
+ (re-search-forward
+ (regexp-quote mail-header-separator) (point-max))
+ (forward-line 1)
+ (point))
+ (point-max))
+ nil)
+
+;;;###autoload
+(defun vm-fill-paragraphs-containing-long-lines-toggle ()
+ (interactive)
+ (let ((fp vm-fill-paragraphs-containing-long-lines-faster))
+ (setq vm-fill-paragraphs-containing-long-lines-faster
+ (cond ((eq fp nil)
+ (setq vm-fill-paragraphs-containing-long-lines
+ vm-fill-long-lines-in-reply-column))
+ ((numberp fp)
+ t)
+ (t
+ (setq vm-fill-paragraphs-containing-long-lines nil)))))
+
+ (message "Paragraph-filling %s!"
+ (if vm-fill-paragraphs-containing-long-lines-faster
+ (if (numberp vm-fill-paragraphs-containing-long-lines-faster)
+ (format "for rows longer than %d chars"
+ vm-fill-paragraphs-containing-long-lines-faster)
+ "enabled in fast mode")
+ "disabled")))
+
+;;;###autoload
+(defun vm-unfill-paragraphs-containing-long-lines-faster ()
+ "Sometimes filling long lines is the wrong thing!
+Call this function, if you want to see the message unfilled."
+ (interactive)
+ (let ((vm-unfill-paragraphs-containing-long-lines-faster t))
+ (vm-select-folder-buffer)
+ (vm-preview-current-message)))
+
+;;;###autoload
+(defun vm-fill-paragraphs-containing-long-lines-faster (width start end)
+ (if (not vm-unfill-paragraphs-containing-long-lines-faster)
+ (vm-save-restriction
+ (widen)
+ (or (markerp end) (setq end (vm-marker end)))
+ (rf-vm-fill-paragraphs-containing-long-lines-faster width start end))
+ nil))
+
+(defun rf-vm-fill-paragraphs-containing-long-lines-faster (width start end)
+ (interactive (list vm-paragraph-fill-column (point-min) (point-max)))
+ (save-excursion
+ (let ((buffer-read-only nil)
+ (fill-column width)
+ (filladapt-fill-column-forward-fuzz 0)
+ (filladapt-mode t)
+ (abbrev-mode nil)
+ (filled 0)
+ (message (if (car vm-message-pointer)
+ (vm-su-subject (car vm-message-pointer))
+ (buffer-name))))
+
+ ;; we need a marker for the end since this position might change
+ (goto-char end) (setq end (point-marker))
+ (goto-char start)
+
+ (message "Filling message `%s' to column %d!" message fill-column)
+
+ ;; this should speed up things!
+ (buffer-disable-undo)
+ (condition-case nil
+ (while (< (point) end)
+ (end-of-line)
+ (when (> (current-column) fill-column)
+ (setq filled (1+ filled))
+ (filladapt-fill-paragraph 'fill-paragraph nil))
+ (forward-line 1))
+ (error nil)
+ (quit nil))
+ (buffer-enable-undo)
+
+ (if (> filled 0)
+ (message "Filled %s line%s in message `%s'!"
+ (if (> filled 1) (format "%d" filled) "one")
+ (if (> filled 1) "s" "")
+ message)
+ (message "Nothing to fill!")))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-fill-paragraphs-containing-long-lines-by-longlines (width start end)
+ "Uses `longlines.el' for filling."
+ (let ((buffer-read-only nil)
+ (fill-column width))
+ (save-excursion
+ (vm-save-restriction
+ ;; longlines-wrap-region contains a (forward-line -1) which is causing
+ ;; wrapping of headers which is wrong, so we restrict it here!
+ (narrow-to-region start end)
+ (longlines-decode-region start end) ; make linebreaks hard
+ (longlines-wrap-region start end) ; wrap, adding soft linebreaks
+ (widen)))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defcustom vm-spamassassin-strip-report "spamassassin -d"
+ "*Shell command used to strip spamassassin-reports from a message."
+ :type 'string
+ :group 'vm-rfaddons)
+
+(defun vm-strip-spamassassin-report ()
+ "Strips spamassassin-reports from a message."
+ (interactive)
+ (save-window-excursion
+ (let ((vm-frame-per-edit nil))
+ (vm-edit-message)
+ (shell-command-on-region (point-min) (point-max)
+ vm-spamassassin-strip-report
+ (current-buffer)
+ t)
+ (vm-edit-message-end))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defvar vm-switch-to-folder-history nil)
+
+;;;###autoload
+(defun vm-switch-to-folder (folder-name)
+"Switch to another opened VM folder and rearrange windows as with a scroll."
+ (interactive (list
+ (let ((fl (vm-folder-list))
+ (f vm-switch-to-folder-history) d)
+ (if (member major-mode
+ '(vm-mode vm-presentation-mode
+ vm-summary-mode))
+ (save-excursion
+ (vm-select-folder-buffer)
+ (setq fl (delete (buffer-name) fl))))
+ (while f
+ (setq d (car f) f (cdr f))
+ (if (member d fl)
+ (setq f nil)))
+ (completing-read
+ (format "Foldername%s: " (if d (format " (%s)" d) ""))
+ (mapcar (lambda (f) (list f)) (vm-folder-list))
+ nil t nil
+ 'vm-switch-to-folder-history
+ d))))
+
+ (switch-to-buffer folder-name)
+ (vm-select-folder-buffer)
+ (vm-summarize)
+ (let ((this-command 'vm-scroll-backward))
+ (vm-display nil nil '(vm-scroll-forward vm-scroll-backward)
+ (list this-command 'reading-message))
+ (vm-update-summary-and-mode-line)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defcustom vm-rmail-mode nil
+ "*Non-nil means up/down of modes listed in `vm-rmail-mode-list' do cursor movement.
+Use `vm-rmail-toggle' to switch between normal and this mode."
+ :type 'boolean
+ :group 'vm-rfaddons)
+
+(defcustom vm-rmail-mode-list
+ '(vm-mode vm-presentation-mode vm-virtual-mode)
+ "*Mode to activate `vm-rmail-mode' in."
+ :type '(repeat (const vm-mode)
+ (const vm-presentation-mode)
+ (const vm-virtual-mode)
+ (const vm-summary-mode))
+ :group 'vm-rfaddons)
+
+(defun vm-rmail-toggle (&optional arg)
+ (interactive)
+ (cond ((eq nil arg)
+ (setq vm-rmail-mode (not vm-rmail-mode)))
+ ((= 1 arg)
+ (setq vm-rmail-mode t))
+ ((= -1 arg)
+ (setq vm-rmail-mode nil))
+ (t
+ (setq vm-rmail-mode (not vm-rmail-mode))))
+ (message (if vm-rmail-mode "Rmail cursor mode" "VM cursor mode")))
+
+(defun vm-rmail-up ()
+ (interactive)
+ (cond ((and vm-rmail-mode (member major-mode vm-rmail-mode-list))
+ (next-line -1))
+ (t
+ (vm-next-message -1)
+ (vm-display nil nil '(rf-vm-rmail-up vm-previous-message)
+ (list this-command)))))
+
+(defun vm-rmail-down ()
+ (interactive)
+ (cond ((and vm-rmail-mode (member major-mode vm-rmail-mode-list))
+ (next-line 1))
+ (t
+ (vm-next-message 1)
+ (vm-display nil nil '(rf-vm-rmail-up vm-next-message)
+ (list this-command)))))
+
+(defun vm-do-with-message (count function vm-display)
+ (vm-follow-summary-cursor)
+ (save-excursion
+ (vm-select-folder-buffer)
+ (let ((mlist (vm-select-marked-or-prefixed-messages count)))
+ (while mlist
+ (funcall function (car mlist))
+ (vm-mark-for-summary-update (car mlist) t)
+ (setq mlist (cdr mlist))))
+ (vm-display nil nil (append vm-display '(vm-do-with-message))
+ (list this-command))
+ (vm-update-summary-and-mode-line)))
+
+(defun vm-toggle-mark (count &optional m)
+ (interactive "p")
+ (vm-do-with-message
+ count
+ (lambda (m) (vm-set-mark-of m (not (vm-mark-of m))))
+ '(vm-toggle-mark vm-mark-message marking-message)))
+
+(defun vm-toggle-deleted (count &optional m)
+ (interactive "p")
+ (vm-do-with-message
+ count
+ (lambda (m) (vm-set-deleted-flag m (not (vm-deleted-flag m))))
+ '(vm-toggle-deleted vm-delete-message vm-delete-message-backward)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defcustom vm-mail-subject-prefix-replacements
+ '(("\\(\\(re\\|aw\\|antw\\)\\(\\[[0-9]+\\]\\)?:[ \t]*\\)+" . "Re: ")
+ ("\\(\\(fo\\|wg\\)\\(\\[[0-9]+\\]\\)?:[ \t]*\\)+" . "Fo: "))
+ "*List of subject prefixes which should be replaced.
+Matching will be done case insentivily."
+ :group 'vm-rfaddons
+ :type '(repeat (cons (regexp :tag "Regexp")
+ (string :tag "Replacement"))))
+
+(defcustom vm-mail-subject-number-reply nil
+ "*Non-nil means, add a number [N] after the reply prefix.
+The number reflects the number of references."
+ :group 'vm-rfaddons
+ :type '(choice
+ (const :tag "on" t)
+ (const :tag "off" nil)))
+
+(defun vm-mail-subject-cleanup ()
+ "Do some subject line clean up.
+- Replace subject prefixes according to `vm-replace-subject-prefixes'.
+- Add a number after replies is `vm-mail-subject-number-reply' is t.
+
+You might add this function to `vm-mail-mode-hook' in order to clean up the
+Subject header."
+ (interactive)
+ (save-excursion
+ ;; cleanup
+ (goto-char (point-min))
+ (re-search-forward (regexp-quote mail-header-separator) (point-max))
+ (let ((case-fold-search t)
+ (rpl vm-mail-subject-prefix-replacements))
+ (while rpl
+ (if (re-search-backward (concat "^Subject:[ \t]*" (caar rpl))
+ (point-min) t)
+ (replace-match (concat "Subject: " (cdar rpl))))
+ (setq rpl (cdr rpl))))
+
+ ;; add number to replys
+ (let (refs (start 0) end (count 0))
+ (when (and vm-mail-subject-number-reply vm-reply-list
+ (setq refs (vm-mail-mode-get-header-contents "References:")))
+ (while (string-match "<[^<>]+>" refs start)
+ (setq count (1+ count)
+ start (match-end 0)))
+ (when (> count 1)
+ (mail-position-on-field "Subject" t)
+ (setq end (point))
+ (if (re-search-backward "^Subject:" (point-min) t)
+ (setq start (point))
+ (error "Could not find end of Subject header start!"))
+ (goto-char start)
+ (if (not (re-search-forward (regexp-quote vm-reply-subject-prefix)
+ end t))
+ (error "Cound not find vm-reply-subject-prefix `%s' in header!"
+ vm-reply-subject-prefix)
+ (goto-char (match-end 0))
+ (skip-chars-backward ": \t")
+ (insert (format "[%d]" count))))))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defun vm-mime-set-8bit-composition-charset (charset &optional buffer-local)
+ "*Set `vm-mime-8bit-composition-charset' to CHARSET.
+With the optional BUFFER-LOCAL prefix arg, this only affects the current
+buffer."
+ (interactive (list (completing-read "Composition charset: "
+ vm-mime-charset-completion-alist
+ nil t)
+ current-prefix-arg))
+ (if (or vm-xemacs-mule-p vm-fsfemacs-p)
+ (error "vm-mime-8bit-composition-charset has no effect in XEmacs/MULE"))
+ (if buffer-local
+ (set (make-local-variable 'vm-mime-8bit-composition-charset) charset)
+ (setq vm-mime-8bit-composition-charset charset)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defun bbdb/vm-set-virtual-folder-alist ()
+ "Create a `vm-virtual-folder-alist' according to the records in the bbdb.
+For each record that has a 'vm-virtual' attribute, add or modify the
+corresponding BBDB-VM-VIRTUAL element of the `vm-virtual-folder-alist'.
+
+ (BBDB-VM-VIRTUAL ((vm-primary-inbox)
+ (author-or-recipient BBDB-RECORD-NET-REGEXP)))
+
+The element gets added to the 'element-name' sublist of the
+`vm-virtual-folder-alist'."
+ (interactive)
+ (let (notes-field email-regexp folder selector)
+ (dolist (record (bbdb-records))
+ (setq notes-field (bbdb-record-raw-notes record))
+ (when (and (listp notes-field)
+ (setq folder (cdr (assq 'vm-virtual notes-field))))
+ (setq email-regexp (mapconcat '(lambda (addr)
+ (regexp-quote addr))
+ (bbdb-record-net record) "\\|"))
+ (unless (zerop (length email-regexp))
+ (setq folder (or (assoc folder vm-virtual-folder-alist)
+ (car
+ (setq vm-virtual-folder-alist
+ (nconc (list (list folder
+ (list (list vm-primary-inbox)
+ (list 'author-or-recipient))))
+ vm-virtual-folder-alist))))
+ folder (cadr folder)
+ selector (assoc 'author-or-recipient folder))
+
+ (if (cdr selector)
+ (if (not (string-match (regexp-quote email-regexp)
+ (cadr selector)))
+ (setcdr selector (list (concat (cadr selector) "\\|"
+ email-regexp))))
+ (nconc selector (list email-regexp)))))
+ )
+ ))
+
+(defun vm-virtual-find-selector (selector-spec type)
+ "Return the first selector of TYPE in SELECTOR-SPEC."
+ (let ((s (assoc type selector-spec)))
+ (unless s
+ (while (and (not s) selector-spec)
+ (setq s (and (listp (car selector-spec))
+ (vm-virtual-find-selector (car selector-spec) type))
+ selector-spec (cdr selector-spec))))
+ s))
+
+(defcustom bbdb/vm-virtual-folder-alist-by-mail-alias-alist nil
+ "*A list of (ALIAS . FOLDER-NAME) pairs, which map an alias to a folder."
+ :group 'vm-rfaddons
+ :type '(repeat (cons :tag "Mapping Definition"
+ (regexp :tag "Alias")
+ (string :tag "Folder Name"))))
+
+(defun bbdb/vm-set-virtual-folder-alist-by-mail-alias ()
+ "Create a `vm-virtual-folder-alist' according to the records in the bbdb.
+For each record check wheather its alias is in the variable
+`bbdb/vm-virtual-folder-alist-by-mail-alias-alist' and then
+add/modify the corresponding VM-VIRTUAL element of the
+`vm-virtual-folder-alist'.
+
+ (BBDB-VM-VIRTUAL ((vm-primary-inbox)
+ (author-or-recipient BBDB-RECORD-NET-REGEXP)))
+
+The element gets added to the 'element-name' sublist of the
+`vm-virtual-folder-alist'."
+ (interactive)
+ (let (notes-field email-regexp mail-aliases folder selector)
+ (dolist (record (bbdb-records))
+ (setq notes-field (bbdb-record-raw-notes record))
+ (when (and (listp notes-field)
+ (setq mail-aliases (cdr (assq 'mail-alias notes-field)))
+ (setq mail-aliases (bbdb-split mail-aliases ",")))
+ (setq folder nil)
+ (while mail-aliases
+ (setq folder
+ (assoc (car mail-aliases)
+ bbdb/vm-virtual-folder-alist-by-mail-alias-alist))
+
+ (when (and folder
+ (setq folder (cdr folder)
+ email-regexp (mapconcat '(lambda (addr)
+ (regexp-quote addr))
+ (bbdb-record-net record)
+ "\\|"))
+ (> (length email-regexp) 0))
+ (setq folder (or (assoc folder vm-virtual-folder-alist)
+ (car
+ (setq vm-virtual-folder-alist
+ (nconc
+ (list
+ (list folder
+ (list (list vm-primary-inbox)
+ (list 'author-or-recipient))
+ ))
+ vm-virtual-folder-alist))))
+ folder (cadr folder)
+ selector (vm-virtual-find-selector folder
+ 'author-or-recipient))
+ (unless selector
+ (nconc (cdr folder) (list (list 'author-or-recipient))))
+ (if (cdr selector)
+ (if (not (string-match (regexp-quote email-regexp)
+ (cadr selector)))
+ (setcdr selector (list (concat (cadr selector) "\\|"
+ email-regexp))))
+ (nconc selector (list email-regexp))))
+ (setq mail-aliases (cdr mail-aliases)))
+ ))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defcustom vm-handle-return-receipt-mode 'edit
+ "*Tells `vm-handle-return-receipt' how to handle return receipts.
+One can choose between 'ask, 'auto, 'edit or an expression which is evaluated
+and which should return t if the return receipts should be sent."
+ :group 'vm-rfaddons
+ :type '(choice (const :tag "Edit" edit)
+ (const :tag "Ask" ask)
+ (const :tag "Auto" auto)))
+
+(defcustom vm-handle-return-receipt-peek 500
+ "*Number of characters from the original message body to be returned."
+ :group 'vm-rfaddons
+ :type '(integer))
+
+(defun vm-handle-return-receipt ()
+ "Generate a reply to the current message if it requests a return receipt
+and has not been replied so far!
+See the variable `vm-handle-return-receipt-mode' for customization."
+ (interactive)
+ (save-excursion
+ (vm-select-folder-buffer)
+ (let* ((msg (car vm-message-pointer))
+ (sender (vm-get-header-contents msg "Return-Receipt-To:"))
+ (mail-signature nil)
+ (mode (and sender
+ (cond ((equal 'ask vm-handle-return-receipt-mode)
+ (y-or-n-p "Send a return receipt? "))
+ ((symbolp vm-handle-return-receipt-mode)
+ vm-handle-return-receipt-mode)
+ (t
+ (eval vm-handle-return-receipt-mode)))))
+ (vm-mutable-frames (if (eq mode 'edit) vm-mutable-frames nil))
+ (vm-mail-mode-hook nil)
+ (vm-mode-hook nil)
+ message)
+ (when (and mode (not (vm-replied-flag msg)))
+ (vm-reply 1)
+ (vm-mail-mode-remove-header "Return-Receipt-To:")
+ (vm-mail-mode-remove-header "To:")
+ (goto-char (point-min))
+ (insert "To: " sender "\n")
+ (mail-text)
+ (delete-region (point) (point-max))
+ (insert
+ (format
+ "Your mail has been received on %s."
+ (current-time-string)))
+ (save-restriction
+ (save-excursion
+ (set-buffer (vm-buffer-of msg))
+ (widen)
+ (setq message
+ (buffer-substring
+ (vm-vheaders-of msg)
+ (let ((tp (+ vm-handle-return-receipt-peek
+ (marker-position
+ (vm-text-of msg))))
+ (ep (marker-position
+ (vm-end-of msg))))
+ (if (< tp ep) tp ep))
+ ))))
+ (insert "\n-----------------------------------------------------------------------------\n"
+ message)
+ (if (re-search-backward "^\\s-+.*" (point-min) t)
+ (replace-match ""))
+ (insert "[...]\n")
+ (if (not (eq mode 'edit))
+ (vm-mail-send-and-exit nil))
+ )
+ )))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defun vm-mime-find-type-of-message/external-body (layout)
+ (save-excursion
+ (vm-select-folder-buffer)
+ (save-restriction
+ (set-buffer (marker-buffer (vm-mm-layout-body-start layout)))
+ (widen)
+ (goto-char (vm-mm-layout-body-start layout))
+ (if (not (re-search-forward "Content-Type: \"?\\([^ ;\" \n\t]+\\)\"?;?"
+ (vm-mm-layout-body-end layout)
+ t))
+ (error "No `Content-Type' header found in: %s"
+ (buffer-substring (vm-mm-layout-body-start layout)
+ (vm-mm-layout-body-end layout)))
+ (match-string 1)))))
+
+;; This is a hack in order to get the right MIME button
+;(defadvice vm-mime-set-extent-glyph-for-type
+; (around vm-message/external-body-glyph activate)
+; (if (and (boundp 'real-mime-type)
+; (string= (ad-get-arg 1) "message/external-body"))
+; (ad-set-arg 1 real-mime-type))
+; ad-do-it)
+
+;;;###autoload
+(defun vm-mime-display-button-message/external-body (layout)
+ "Return a button usable for viewing message/external-body MIME parts.
+When you apply `vm-mime-send-body-to-file' with `vm-mime-delete-after-saving'
+set to t one will get theses message/external-body parts which point
+to the external file.
+In order to view these we search for the right viewer hopefully listed
+in `vm-mime-external-content-types-alist' and invoke it as it would
+have happened before saving. Otherwise we display the contents as text/plain.
+Probably we should be more clever here in order to fake a layout if internal
+displaying is possible ...
+
+But nevertheless this allows for keeping folders smaller without
+loosing basic functionality when using `vm-mime-auto-save-all-attachments'."
+ (let ((buffer-read-only nil)
+ (real-mime-type (vm-mime-find-type-of-message/external-body layout)))
+ (vm-mime-insert-button
+ (replace-in-string
+ (format " external: %s %s"
+ (if (vm-mime-get-parameter layout "name")
+ (file-name-nondirectory (vm-mime-get-parameter layout "name"))
+ "")
+ (let ((tmplayout (copy-tree layout t))
+ format)
+ (aset tmplayout 0 (list real-mime-type))
+ (setq format (vm-mime-find-format-for-layout tmplayout))
+ (setq format (replace-in-string format "^%-[0-9]+.[0-9]+"
+ "%-15.15" t))
+ (vm-mime-sprintf format tmplayout)))
+ "save to a file\\]"
+ "display as text]")
+ (function
+ (lambda (xlayout)
+ (setq layout (if vm-xemacs-p
+ (vm-extent-property xlayout 'vm-mime-layout)
+ (overlay-get xlayout 'vm-mime-layout)))
+ (let* ((type (vm-mime-find-type-of-message/external-body layout))
+ (viewer (vm-mime-find-external-viewer type))
+ (filename (vm-mime-get-parameter layout "name")))
+ (if (car viewer)
+ (progn
+ (message "Viewing %s with %s" filename (car viewer))
+ (start-process (format "Viewing %s" filename)
+ nil
+ (car viewer)
+ filename))
+ (let ((buffer-read-only nil)
+ (converter (assoc type vm-mime-type-converter-alist)))
+ (if vm-xemacs-p
+ (delete-region (extent-start-position xlayout)
+ (extent-end-position xlayout))
+ (delete-region (overlay-start xlayout) (overlay-end xlayout)))
+
+ (if converter
+ (shell-command (concat (caddr converter) " < '" filename "'")
+ 1)
+ (message "Could not find viewer for type %s!" type)
+ (insert-file filename))))
+ )))
+ layout
+ nil)))
+
+;;;###autoload
+;(defun vm-mime-display-internal-message/external-body (layout)
+; "Display the text of the message/external-body MIME part."
+; (vm-mime-display-internal-text/plain layout))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defcustom vm-mime-all-attachments-directory nil
+ "*Directory to where the attachments should go or come from."
+ :group 'vm-rfaddons
+ :type '(choice (directory :tag "Directory:")
+ (const :tag "Use `vm-mime-attachment-save-directory'" nil)))
+
+(defvar vm-mime-save-all-attachments-history nil
+ "Directory history to where the attachments should go.")
+
+(defvar vm-mime-attach-files-in-directory-regexps-history nil
+ "Regexp history for matching files.")
+
+(defcustom vm-mime-attach-files-in-directory-default-type nil
+ "*The default MIME-type for attached files.
+If set to nil you will be asked for the type if it cannot be guessed.
+For guessing mime-types we use `vm-mime-attachment-auto-type-alist'."
+ :group 'vm-rfaddons
+ :type '(choice (const :tag "Ask" nil)
+ (string "application/octet-stream")))
+
+(defcustom vm-mime-attach-files-in-directory-default-charset 'guess
+ "*The default charset used for attached files of type `text'.
+If set to nil you will be asked for the charset.
+If set to 'guess it will be determined by `vm-determine-proper-charset', but
+this may take some time, since the file needs to be visited."
+ :group 'vm-rfaddons
+ :type '(choice (const :tag "Ask" nil)
+ (const :tag "Guess" guess)))
+
+(defcustom vm-mime-save-all-attachments-types
+ (append
+ '("application" "x-unknown" "application/x-gzip")
+ (mapcar (lambda (a) (car a))
+ vm-mime-external-content-types-alist))
+ "*List of MIME types which should be saved."
+ :group 'vm-rfaddons
+ :type '(repeat (string :tag "MIME type" nil)))
+
+(defcustom vm-mime-save-all-attachments-types-exceptions
+ '("text")
+ "*List of MIME types which should not be saved."
+ :group 'vm-rfaddons
+ :type '(repeat (string :tag "MIME type" nil)))
+
+(defcustom vm-mime-delete-all-attachments-types
+ (append
+ '("application" "x-unknown" "application/x-gzip")
+ (mapcar (lambda (a) (car a))
+ vm-mime-external-content-types-alist))
+ "*List of MIME types which should be deleted."
+ :group 'vm-rfaddons
+ :type '(repeat (string :tag "MIME type" nil)))
+
+(defcustom vm-mime-delete-all-attachments-types-exceptions
+ '("text")
+ "*List of MIME types which should not be deleted."
+ :group 'vm-rfaddons
+ :type '(repeat (string :tag "MIME type" nil)))
+
+(defvar vm-mime-auto-save-all-attachments-avoid-recursion nil
+ "For internal use.")
+
+(defun vm-mime-is-type-valid (type types-alist type-exceptions)
+ (catch 'done
+ (let ((list type-exceptions)
+ (matched nil))
+ (while list
+ (if (vm-mime-types-match (car list) type)
+ (throw 'done nil)
+ (setq list (cdr list))))
+ (setq list types-alist)
+ (while (and list (not matched))
+ (if (vm-mime-types-match (car list) type)
+ (setq matched t)
+ (setq list (cdr list))))
+ matched )))
+
+;;;###autoload
+(defun vm-mime-attach-files-in-directory (directory &optional regexp)
+ "Attach all files in DIRECTORY matching REGEXP.
+The optional argument MATCH might specify a regexp matching all files
+which should be attached, when empty all files will be attached.
+
+When called with a prefix arg it will do a literal match instead of a regexp
+match."
+ (interactive
+ (flet ((substitute-in-file-name (file) file))
+ (let ((file (vm-read-file-name
+ "Attach files matching regexp: "
+ (or vm-mime-all-attachments-directory
+ vm-mime-attachment-save-directory
+ default-directory)
+ (or vm-mime-all-attachments-directory
+ vm-mime-attachment-save-directory
+ default-directory)
+ nil nil
+ vm-mime-attach-files-in-directory-regexps-history)))
+ (list (file-name-directory file)
+ (file-name-nondirectory file)))))
+
+ (setq vm-mime-all-attachments-directory directory)
+
+ (message "Attaching files matching `%s' from directory %s " regexp directory)
+
+ (if current-prefix-arg
+ (setq regexp (concat "^" (regexp-quote regexp) "$")))
+
+ (let ((files (directory-files directory t regexp nil))
+ file type charset)
+ (if (null files)
+ (error "No matching files!")
+ (while files
+ (setq file (car files))
+ (if (file-directory-p file)
+ nil ;; should we add recursion here?
+ (setq type (or (vm-mime-default-type-from-filename file)
+ vm-mime-attach-files-in-directory-default-type))
+ (message "Attaching file %s with type %s ..." file type)
+ (if (null type)
+ (let ((default-type (or (vm-mime-default-type-from-filename file)
+ "application/octet-stream")))
+ (setq type (completing-read
+ (format "Content type for %s (default %s): "
+ (file-name-nondirectory file)
+ default-type)
+ vm-mime-type-completion-alist)
+ type (if (> (length type) 0) type default-type))))
+ (if (not (vm-mime-types-match "text" type)) nil
+ (setq charset vm-mime-attach-files-in-directory-default-charset)
+ (cond ((eq 'guess charset)
+ (save-excursion
+ (let ((b (get-file-buffer file)))
+ (set-buffer (or b (find-file-noselect file t t)))
+ (setq charset (vm-determine-proper-charset (point-min)
+ (point-max)))
+ (if (null b) (kill-buffer (current-buffer))))))
+ ((null charset)
+ (setq charset
+ (completing-read
+ (format "Character set for %s (default US-ASCII): "
+ file)
+ vm-mime-charset-completion-alist)
+ charset (if (> (length charset) 0) charset)))))
+ (vm-mime-attach-file file type charset))
+ (setq files (cdr files))))))
+
+(defcustom vm-mime-auto-save-all-attachments-subdir
+ nil
+ "*Subdirectory where to save the attachments of a message.
+This variable might be set to a string, a function or anything which evaluates
+to a string. If set to nil we use a concatenation of the from, subject and
+date header as subdir for the attachments."
+ :group 'vm-rfaddons
+ :type '(choice (directory :tag "Directory")
+ (string :tag "No Subdir" "")
+ (function :tag "Function")
+ (sexp :tag "sexp")))
+
+(defun vm-mime-auto-save-all-attachments-subdir (msg)
+ "Return a subdir for the attachments of MSG.
+This will be done according to `vm-mime-auto-save-all-attachments-subdir'."
+ (setq msg (vm-real-message-of msg))
+ (when (not (string-match (regexp-quote (vm-su-full-name msg))
+ (vm-get-header-contents msg "From:")))
+ (backtrace)
+ (if (y-or-n-p (format "Is this wrong? %s <> %s "
+ (vm-su-full-name msg)
+ (vm-get-header-contents msg "From:")))
+ (error "Yes it is wrong!")))
+
+ (cond ((functionp vm-mime-auto-save-all-attachments-subdir)
+ (funcall vm-mime-auto-save-all-attachments-subdir msg))
+ ((stringp vm-mime-auto-save-all-attachments-subdir)
+ (vm-summary-sprintf vm-mime-auto-save-all-attachments-subdir msg))
+ ((null vm-mime-auto-save-all-attachments-subdir)
+ (let (;; for the folder
+ (basedir (buffer-file-name (vm-buffer-of msg)))
+ ;; for the message
+ (subdir (concat
+ "/"
+ (format "%04s.%02s.%02s-%s"
+ (vm-su-year msg)
+ (vm-su-month-number msg)
+ (vm-su-monthday msg)
+ (vm-su-hour msg))
+ "--"
+ (vm-decode-mime-encoded-words-in-string
+ (or (vm-su-full-name msg)
+ "unknown"))
+ "--"
+ (vm-decode-mime-encoded-words-in-string
+ (vm-su-subject msg)))))
+
+ (if (and basedir vm-folder-directory
+ (string-match
+ (concat "^" (expand-file-name vm-folder-directory))
+ basedir))
+ (setq basedir (replace-match "" nil nil basedir)))
+
+ (setq subdir (replace-in-string subdir "\\s-\\s-+" " " t))
+ (setq subdir (replace-in-string subdir "[^A-Za-z0-9\241-_-]+" "_" t))
+ (setq subdir (replace-in-string subdir "?_-?_" "-" nil))
+ (setq subdir (replace-in-string subdir "^_+" "" t))
+ (setq subdir (replace-in-string subdir "_+$" "" t))
+ (concat basedir "/" subdir)))
+ (t
+ (eval vm-mime-auto-save-all-attachments-subdir))))
+
+(defun vm-mime-auto-save-all-attachments-path (msg)
+ "Create a path for storing the attachments of MSG."
+ (let ((subdir (vm-mime-auto-save-all-attachments-subdir
+ (vm-real-message-of msg))))
+ (if (not vm-mime-attachment-save-directory)
+ (error "Set `vm-mime-attachment-save-directory' for autosaving of attachments!")
+ (if subdir
+ (if (string-match "/$" vm-mime-attachment-save-directory)
+ (concat vm-mime-attachment-save-directory subdir)
+ (concat vm-mime-attachment-save-directory "/" subdir))
+ vm-mime-attachment-save-directory))))
+
+;;;###autoload
+(defun vm-mime-auto-save-all-attachments (&optional count)
+ "Save all attachments to a subdirectory.
+Root directory for saving is `vm-mime-attachment-save-directory'.
+
+You might add this to `vm-select-new-message-hook' in order to automatically
+save attachments.
+
+ (add-hook 'vm-select-new-message-hook 'vm-mime-auto-save-all-attachments)
+"
+ (interactive "P")
+
+ (if vm-mime-auto-save-all-attachments-avoid-recursion
+ nil
+ (let ((vm-mime-auto-save-all-attachments-avoid-recursion t))
+ (vm-check-for-killed-folder)
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+
+ (vm-mime-save-all-attachments
+ count
+ 'vm-mime-auto-save-all-attachments-path)
+
+ (when (interactive-p)
+ (vm-discard-cached-data)
+ (vm-preview-current-message)))))
+
+;;;###autoload
+(defun vm-mime-auto-save-all-attachments-delete-external (msg)
+ "Deletes the external attachments created by `vm-mime-save-all-attachments'.
+You may want to use this function in order to get rid of the external files
+when deleting a message.
+
+See the advice in `vm-rfaddons-infect-vm'."
+ (interactive "")
+ (vm-check-for-killed-folder)
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (setq msg (or msg (car vm-message-pointer)))
+ (if msg
+ (let ((o (vm-mm-layout msg))
+ (no 0)
+ parts layout file type)
+
+ (if (eq 'none o)
+ nil;; this is no mime message
+ (setq type (car (vm-mm-layout-type o)))
+
+ (cond ((or (vm-mime-types-match "multipart/alternative" type)
+ (vm-mime-types-match "multipart/mixed" type))
+ (setq parts (copy-sequence (vm-mm-layout-parts o))))
+ (t (setq parts (list o))))
+
+ (while parts
+ (if (vm-mime-composite-type-p
+ (car (vm-mm-layout-type (car parts))))
+ (setq parts (nconc (copy-sequence
+ (vm-mm-layout-parts
+ (car parts)))
+ (cdr parts))))
+
+ (setq layout (car parts))
+ (if layout
+ (setq type (car (vm-mm-layout-type layout))))
+
+ (if (not (string= type "message/external-body"))
+ nil
+ (setq file (vm-mime-get-parameter layout "name"))
+ (if (and file (file-exists-p file))
+ (progn (delete-file file)
+ (setq no (+ 1 no)))))
+ (setq parts (cdr parts))))
+
+ (if (> no 0)
+ (message "%s file%s deleted."
+ (if (= no 1) "One" no)
+ (if (= no 1) "" "s")))
+
+ (if (and file
+ (file-name-directory file)
+ (file-exists-p (file-name-directory file))
+ ;; is the directory empty?
+ (let ((files (directory-files (file-name-directory file))))
+ (and files (= 2 (length files)))))
+ (delete-directory (file-name-directory file))))))
+
+(defun vm-mime-action-on-all-attachments (count action
+ &optional include exclude
+ mlist
+ quiet)
+ "On the next COUNT or marked messages call the function ACTION on those mime
+parts which have a filename or the disposition attachment or match with their type
+to INCLUDE but not to EXCLUDE (which are lists of mime types).
+
+If QUIET is true no messages are generated.
+
+ACTION will get called with four arguments: MSG LAYOUT TYPE FILENAME."
+ (unless mlist
+ (or count (setq count 1))
+ (vm-check-for-killed-folder)
+ (vm-select-folder-buffer)
+ (vm-error-if-folder-empty))
+
+ (let ((mlist (or mlist (vm-select-marked-or-prefixed-messages count))))
+ (save-excursion
+ (while mlist
+ (let (parts layout filename type disposition o)
+ (setq o (vm-mm-layout (car mlist)))
+ (when (stringp o)
+ (setq o 'none)
+ (backtrace (get-buffer-create "*backtrace*"))
+ (message "There is a bug, see *backtrace* for details"))
+ (if (eq 'none o)
+ nil;; this is no mime message
+ (setq type (car (vm-mm-layout-type o)))
+
+ (cond ((or (vm-mime-types-match "multipart/alternative" type)
+ (vm-mime-types-match "multipart/mixed" type)
+ (vm-mime-types-match "multipart/report" type)
+ (vm-mime-types-match "message/rfc822" type)
+ )
+ (setq parts (copy-sequence (vm-mm-layout-parts o))))
+ (t (setq parts (list o))))
+
+ (while parts
+ (if (vm-mime-composite-type-p
+ (car (vm-mm-layout-type (car parts))))
+ (setq parts (nconc (copy-sequence
+ (vm-mm-layout-parts
+ (car parts)))
+ (cdr parts))))
+
+ (setq layout (car parts)
+ type (car (vm-mm-layout-type layout))
+ disposition (car (vm-mm-layout-disposition layout))
+ filename (or (vm-mime-get-disposition-parameter layout "filename")
+ (vm-mime-get-disposition-parameter layout "name")
+ (vm-mime-get-disposition-parameter layout "filename*")
+ (vm-mime-get-disposition-parameter layout "name*")))
+
+ (cond ((or filename
+ (and disposition (string= disposition "attachment"))
+ (and (not (vm-mime-types-match "message/external-body" type))
+ include
+ (vm-mime-is-type-valid type include exclude)))
+ (when (not quiet)
+ (message "Action on part type=%s filename=%s disposition=%s!"
+ type filename disposition))
+ (funcall action (car mlist) layout type filename))
+ ((not quiet)
+ (message "No action on part type=%s filename=%s disposition=%s!"
+ type filename disposition)))
+ (setq parts (cdr parts)))))
+ (setq mlist (cdr mlist))))))
+
+;;;###autoload
+(defun vm-mime-delete-all-attachments (&optional count)
+ (interactive "p")
+ (vm-check-for-killed-summary)
+ (if (interactive-p) (vm-follow-summary-cursor))
+
+ (vm-mime-action-on-all-attachments
+ count
+ (lambda (msg layout type file)
+ (message "Deleting `%s%s" type (if file (format " (%s)" file) ""))
+ (vm-mime-discard-layout-contents layout))
+ vm-mime-delete-all-attachments-types
+ vm-mime-delete-all-attachments-types-exceptions)
+
+ (when (interactive-p)
+ (vm-discard-cached-data)
+ (vm-preview-current-message)))
+
+;;;###autoload
+(defun vm-mime-save-all-attachments (&optional count
+ directory
+ no-delete-after-saving)
+ "Save all MIME-attachments to DIRECTORY.
+When directory does not exist it will be created."
+ (interactive
+ (list current-prefix-arg
+ (vm-read-file-name
+ "Attachment directory: "
+ (or vm-mime-all-attachments-directory
+ vm-mime-attachment-save-directory
+ default-directory)
+ (or vm-mime-all-attachments-directory
+ vm-mime-attachment-save-directory
+ default-directory)
+ nil nil
+ vm-mime-save-all-attachments-history)))
+
+ (vm-check-for-killed-summary)
+ (if (interactive-p) (vm-follow-summary-cursor))
+
+ (let ((no 0))
+ (vm-mime-action-on-all-attachments
+ count
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; the action to be performed BEGIN
+ (lambda (msg layout type file)
+ (let ((directory (if (functionp directory)
+ (funcall directory msg)
+ directory)))
+ (setq file (if file
+ (expand-file-name (file-name-nondirectory file) directory)
+ (vm-read-file-name
+ (format "Save %s to file: " type)
+ (or directory
+ vm-mime-all-attachments-directory
+ vm-mime-attachment-save-directory)
+ (or directory
+ vm-mime-all-attachments-directory
+ vm-mime-attachment-save-directory)
+ nil nil
+ vm-mime-save-all-attachments-history)
+ ))
+
+ (if (and file (file-exists-p file))
+ (if (y-or-n-p (format "Overwrite `%s'? " file))
+ (delete-file file)
+ (setq file nil)))
+
+ (when file
+ (message "Saving `%s%s" type (if file (format " (%s)" file) ""))
+ (make-directory (file-name-directory file) t)
+ (vm-mime-send-body-to-file layout file file)
+ (if vm-mime-delete-after-saving
+ (let ((vm-mime-confirm-delete nil))
+ (vm-mime-discard-layout-contents layout
+ (expand-file-name file))))
+ (setq no (+ 1 no)))))
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; the action to be performed END
+ ;; attachment filters
+ vm-mime-save-all-attachments-types
+ vm-mime-save-all-attachments-types-exceptions)
+
+ (when (interactive-p)
+ (vm-discard-cached-data)
+ (vm-preview-current-message))
+
+ (if (> no 0)
+ (message "%d attachment%s saved." no (if (= no 1) "" "s"))
+ (message "No attachments saved!"))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-mail-check-recipients ()
+ "Check if the recipients are specifiey correctly.
+Actually it checks only if there are any missing commas or the like in the
+headers."
+ (interactive)
+ (let ((header-list '("To:" "CC:" "BCC:"
+ "Resent-To:" "Resent-CC:" "Resent-BCC:"))
+ (contents nil)
+ (errors nil))
+ (while header-list
+ (setq contents (vm-mail-mode-get-header-contents (car header-list)))
+ (if (and contents (string-match "@[^,\"]*@" contents))
+ (setq errors (replace-in-string
+ (format "Missing separator in %s \"%s\"! "
+ (car header-list)
+ (match-string 0 contents))
+ "[\n\t ]+" " ")))
+ (setq header-list (cdr header-list)))
+ (if errors
+ (error errors))))
+
+
+(defcustom vm-mail-prompt-if-subject-empty t
+ "*Prompt for a subject when empty."
+ :group 'vm-rfaddons
+ :type '(boolean))
+
+;;;###autoload
+(defun vm-mail-check-for-empty-subject ()
+ "Check if the subject line is empty and issue an error if so."
+ (interactive)
+ (let (subject)
+ (setq subject (vm-mail-mode-get-header-contents "Subject:"))
+ (if (or (not subject) (string-match "^[ \t]*$" subject))
+ (if (not vm-mail-prompt-if-subject-empty)
+ (error "Empty subject")
+ (mail-position-on-field "Subject")
+ (insert (read-string "Subject: "))))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defcustom vm-mime-encode-headers-regexp
+ "Subject\\|\\(\\(Resent-\\)?\\(From\\|To\\|CC\\|BCC\\)\\)\\|Organization"
+ "*A regexp matching the headers which should be encoded."
+ :group 'vm-rfaddons
+ :type '(regexp))
+
+(defcustom vm-mime-encode-headers-words-regexp
+ (let ((8bit-word "\\([^ \t\n\r]*[^\x0-\x7f]+[^ \t\n\r]*\\)+"))
+ (concat "\\s-\\(" 8bit-word "\\(\\s-+" 8bit-word "\\)*\\)"))
+ "*A regexp matching a set of consecutive words which must be encoded."
+ :group 'vm-rfaddons
+ :type '(regexp))
+
+;;;###autoload
+(defun vm-mime-encode-headers ()
+ "Encodes the headers of a message.
+
+Only the words containing a non 7bit ASCII char are encoded, but not the whole
+header as this will cause trouble for the recipients and authors headers.
+
+Whitespace between encoded words is trimmed during decoding and thus those
+should be encoded together."
+ (interactive)
+ (save-excursion
+ (let ((headers (concat "^\\(" vm-mime-encode-headers-regexp "\\):"))
+ bodysep)
+
+ (goto-char (point-min))
+ (search-forward mail-header-separator)
+ (setq bodysep (vm-marker (match-beginning 0)))
+ (goto-char (point-min))
+
+ (while (re-search-forward headers bodysep t)
+ (goto-char (match-end 0))
+ (when (not (looking-at "\\s-"))
+ (insert " ")
+ (backward-char 1))
+ (let (hend charset coding q-encoding start end)
+ (save-excursion
+ (setq hend (or (and (re-search-forward "^[^ \t:]+:" bodysep t)
+ (match-beginning 0))
+ bodysep)
+ hend (vm-marker hend)))
+ ;; search for words containing chars in the upper 8bit range
+ (while
+ (let ((case-fold-search nil))
+ (re-search-forward vm-mime-encode-headers-words-regexp hend t))
+ (setq start (match-beginning 1)
+ end (vm-marker (match-end 1))
+ charset (or (vm-determine-proper-charset start end)
+ vm-mime-8bit-composition-charset)
+ coding (vm-string-assoc charset vm-mime-mule-charset-to-coding-alist)
+ coding (and coding (cadr coding)))
+ ;; insert end mark
+ (goto-char end)
+ (insert "?=")
+ ;; encode coding system body
+ (when (and coding (not (eq coding 'no-conversion)))
+ (goto-char end)
+ ;; this is a bug of encode-coding-region, it does not return
+ ;; the right length of the new text, but always 0
+ (let ((old-buffer-size (buffer-size)))
+ (encode-coding-region start end coding)
+ (setq end (+ end (- (buffer-size) old-buffer-size)))))
+ ;; encode unprintable chars in header
+ (vm-mime-Q-encode-region start end)
+ ;; insert start mark
+ (goto-char start)
+ (insert "=?" charset "?Q?")
+ (goto-char end)))))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defface vm-shrunken-headers-face
+ '((t (:background "gray")))
+ "Used for marking shrunken headers."
+ :group 'vm-faces)
+
+(defvar vm-shrunken-headers-keymap
+ (let ((map (if vm-xemacs-p (make-keymap) (copy-keymap vm-mode-map))))
+ (define-key map [(return)] 'vm-shrunken-headers-toggle-this)
+ (if vm-xemacs-p
+ (define-key map [(button2)] 'vm-shrunken-headers-toggle-this-mouse)
+ (define-key map [(mouse-2)] 'vm-shrunken-headers-toggle-this-mouse))
+ map)
+ "*Keymap used for shrunken-headers glyphs.")
+
+;;;###autoload
+(defun vm-shrunken-headers-toggle ()
+ "Toggle display of shrunken headers."
+ (interactive)
+ (vm-shrunken-headers 'toggle))
+
+;;;###autoload
+(defun vm-shrunken-headers-toggle-this-mouse (&optional event)
+ "Toggle display of shrunken headers!"
+ (interactive "e")
+ (mouse-set-point event)
+ (end-of-line)
+ (vm-shrunken-headers-toggle-this))
+
+;;;###autoload
+(defun vm-shrunken-headers-toggle-this-widget (widget &rest event)
+ (goto-char (widget-get widget :to))
+ (end-of-line)
+ (vm-shrunken-headers-toggle-this))
+
+;;;###autoload
+(defun vm-shrunken-headers-toggle-this ()
+ "Toggle display of shrunken headers!"
+ (interactive)
+
+ (save-excursion
+ (if (and (boundp 'vm-mail-buffer) (symbol-value 'vm-mail-buffer))
+ (set-buffer (symbol-value 'vm-mail-buffer)))
+ (if vm-presentation-buffer
+ (set-buffer vm-presentation-buffer))
+ (let ((o (or (car (vm-shrunken-headers-get-overlays (point)))
+ (car (vm-shrunken-headers-get-overlays
+ (save-excursion (end-of-line)
+ (forward-char 1)
+ (point)))))))
+ (save-restriction
+ (narrow-to-region (- (overlay-start o) 7) (overlay-end o))
+ (vm-shrunken-headers 'toggle)
+ (widen)))))
+
+(defun vm-shrunken-headers-get-overlays (start &optional end)
+ (let ((o-list (if end
+ (overlays-in start end)
+ (overlays-at start))))
+ (setq o-list (mapcar (lambda (o)
+ (if (overlay-get o 'vm-shrunken-headers)
+ o
+ nil))
+ o-list)
+ o-list (delete nil o-list))))
+
+;;;###autoload
+(defun vm-shrunken-headers (&optional toggle)
+ "Hide or show headers which occupy more than one line.
+Well, one might do it more precisely with only some headers,
+but it is sufficient for me!
+
+If the optional argument TOGGLE, then hiding is toggled.
+
+The face used for the visible hidden regions is `vm-shrunken-headers-face' and
+the keymap used within that region is `vm-shrunken-headers-keymap'."
+ (interactive "P")
+
+ (save-excursion
+ (let (headers-start headers-end start end o shrunken)
+ (if (equal major-mode 'vm-summary-mode)
+ (if (and (boundp 'vm-mail-buffer) (symbol-value 'vm-mail-buffer))
+ (set-buffer (symbol-value 'vm-mail-buffer))))
+ (if (equal major-mode 'vm-mode)
+ (if vm-presentation-buffer
+ (set-buffer vm-presentation-buffer)))
+
+ ;; We cannot use the default functions (vm-headers-of, ...) since
+ ;; we might also work within a presentation buffer.
+ (goto-char (point-min))
+ (setq headers-start (point-min)
+ headers-end (or (re-search-forward "\n\n" (point-max) t)
+ (point-max)))
+
+ (cond (toggle
+ (setq shrunken (vm-shrunken-headers-get-overlays
+ headers-start headers-end))
+ (while shrunken
+ (setq o (car shrunken))
+ (let ((w (overlay-get o 'vm-shrunken-headers-widget)))
+ (widget-toggle-action w))
+ (overlay-put o 'invisible (not (overlay-get o 'invisible)))
+ (setq shrunken (cdr shrunken))))
+ (t
+ (goto-char headers-start)
+ (while (re-search-forward "^\\(\\s-+.*\n\\)+" headers-end t)
+ (setq start (match-beginning 0) end (match-end 0))
+ (setq o (vm-shrunken-headers-get-overlays start end))
+ (if o
+ (setq o (car o))
+ (setq o (make-overlay (1- start) end))
+ (overlay-put o 'face 'vm-shrunken-headers-face)
+ (overlay-put o 'mouse-face 'highlight)
+ (overlay-put o 'local-map vm-shrunken-headers-keymap)
+ (overlay-put o 'priority 10000)
+ ;; make a new overlay for the invisibility, the other one we
+ ;; made before is just for highlighting and key-bindings ...
+ (setq o (make-overlay start end))
+ (overlay-put o 'vm-shrunken-headers t)
+ (goto-char (1- start))
+ (overlay-put o 'start-closed nil)
+ (overlay-put o 'vm-shrunken-headers-widget
+ (widget-create 'visibility
+ :action
+ 'vm-shrunken-headers-toggle-this-widget))
+ (overlay-put o 'invisible t)))))
+ (goto-char (point-min)))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defcustom vm-assimilate-html-command "striptags"
+ "*Command/function which should be called for stripping tags.
+
+When this is a string, then it is a command which is feed with the
+html and which should return the text.
+Otherwise it should be a Lisp function which performs the stripping of
+the tags.
+
+I prefer to use lynx for this job:
+
+#!/bin/tcsh
+
+tmpfile=/tmp/$USER-stripttags.html
+cat > $tmpfile
+lynx -force_html -dump $tmpfile
+rm $tmpfile"
+ :group 'vm-rfaddons
+ :type '(string))
+
+(defcustom vm-assimilate-html-mixed t
+ "*Non-nil values cause messages to be assimilated as text/mixed.
+Otherwise they will be assimilated into a text/alternative message."
+ :group 'vm-rfaddons
+ :type '(boolean))
+
+;;;###autoload
+(defun vm-assimilate-html-message (&optional plain)
+ "Try to assimilate a message which is only in html format.
+When called with a prefix argument then it will replace the message
+with the PLAIN text version otherwise it will create a text/mixed or
+text/alternative message depending on the value of the variable
+`vm-assimilate-html-mixed'."
+ (interactive "P")
+
+ (let ((vm-frame-per-edit nil)
+ (boundary (concat (vm-mime-make-multipart-boundary)))
+ (case-fold-search t)
+ (qp-encoded nil)
+ body start end charset)
+
+ (vm-edit-message)
+ (goto-char (point-min))
+ (goto-char (re-search-forward "\n\n"))
+
+ (if (re-search-backward "^Content-Type:\\s-*\\(text/html\\)\\(.*\n?\\(^\\s-.*\\)*\\)$"
+ (point-min) t)
+ (progn (setq charset (buffer-substring (match-beginning 2)
+ (match-end 2)))
+ (if plain
+ (progn (delete-region (match-beginning 1) (match-end 1))
+ (goto-char (match-beginning 1))
+ (insert "text/plain"))
+ (progn (delete-region (match-beginning 1) (match-end 2))
+ (goto-char (match-beginning 1))
+ (insert "multipart/"
+ (if vm-assimilate-html-mixed "mixed"
+ "alternative") ";\n"
+ " boundary=\"" boundary "\""))))
+ (progn
+ (kill-this-buffer)
+ (error "This message seems to be no HTML only message!")))
+
+ (goto-char (point-min))
+ (goto-char (re-search-forward "\n\n"))
+ (setq qp-encoded (re-search-backward "^Content-Transfer-Encoding: quoted-printable"
+ (point-min) t))
+
+ (goto-char (re-search-forward "\n\n"))
+ (if plain
+ (progn (setq body (point)
+ start (point))
+ (goto-char (point-max))
+ (setq end (point)))
+ (progn (insert "--" boundary "\n"
+ "Content-Type: text/plain" charset "\n"
+ "Content-Transfer-Encoding: 8bit\n\n")
+ (setq body (point))
+
+ (insert "\n--" boundary "\n"
+ "Content-Type: text/html" charset "\n"
+ "Content-Transfer-Encoding: 8bit\n\n")
+ (setq start (point-marker))
+ (goto-char (point-max))
+ (setq end (point-marker))
+ (insert "--" boundary "--\n")))
+
+ (if qp-encoded (vm-mime-qp-decode-region start end))
+
+ (goto-char body)
+ (if (stringp vm-assimilate-html-command)
+ (call-process-region start end vm-assimilate-html-command
+ plain t)
+ (funcall vm-assimilate-html-command start end plain))
+ (vm-edit-message-end)
+ ))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Original Authors: Edwin Huffstutler & John Reynolds
+
+(defcustom vm-mail-mode-citation-kill-regexp-alist
+ (list
+ ;; empty lines multi quoted
+ (cons (concat "^\\(" vm-included-text-prefix "[|{}>:;][^\n]*\n\\)+")
+ "[...]\n")
+ ;; empty quoted starting/ending lines
+ (cons (concat "^\\([^|{}>:;]+.*\\)\n"
+ vm-included-text-prefix "[|{}>:;]*$")
+ "\\1")
+ (cons (concat "^" vm-included-text-prefix "[|{}>:;]*\n"
+ "\\([^|{}>:;]\\)")
+ "\\1")
+ ;; empty quoted multi lines
+ (cons (concat "^" vm-included-text-prefix "[|{}>:;]*\\s-*\n\\("
+ vm-included-text-prefix "[|{}>:;]*\\s-*\n\\)+")
+ (concat vm-included-text-prefix "\n"))
+ ;; empty lines
+ (cons "\n\n\n+"
+ "\n\n")
+ ;; signature & -----Ursprüngliche Nachricht-----
+ (cons (concat "^" vm-included-text-prefix "--[^\n]*\n"
+ "\\(" vm-included-text-prefix "[^\n]*\n\\)+")
+ "\n")
+ (cons (concat "^" vm-included-text-prefix "________[^\n]*\n"
+ "\\(" vm-included-text-prefix "[^\n]*\n\\)+")
+ "\n")
+ )
+ "*Regexp replacement pairs for cleaning of replies."
+ :group 'vm-rfaddons
+ :type '(repeat (cons :tag "Kill Definition"
+ (regexp :tag "Regexp")
+ (string :tag "Replacement"))))
+
+(defun vm-mail-mode-citation-clean-up (&optional s e)
+ "Remove doubly-cited text and extra lines in a mail message."
+ (interactive)
+ (if (region-exists-p)
+ (setq s (point)
+ e (mark)))
+ (save-excursion
+ (mail-text)
+ (let ((re-alist vm-mail-mode-citation-kill-regexp-alist)
+ (pmin (point))
+ re subst)
+
+ (while re-alist
+ (goto-char pmin)
+ (setq re (caar re-alist)
+ subst (cdar re-alist))
+ (while (re-search-forward re (point-max) t)
+ (replace-match subst))
+ (setq re-alist (cdr re-alist))))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-summary-function-S (MSG)
+ "Return the size of a message in bytes, kilobytes or megabytes.
+You may add this to the summary line by \"%US\".
+Argument MSG is a message pointer."
+ (let ((size (- (point-max) (point-min))))
+ (cond
+ ((< size 1024)
+ (format "%d" size))
+ ((< size 1048576)
+ (setq size (/ size 1024))
+ (format "%dK" size))
+ (t
+ (setq size (/ size 1048576))
+ (format "%dM" size)))))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defcustom vm-summary-attachment-indicator "$"
+ "*Indicator shown for messages containing an attachments."
+ :group 'vm-rfaddons
+ :type 'string)
+
+(defcustom vm-summary-attachment-label nil
+ "*Label added to messages containing an attachments."
+ :group 'vm-rfaddons
+ :type '(choice (string) (const :tag "No Label" nil)))
+
+(defcustom vm-mime-summary-attachment-label-types nil
+ "*List of MIME types which should be listed as attachment.
+Mime parts with a disposition of attachment or a filename/name disposition
+parameter will be automatically considered as attachment."
+ :group 'vm-rfaddons
+ :type '(repeat (string :tag "MIME type" nil)))
+
+(defcustom vm-mime-summary-attachment-label-types-exceptions
+ nil
+ "*List of MIME types which should not be listed as attachment."
+ :group 'vm-rfaddons
+ :type '(repeat (string :tag "MIME type" nil)))
+
+;;;###autoload
+(defun vm-summary-function-A (msg)
+ "Indicate if there are attachments in a message.
+The summary displays a `vm-summary-attachment-indicator', wich is a $ by
+default. In order to get this working, add an \"%1UA\" to your
+`vm-summary-format' and call `vm-fix-my-summary!!!'.
+
+As an sideeffect a label can be added to new messages. Setting
+`vm-summary-attachment-label' to a string (the label) enables this.
+If you just want the label, then set `vm-summary-attachment-indicator' to nil
+and add an \"%0UA\" to your `vm-summary-format'."
+ (let ((attachments 0))
+ (setq msg (vm-real-message-of msg))
+ (vm-mime-action-on-all-attachments
+ nil
+ (lambda (msg layout type file)
+ (setq attachments (1+ attachments)))
+ vm-mime-summary-attachment-label-types
+ vm-mime-summary-attachment-label-types-exceptions
+ (list msg)
+ t)
+
+ (if (= attachments 0 )
+ ""
+ (if (and (vm-new-flag msg)
+ vm-summary-attachment-label
+ (or (not (vm-labels-of msg))
+ (not (member vm-summary-attachment-label
+ (vm-labels-of msg)))))
+ (vm-set-labels msg (append (list vm-summary-attachment-label)
+ (vm-labels-of msg))))
+ (or vm-summary-attachment-indicator ""))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-delete-quit ()
+ "Delete mails and quit. Expunge only if it's not the primary inbox!"
+ (interactive)
+ (save-excursion
+ (vm-select-folder-buffer)
+ (if (and buffer-file-name
+ (string-match (regexp-quote vm-primary-inbox) buffer-file-name))
+ (message "No auto-expunge for folder `%s'!" buffer-file-name)
+ (condition-case nil
+ (vm-expunge-folder)
+ (error nil)))
+ (vm-quit)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-mail-mode-install-open-line ()
+ "Install the open-line hooks for `vm-mail-mode'.
+Add this to `vm-mail-mode-hook'."
+ (make-local-hook 'before-change-functions)
+ (make-local-hook 'after-change-functions)
+ (add-hook 'before-change-functions 'vm-mail-mode-open-line nil t)
+ (add-hook 'after-change-functions 'vm-mail-mode-open-line nil t))
+
+(defvar vm-mail-mode-open-line nil
+ "Flag used by `vm-mail-mode-open-line'.")
+
+(defun vm-mail-mode-open-line (start end &optional length)
+ "Opens a line when inserting into the region of a reply.
+
+Insert newlines before and after an insert where necessary and does a cleanup
+of empty lines which have been quoted."
+ (if (= start end)
+ (save-excursion
+ (beginning-of-line)
+ (setq vm-mail-mode-open-line
+ (if (and (eq this-command 'self-insert-command)
+ (looking-at (concat "^"
+ (regexp-quote
+ vm-included-text-prefix))))
+ (if (< (point) start) (point) start))))
+ (if (and length (= length 0) vm-mail-mode-open-line)
+ (let (start-mark end-mark)
+ (save-excursion
+ (if (< vm-mail-mode-open-line start)
+ (progn
+ (insert "\n\n" vm-included-text-prefix)
+ (setq end-mark (point-marker))
+ (goto-char start)
+ (setq start-mark (point-marker))
+ (insert "\n\n"))
+ (if (looking-at (concat "\\("
+ (regexp-quote vm-included-text-prefix)
+ "\\)+[ \t]*\n"))
+ (replace-match ""))
+ (insert "\n\n")
+ (setq end-mark (point-marker))
+ (goto-char start)
+ (setq start-mark (point-marker))
+ (insert "\n"))
+
+ ;; clean leading and trailing garbage
+ (let ((iq (concat "^" (regexp-quote vm-included-text-prefix)
+ "[> \t]*\n")))
+ (save-excursion
+ (goto-char start-mark)
+ (beginning-of-line)
+ (while (looking-at "^$") (forward-line -1))
+; (message "1%s<" (buffer-substring (point) (save-excursion (end-of-line) (point))))
+ (while (looking-at iq)
+ (replace-match "")
+ (forward-line -1))
+ (goto-char end-mark)
+ (beginning-of-line)
+ (while (looking-at "^$") (forward-line 1))
+; (message "3%s<" (buffer-substring (point) (save-excursion (end-of-line) (point))))
+ (while (looking-at iq)
+ (replace-match "")))))
+
+ (setq vm-mail-mode-open-line nil)))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defcustom vm-mail-mode-elide-reply-region "[...]\n"
+ "*String which is used as replacement for elided text."
+ :group 'vm-rfaddons
+ :type '(string))
+
+;;;###autoload
+(defun vm-mail-mode-elide-reply-region (b e)
+ "Replace marked region or current line with `vm-mail-elide-reply-region'.
+B and E are the beginning and end of the marked region or the current line."
+ (interactive (if (mark)
+ (if (< (mark) (point))
+ (list (mark) (point))
+ (list (point) (mark)))
+ (list (save-excursion (beginning-of-line) (point))
+ (save-excursion (end-of-line) (point)))))
+ (if (eobp) (insert "\n"))
+ (if (mark) (delete-region b e) (delete-region b (+ 1 e)))
+ (insert vm-mail-mode-elide-reply-region))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-save-everything ()
+ "Save all VM folder buffers, BBDB and newsrc if GNUS is started."
+ (interactive)
+ (save-excursion
+ (let ((folders (vm-folder-list)))
+ (while folders
+ (set-buffer (car folders))
+ (message "Saving <%S>" (car folders))
+ (vm-save-folder)
+ (setq folders (cdr folders))))
+ (if (fboundp 'bbdb-save-db)
+ (bbdb-save-db)))
+ (if (fboundp 'gnus-group-save-newsrc)
+ (gnus-group-save-newsrc)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-get-all-new-mail ()
+ "Get mail for all opened VM folders."
+ (interactive)
+ (save-excursion
+ (let ((buffers (buffer-list)))
+ (while buffers
+ (set-buffer (car buffers))
+ (if (eq major-mode 'vm-mode)
+ (vm-get-new-mail))
+ (setq buffers (cdr buffers))))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-save-message-preview (file)
+ "Save preview of a message in FILE.
+It saves the decoded message and not the raw message like `vm-save-message'!"
+ (interactive
+ ;; protect value of last-command
+ (let ((last-command last-command)
+ (this-command this-command)
+ filename)
+ (vm-follow-summary-cursor)
+ (vm-select-folder-buffer)
+ (setq filename
+ (vm-read-file-name
+ (if vm-last-written-file
+ (format "Write text to file: (default %s) "
+ vm-last-written-file)
+ "Write text to file: ")
+ nil vm-last-written-file nil))
+ (if (and (file-exists-p filename)
+ (not (yes-or-no-p (format "Overwrite '%s'? " filename))))
+ (error "Aborting `vm-save-message-preview'."))
+ (list filename)))
+ (save-excursion
+ (vm-follow-summary-cursor)
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-error-if-folder-empty)
+
+ (if (and (boundp 'vm-mail-buffer) (symbol-value 'vm-mail-buffer))
+ (set-buffer (symbol-value 'vm-mail-buffer))
+ (if vm-presentation-buffer
+ (set-buffer vm-presentation-buffer)))
+ (write-region (point-min) (point-max) file)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Subject: Re: How to Delete an attachment?
+;; Newsgroups: gnu.emacs.vm.info
+;; Date: 05 Oct 1999 11:09:19 -0400
+;; Organization: Road Runner
+;; From: Dave Bakhash
+(defun vm-mime-take-action-on-attachment (action)
+ "Do something with the MIME attachment at point."
+ (interactive
+ (list (vm-read-string "action: "
+ '("save-to-file"
+ "delete"
+ "display-as-ascii"
+ "pipe-to-command")
+ nil)))
+ (vm-mime-run-display-function-at-point
+ (cond ((string= action "save-to-file")
+ 'vm-mime-send-body-to-file)
+ ((string= action "display-as-ascii")
+ 'vm-mime-display-body-as-text)
+ ((string= action "delete")
+ (vm-delete-mime-object))
+ ((string= action "pipe-to-command")
+ 'vm-mime-pipe-body-to-queried-command-discard-output))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Subject: RE: How to configure for more obvious 'auto decode' attachement.
+;; Newsgroups: gnu.emacs.vm.info
+;; Date: Mon, 20 Sep 1999 21:48:37 GMT
+;; Organization: Deja.com - Share what you know. Learn what you don't.
+;; From: rmirani
+(defcustom vm-mime-display-internal-multipart/mixed-separater
+ "\n----------------------------------------------------------------------\n"
+ "*The separator which is inserted between the parts of a multipart message."
+ :group 'vm-rfaddons
+ :type '(choice (string :tag "Separator")
+ (const :tag "No Separator" nil)))
+
+;;;###autoload
+(defun vm-mime-display-internal-multipart/mixed (layout)
+ "A replacement for VMs default function adding separators.
+LAYOUT specifies the layout."
+
+ (let ((part-list (vm-mm-layout-parts layout)))
+ (while part-list
+ (let ((cur (car part-list)))
+ (vm-decode-mime-layout cur)
+ (setq part-list (cdr part-list))
+ (cond
+ ((and part-list
+ (not (vm-mime-should-display-button cur nil))
+ (vm-mime-should-display-button (car part-list) nil))
+ ;; do nothing
+ )
+ ((and part-list
+ (not (vm-mime-should-display-button cur nil))
+ (not (vm-mime-should-display-button (car part-list) nil))
+ vm-mime-display-internal-multipart/mixed-separater)
+ (insert vm-mime-display-internal-multipart/mixed-separater)))))
+ t))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun vm-assimilate-outlook-message ()
+ "Assimilate a message which has been forwarded by MS Outlook.
+You will need vm-pine.el in order to get this work."
+ (interactive)
+ (vm-continue-postponed-message t)
+ (let ((pm (point-max)))
+ (goto-char (point-min))
+ (if (re-search-forward "^.*\\(-----Urspr[u]ngliche Nachricht-----\\|-----Original Message-----\\)\n" pm)
+ (delete-region 1 (match-end 0)))
+ ;; remove the quotes from the forwarded message
+ (while (re-search-forward "^> ?" pm t)
+ (replace-match ""))
+ (goto-char (point-min))
+ ;; rewrite headers
+ (while (re-search-forward "^\\(Von\\|From\\):[ \t]*\\(.+\\) *\\[\\(SMTP\\|mailto\\):\\(.+\\)\\].*" pm t)
+ (replace-match "From: \\2 <\\4>"))
+ (while (re-search-forward "^\\(Gesendet[^:]*\\|Sent\\):[ \t]*\\(...\\).*, \\([0-9]+\\)\\. \\(...\\)[a-z]+[ \t]*\\(.*\\)" pm t)
+ (replace-match "Date: \\3 \\4 \\5"))
+ (while (re-search-forward "^\\(An\\|To\\):[ \t]*\\(.*\\)$" pm t)
+ (replace-match "To: \\2"))
+ (while (re-search-forward "^\\(Betreff\\|Subject\\):[ \t]*\\(.*\\)$" pm t)
+ (replace-match "Subject: \\2"))
+ (goto-char (point-min))
+ ;; insert mail header separator
+ (re-search-forward "^$" pm)
+ (goto-char (match-end 0))
+ (insert mail-header-separator "\n")
+ ;; and put it back into the source folder
+ (vm-postpone-message)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Highlighting faces
+;;;###autoload
+(defun vm-install-rf-faces ()
+ (make-face 'message-url)
+
+ (custom-set-faces
+ '(message-url
+ ((t (:foreground "blue" :bold t))))
+ '(message-headers
+ ((t (:foreground "blue" :bold t))))
+ '(message-cited-text
+ ((t (:foreground "red3"))))
+ '(message-header-contents
+ ((((type x)) (:foreground "green3"))))
+ '(message-highlighted-header-contents
+ ((((type x)) (:bold t))
+ (t (:bold t)))))
+
+ (setq vm-highlight-url-face 'message-url))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Well I like to have a different comment style a provided as default.
+;; I'd like to have blank lines also prefixed by a comment char.
+;; I overwrite the standard function by a slightly different version.
+;;;###autoload
+(defun vm-mail-mode-comment-region (beg end &optional arg)
+ "Comment or uncomment each line in the region BEG to END.
+With just a non-nil prefix ARG, uncomment each line in region.
+Numeric prefix arg ARG means use ARG comment characters.
+If ARG is negative, delete that many comment characters instead.
+Comments are terminated on each line, even for syntax in which newline does
+not end the comment. Blank lines do not get comments."
+ ;; if someone wants it to only put a comment-start at the beginning and
+ ;; comment-end at the end then typing it, C-x C-x, closing it, C-x C-x
+ ;; is easy enough. No option is made here for other than commenting
+ ;; every line.
+ (interactive "r\nP")
+ (or comment-start (error "No comment syntax is defined"))
+ (if (> beg end) (let (mid) (setq mid beg beg end end mid)))
+ (save-excursion
+ (save-restriction
+ (let ((cs comment-start) (ce comment-end)
+ numarg)
+ (if (consp arg) (setq numarg t)
+ (setq numarg (prefix-numeric-value arg))
+ ;; For positive arg > 1, replicate the comment delims now,
+ ;; then insert the replicated strings just once.
+ (while (> numarg 1)
+ (setq cs (concat cs comment-start)
+ ce (concat ce comment-end))
+ (setq numarg (1- numarg))))
+ ;; Loop over all lines from BEG to END.
+ (narrow-to-region beg end)
+ (goto-char beg)
+ (while (not (eobp))
+ (if (or (eq numarg t) (< numarg 0))
+ (progn
+ ;; Delete comment start from beginning of line.
+ (if (eq numarg t)
+ (while (looking-at (regexp-quote cs))
+ (delete-char (length cs)))
+ (let ((count numarg))
+ (while (and (> 1 (setq count (1+ count)))
+ (looking-at (regexp-quote cs)))
+ (delete-char (length cs)))))
+ ;; Delete comment end from end of line.
+ (if (string= "" ce)
+ nil
+ (if (eq numarg t)
+ (progn
+ (end-of-line)
+ ;; This is questionable if comment-end ends in
+ ;; whitespace. That is pretty brain-damaged,
+ ;; though.
+ (skip-chars-backward " \t")
+ (if (and (>= (- (point) (point-min)) (length ce))
+ (save-excursion
+ (backward-char (length ce))
+ (looking-at (regexp-quote ce))))
+ (delete-char (- (length ce)))))
+ (let ((count numarg))
+ (while (> 1 (setq count (1+ count)))
+ (end-of-line)
+ ;; This is questionable if comment-end ends in
+ ;; whitespace. That is pretty brain-damaged though
+ (skip-chars-backward " \t")
+ (save-excursion
+ (backward-char (length ce))
+ (if (looking-at (regexp-quote ce))
+ (delete-char (length ce))))))))
+ (forward-line 1))
+ ;; Insert at beginning and at end.
+ (progn
+ (insert cs)
+ (if (string= "" ce) ()
+ (end-of-line)
+ (insert ce)))
+ (search-forward "\n" nil 'move)))))))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Sometimes it's handy to fake a date.
+;; I overwrite the standard function by a slightly different version.
+(defcustom vm-mail-mode-fake-date-p t
+ "*Non-nil means `vm-mail-mode-insert-date-maybe' will not overwrite a existing date header."
+ :group 'vm-rfaddons
+ :type '(boolean))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defun vm-isearch-presentation ()
+ "Switched to the presentation or preview buffer and starts isearch."
+ (interactive)
+ (vm-select-folder-buffer)
+ (let ((target (or vm-presentation-buffer (current-buffer))))
+ (if (get-buffer-window-list target)
+ (select-window (car (get-buffer-window-list target)))
+ (switch-to-buffer target)))
+ (isearch-forward))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defcustom vm-delete-message-action "vm-next-message"
+ "Forward to next (unread) message after deletion")
+
+;;;###autoload
+(defun vm-delete-message-action (&optional arg)
+ "Delete current message and perform some action after it, e.g. move to next.
+Call it with a prefix ARG to change the action."
+ (interactive "P")
+ (when (and (listp arg) (not (null arg)))
+ (setq vm-delete-message-action
+ (completing-read "After delete: "
+ '(("vm-rmail-up")
+ ("vm-rmail-down")
+ ("vm-previous-message")
+ ("vm-next-message")
+ ("vm-previous-unread-message")
+ ("vm-next-unread-message")
+ ("nothing"))))
+ (message "action after delete is %S" vm-delete-message-action))
+ (vm-toggle-deleted (prefix-numeric-value arg))
+ (let ((fun (intern vm-delete-message-action)))
+ (if (functionp fun)
+ (call-interactively fun))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defvar vm-smtp-server-online-p-cache nil
+ "Alist of cached (server online-status) entries.")
+
+(defun vm-smtp-server-online-p (&optional host port)
+ "Opens SMTP connection to see if the server HOST on PORT is online.
+Results are cached in `smtp-server-online-p-cache' for non interactive
+calls."
+ (interactive)
+ (save-excursion
+ (let (online-p server hp)
+ (if (null host)
+ (setq server (if (functionp 'esmtpmail-via-smtp-server)
+ (esmtpmail-via-smtp-server)
+ (smtpmail-via-smtp-server))
+ host (car server)
+ port (cadr server)))
+ (setq port (or port 25)
+ hp (format "%s:%s" host port))
+
+ (if (interactive-p)
+ (setq vm-smtp-server-online-p-cache nil))
+
+ (if (assoc hp vm-smtp-server-online-p-cache)
+ ;; take cache content
+ (setq online-p (cadr (assoc hp vm-smtp-server-online-p-cache))
+ hp (concat hp " (cached)"))
+ ;; do the check
+ (let* ((n (format " *SMTP server check %s:%s *" host port))
+ (buf (get-buffer n))
+ (stream nil))
+ (if buf (kill-buffer buf))
+
+ (condition-case err
+ (progn
+ (setq stream (open-network-stream n n host port))
+ (setq online-p t))
+ (error
+ (message (cadr err))
+ (if (and (get-buffer n)
+ (< 0 (length (save-excursion
+ (set-buffer (get-buffer n))
+ (buffer-substring (point-min) (point-max))))))
+ (pop-to-buffer n))))
+ (if stream (delete-process stream))
+ (when (setq buf (get-buffer n))
+ (set-buffer buf)
+ (message "%S" (buffer-substring (point-min) (point-max)))
+ (goto-char (point-min))
+ (when (re-search-forward
+ "gethostbyname: Resource temporarily unavailable"
+ (point-max) t)
+ (setq online-p nil))))
+
+ ;; add to cache for further lookups
+ (add-to-list 'vm-smtp-server-online-p-cache (list hp online-p)))
+
+ (if (interactive-p)
+ (message "SMTP server %s is %s" hp
+ (if online-p "online" "offline")))
+ online-p)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defun vm-mail-send-or-feed-it ()
+ "Sends a message if the SMTP server is online, queues it otherwise."
+ (if (not (vm-smtp-server-online-p))
+ (feedmail-send-it)
+ (if (functionp 'esmtpmail-send-it)
+ (esmtpmail-send-it)
+ (smtpmail-send-it))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(provide 'vm-rfaddons)
+
+;;; vm-rfaddons.el ends here
diff --git a/vm-save.el b/lisp/vm-save.el
index 9a3659c..2512f6f 100644
--- a/vm-save.el
+++ b/lisp/vm-save.el
@@ -1,25 +1,29 @@
-;;; Saving and piping messages under VM
-;;; Copyright (C) 1989, 1990, 1993, 1994 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-save)
-
-;; (match-data) returns the match data as MARKERS, often corrupting
-;; it in the process due to buffer narrowing, and the fact that buffers are
-;; indexed from 1 while strings are indexed from 0. :-(
+;;; vm-save.el --- Saving and piping messages under VM
+;;
+;; Copyright (C) 1989, 1990, 1993, 1994 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+;; (match-data) returns the match data as MARKERS, often corrupting it in the
+;; process due to buffer narrowing, and the fact that buffers are indexed from
+;; 1 while strings are indexed from 0. :-(
+
+;;; Code:
+
+;;;###autoload
(defun vm-match-data ()
(let ((n (1- (/ (length (match-data)) 2)))
(list nil))
@@ -29,6 +33,7 @@
n (1- n)))
list))
+;;;###autoload
(defun vm-auto-select-folder (mp auto-folder-alist)
(condition-case error-data
(catch 'match
@@ -85,6 +90,7 @@
(error (error "error processing vm-auto-folder-alist: %s"
(prin1-to-string error-data)))))
+;;;###autoload
(defun vm-auto-archive-messages (&optional arg)
"Save all unfiled messages that auto-match a folder via
vm-auto-folder-alist to their appropriate folders. Messages that
@@ -152,7 +158,74 @@ The saved messages are flagged as `filed'."
(message "%d message%s archived"
archived (if (= 1 archived) "" "s")))))
+;;;---------------------------------------------------------------------------
+;; The following defun seems a lot less efficient than it might be,
+;; but I don't have a better sense of how to access the folder buffer
+;; and read its local variables. [2006/10/31:rpg]
+;;---------------------------------------------------------------------------
+
+(defun vm-imap-folder-p ()
+ "Is the current folder an IMAP folder?"
+ (save-excursion
+ (vm-select-folder-buffer)
+ (eq vm-folder-access-method 'imap)))
+
+;;;---------------------------------------------------------------------------
+;; New shell defun to handle both IMAP and local saving.
+;;---------------------------------------------------------------------------
+;;;###autoload
(defun vm-save-message (folder &optional count)
+ "Save the current message. This may be done either by saving it
+to an IMAP folder or by saving it to a local filesystem folder.
+Which is done is controlled by the type of the current vm-folder
+buffer and the variable `vm-imap-save-to-server'."
+ (interactive
+ (if (and vm-imap-save-to-server
+ (vm-imap-folder-p))
+ ;; IMAP saving --- argument parsing taken from
+ ;; vm-save-message-to-imap-folder
+ (save-excursion
+ (vm-session-initialization)
+ (vm-check-for-killed-folder)
+ (vm-select-folder-buffer-if-possible)
+ (let ((this-command this-command)
+ (last-command last-command))
+ (list (vm-read-imap-folder-name "Save to IMAP folder: "
+ vm-imap-server-list t)
+ (prefix-numeric-value current-prefix-arg))))
+ ;; saving to local filesystem. argument parsing taken from old
+ ;; vm-save-message now vm-save-message-to-local-folder
+ (list
+ ;; protect value of last-command
+ (let ((last-command last-command)
+ (this-command this-command))
+ (vm-follow-summary-cursor)
+ (let ((default (save-excursion
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-error-if-folder-empty)
+ (or (vm-auto-select-folder vm-message-pointer
+ vm-auto-folder-alist)
+ vm-last-save-folder)))
+ (dir (or vm-folder-directory default-directory)))
+ (cond ((and default
+ (let ((default-directory dir))
+ (file-directory-p default)))
+ (vm-read-file-name "Save in folder: " dir nil nil default))
+ (default
+ (vm-read-file-name
+ (format "Save in folder: (default %s) " default)
+ dir default))
+ (t
+ (vm-read-file-name "Save in folder: " dir nil)))))
+ (prefix-numeric-value current-prefix-arg))))
+ (if (and vm-imap-save-to-server
+ (vm-imap-folder-p))
+ (vm-save-message-to-imap-folder folder count)
+ (vm-save-message-to-local-folder folder count)))
+
+;;;###autoload
+(defun vm-save-message-to-local-folder (folder &optional count)
"Save the current message to a mail folder.
If the folder already exists, the message will be appended to it.
@@ -205,7 +278,7 @@ The saved messages are flagged as `filed'."
(expand-file-name (or vm-folder-directory default-directory))))
(setq folder (expand-file-name folder)))
;; Confirm new folders, if the user requested this.
- (if (and vm-confirm-new-folders (interactive-p)
+ (if (and vm-confirm-new-folders
(not (file-exists-p folder))
(or (not vm-visit-when-saving) (not (vm-get-file-buffer folder)))
(not (y-or-n-p (format "%s does not exist, save there anyway? "
@@ -361,14 +434,12 @@ The saved messages are flagged as `filed'."
vm-buffers-needing-display-update)
(vm-preview-current-message))
(vm-update-summary-and-mode-line)))))
- (if (interactive-p)
- (message "%d message%s saved to buffer %s"
- count
- (if (/= 1 count) "s" "")
- (buffer-name folder-buffer))))
- (if (interactive-p)
- (message "%d message%s saved to %s"
- count (if (/= 1 count) "s" "") folder)))))
+ (message "%d message%s saved to buffer %s"
+ count
+ (if (/= 1 count) "s" "")
+ (buffer-name folder-buffer)))
+ (message "%d message%s saved to %s"
+ count (if (/= 1 count) "s" "") folder))))
(if (or (null vm-last-save-folder)
(not (equal unexpanded-folder auto-folder)))
(setq vm-last-save-folder unexpanded-folder))
@@ -376,6 +447,7 @@ The saved messages are flagged as `filed'."
(vm-delete-message count))
folder ))
+;;;###autoload
(defun vm-save-message-sans-headers (file &optional count)
"Save the current message to a file, without its header section.
If the file already exists, the message body will be appended to it.
@@ -467,14 +539,35 @@ vm-save-message instead (normally bound to `s')."
(message "Message%s written to %s" (if (/= 1 count) "s" "") file)))
(setq vm-last-written-file file)))
-(defun vm-pipe-message-to-command (command prefix-arg)
- "Runs a shell command with some or all of the contents of the
-current message as input.
+(defun vm-switch-to-command-output-buffer (command buffer discard-output)
+ "Eventually switch to the output buffer of the command."
+ (let ((output-bytes (save-excursion (set-buffer buffer) (buffer-size))))
+ (if (zerop output-bytes)
+ (message "Command '%s' produced no output." command)
+ (if discard-output
+ (message "Command '%s' produced %d bytes of output."
+ command output-bytes)
+ (display-buffer buffer)))))
+
+(defun vm-pipe-message-part (m arg)
+ "Return (START END) bounds for piping to external command, based on ARG."
+ (cond ((equal prefix-arg '(4))
+ (list (vm-text-of m) (vm-text-end-of m)))
+ ((equal prefix-arg '(16))
+ (list (vm-headers-of m) (vm-text-of m)))
+ ((equal prefix-arg '(64))
+ (list (vm-vheaders-of m) (vm-text-end-of m)))
+ (t
+ (list (vm-headers-of m) (vm-text-end-of m)))))
+
+;;;###autoload
+(defun vm-pipe-message-to-command (command &optional prefix-arg discard-output)
+ "Runs a shell command with contents from the current message as input.
By default, the entire message is used.
With one \\[universal-argument] the text portion of the message is used.
With two \\[universal-argument]'s the header portion of the message is used.
With three \\[universal-argument]'s the visible header portion of the message
- plus the text portion is used.
+plus the text portion is used.
When invoked on marked messages (via vm-next-command-uses-marks),
each marked message is successively piped to the shell command,
@@ -509,30 +602,172 @@ Output, if any, is displayed. The message is not altered."
(set-buffer (vm-buffer-of m))
(save-restriction
(widen)
- (goto-char (vm-headers-of m))
- (cond ((equal prefix-arg nil)
- (narrow-to-region (point) (vm-text-end-of m)))
- ((equal prefix-arg '(4))
- (narrow-to-region (vm-text-of m)
- (vm-text-end-of m)))
- ((equal prefix-arg '(16))
- (narrow-to-region (point) (vm-text-of m)))
- ((equal prefix-arg '(64))
- (narrow-to-region (vm-vheaders-of m) (vm-text-end-of m)))
- (t (narrow-to-region (point) (vm-text-end-of m))))
(let ((pop-up-windows (and pop-up-windows (eq vm-mutable-windows t)))
;; call-process-region calls write-region.
;; don't let it do CR -> LF translation.
- (selective-display nil))
- (call-process-region (point-min) (point-max)
+ (selective-display nil)
+ (region (vm-pipe-message-part m prefix-arg)))
+ (call-process-region (nth 0 region) (nth 1 region)
(or shell-file-name "sh")
nil buffer nil shell-command-switch command)))
(setq mlist (cdr mlist)))
(vm-display nil nil '(vm-pipe-message-to-command)
'(vm-pipe-message-to-command))
- (if (not (zerop (save-excursion (set-buffer buffer) (buffer-size))))
- (display-buffer buffer))))
+ (vm-switch-to-command-output-buffer command buffer discard-output)
+ buffer))
+
+(defun vm-pipe-message-to-command-to-string (command &optional prefix-arg)
+ "Run a shell command with contents from the current message as input.
+This function is like `vm-pipe-message-to-command', but will not display the
+output of the command, but return it as a string."
+ (save-excursion
+ (set-buffer (vm-pipe-message-to-command command prefix-arg t))
+ (buffer-substring-no-properties (point-min) (point-max))))
+
+;;;###autoload
+(defun vm-pipe-message-to-command-discard-output (command &optional prefix-arg)
+ "Run a shell command with contents from the current message as input.
+This function is like `vm-pipe-message-to-command', but will not display the
+output of the command."
+ (interactive
+ ;; protect value of last-command
+ (let ((last-command last-command)
+ (this-command this-command))
+ (vm-follow-summary-cursor)
+ (vm-select-folder-buffer)
+ (list (read-string "Pipe to command: " vm-last-pipe-command)
+ current-prefix-arg)))
+ (vm-pipe-message-to-command command prefix-arg t))
+
+(defun vm-pipe-command-exit-handler (process discard-output
+ &optional exit-handler)
+ "Switch to output buffer of PROCESS if DISCARD-OUTPUT non-nil.
+If non-nil call EXIT-HANDLER with the two arguments COMMAND and OUTPUT-BUFFER."
+ (let ((exit-code (process-exit-status process))
+ (buffer (process-buffer process))
+ (command (process-command process)))
+ (if (not (zerop exit-code))
+ (message "Command '%s' exit code is %d." command exit-code))
+ (vm-display nil nil '(vm-pipe-message-to-command)
+ '(vm-pipe-message-to-command))
+ (vm-switch-to-command-output-buffer command buffer discard-output)
+ (if exit-handler
+ (funcall exit-handler command buffer))))
+(defvar vm-pipe-messages-to-command-start ""
+ "*Inserted by `vm-pipe-messages-to-command' before a message.")
+
+(defvar vm-pipe-messages-to-command-end "\n"
+ "*Inserted by `vm-pipe-messages-to-command' after a message.")
+
+;;;###autoload
+(defun vm-pipe-messages-to-command (command &optional prefix-arg
+ discard-output no-wait)
+ "Run a shell command with contents from messages as input.
+
+Similar to `vm-pipe-message-to-command', but it will call process
+just once and pipe all messages to it. For bulk operations this
+is much faster than calling the command on each message. This is
+more like saving to a pipe.
+
+Before a message it will insert `vm-pipe-messages-to-command-start'
+and after a message `vm-pipe-messages-to-command-end'.
+
+Output, if any, is displayed unless DISCARD-OUTPUT is t.
+
+If NO-WAIT is t, then do not wait for process to finish, if it is
+a function then call it with the COMMAND and OUTPUT-BUFFER as
+arguments after the command finished."
+ (interactive
+ ;; protect value of last-command
+ (let ((last-command last-command)
+ (this-command this-command))
+ (vm-follow-summary-cursor)
+ (vm-select-folder-buffer)
+ (list (read-string "Pipe to command: " vm-last-pipe-command)
+ current-prefix-arg)))
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-error-if-folder-empty)
+ (setq vm-last-pipe-command command)
+ (let ((buffer (get-buffer-create "*Shell Command Output*"))
+ (pop-up-windows (and pop-up-windows (eq vm-mutable-windows t)))
+ ;; prefix arg doesn't have "normal" meaning here, so only call
+ ;; vm-select-marked-or-prefixed-messages if we're using marks.
+ (mlist (if (eq last-command 'vm-next-command-uses-marks)
+ (vm-select-marked-or-prefixed-messages 0)
+ (list (car vm-message-pointer))))
+ m process)
+ (save-excursion
+ (set-buffer buffer)
+ (erase-buffer))
+ (setq process (start-process command buffer
+ (or shell-file-name "sh")
+ shell-command-switch command))
+ (set-process-sentinel
+ process
+ `(lambda (process status)
+ (setq status (process-status process))
+ (if (eq 'exit status)
+ (if ,no-wait
+ (vm-pipe-command-exit-handler
+ process ,command ,discard-output
+ (if (and ,no-wait (functionp ,no-wait))
+ no-wait)))
+ (message "Command '%s' changed state to %s."
+ ,command status))))
+ (while mlist
+ (setq m (vm-real-message-of (car mlist)))
+ (set-buffer (vm-buffer-of m))
+ (process-send-string process vm-pipe-messages-to-command-start)
+ (save-restriction
+ (widen)
+ (let ((region (vm-pipe-message-part m prefix-arg)))
+ (process-send-region process (nth 0 region) (nth 1 region))))
+ (process-send-string process vm-pipe-messages-to-command-end)
+ (setq mlist (cdr mlist)))
+
+ (process-send-eof process)
+
+ (when (not no-wait)
+ (while (and (eq 'run (process-status process)))
+ (accept-process-output process)
+ (sit-for 0))
+ (vm-pipe-command-exit-handler process command discard-output))
+ buffer))
+
+(defun vm-pipe-messages-to-command-to-string (command &optional prefix-arg)
+ "Runs a shell command with contents from the current message as input.
+This function is like `vm-pipe-messages-to-command', but will not display the
+output of the command, but return it as a string."
+ (interactive
+ ;; protect value of last-command
+ (let ((last-command last-command)
+ (this-command this-command))
+ (vm-follow-summary-cursor)
+ (vm-select-folder-buffer)
+ (list (read-string "Pipe to command: " vm-last-pipe-command)
+ current-prefix-arg)))
+ (save-excursion
+ (set-buffer (vm-pipe-messages-to-command command prefix-arg t))
+ (buffer-substring-no-properties (point-min) (point-max))))
+
+;;;###autoload
+(defun vm-pipe-messages-to-command-discard-output (command &optional prefix-arg)
+ "Runs a shell command with contents from the current message as input.
+This function is like `vm-pipe-messages-to-command', but will not display the
+output of the command."
+ (interactive
+ ;; protect value of last-command
+ (let ((last-command last-command)
+ (this-command this-command))
+ (vm-follow-summary-cursor)
+ (vm-select-folder-buffer)
+ (list (read-string "Pipe to command: " vm-last-pipe-command)
+ current-prefix-arg)))
+ (vm-pipe-messages-to-command command prefix-arg t))
+
+;;;###autoload
(defun vm-print-message (&optional count)
"Print the current message
Prefix arg N means print the current message and the next N - 1 messages.
@@ -621,9 +856,9 @@ Output, if any, is displayed. The message is not altered."
(vm-error-free-call 'delete-file tempfile)))))
(setq mlist (cdr mlist)))
(vm-display nil nil '(vm-print-message) '(vm-print-message))
- (if (not (zerop (save-excursion (set-buffer buffer) (buffer-size))))
- (display-buffer buffer))))
+ (vm-switch-to-command-output-buffer command buffer nil)))
+;;;###autoload
(defun vm-save-message-to-imap-folder (folder &optional count)
"Save the current message to an IMAP folder.
Prefix arg COUNT means save this message and the next COUNT-1
@@ -662,19 +897,20 @@ The saved messages are flagged as `filed'."
(while mlist
(setq m (car mlist))
(vm-imap-save-message process m mailbox)
- (if (null (vm-filed-flag m))
+ (when (null (vm-filed-flag m))
(vm-set-filed-flag m t))
(vm-increment count)
(vm-modify-folder-totals folder 'saved 1 m)
(setq mlist (cdr mlist))))
(and process (vm-imap-end-session process)))
(vm-update-summary-and-mode-line)
- (if (interactive-p)
- (message "%d message%s saved to %s"
- count (if (/= 1 count) "s" "")
- (vm-safe-imapdrop-string folder)))
- (if (and vm-delete-after-saving (not vm-folder-read-only))
+ (message "%d message%s saved to %s"
+ count (if (/= 1 count) "s" "")
+ (vm-safe-imapdrop-string folder))
+ (when (and vm-delete-after-saving (not vm-folder-read-only))
(vm-delete-message count))
folder ))
(provide 'vm-save)
+
+;;; vm-save.el ends here
diff --git a/vm-search.el b/lisp/vm-search.el
index f5d1147..597f140 100644
--- a/vm-search.el
+++ b/lisp/vm-search.el
@@ -1,22 +1,25 @@
-;;; Incremental search through a mail folder (for Lucid and FSF Emacs 19)
-;;; Copyright (C) 1994 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+;;; vm-search.el --- Incremental search through a mail folder
+;;
+;; Copyright (C) 1994 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-;;(provide 'vm-search)
+;;; Code:
+;;;###autoload
(defun vm-isearch-forward (&optional arg)
"Incrementally search forward through the current folder's messages.
Usage is identical to the standard Emacs incremental search.
@@ -31,6 +34,7 @@ vm-search-using-regexps for this search."
(if arg (not vm-search-using-regexps) vm-search-using-regexps)))
(vm-isearch t)))
+;;;###autoload
(defun vm-isearch-backward (&optional arg)
"Incrementally search backward through the current folder's messages.
Usage is identical to the standard Emacs incremental search.
@@ -122,3 +126,5 @@ vm-search-using-regexps for this search."
(vm-update-summary-and-mode-line)))))
(provide 'vm-search)
+
+;;; vm-search.el ends here
diff --git a/lisp/vm-serial.el b/lisp/vm-serial.el
new file mode 100644
index 0000000..f2edf89
--- /dev/null
+++ b/lisp/vm-serial.el
@@ -0,0 +1,894 @@
+;;; vm-serial.el --- automatic creation of personalized message bodies
+;; and sending of personalized serial mails
+;;
+;; Copyright (C) 2000-2005 Robert Widhopf-Fenk
+;;
+;; Author: Robert Widhopf-Fenk
+;; Status: Tested with XEmacs 21.4.15 & VM 7.19
+;; Keywords: sending mail, default mail, multiple recipients, serial mails
+;; X-URL: http://www.robf.de/Hacking/elisp
+;; Version: $Id$
+
+;;
+;; This code is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 1, or (at your option)
+;; any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+;;
+;;
+;;; Commentary:
+;;
+;; Are you lazy on the one hand, but you like salutations and greetings?
+;;
+;; YES?
+;;
+;; If so you got the right package here! The idea is similar to those of
+;; autoinsert.el, tempo.el, template.el etc., but specialized for composing
+;; mails with VM.
+;;
+;; You may want to use the following into your .vm file after adding other
+;; vm-mail-mode-hooks ...
+;;
+;; (require 'vm-serial)
+;; (add-hook 'vm-mail-mode-hook 'vm-serial-auto-yank-mail t)
+;; (define-key vm-mail-mode-map "\C-c\C-t" 'vm-serial-expand-tokens)
+;;
+;; and check out what happens if you reply to a message or what happens after
+;; specifying a recipient in the to header and typing [C-c C-t].
+;;
+;; Isn't it cool?
+;;
+;; Now add multiple recipients to a mail before pressing [C-c C-t] and call
+;; [M-x vm-serial-send-mail] in order to see what happens. If you are a
+;; trustful guy you may add a prefix arg [C-u].
+;;
+;; In order to learn more about valid tokens you should have a look at the
+;; documentation mail template.
+;;
+;; Go to an newly mail buffer add a From and To header and type:
+;; C-u M-x vm-serial-yank-mail RET doc RET
+;; M-x vm-serial-expand-tokens RET
+;;
+;;; KNOWN PROBLEMS:
+;;
+;; - mail-signature: instead of using this variable, you should use
+;; `vm-serial-mail-signature' with exaclty the same semantics.
+;;
+;;; Thanks:
+;;
+;; Ivan Kanis has contributed some bugfixes & enhancements.
+;;
+;;; Code:
+
+(defgroup vm nil
+ "VM"
+ :group 'mail)
+
+(defgroup vm-serial nil
+ "Sending personalized serial mails and getting message templates."
+ :group 'vm)
+
+(eval-when-compile
+ (require 'cl))
+
+(require 'vm-reply)
+
+(eval-and-compile
+ (require 'vm-pine)
+ (require 'mail-utils)
+ (require 'mail-extr)
+ (require 'advice))
+
+(let ((feature-list '(bbdb bbdb-sc)))
+ (while feature-list
+ (condition-case nil
+ (require (car feature-list))
+ (error
+ (if (load (format "%s" (car feature-list)) t)
+ (message "Library %s loaded!" (car feature-list))
+ (message "Could not load feature %S. Related functions may not work correctly!" (car feature-list)))))
+ (setq feature-list (cdr feature-list))))
+
+(defvar vm-reply-list nil)
+(defvar vm-redistribute-list nil)
+(defvar vm-forward-list)
+
+;;-----------------------------------------------------------------------------
+(defcustom vm-serial-token-alist
+ '(;; standard tokens you should not change (or need not)
+ ("to" (vm-serial-get-to)
+ "to header of the mail")
+
+ ("sir" (vm-serial-get-name 'last)
+ "the last name of the recipient")
+ ("you" (vm-serial-get-name 'first)
+ "the first name of the recipient")
+ ("mr" (vm-serial-get-name)
+ "the full name of the recipient")
+
+ ("bbdbsir" (vm-serial-get-bbdb-name 'last)
+ "the last name of the recipient as returned by the BBDB")
+ ("bbdbyou" (vm-serial-get-bbdb-name 'first)
+ "the first name of the recipient as returned by the BBDB")
+ ("bbdbmr" (vm-serial-get-bbdb-name)
+ "the full name of the recipient as returned by the BBDB")
+
+ ("me" (user-full-name)
+ "your full name")
+ ("i" (vm-serial-get-name 'first (user-full-name))
+ "your first name")
+ ("I" (vm-serial-get-name 'last (user-full-name))
+ "your last name")
+ ("point" (and (setq vm-serial-point (point)) nil)
+ "the position of point after expanding tokens")
+ ("reply" (if (and vm-reply-list vm-serial-body-contents)
+ (insert vm-serial-body-contents))
+ "set to the message body when replying")
+ ("forward" (if (and vm-forward-list vm-serial-body-contents)
+ (insert vm-serial-body-contents))
+ "set to the message body when forwarding")
+ ("body" (if vm-serial-body-contents
+ (insert vm-serial-body-contents))
+ "set to the message body before yanking a mail template")
+ ("sig" (cond
+ ((not vm-serial-mail-signature)
+ nil)
+ ((stringp vm-serial-mail-signature)
+ vm-serial-mail-signature)
+ ((eq t vm-serial-mail-signature)
+ (insert-file mail-signature-file))
+ ((functionp vm-serial-mail-signature)
+ (funcall vm-serial-mail-signature))
+ (t
+ (eval vm-serial-mail-signature)))
+ "the signature obtained from `vm-serial-mail-signature'")
+ ("fifosig" (concat "-- \n"
+ (shell-command-to-string
+ (concat "cat " mail-signature-file)))
+ "a signature read from a FIFO")
+ ;; english
+ ("hi" ("Hi" "Hello" "Dear")
+ "a randomly selected hi-style salutation")
+ ("dear" ("Lovely" "Hello" "Dear" "Sweetheart")
+ "a randomly selected dear-style salutation")
+ ("bye" ("" "Bye " "Cheers " "CU ")
+ "a randomly selected bye-style greeting")
+ ("br" ("Best regards" "Sincerly" "Yours")
+ "a randomly selected best-regards-style greeting")
+ ("babe" ("honey" "sugar pie" "darling" "babe")
+ "a randomly selected honey-style salutation")
+ ("inlove" ("In love" "Dreaming of you" "1 billion kisses")
+ "a randomly selected inlove-style greeting")
+ ("your" ("honey" "sugar pie" "darling" "babe"
+ (vm-serial-get-name 'first (user-full-name)))
+ "a randomly selected your-style greeting")
+ ;; german
+ ("hallo" ("Hi" "Griass di" "Servus" "Hallo")
+ "ein Hallo-Gruß")
+ ("mausl" ("Mausl" "Liebling" "Schatzi" "Hallo")
+ "die Freundin")
+ ("ciao" ("" "Ciao " "Tschüß " "Servus " "Mach's gut " "Bis denn "
+ "Bis die Tage mal ")
+ "Verabschiedung")
+ ("sg" ("Sehr geehrte Frau/Herr")
+ "förmliche Anrede")
+ ("mfg" ("Mit freundlichen Grüßen")
+ "förmliche Verabschiedung")
+ ;; french
+ ("salut" ("Salut" "Bonjour")
+ "Une salutation au hasard")
+ ("merci" ("Merci" "Au revoir" "A+" "Amicalement")
+ "Un au revoir au hasard")
+ )
+ "*Alist for mapping tokens to real things, i.e., strings.
+Set this by calling `vm-serial-set-tokens'!
+
+The format of each record is:
+
+ (TOKENNAME SEXPRESSION DOCUMENTATION)
+
+TOKENNAME and DOCUMENTATION have to be strings.
+SEXPRESSION one of
+- a list starting with a string, which might be followed by other
+ string, functions or Lisp expressions
+- a function returning a string
+- a Lisp expression which evaluates to a string
+
+When a list starting with a string then `vm-serial-expand-tokens' will
+randomly select one of them during expansion."
+ :group 'vm-serial
+ :type '(repeat (list (string :tag "Tagname")
+ (choice (repeat :tag "List of strings" (string))
+ (sexp :tag "SExp evaluating to a string"))
+ (string :tag "Documentation"))))
+
+(defcustom vm-serial-mails-alist
+ '(("honey"
+ "girlfriend"
+ "$dear $babe,
+
+$point$reply
+
+$inlove $your
+$forward")
+ ("german-reply"
+ (and vm-reply-list
+ (string-match "\\.\\(de\\|at\\|ch\\)>?$"
+ (vm-mail-mode-get-header-contents "To:")))
+ "$reply
+$point
+$ciao$i")
+ ("german-default"
+ "\\.\\(de\\|at\\|ch\\)>?$"
+ "$hallo $you,
+
+$point$reply
+
+$ciao$i
+
+$forward
+$sig")
+ ("german-serious"
+ "\\.\\(de\\|at\\|ch\\)>?$"
+ "$sg $sir,
+
+$point$reply
+
+$mfg
+$me
+
+$forward
+$sig")
+ ("english-reply"
+ vm-reply-list
+ "$reply
+$point
+$bye$i")
+ ("english-default"
+ t
+ "$hi $you,
+
+$point$reply
+
+$bye$i
+
+$forward
+$sig
+")
+ ;; A test mail for showing what's possible
+ ("doc"
+ nil
+ "
+ A LECTURE ON VM-SERIAL
+
+The `vm-serial-mails-alist' contains a list of templates and associated
+conditions and names for these templates.
+
+When doing a `vm-serial-yank-mail' it will check for the first condition
+which matches and inserts this template. Tokens in the template are
+expanded by the function called `vm-serial-expand-tokens'.
+
+There are default tokens for various things. Tokens start with the
+string specified in `vm-serial-cookie' which is \"$(eval vm-serial-cookie)\" followed by a
+string matching the regexp \\([a-zA-Z][a-zA-Z0-9_-]*\\) which may be
+enclosed by {} or a lisp expressions. The first type is a named token
+and has to be listed in the variable `vm-serial-token-alist'. It will be
+expanded and if evaluating to a non nil object then it is inserted. In
+order to get just the `vm-serial-cookie' \"$(eval vm-serial-cookie)\" simply write it twice.
+
+You may also embed any kind of lisp expression. If they return a string, it
+will be inserted.
+
+Do [M-x vm-serial-expand-tokens] in order to see how things change ...
+
+Example of a embedded lisp expression:
+
+ the current date is $$(format-time-string \"%D %r\").
+
+ $$(center-line) Center this line
+
+ $$$no expansion
+
+The following tokens are currently defined:
+
+Token Documentation (the example follows in the next line)
+$(mapconcat
+ (function (lambda (tk)
+ (concat (car tk) \"\\t\" (caddr tk) \"\n\t$\" (car tk))))
+ vm-serial-token-alist \"\n\")
+
+
+If you thing there are other tokens which should be added to this list, please
+let me know!
+
+mailto:Robert Fenk"))
+ "*Alist of default mail templates.
+Set this by calling `vm-serial-set-mail'!
+
+Format:
+ ((SYMBOLIC-NAME CONDITION MAIL-FORM)
+ ...)
+
+When calling `vm-serial-yank-mail' interactively one will be prompted for
+a SYMBOLIC-NAME of a mail from. If called non interactively it will
+search for the first condition which evaluates to true and inserts the
+corresponding mail. If CONDITION is a string it is matched against the
+To-header otherwise it is evaluated."
+ :group 'vm-serial
+ :type '(repeat (list (string :tag "Name")
+ (choice :tag "Condition"
+ (const :tag "NEVER" nil)
+ (const :tag "ALWAYS" t)
+ (string :tag "Regexp" "emailaddress")
+ (variable-item :tag "Relpy" vm-reply-list)
+ (variable-item :tag "Forward" vm-forward-list)
+ (variable-item :tag "Redistribute" vm-redistribute-list)
+ (sexp :tag "SEXP"))
+ (string :tag "Message-Template"))))
+
+(defcustom vm-serial-cookie "$"
+ "*The string which begins a token or Lisp expression.
+See `vm-serial-expand-tokens' for information about valid tokens."
+ :group 'vm-serial
+ :type 'string)
+
+(defcustom vm-serial-fcc nil
+ "*Whether to keep a FCC from the source mail within each serial mail.
+If the function `vm-postpone-message' (from vm-pine) is present it will
+also save the source message in the specified folder otherwise there is
+no way to save the source message."
+ :group 'vm-serial
+ :type 'boolean)
+
+(defcustom vm-serial-mail-signature nil
+ "*Text inserted at the `sig'-token of a mail buffer.
+The semantics are equal to those of variable `mail-signature', however you
+should disable variable `mail-signature', since it interacts badly with
+vm-serial, i.e. set vm-serial-mail-signature to the value of variable
+`mail-signature' and set variable `mail-signature' to nil!"
+ :group 'vm-serial
+ :type '(choice (const :tag "None" nil)
+ (const :tag "The content of `mail-signature-file'" t)
+ (function-item :tag "Function")
+ (sexp :tag "Lisp-Form")))
+
+(defvar vm-serial-to nil
+ "The recipient of the currently expanded message.")
+
+(defvar vm-serial-body-contents nil
+ "The message body of the currently replied or forwarded message.")
+
+(defcustom vm-serial-unknown-to "unknown"
+ "*The string displayed for recipients without a real name.
+If set to something different than a string it will be evaluated in order to
+return a string."
+ :group 'vm-serial
+ :type 'string)
+
+(defvar vm-serial-source-buffer
+ nil
+ "The source buffer of the currently expanded template.
+When doing a `vm-serial-send-mail' this will point to the source
+buffer containing the original message.")
+
+(defvar vm-serial-send-mail-buffer "*vm-serial-mail*"
+ "*Name of the buffer use by `vm-serial-send-mail' for expanded template.")
+
+(defvar vm-serial-send-mail-jobs
+ nil
+ "Remaining list of addresses which have to be processed after editing.")
+
+(make-variable-buffer-local 'vm-serial-source-buffer)
+(make-variable-buffer-local 'vm-serial-send-mail-jobs)
+
+;;-----------------------------------------------------------------------------
+(defun vm-serial-get-completing-list (alist)
+ "Return cars from ALIST for completion."
+ (mapcar (lambda (e) (list (car e))) alist))
+
+;;-----------------------------------------------------------------------------
+(defvar vm-serial-token-history nil)
+
+(defun vm-serial-set-token (&optional token newvalue doc)
+ "Set vm-serial TOKEN to NEWVALUE with DOC.
+You may remove a token by specifying just the TOKEN as argument."
+ (interactive
+ (let* ((token (completing-read "Token: "
+ (vm-serial-get-completing-list
+ vm-serial-token-alist)
+ nil nil nil
+ vm-serial-token-history))
+ (value (read-expression
+ "Value: "
+ (format "%S" (cdr (assoc var vm-serial-token-alist))))))
+ (list token value)))
+ (let ((tk (assoc token vm-serial-token-alist)))
+ (if tk
+ (if newvalue
+ (setcdr tk (list newvalue doc))
+ (setq vm-serial-token-alist (delete tk vm-serial-token-alist)))
+ (setq vm-serial-token-alist
+ (nconc vm-serial-token-alist
+ (list (list token newvalue doc)))))))
+
+(defun vm-serial-set-tokens (token-list)
+ "Set `vm-serial-token-alist' according to TOKEN-LIST.
+Is a list of (TOKEN NEWVALUE DOC) elements"
+ (let (token-value)
+ (while token-list
+ (setq token-value (car token-list))
+ (vm-serial-set-token (car token-value) (cadr token-value)
+ (caddr token-value))
+ (setq token-list (cdr token-list)))))
+
+(defun vm-serial-get-token (&optional token)
+ "Return value of vm-serial TOKEN."
+ (interactive (list (completing-read "Token: "
+ (vm-serial-get-completing-list
+ vm-serial-token-alist)
+ nil nil nil
+ vm-serial-token-history)))
+ (let ((value (assoc token vm-serial-token-alist)))
+ (if value
+ (cadr value)
+ (warn "There is no vm-serial token `%s'" token)
+ nil)))
+
+(defun vm-serial-eval-token-value (&optional token-value)
+ "Return string value by evaluation TOKEN-VALUE."
+ (if (stringp token-value)
+ token-value
+ (condition-case err
+ (cond ((and (listp token-value) (stringp (car token-value)))
+ (setq token-value (vm-serial-random-string token-value)))
+ ((functionp token-value)
+ (setq token-value (funcall token-value)))
+ (t
+ (setq token-value (eval token-value))))
+ (error (setq token-value nil)
+ (warn (format "Token `%s' caused a %S"
+ token-value err))
+ nil))
+ token-value))
+
+;;-----------------------------------------------------------------------------
+(defun vm-serial-get-emails (&optional header)
+ "Return the recipient of current message.
+Optional argument HEADER is the header to get the recipients from."
+ (setq header (or header "To:"))
+ (let ((to (vm-mail-mode-get-header-contents header)))
+ (if (functionp 'bbdb-extract-address-components)
+ (car (bbdb-extract-address-components to))
+ (mail-extract-address-components to))))
+
+(defun vm-serial-get-to ()
+ "Return the recipient of current message."
+ (or vm-serial-to
+ (vm-serial-get-emails "To:")))
+
+(defun vm-serial-get-name (&optional part name)
+ (let ((name (or name
+ (and vm-serial-to (car vm-serial-to))
+ (let ((to (vm-serial-get-to)))
+ (and to (or (car to)
+ (cadr to))))
+ (eval vm-serial-unknown-to)))
+ (part (cond ((stringp part) part)
+ ((equal part 'first) "^\\(\\w+\\)[\t ._]")
+ ((equal part 'last) "^\\w+[\t ._]+\\(.+\\)$"))))
+
+ (if (and part (string-match part name))
+ (match-string 1 name)
+ name)))
+
+(defun vm-serial-get-bbdb-name (&optional part name)
+ (let* ((to (vm-serial-get-to))
+ (rec (bbdb-search-simple nil (cadr to))))
+ (if rec
+ (cond ((equal part 'first) (or (bbdb/sc-consult-attr (cadr to))
+ (bbdb-record-firstname rec)))
+ ((equal part 'last) (bbdb-record-lastname rec)))
+ (vm-serial-get-name part name))))
+
+;;-----------------------------------------------------------------------------
+(defun vm-serial-set-mails (mail-alist)
+ "Set `vm-serial-mails-alist' according to MAIL-ALIST."
+ (let (m)
+ (setq mail-alist (reverse mail-alist))
+ (while mail-alist
+ (setq m (assoc (caar mail-alist) vm-serial-mails-alist))
+ (if m
+ (setq vm-serial-mails-alist (delete m vm-serial-mails-alist)))
+ (add-to-list 'vm-serial-mails-alist (car mail-alist))
+ (setq mail-alist (cdr mail-alist)))))
+
+(defun vm-serial-get-mail (&optional mail)
+ "Return the mail body associated with MAIL."
+ (let ((value (assoc mail vm-serial-mails-alist)))
+ (if value (car (last value)) nil)))
+
+(defvar vm-serial-mail-history nil
+ "History for `vm-serial-yank-mail'.")
+
+(defun vm-serial-find-default-mail ()
+ "Return the first recipient."
+ (let ((to (vm-decode-mime-encoded-words-in-string
+ (or (vm-mail-mode-get-header-contents "To:")
+ (vm-mail-mode-get-header-contents "CC:")
+ (vm-mail-mode-get-header-contents "BCC:")
+ "")))
+ (mails-alist vm-serial-mails-alist)
+ m mail)
+ (setq mail nil)
+ (if (string-match "^\\s-*\\(.*[^ \t]\\)\\s-*$" to)
+ (setq to (match-string 1 to)))
+ (while mails-alist
+ (setq m (car mails-alist))
+ (if (and (> (length m) 2)
+ (cond ((stringp (cadr m))
+ (let ((case-fold-search t))
+ (string-match (cadr m) to)))
+ ((functionp (cadr m))
+ (funcall (cadr m)))
+ ((equal (cadr m) t))
+ (t
+ (eval (cadr m)))))
+ (setq mail (car m)
+ mails-alist nil))
+ (setq mails-alist (cdr mails-alist)))
+ mail))
+
+(defun vm-serial-auto-yank-mail (&optional mail no-expand)
+ "Yank the mail associated with MAIL.
+If MAIL is nil search for a default mail, i.e. the first which evaluates its
+condition to true. When called with a prefix argument or if NO-EXPAND is non
+nil no tokens will be expanded after yanking.
+
+This is like `vm-serial-yank-mail', but it ensures to yank only if the buffer
+is no serial mail buffer and if there was no yank-mail before!"
+ (if (and (not vm-serial-source-buffer)
+ (not vm-redistribute-list)
+ (not (local-variable-p 'vm-serial-body-contents (current-buffer)))
+ (boundp 'vm-postponed-message-folder-buffer)
+ (not vm-postponed-message-folder-buffer))
+ (vm-serial-yank-mail (or mail (vm-serial-find-default-mail))
+ no-expand)))
+
+(defvar vm-serial-yank-mail-choice nil)
+(make-variable-buffer-local 'vm-serial-yank-mail-choice)
+
+(defun vm-serial-yank-mail (&optional mail no-expand)
+ "Yank the template associated with MAIL.
+
+If MAIL is nil search for a default template, i.e. the first one which
+evaluates its condition to true. When called with a prefix argument ask for
+a template and with another prefix argument or if NO-EXPAND is non nil
+no tokens will be expanded after yanking.
+
+You may bind this to [C-c C-t] in mail-mode in order to automatically yank
+the right mail into the composition buffer and move the cursor to the
+editing point.
+
+I try to be clever when to delete the existing buffer contents and when to
+expand the tokens, however if this does not satisfy you please report it to
+me."
+
+ (interactive "p")
+
+ (if (numberp mail)
+ (if (= mail 1)
+ (setq mail nil)
+ (setq no-expand (if (= mail 16) '(t))
+ mail (completing-read
+ "Mail: "
+ (vm-serial-get-completing-list
+ vm-serial-mails-alist)
+ nil
+ t;; exact match
+ (cons (vm-serial-find-default-mail)
+ 0)
+ vm-serial-mail-history)
+ vm-serial-yank-mail-choice mail)))
+
+ (setq mail (or mail vm-serial-yank-mail-choice (vm-serial-find-default-mail)))
+
+ (let ((save-point (point)))
+ (if (not mail)
+ (message "There is no matching mail form!")
+ (if (local-variable-p 'vm-serial-body-contents (current-buffer))
+ (progn (delete-region (mail-text) (point-max))
+ (setq no-expand (if (and no-expand (listp no-expand))
+ no-expand 'not))))
+
+ (if (or (interactive-p)
+ (local-variable-p 'vm-serial-body-contents (current-buffer)))
+ (message "Inserting serial mail `%S'." mail)
+ (let ((start (mail-text)) (end (goto-char (point-max))))
+ (make-local-variable 'vm-serial-body-contents)
+ (make-local-variable 'vm-serial-to)
+ (setq vm-serial-to nil
+ vm-serial-body-contents nil)
+ (if (not (or vm-reply-list vm-forward-list))
+ (setq no-expand (if (equal no-expand 'not) nil
+ (if (and no-expand (listp no-expand))
+ no-expand t)))
+ (setq vm-serial-body-contents (buffer-substring start end))
+ (delete-region start end))))
+
+ (let ((value (vm-serial-get-mail mail)))
+ (save-excursion
+ (insert value)))
+
+ (if (or (and (not vm-forward-list) (not no-expand))
+ (equal no-expand 'not))
+ (vm-serial-expand-tokens)
+ (goto-char save-point)))))
+
+;;-----------------------------------------------------------------------------
+(defun vm-serial-random-string (string-list)
+ "Randomly return one of the strings in STRING-LIST."
+ (let ((value (nth (mod (random) (length string-list)) string-list)))
+ (cond ((stringp value)
+ value)
+ ((functionp value)
+ (funcall value))
+ (t
+ (eval value)))))
+
+(defun vm-serial-expand-tokens (&optional rstart rend)
+ "Expand all tokens within the current mail.
+This means we search for the `vm-serial-cookie' and if it is followed by a
+regexp of \"[a-zA-Z][a-zA-Z0-9_-]\" we treat this as a symbol to look up in
+our `vm-serial-token-alist'. Optionally one may enclose the symbol by curly
+parenthesis. See the test mail in `vm-serial-mails-alist' for examples.
+If the cookie is followed by a parenthesis then it is treated as a lisp
+expression which is evaluated
+
+Results evaluating to a string are inserted all other return values are
+ignored. For non existing tokens or errors during evaluation one will get
+a warning."
+ (interactive)
+
+ (let ((token-regexp (concat (regexp-quote vm-serial-cookie)
+ "\\(" (regexp-quote vm-serial-cookie) "\\)*"
+ "[{\(a-zA-Z]"))
+ start end expr result vm-serial-point)
+ (if (and vm-xemacs-p
+ (region-exists-p)
+ (eq (zmacs-region-buffer) (current-buffer)))
+ (setq rstart (goto-char (region-beginning)) rend (region-end))
+ (setq rstart (mail-text) rend (point-max)))
+
+ (narrow-to-region rstart rend)
+ (while (re-search-forward token-regexp (point-max) t)
+ (backward-char 1)
+ (setq start (- (match-end 0) 1)
+ result nil)
+ (cond ((> (length (match-string 1)) 0)
+ (delete-region (match-beginning 1) (match-end 1)))
+ ((looking-at "(")
+ (setq end (scan-sexps start 1))
+ (goto-char start)
+ (setq expr (read (current-buffer)))
+ (delete-region (- start 1) end)
+ (setq result (vm-serial-eval-token-value expr)))
+ ((looking-at "\\({\\)?\\([a-zA-Z][a-zA-Z0-9_-]*\\)\\(}\\)?")
+ (setq start (match-beginning 2))
+ (setq end (match-end 2))
+ (setq expr (buffer-substring start end))
+ (if (and (not (and (match-end 1) (match-end 3)))
+ (or (match-end 1) (match-end 3)))
+ (error "Invalid token expression `%s'"
+ (match-string 0)))
+ (delete-region (- (match-beginning 0) 1) (match-end 0))
+ (setq result (vm-serial-eval-token-value
+ (vm-serial-get-token expr))))
+ )
+ (if (and result (stringp result))
+ (insert (format "%s" result))))
+ (widen)
+ (if vm-serial-point
+ (goto-char vm-serial-point))))
+
+(defvar vm-serial-insert-token-history nil)
+
+(defun vm-serial-insert-token (token)
+ "Reads a valid token, inserts it at point and expands it."
+ (interactive (list
+ (completing-read
+ (format "Token%s: "
+ (if vm-serial-insert-token-history
+ (concat " (default: "
+ (car vm-serial-insert-token-history)
+ ")")
+ ""))
+ (mapcar (lambda (tok) (list (car tok)))
+ vm-serial-token-alist)
+ nil
+ t
+ nil
+ 'vm-serial-insert-token-history)))
+ (setq vm-serial-insert-token-history
+ (delete "" vm-serial-insert-token-history))
+ (if (string= "" token)
+ (setq token (car vm-serial-insert-token-history)))
+ (if (null token)
+ (error "Error: you have to enter a toke name!"))
+ (let ((start (point)))
+ (insert vm-serial-cookie token)
+ (vm-serial-expand-tokens start (point))))
+
+;;-----------------------------------------------------------------------------
+(defvar vm-serial-sent-cnt nil)
+(defvar vm-serial-edited-cnt nil)
+(defvar vm-serial-killed-cnt nil)
+(defvar vm-serial-send-mail-exit nil)
+
+(defun vm-serial-send-mail-increment (variable)
+ (save-excursion
+ (set-buffer vm-serial-source-buffer)
+ (eval (list 'vm-increment variable))))
+
+
+(defun vm-serial-send-mail-and-exit (&optional non-interactive)
+ "Like `vm-serial-send-mail' but kills the buffer after sending all."
+ (interactive "P")
+ (make-local-variable 'vm-serial-send-mail-exit)
+ (setq vm-serial-send-mail-exit t)
+ (vm-serial-send-mail non-interactive))
+
+(defun vm-serial-send-mail (&optional non-interactive done)
+ "Send an expanded mail to each recipient listed in the To-header.
+This will create a new buffer for expanding the tokens and user interaction.
+You may send each mail interactively, that means you may send the message as
+it is, or you may edit it before sending or you may skip it.
+
+If called with a prefix argument or NON-INTERACTIVE set to non nil, no
+questions will bother you!"
+ (interactive "P")
+
+ (remove-hook 'kill-buffer-hook 'vm-serial-send-mail t)
+
+ (if vm-serial-source-buffer
+ (progn (set-buffer vm-serial-source-buffer)
+ (setq done t)))
+
+ (if (get-buffer vm-serial-send-mail-buffer)
+ (save-excursion
+ (kill-buffer (get-buffer vm-serial-send-mail-buffer))))
+
+ (let* ((work-buffer
+ (save-excursion
+ (let ((vm-frame-per-composition nil))
+ (flet ((vm-display (buffer display commands configs
+ &optional do-not-raise)
+ nil))
+ (vm-mail-internal vm-serial-send-mail-buffer))
+ (get-buffer vm-serial-send-mail-buffer))))
+ (source-buffer (current-buffer))
+ work to to-string)
+
+ (if (and (not vm-serial-send-mail-jobs) (not done))
+ (if (not (setq to (mail-fetch-field "To" nil t)))
+ (error "There are no recipients in %s!" (buffer-name))
+ (setq vm-serial-send-mail-jobs
+ (if (functionp 'bbdb-extract-address-components)
+ (bbdb-extract-address-components to)
+ (mapcar 'mail-extract-address-components
+ (bbdb-split to ","))))
+ (make-local-variable 'vm-serial-sent-cnt)
+ (make-local-variable 'vm-serial-edited-cnt)
+ (make-local-variable 'vm-serial-killed-cnt)
+ (setq vm-serial-sent-cnt 0
+ vm-serial-edited-cnt 0
+ vm-serial-killed-cnt 0)))
+
+ ;; mail-extract-address-components isn't good at all! Fix it!
+ (save-excursion
+ (set-buffer work-buffer)
+ (setq major-mode 'mail-mode))
+
+ (while (and (not work) vm-serial-send-mail-jobs)
+ (setq to (car vm-serial-send-mail-jobs)
+ to-string (if (car to)
+ (concat (car to) " <" (cadr to) ">")
+ (cadr to)))
+ (copy-to-buffer work-buffer (point-min) (point-max))
+ (save-excursion
+ (set-buffer work-buffer)
+ (goto-char (point-min))
+ (vm-mail-mode-remove-header "To:")
+ (mail-position-on-field "To")
+ (insert to-string)
+ (if (not vm-serial-fcc)
+ (vm-mail-mode-remove-header "FCC:"))
+ (setq vm-serial-to to
+ vm-serial-source-buffer source-buffer)
+ (setq buffer-undo-list t)
+ (vm-serial-expand-tokens)
+
+ (if (not non-interactive)
+ (let (command)
+ (switch-to-buffer work-buffer)
+ (while (not command)
+ (message "(q)uit session or (e)dit, (s)end or (k)ill this mail to `%s'?"
+ to)
+ (setq command (read-char-exclusive))
+ (cond ((= command ?e)
+ (vm-serial-send-mail-increment 'vm-serial-edited-cnt)
+ (setq work 'edit))
+ ((= command ?s)
+ (vm-serial-send-mail-increment 'vm-serial-sent-cnt)
+ (vm-mail-send))
+ ((= command ?k)
+ (vm-serial-send-mail-increment 'vm-serial-killed-cnt))
+ ((= command ?q)
+ (setq work 'quit))
+ (t (message "Invalid command!")
+ (sit-for 1)
+ (setq command nil)))))
+ (vm-mail-send)
+ (vm-serial-send-mail-increment 'vm-serial-sent-cnt)))
+
+ (setq vm-serial-send-mail-jobs (cdr vm-serial-send-mail-jobs)))
+
+ ;; ok there was an exit or the like
+ (if (equal work 'edit)
+ (progn ;; and we want to edit the outgoing mail before sending
+ (switch-to-buffer work-buffer)
+ (run-hooks 'vm-mail-hook)
+ (run-hooks 'vm-mail-mode-hook)
+ (setq buffer-undo-list nil)
+ (make-local-hook 'kill-buffer-hook)
+ (add-hook 'kill-buffer-hook
+ '(lambda ()
+ (vm-serial-send-mail-increment 'vm-serial-killed-cnt))
+ t t)
+ (add-hook 'kill-buffer-hook 'vm-serial-send-mail t t)
+ (make-local-hook 'mail-send-hook)
+ (add-hook 'mail-send-hook
+ '(lambda ()
+ (vm-serial-send-mail-increment 'vm-serial-sent-cnt))
+ t t)
+ (remove-hook 'kill-buffer-hook 'vm-save-killed-message-hook t)
+ (message "Kill or send this mail to get to the next mail!"))
+
+ ;; get rid of the work buffer and go back to the source
+ (kill-buffer work-buffer)
+ (switch-to-buffer source-buffer)
+
+ (if (not (equal work 'quit))
+ (let ((fcc (vm-mail-mode-get-header-contents "FCC:")))
+ ;; some statistics
+ (message "%s mail%s sent, %s edited and %s killed by vm-serial!"
+ (if (= vm-serial-sent-cnt 1) "One" vm-serial-sent-cnt)
+ (if (= vm-serial-sent-cnt 1) "" "s")
+ vm-serial-edited-cnt vm-serial-killed-cnt)
+
+ ;; this was the last mail so is there some FCC work to do?
+ (if (and fcc (not vm-serial-send-mail-jobs))
+ (if (not (functionp 'vm-postpone-message))
+ (error "vm-pine.el is needed to save source messages!")
+ ;; no postponed header for this!!
+ (vm-mail-mode-remove-header "FCC:")
+ (vm-postpone-message fcc vm-serial-send-mail-exit t))
+ (if vm-serial-send-mail-exit
+ (kill-this-buffer))))))))
+
+(defadvice vm-mail-send-and-exit (after vm-serial-send-mail activate)
+ (if vm-serial-source-buffer
+ (kill-this-buffer)))
+
+;;-----------------------------------------------------------------------------
+(provide 'vm-serial)
+
+;;; vm-serial.el ends here
diff --git a/vm-sort.el b/lisp/vm-sort.el
index e3a398b..859ed22 100644
--- a/vm-sort.el
+++ b/lisp/vm-sort.el
@@ -1,22 +1,26 @@
-;;; Sorting and moving messages inside VM
-;;; Copyright (C) 1993, 1994 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-sort)
+;;; vm-sort.el --- Sorting and moving messages inside VM
+;; Copyright (C) 1993, 1994 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+;;; Commentary:
+;;
+
+;;;###autoload
(defun vm-move-message-forward (count)
"Move a message forward in a VM folder.
Prefix arg COUNT causes the current message to be moved COUNT messages forward.
@@ -47,8 +51,8 @@ the folder undisturbed."
(while (not (zerop count))
(vm-move-message-pointer direction)
(vm-decrement count))
- (if (> (string-to-int (vm-number-of (car vm-message-pointer)))
- (string-to-int (vm-number-of (car ovmp))))
+ (if (> (string-to-number (vm-number-of (car vm-message-pointer)))
+ (string-to-number (vm-number-of (car ovmp))))
(setq vm-message-pointer (cdr vm-message-pointer)))
(if (eq vm-message-pointer ovmp)
()
@@ -92,8 +96,8 @@ the folder undisturbed."
vm-numbering-redo-end-point (cdr ovmp-prev)
vm-summary-pointer (car ovmp-prev)))
((or (not vm-message-pointer)
- (< (string-to-int (vm-number-of (car ovmp-prev)))
- (string-to-int (vm-number-of (car vm-message-pointer)))))
+ (< (string-to-number (vm-number-of (car ovmp-prev)))
+ (string-to-number (vm-number-of (car vm-message-pointer)))))
(setq vm-numbering-redo-start-point (cdr ovmp-prev)
vm-numbering-redo-end-point (cdr ovmp)
vm-summary-pointer (car (cdr ovmp-prev))))
@@ -130,6 +134,7 @@ the folder undisturbed."
(vm-preview-current-message)
(vm-update-summary-and-mode-line)))
+;;;###autoload
(defun vm-move-message-backward (count)
"Move a message backward in a VM folder.
Prefix arg COUNT causes the current message to be moved COUNT
@@ -144,12 +149,14 @@ the folder undisturbed."
(interactive "p")
(vm-move-message-forward (- count)))
+;;;###autoload
(defun vm-move-message-forward-physically (count)
"Like vm-move-message-forward but always move the message physically."
(interactive "p")
(let ((vm-move-messages-physically t))
(vm-move-message-forward count)))
+;;;###autoload
(defun vm-move-message-backward-physically (count)
"Like vm-move-message-backward but always move the message physically."
(interactive "p")
@@ -207,6 +214,7 @@ the folder undisturbed."
;; delete the old copy of the message
(delete-region doomed-start doomed-end)))))
+;;;###autoload
(defun vm-so-sortable-datestring (m)
(or (vm-sortable-datestring-of m)
(progn
@@ -220,6 +228,7 @@ the folder undisturbed."
(error "1970010100:00:00")))
(vm-sortable-datestring-of m))))
+;;;###autoload
(defun vm-so-sortable-subject (m)
(or (vm-sortable-subject-of m)
(progn
@@ -246,6 +255,12 @@ the folder undisturbed."
subject ))
(vm-sortable-subject-of m))))
+(defvar vm-sort-compare-header nil
+ "the header to sort on.")
+
+(defvar vm-sort-compare-header-history nil)
+
+;;;###autoload
(defun vm-sort-messages (keys &optional lets-get-physical)
"Sort message in a folder by the specified KEYS.
You may sort by more than one particular message key. If
@@ -255,11 +270,13 @@ read from the minibuffer. Valid keys are
\"date\" \"reversed-date\"
\"author\" \"reversed-author\"
+\"full-name\" \"reversed-full-name\"
\"subject\" \"reversed-subject\"
\"recipients\" \"reversed-recipients\"
\"line-count\" \"reversed-line-count\"
\"byte-count\" \"reversed-byte-count\"
\"physical-order\" \"reversed-physical-order\"
+\"spam-score\" \"reversed-spam-score\"
Optional second arg (prefix arg interactively) means the sort
should change the physical order of the messages in the folder.
@@ -291,7 +308,8 @@ folder in the order in which the messages arrived."
doomed-start doomed-end offset
(order-did-change nil)
virtual
- physical)
+ physical
+ auto-folder-p)
(setq key-list (vm-parse keys "[ \t]*\\([^ \t]+\\)")
ml-keys (and key-list (mapconcat (function identity) key-list "/"))
key-funcs nil
@@ -308,10 +326,17 @@ folder in the order in which the messages arrived."
(vm-build-threads-if-unbuilt)
(vm-build-thread-lists)
(setq key-funcs (cons 'vm-sort-compare-thread key-funcs)))
+ ((equal key "auto-folder")
+ (setq auto-folder-p t)
+ (setq key-funcs (cons 'vm-sort-compare-auto-folder key-funcs)))
((equal key "author")
(setq key-funcs (cons 'vm-sort-compare-author key-funcs)))
((equal key "reversed-author")
(setq key-funcs (cons 'vm-sort-compare-author-r key-funcs)))
+ ((equal key "full-name")
+ (setq key-funcs (cons 'vm-sort-compare-full-name key-funcs)))
+ ((equal key "reversed-full-name")
+ (setq key-funcs (cons 'vm-sort-compare-full-name-r key-funcs)))
((equal key "date")
(setq key-funcs (cons 'vm-sort-compare-date key-funcs)))
((equal key "reversed-date")
@@ -332,11 +357,22 @@ folder in the order in which the messages arrived."
(setq key-funcs (cons 'vm-sort-compare-line-count key-funcs)))
((equal key "reversed-line-count")
(setq key-funcs (cons 'vm-sort-compare-line-count-r key-funcs)))
+ ((equal key "spam-score")
+ (setq key-funcs (cons 'vm-sort-compare-spam-score key-funcs)))
+ ((equal key "reversed-spam-score")
+ (setq key-funcs (cons 'vm-sort-compare-spam-score-r key-funcs)))
((equal key "physical-order")
(setq key-funcs (cons 'vm-sort-compare-physical-order key-funcs)))
((equal key "reversed-physical-order")
(setq key-funcs (cons 'vm-sort-compare-physical-order-r key-funcs)))
- (t (error "Unknown key: %s" key)))
+ ((equal key "header")
+ (setq vm-sort-compare-header nil)
+ (setq key-funcs (cons 'vm-sort-compare-header key-funcs)))
+ (t
+ (let ((compare (intern (format "vm-sort-compare-%s" key))))
+ (if (functionp compare)
+ (setq key-funcs (cons compare key-funcs))
+ (error "Unknown key: %s" key)))))
(setq key-list (cdr key-list)))
;; if this is not a thread sort and threading is enabled,
;; then disable threading and make sure the whole summary is
@@ -386,7 +422,7 @@ folder in the order in which the messages arrived."
(vm-set-su-start-of (car mp-new)
(vm-su-start-of (car mp-old)))))
(setq mp-new nil)))
- (if (and order-did-change physical)
+ (if (and physical (vm-has-message-order))
(let ((buffer-read-only nil))
;; the folder is being physically ordered so we don't
;; need a message order header to be stuffed, nor do
@@ -446,8 +482,12 @@ folder in the order in which the messages arrived."
(or lets-get-physical vm-move-messages-physically))
;; clip region is most likely messed up
(vm-preview-current-message)
- (vm-update-summary-and-mode-line))))
+ (vm-update-summary-and-mode-line))
+
+ (if auto-folder-p
+ (vm-sort-insert-auto-folder-names))))
+;;;###autoload
(defun vm-sort-compare-xxxxxx (m1 m2)
(let ((key-funcs vm-key-functions) result)
(while (and key-funcs
@@ -500,6 +540,20 @@ folder in the order in which the messages arrived."
((string-equal s1 s2) '=)
(t t))))
+(defun vm-sort-compare-full-name (m1 m2)
+ (let ((s1 (vm-su-full-name m1))
+ (s2 (vm-su-full-name m2)))
+ (cond ((string-lessp s1 s2) t)
+ ((string-equal s1 s2) '=)
+ (t nil))))
+
+(defun vm-sort-compare-full-name-r (m1 m2)
+ (let ((s1 (vm-su-full-name m1))
+ (s2 (vm-su-full-name m2)))
+ (cond ((string-lessp s1 s2) nil)
+ ((string-equal s1 s2) '=)
+ (t t))))
+
(defun vm-sort-compare-date (m1 m2)
(let ((s1 (vm-so-sortable-datestring m1))
(s2 (vm-so-sortable-datestring m2)))
@@ -543,33 +597,48 @@ folder in the order in which the messages arrived."
(t t))))
(defun vm-sort-compare-line-count (m1 m2)
- (let ((n1 (string-to-int (vm-su-line-count m1)))
- (n2 (string-to-int (vm-su-line-count m2))))
+ (let ((n1 (string-to-number (vm-su-line-count m1)))
+ (n2 (string-to-number (vm-su-line-count m2))))
(cond ((< n1 n2) t)
((= n1 n2) '=)
(t nil))))
(defun vm-sort-compare-line-count-r (m1 m2)
- (let ((n1 (string-to-int (vm-su-line-count m1)))
- (n2 (string-to-int (vm-su-line-count m2))))
+ (let ((n1 (string-to-number (vm-su-line-count m1)))
+ (n2 (string-to-number (vm-su-line-count m2))))
(cond ((> n1 n2) t)
((= n1 n2) '=)
(t nil))))
(defun vm-sort-compare-byte-count (m1 m2)
- (let ((n1 (string-to-int (vm-su-byte-count m1)))
- (n2 (string-to-int (vm-su-byte-count m2))))
+ (let ((n1 (string-to-number (vm-su-byte-count m1)))
+ (n2 (string-to-number (vm-su-byte-count m2))))
(cond ((< n1 n2) t)
((= n1 n2) '=)
(t nil))))
(defun vm-sort-compare-byte-count-r (m1 m2)
- (let ((n1 (string-to-int (vm-su-byte-count m1)))
- (n2 (string-to-int (vm-su-byte-count m2))))
+ (let ((n1 (string-to-number (vm-su-byte-count m1)))
+ (n2 (string-to-number (vm-su-byte-count m2))))
(cond ((> n1 n2) t)
((= n1 n2) '=)
(t nil))))
+(defun vm-sort-compare-spam-score (m1 m2)
+ (let ((s1 (vm-su-spam-score m1))
+ (s2 (vm-su-spam-score m2)))
+ (cond ((< s1 s2) t)
+ ((= s1 s2) '=)
+ (t nil))))
+
+(defun vm-sort-compare-spam-score-r (m1 m2)
+ (let ((s1 (vm-su-spam-score m1))
+ (s2 (vm-su-spam-score m2)))
+ (cond ((< s1 s2) nil)
+ ((= s1 s2) '=)
+ (t t))))
+
+;;;###autoload
(defun vm-sort-compare-physical-order (m1 m2)
(let ((n1 (vm-start-of m1))
(n2 (vm-start-of m2)))
@@ -577,6 +646,7 @@ folder in the order in which the messages arrived."
((= n1 n2) '=)
(t nil))))
+;;;###autoload
(defun vm-sort-compare-physical-order-r (m1 m2)
(let ((n1 (vm-start-of m1))
(n2 (vm-start-of m2)))
@@ -584,4 +654,35 @@ folder in the order in which the messages arrived."
((= n1 n2) '=)
(t nil))))
+(add-to-list 'vm-supported-sort-keys "header")
+
+(defun vm-get-headers-of (m &optional headers)
+ (save-excursion
+ (save-restriction
+ (widen)
+ (let ((end (vm-text-of m)))
+ (set-buffer (vm-buffer-of m))
+ (goto-char (vm-start-of m))
+ (while (re-search-forward "^[^: \n\t]+:" end t)
+ (add-to-list 'headers (match-string 0)))
+ headers))))
+
+(defun vm-sort-compare-header (m1 m2)
+ (if (null vm-sort-compare-header)
+ (setq vm-sort-compare-header
+ (completing-read
+ (if (car vm-sort-compare-header-history)
+ (format "Sort hy header (%s): "
+ (car vm-sort-compare-header-history))
+ "Sort hy header: ")
+ (mapcar (lambda (h) (list h))
+ (vm-get-headers-of m2 (vm-get-headers-of m1)))
+ nil nil nil
+ 'vm-sort-compare-header-history
+ (car vm-sort-compare-header-history)))
+ (string< (vm-get-header-contents m1 vm-sort-compare-header)
+ (vm-get-header-contents m2 vm-sort-compare-header))))
+
(provide 'vm-sort)
+
+;;; vm-sort.el ends here
diff --git a/lisp/vm-startup.el b/lisp/vm-startup.el
new file mode 100644
index 0000000..3eb19d0
--- /dev/null
+++ b/lisp/vm-startup.el
@@ -0,0 +1,3 @@
+;;; This file is only here for compatibility with older VM versions
+(require 'vm)
+(provide 'vm-startup)
diff --git a/lisp/vm-summary-faces.el b/lisp/vm-summary-faces.el
new file mode 100644
index 0000000..85fdc36
--- /dev/null
+++ b/lisp/vm-summary-faces.el
@@ -0,0 +1,258 @@
+;;; vm-summary-faces.el --- faces support for VM summary buffers
+;;
+;; Copyright (C) 2001 Robert Fenk
+;;
+;; Author: Robert Fenk
+;; Status: Tested with XEmacs 21.4.15 & VM 7.18
+;; Keywords: VM
+;; X-URL: http://www.robf.de/Hacking/elisp
+;; Version: $Id$
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+;;; Commentary:
+;;
+;; to use this add the following line to your ~/.vm file
+;;
+;; (require 'vm-summary-faces)
+;; (vm-summary-faces-mode 1)
+;;
+
+(defgroup vm nil
+ "VM"
+ :group 'mail)
+
+(defgroup vm-summary-faces nil
+ "VM additional virtual folder selectors and functions."
+ :group 'vm)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(eval-when-compile
+ (require 'cl))
+
+(eval-and-compile
+ (require 'advice)
+ (require 'vm-summary)
+ (require 'vm-virtual))
+
+(eval-and-compile
+ (if vm-xemacs-p (require 'overlay)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defface vm-summary-selected-face
+ '((t (:bold on)))
+ "The face used in VM Summary buffers for the selected message."
+ :group 'vm-summary-faces)
+
+(defface vm-summary-marked-face
+ '((((type x)) (:foreground "red3")))
+ "The face used in VM Summary buffers for marked messages."
+ :group 'vm-summary-faces)
+
+(defface vm-summary-deleted-face
+ '((t (:foreground "grey50" :strikethru t)))
+ "The face used in VM Summary buffers for deleted messages."
+ :group 'vm-summary-faces)
+
+(defface vm-summary-new-face
+ '((t (:foreground "blue")))
+ "The face used in VM Summary buffers for new messages."
+ :group 'vm-summary-faces)
+
+(defface vm-summary-unread-face
+ '((t (:foreground "blue4")))
+ "The face used in VM Summary buffers for unread messages."
+ :group 'vm-summary-faces)
+
+(defface vm-summary-filed-face
+ '((t (:foreground "green4" :underline t)))
+ "The face used in VM Summary buffers for filed messages."
+ :group 'vm-summary-faces)
+
+(defface vm-summary-written-face
+ '((t (:foreground "green4" :underline t)))
+ "The face used in VM Summary buffers for written messages."
+ :group 'vm-summary-faces)
+
+(defface vm-summary-replied-face
+ '((t (:foreground "grey50")))
+ "The face used in VM Summary buffers for replied messages."
+ :group 'vm-summary-faces)
+
+(defface vm-summary-forwarded-face
+ '((t (:foreground "grey50")))
+ "The face used in VM Summary buffers for forwarded messages."
+ :group 'vm-summary-faces)
+
+(defface vm-summary-edited-face
+ nil
+ "The face used in VM Summary buffers for edited messages."
+ :group 'vm-summary-faces)
+
+(defface vm-summary-redistributed-face
+ '((t (:foreground "grey50")))
+ "The face used in VM Summary buffers for redistributed messages."
+ :group 'vm-summary-faces)
+
+(defface vm-summary-outgoing-face
+ '((t (:foreground "grey50")))
+ "The face used in VM Summary buffers for outgoing messages."
+ :group 'vm-summary-faces)
+
+(defface vm-summary-high-priority-face
+ '((t (:foreground "red")))
+ "The face used in VM Summary buffers for high-priority messages."
+ :group 'vm-summary-faces)
+
+(defface vm-summary-default-face
+ nil
+ "The default face used in VM Summary buffers."
+ :group 'vm-summary-faces)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defcustom vm-summary-faces-alist
+ '(
+ ((or (header "Priority: urgent")
+ (header "Importance: high")
+ (header "X-Priority: 1")
+ (label "!")
+ (header "X-VM-postponed-data:"))
+ vm-summary-high-priority-face)
+ ((deleted) vm-summary-deleted-face)
+ ((new) vm-summary-new-face)
+ ((unread) vm-summary-unread-face)
+ ((filed) vm-summary-filed-face)
+ ((written) vm-summary-written-face)
+ ((replied) vm-summary-replied-face)
+ ((forwarded) vm-summary-forwarded-face)
+ ((edited) vm-summary-edited-face)
+ ((redistributed) vm-summary-redistributed-face)
+ ((marked) vm-summary-marked-face)
+ ((outgoing) vm-summary-outgoing-face)
+ ((any) vm-summary-default-face))
+ "Alist of virtual folder conditions and corresponding faces.
+Order matters. The first matching one will be used as face."
+ :type '(repeat (cons (sexp) (face)))
+ :group 'vm-summary-faces)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(eval-and-compile
+ (if (fboundp 'mapcar-extents)
+ (defun vm-summary-faces-list-extents () (mapcar-extents 'identity))
+ (defun vm-summary-faces-list-extents ()
+ (let ((o (overlay-lists))) (nconc (car o) (cdr o))))))
+
+(defvar vm-summary-faces-hide nil
+ "Last face hidden by `vm-summary-faces-hide'.")
+
+;;;###autoload
+(defun vm-summary-faces-hide (&optional face)
+ "Toggle visibility of messages with FACE.
+When called with a prefix arg prompt for the face."
+ (interactive "P")
+ (if (and (listp face) (numberp (car face)))
+ (setq face (completing-read "Face name: "
+ (mapcar (lambda (f)
+ (list (format "%s" (caar f))))
+ vm-summary-faces-alist)
+ nil t "deleted")))
+ (setq face (or face vm-summary-faces-hide "deleted"))
+ (vm-summarize)
+ (vm-select-folder-buffer)
+ (set-buffer vm-summary-buffer)
+ (let ((extents (vm-summary-faces-list-extents))
+ (face (intern (concat "vm-summary-" face "-face")))
+ x)
+ (while extents
+ (setq x (car extents))
+ (when (equal face (vm-extent-property x 'face))
+ (vm-set-extent-property x 'invisible (not (vm-extent-property x 'invisible))))
+ (setq extents (cdr extents)))))
+
+;;;###autoload
+(defun vm-summary-faces-add (msg)
+ "Add a face to a summary entry according to `vm-summary-faces-alist'."
+ (let ((faces vm-summary-faces-alist)
+ (x (or (vm-su-summary-mouse-track-overlay-of msg)
+ (vm-extent-at (vm-su-start-of msg))
+ (vm-extent-at (vm-su-end-of msg)))))
+ (while faces
+ (when (apply 'vm-vs-or msg (list (caar faces)))
+ (vm-set-extent-property x 'face (cadar faces))
+ (setq faces nil))
+ (setq faces (cdr faces)))))
+
+(defun vm-summary-faces-destroy ()
+ "Removes the face from all summary entries."
+ (let ((extents (vm-summary-faces-list-extents))
+ x)
+ (while extents
+ (setq x (car extents))
+ (vm-set-extent-property x 'face nil)
+ (setq extents (cdr extents)))))
+
+(defvar vm-summary-faces-mode nil)
+
+;;;###autoload
+(defun vm-summary-faces-mode (&optional arg)
+ "Toggle `vm-summary-faces-mode'.
+Remove/add the `vm-summary-fontify-buffer' hook from the hook variable
+`vm-summary-mode-hook' and when in a summary buffer, then toggle the
+`font-lock-mode'."
+ (interactive "P")
+ (if (null arg)
+ (setq vm-summary-faces-mode (not vm-summary-faces-mode))
+ (if (> (prefix-numeric-value arg) 0)
+ (setq vm-summary-faces-mode t)
+ (setq vm-summary-faces-mode nil)))
+
+ (when (interactive-p)
+ (message "VM summary faces mode is %s"
+ (if vm-summary-faces-mode "on" "off")))
+
+ (if (memq major-mode '(vm-mode vm-virtual-mode vm-summary-mode
+ vm-presentation-mode))
+ (save-excursion
+ (vm-select-folder-buffer)
+ (vm-summarize)
+ (set-buffer vm-summary-buffer)
+ (if vm-summary-faces-mode
+ (let ((mp vm-message-list))
+ (while mp
+ (vm-summary-faces-add (car mp))
+ (setq mp (cdr mp))))
+ (vm-summary-faces-destroy)
+ (if vm-summary-overlay
+ (vm-set-extent-property vm-summary-overlay 'face
+ vm-summary-highlight-face))))))
+
+(defadvice vm-mouse-set-mouse-track-highlight (after vm-summary-faces activate)
+ (when (and vm-summary-faces-mode
+ (eq major-mode 'vm-summary-mode)
+ (boundp 'm)
+ m)
+ ;; FIXME there is a warning about a free variable here, sorry!
+ (vm-summary-faces-add m)))
+
+(defun vm-summary-faces-fix-pointer ()
+ (if vm-summary-overlay
+ (vm-set-extent-property vm-summary-overlay 'face
+ (if vm-summary-faces-mode
+ 'vm-summary-selected-face
+ vm-summary-highlight-face))))
+
+(add-hook 'vm-summary-pointer-update-hook 'vm-summary-faces-fix-pointer)
+
+(provide 'vm-summary-faces)
diff --git a/vm-summary.el b/lisp/vm-summary.el
index c512e32..b1e6368 100644
--- a/vm-summary.el
+++ b/lisp/vm-summary.el
@@ -1,22 +1,23 @@
-;;; Summary gathering and formatting routines for VM
-;;; Copyright (C) 1989-1995, 2000 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-summary)
-
+;;; vm-summary.el --- Summary gathering and formatting routines for VM
+;;
+;; Copyright (C) 1989-1995, 2000 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+;;; Code:
(defun vm-summary-mode-internal ()
(setq mode-name "VM Summary"
major-mode 'vm-summary-mode
@@ -51,9 +52,10 @@
(fset 'vm-summary-mode 'vm-mode)
(put 'vm-summary-mode 'mode-class 'special)
+;;;###autoload
(defun vm-summarize (&optional display raise)
- "Summarize the contents of the folder in a summary buffer.
-The format is as described by the variable vm-summary-format. Generally
+ "Summarize the contents of the folder in a summary buffer.
+The format is as described by the variable `vm-summary-format'. Generally
one line per message is most pleasing to the eye but this is not
mandatory."
(interactive "p\np")
@@ -95,6 +97,7 @@ mandatory."
(list this-command)))
(vm-update-summary-and-mode-line))
+;;;###autoload
(defun vm-summarize-other-frame (&optional display)
"Like vm-summarize, but run in a newly created frame."
(interactive "p")
@@ -441,10 +444,10 @@ mandatory."
new-match-end (car retval))))
(setq token `('group-begin
,(if (match-beginning 2)
- (string-to-int
+ (string-to-number
(concat (match-string 1 format)
(match-string 2 format))))
- ,(string-to-int
+ ,(string-to-number
(match-string 4 format)))
splice t)))
((= conv-spec ?\))
@@ -544,7 +547,7 @@ mandatory."
'vm-numeric-left-justify-string
'vm-left-justify-string)
(car sexp)
- (string-to-int
+ (string-to-number
(substring format
(match-beginning 2)
(match-end 2))))))
@@ -555,14 +558,14 @@ mandatory."
'vm-numeric-right-justify-string
'vm-right-justify-string)
(car sexp)
- (string-to-int
+ (string-to-number
(substring format
(match-beginning 2)
(match-end 2)))))))
(cond ((and (not token) (match-beginning 3))
(setcar sexp
(list 'vm-truncate-string (car sexp)
- (string-to-int
+ (string-to-number
(substring format
(match-beginning 4)
(match-end 4)))))))
@@ -731,6 +734,18 @@ mandatory."
(- (vm-text-end-of (vm-real-message-of m))
(vm-text-of (vm-real-message-of m)))))))
+(defun vm-su-spam-score-aux (m)
+ "Return the numeric spam level for M."
+ (let ((spam-status (vm-get-header-contents m "X-Spam-Status:")))
+ (if (string-match "hits=\\([+-]?[0-9.]+\\)" spam-status)
+ (string-to-number (match-string 1 spam-status))
+ 0)))
+
+(defun vm-su-spam-score (m)
+ "Return the numeric spam level for M (possibly using cache)."
+ (or (vm-spam-score-of m)
+ (vm-set-spam-score-of m (vm-su-spam-score-aux m))))
+
(defun vm-su-weekday (m)
(or (vm-weekday-of m)
(progn (vm-su-do-date m) (vm-weekday-of m))))
@@ -821,7 +836,7 @@ mandatory."
(<= (length string) 2))
(setq monthday string))
((= (length string) 2)
- (if (< (string-to-int string) 70)
+ (if (< (string-to-number string) 70)
(setq year (concat "20" string))
(setq year (concat "19" string))))
(t (setq year string))))
@@ -1051,7 +1066,8 @@ mandatory."
(vm-get-header-contents m "Newsgroups:" ", ")
;; desperation....
(user-login-name))
- cc (vm-get-header-contents m "Cc:" ", ")
+ cc (or (vm-get-header-contents m "Cc:" ", ")
+ (vm-get-header-contents m "Bcc:" ", "))
all to
all (if all (concat all ", " cc) cc)
addresses (rfc822-addresses all))
@@ -1069,7 +1085,8 @@ mandatory."
(aset full-name i ?\ ))
(setq names (cons full-name names))
(setq list (cdr list)))
- (setq names (nreverse names)) ; added by jwz for fixed vm-parse-addresses
+ (setq names (nreverse names))
+ ;; added by jwz for fixed vm-parse-addresses
(vm-set-to-of m (mapconcat 'identity addresses ", "))
(vm-set-to-names-of m (mapconcat 'identity names ", "))))
@@ -1117,7 +1134,8 @@ mandatory."
(or (vm-subject-of m)
(vm-set-subject-of
m
- (let ((subject (or (vm-get-header-contents m "Subject:" " ") ""))
+ (let ((subject (vm-decode-mime-encoded-words-in-string
+ (or (vm-get-header-contents m "Subject:") "")))
(i nil))
(while (string-match "\n[ \t]*" subject)
(setq subject (replace-match " " nil t subject)))
@@ -1137,7 +1155,10 @@ mandatory."
(vm-set-summary-of m (vm-summary-sprintf vm-summary-format m t))
(vm-summary-of m)))))
+;;;###autoload
(defun vm-fix-my-summary!!! ()
+ "Rebuilts the summary.
+Call this function if you made changes to `vm-summary-format'."
(interactive)
(vm-select-folder-buffer)
(vm-check-for-killed-summary)
@@ -1411,7 +1432,7 @@ mandatory."
'vm-numeric-left-justify-string
'vm-left-justify-string)
(car sexp)
- (string-to-int
+ (string-to-number
(substring format
(match-beginning 2)
(match-end 2))))))
@@ -1422,14 +1443,14 @@ mandatory."
'vm-numeric-right-justify-string
'vm-right-justify-string)
(car sexp)
- (string-to-int
+ (string-to-number
(substring format
(match-beginning 2)
(match-end 2)))))))
(cond ((match-beginning 3)
(setcar sexp
(list 'vm-truncate-string (car sexp)
- (string-to-int
+ (string-to-number
(substring format
(match-beginning 4)
(match-end 4)))))))
@@ -1700,3 +1721,5 @@ mandatory."
nil )))
(provide 'vm-summary)
+
+;;; vm-summary.el ends here
diff --git a/vm-thread.el b/lisp/vm-thread.el
index 2c97125..c38d1d4 100644
--- a/vm-thread.el
+++ b/lisp/vm-thread.el
@@ -1,22 +1,25 @@
-;;; Thread support for VM
-;;; Copyright (C) 1994, 2001 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+;;; vm-thread.el --- Thread support for VM
+;;
+;; Copyright (C) 1994, 2001 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-;;(provide 'vm-thread)
+;;; Code:
+;;;###autoload
(defun vm-toggle-threads-display ()
"Toggle the threads display on and off.
When the threads display is on, the folder will be sorted by
@@ -35,6 +38,7 @@ will be visible."
(vm-sort-messages "thread")
(vm-sort-messages "physical-order")))
+;;;###autoload
(defun vm-build-threads (message-list)
(if (not (vectorp vm-thread-obarray))
(setq vm-thread-obarray (make-vector 641 0)
@@ -170,6 +174,8 @@ will be visible."
;; ordering key by the thread sort the oldest-date properties
;; must be computed before the sort begins, not during it.
;; Otherwise the sort won't be stable and there will be chaos.
+
+;;;###autoload
(defun vm-build-thread-lists ()
(let ((mp vm-message-list))
(while mp
@@ -259,6 +265,8 @@ will be visible."
;; might be different if the message contents changed.
;;
;; message must be a real (non-virtual) message
+
+;;;###autoload
(defun vm-unthread-message (message &optional message-changing)
(save-excursion
(let ((mp (cons message (vm-virtual-messages-of message)))
@@ -337,6 +345,7 @@ will be visible."
(and id (vm-set-references-of m (list id)))
id )))))
+;;;###autoload
(defun vm-th-thread-indentation (m)
(or (vm-thread-indentation-of m)
(let ((p (vm-th-thread-list m)))
@@ -345,6 +354,7 @@ will be visible."
(vm-set-thread-indentation-of m (1- (length p)))
(vm-thread-indentation-of m))))
+;;;###autoload
(defun vm-th-thread-list (m)
(or (vm-thread-list-of m)
(progn
@@ -352,3 +362,5 @@ will be visible."
(vm-thread-list-of m))))
(provide 'vm-thread)
+
+;;; vm-thread.el ends here
diff --git a/vm-toolbar.el b/lisp/vm-toolbar.el
index 361a566..7719c03 100644
--- a/vm-toolbar.el
+++ b/lisp/vm-toolbar.el
@@ -1,22 +1,23 @@
-;;; Toolbar related functions and commands
-;;; Copyright (C) 1995-1997, 2000, 2001 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-toolbar)
-
+;;; vm-toolbar.el --- Toolbar related functions and commands
+;;
+;; Copyright (C) 1995-1997, 2000, 2001 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+;;; Code:
(defvar vm-toolbar-specifier nil)
(defvar vm-toolbar-next-button
@@ -119,6 +120,34 @@ s-expression like this one in your .vm file:
(or (fboundp 'vm-toolbar-reply-command)
(fset 'vm-toolbar-reply-command 'vm-followup-include-text))
+(defvar vm-toolbar-forward-button
+ [vm-toolbar-forward-icon
+ vm-toolbar-forward-command
+ (vm-toolbar-any-messages-p)
+ "Forward the current message.\n
+The command `vm-toolbar-forward-command' is run, which is normally
+fbound to `vm-forward-message'.
+You can make this button run some other command by using a Lisp
+s-expression like this one in your .vm file:
+ (fset 'vm-toolbar-forward-command 'some-other-command)"])
+(defvar vm-toolbar-forward-icon nil)
+(or (fboundp 'vm-toolbar-forward-command)
+ (fset 'vm-toolbar-forward-command 'vm-forward-message))
+
+(defvar vm-toolbar-followup-button
+ [vm-toolbar-followup-icon
+ vm-toolbar-followup-command
+ (vm-toolbar-any-messages-p)
+ "Follow up the current message.\n
+The command `vm-toolbar-followup-command' is run, which is normally
+fbound to `vm-followup-message'.
+You can make this button run some other command by using a Lisp
+s-expression like this one in your .vm file:
+ (fset 'vm-toolbar-followup-command 'some-other-command)"])
+(defvar vm-toolbar-followup-icon nil)
+(or (fboundp 'vm-toolbar-followup-command)
+ (fset 'vm-toolbar-followup-command 'vm-followup))
+
(defvar vm-toolbar-compose-button
[vm-toolbar-compose-icon vm-toolbar-compose-command t
"Compose a new message.\n
@@ -178,7 +207,7 @@ s-expression like this one in your .vm file:
VM uses this button to offer help if you're in trouble.
Under normal circumstances, this button runs `vm-help'.
If the current folder looks out-of-date relative to its auto-save
-file then this button will run `recover-file'
+file then this button will run `vm-recover-folder'.
If there is mail waiting in one of the spool files associated
with the current folder, and the `getmail' button is not on the
toolbar, this button will run `vm-get-new-mail'.
@@ -188,6 +217,7 @@ will run 'vm-decode-mime-message'."])
(defvar vm-toolbar-helper-command nil)
(make-variable-buffer-local 'vm-toolbar-helper-command)
+;;;###autoload
(defun vm-toolbar-helper-command ()
(interactive)
(setq this-command vm-toolbar-helper-command)
@@ -214,6 +244,7 @@ s-expression like this one in your .vm file:
vm-message-list)
(error nil)))
+;;;###autoload
(defun vm-toolbar-delete/undelete-message (&optional prefix-arg)
(interactive "P")
(vm-follow-summary-cursor)
@@ -226,6 +257,7 @@ s-expression like this one in your .vm file:
(call-interactively 'vm-undelete-message)
(call-interactively 'vm-delete-message))))
+;;;###autoload
(defun vm-toolbar-can-autofile-p ()
(interactive)
(condition-case nil
@@ -236,6 +268,7 @@ s-expression like this one in your .vm file:
(vm-auto-select-folder vm-message-pointer vm-auto-folder-alist)))
(error nil)))
+;;;###autoload
(defun vm-toolbar-autofile-message ()
(interactive)
(vm-follow-summary-cursor)
@@ -296,7 +329,7 @@ s-expression like this one in your .vm file:
(setq vm-toolbar-delete/undelete-icon vm-toolbar-undelete-icon)
(setq vm-toolbar-delete/undelete-icon vm-toolbar-delete-icon))
(cond ((vm-toolbar-can-recover-p)
- (setq vm-toolbar-helper-command 'recover-file
+ (setq vm-toolbar-helper-command 'vm-recover-folder
vm-toolbar-helper-icon vm-toolbar-recover-icon))
((and (vm-toolbar-mail-waiting-p)
(not (memq 'getmail vm-use-toolbar)))
@@ -331,6 +364,11 @@ s-expression like this one in your .vm file:
(if (and vm-fsfemacs-p (not vm-use-toolbar))
(vm-toolbar-fsfemacs-uninstall-toolbar)))
+(defcustom vm-toolbar-height nil
+ "*Desired height of the toolbar."
+ :group 'vm
+ :type '(choice (const :tag "Automatic" nil) integer))
+
(defun vm-toolbar-install-toolbar ()
;; drag these in now instead of waiting for them to be
;; autoloaded. the "loading..." messages could come at a bad
@@ -341,14 +379,14 @@ s-expression like this one in your .vm file:
(if vm-fsfemacs-p
(if (not vm-fsfemacs-toolbar-installed-p)
(vm-toolbar-fsfemacs-install-toolbar))
- (if (not (and (stringp vm-toolbar-pixmap-directory)
- (file-directory-p vm-toolbar-pixmap-directory)))
+ (if (not (vm-toolbar-pixmap-directory))
(progn
(message "Bad toolbar pixmap directory, can't setup toolbar.")
(sit-for 2))
(vm-toolbar-initialize)
- (let ((height (+ 4 (glyph-height (car vm-toolbar-help-icon))))
- (width (+ 4 (glyph-width (car vm-toolbar-help-icon))))
+ (let ((height (or vm-toolbar-height
+ (+ 5 (glyph-height (car vm-toolbar-help-icon)))))
+ (width (+ 5 (glyph-width (car vm-toolbar-help-icon))))
(frame (selected-frame))
(buffer (current-buffer))
(tag-set '(win))
@@ -357,9 +395,9 @@ s-expression like this one in your .vm file:
;; glyph-width and glyph-height return 0 at startup sometimes
;; use reasonable values if they fail.
(if (= width 4)
- (setq width 68))
+ (setq width 38))
(if (= height 4)
- (setq height 46))
+ (setq height 38))
;; honor user setting of vm-toolbar if they are daring enough
;; to set it.
(if vm-toolbar
@@ -405,6 +443,8 @@ s-expression like this one in your .vm file:
(print . vm-toolbar-print-button)
(quit . vm-toolbar-quit-button)
(reply . vm-toolbar-reply-button)
+ (forward . vm-toolbar-forward-button)
+ (followup . vm-toolbar-followup-button)
(visit . vm-toolbar-visit-button)
))
(button-list vm-use-toolbar)
@@ -430,54 +470,42 @@ s-expression like this one in your .vm file:
(vm-fsfemacs-p nil)
((null vm-toolbar-help-icon)
(let ((tuples
- (if (featurep 'xpm)
- (list
- (if (and (device-on-window-system-p)
- (>= (device-bitplanes) 16))
- '(vm-toolbar-decode-mime-icon "mime-colorful-up.xpm"
- "mime-colorful-dn.xpm"
- "mime-colorful-xx.xpm")
- '(vm-toolbar-decode-mime-icon "mime-simple-up.xpm"
- "mime-simple-dn.xpm"
- "mime-simple-xx.xpm"))
- '(vm-toolbar-next-icon "next-up.xpm" "next-dn.xpm" "next-dn.xpm")
- '(vm-toolbar-previous-icon "previous-up.xpm" "previous-dn.xpm"
- "previous-dn.xpm")
- '(vm-toolbar-delete-icon "delete-up.xpm" "delete-dn.xpm" "delete-dn.xpm")
- '(vm-toolbar-undelete-icon "undelete-up.xpm" "undelete-dn.xpm"
- "undelete-dn.xpm")
- '(vm-toolbar-autofile-icon "autofile-up.xpm" "autofile-dn.xpm"
- "autofile-dn.xpm")
- '(vm-toolbar-getmail-icon "getmail-up.xpm" "getmail-dn.xpm" "getmail-dn.xpm")
- '(vm-toolbar-file-icon "file-up.xpm" "file-dn.xpm" "file-dn.xpm")
- '(vm-toolbar-reply-icon "reply-up.xpm" "reply-dn.xpm" "reply-dn.xpm")
- '(vm-toolbar-compose-icon "compose-up.xpm" "compose-dn.xpm" "compose-dn.xpm")
- '(vm-toolbar-print-icon "print-up.xpm" "print-dn.xpm" "print-dn.xpm")
- '(vm-toolbar-visit-icon "visit-up.xpm" "visit-dn.xpm" "visit-dn.xpm")
- '(vm-toolbar-quit-icon "quit-up.xpm" "quit-dn.xpm" "quit-dn.xpm")
- '(vm-toolbar-help-icon "help-up.xpm" "help-dn.xpm" "help-dn.xpm")
- '(vm-toolbar-recover-icon "recover-up.xpm" "recover-dn.xpm" "recover-dn.xpm")
- )
- '(
- (vm-toolbar-decode-mime-icon "mime-up.xbm" "mime-dn.xbm" "mime-xx.xbm")
- (vm-toolbar-next-icon "next-up.xbm" "next-dn.xbm" "next-xx.xbm")
- (vm-toolbar-previous-icon "previous-up.xbm" "previous-dn.xbm"
- "previous-xx.xbm")
- (vm-toolbar-delete-icon "delete-up.xbm" "delete-dn.xbm" "delete-xx.xbm")
- (vm-toolbar-undelete-icon "undelete-up.xbm" "undelete-dn.xbm"
- "undelete-xx.xbm")
- (vm-toolbar-autofile-icon "autofile-up.xbm" "autofile-dn.xbm"
- "autofile-xx.xbm")
- (vm-toolbar-getmail-icon "getmail-up.xbm" "getmail-dn.xbm" "getmail-xx.xbm")
- (vm-toolbar-file-icon "file-up.xbm" "file-dn.xbm" "file-xx.xbm")
- (vm-toolbar-reply-icon "reply-up.xbm" "reply-dn.xbm" "reply-xx.xbm")
- (vm-toolbar-compose-icon "compose-up.xbm" "compose-dn.xbm" "compose-xx.xbm")
- (vm-toolbar-print-icon "print-up.xbm" "print-dn.xbm" "print-xx.xbm")
- (vm-toolbar-visit-icon "visit-up.xbm" "visit-dn.xbm" "visit-xx.xbm")
- (vm-toolbar-quit-icon "quit-up.xbm" "quit-dn.xbm" "quit-xx.xbm")
- (vm-toolbar-help-icon "help-up.xbm" "help-dn.xbm" "help-xx.xpm")
- (vm-toolbar-recover-icon "recover-up.xbm" "recover-dn.xbm" "recover-xx.xpm")
- )))
+ (list
+ '(vm-toolbar-decode-mime-icon
+ "mime-up.xpm" "mime-dn.xpm" "mime-xx.xpm")
+ '(vm-toolbar-next-icon
+ "next-up.xpm" "next-dn.xpm" "next-dn.xpm")
+ '(vm-toolbar-previous-icon
+ "previous-up.xpm" "previous-dn.xpm" "previous-dn.xpm")
+ '(vm-toolbar-delete-icon
+ "delete-up.xpm" "delete-dn.xpm" "delete-dn.xpm")
+ '(vm-toolbar-undelete-icon
+ "undelete-up.xpm" "undelete-dn.xpm" "undelete-dn.xpm")
+ '(vm-toolbar-autofile-icon
+ "autofile-up.xpm" "autofile-dn.xpm" "autofile-dn.xpm")
+ '(vm-toolbar-getmail-icon
+ "getmail-up.xpm" "getmail-dn.xpm" "getmail-dn.xpm")
+ '(vm-toolbar-file-icon
+ "file-up.xpm" "file-dn.xpm" "file-dn.xpm")
+ '(vm-toolbar-reply-icon
+ "reply-up.xpm" "reply-dn.xpm" "reply-dn.xpm")
+ '(vm-toolbar-forward-icon
+ "forward-up.xpm" "forward-dn.xpm" "forward-dn.xpm")
+ '(vm-toolbar-followup-icon
+ "followup-up.xpm" "followup-dn.xpm" "followup-dn.xpm")
+ '(vm-toolbar-compose-icon
+ "compose-up.xpm" "compose-dn.xpm" "compose-dn.xpm")
+ '(vm-toolbar-print-icon
+ "print-up.xpm" "print-dn.xpm" "print-dn.xpm")
+ '(vm-toolbar-visit-icon
+ "visit-up.xpm" "visit-dn.xpm" "visit-dn.xpm")
+ '(vm-toolbar-quit-icon
+ "quit-up.xpm" "quit-dn.xpm" "quit-dn.xpm")
+ '(vm-toolbar-help-icon
+ "help-up.xpm" "help-dn.xpm" "help-dn.xpm")
+ '(vm-toolbar-recover-icon
+ "recover-up.xpm" "recover-dn.xpm" "recover-dn.xpm")
+ ))
tuple files var)
(while tuples
(setq tuple (car tuples)
@@ -487,7 +515,7 @@ s-expression like this one in your .vm file:
(function
(lambda (f)
(make-glyph
- (expand-file-name f vm-toolbar-pixmap-directory))))
+ (expand-file-name f (vm-toolbar-pixmap-directory)))))
files))
(setq tuples (cdr tuples))))))
(setq vm-toolbar-delete/undelete-icon vm-toolbar-delete-icon)
@@ -502,11 +530,8 @@ s-expression like this one in your .vm file:
(defun vm-toolbar-fsfemacs-install-toolbar ()
(let ((button-list (reverse vm-use-toolbar))
- (dir vm-toolbar-pixmap-directory)
- (extension (if (and (display-color-p)
- (image-type-available-p 'xpm))
- "xpm"
- "xbm"))
+ (dir (vm-toolbar-pixmap-directory))
+ (extension "xpm")
item t-spec sym name images)
(defvar tool-bar-map)
;; hide the toolbar entries that are in the global keymap so
@@ -528,15 +553,14 @@ s-expression like this one in your .vm file:
;; can't do separators in FSF Emacs
t)
((memq sym '(autofile compose file getmail
- mime next previous print quit reply visit))
+ mime next previous print quit
+ reply followup forward visit))
(setq t-spec (symbol-value
(intern (format "vm-toolbar-%s-button"
(if (eq sym 'mime)
'decode-mime
sym)))))
- (if (and (eq sym 'mime) (string= extension "xpm"))
- (setq name "mime-colorful")
- (setq name (symbol-name sym)))
+ (setq name (symbol-name sym))
(setq images (vm-toolbar-make-fsfemacs-toolbar-image-spec
name extension dir
(if (eq sym 'mime) nil 'heuristic)))
@@ -545,7 +569,7 @@ s-expression like this one in your .vm file:
(aref t-spec 3)
(aref t-spec 1)
':enable (aref t-spec 2)
- ':button '(:toggle nil)
+; ':button '(:toggle nil)
':image images))
(define-key vm-mode-map (vector 'tool-bar sym) item))
((eq sym 'delete/undelete)
@@ -560,7 +584,7 @@ s-expression like this one in your .vm file:
':visible '(eq vm-toolbar-delete/undelete-icon
vm-toolbar-delete-icon)
':enable (aref t-spec 2)
- ':button '(:toggle nil)
+; ':button '(:toggle nil)
':image images))
(define-key vm-mode-map (vector 'tool-bar 'delete) item)
(setq name "undelete")
@@ -573,7 +597,7 @@ s-expression like this one in your .vm file:
':visible '(eq vm-toolbar-delete/undelete-icon
vm-toolbar-undelete-icon)
':enable (aref t-spec 2)
- ':button '(:toggle nil)
+; ':button '(:toggle nil)
':image images))
(define-key vm-mode-map (vector 'tool-bar 'undelete) item))
((eq sym 'help)
@@ -587,7 +611,7 @@ s-expression like this one in your .vm file:
(aref t-spec 1)
':visible '(eq vm-toolbar-helper-command 'vm-help)
':enable (aref t-spec 2)
- ':button '(:toggle nil)
+; ':button '(:toggle nil)
':image images))
(define-key vm-mode-map (vector 'tool-bar 'help-help) item)
(setq name "recover")
@@ -600,7 +624,7 @@ s-expression like this one in your .vm file:
':visible '(eq vm-toolbar-helper-command
'recover-file)
':enable (aref t-spec 2)
- ':button '(:toggle nil)
+; ':button '(:toggle nil)
':image images))
(define-key vm-mode-map (vector 'tool-bar 'help-recover) item)
(setq name "getmail")
@@ -613,12 +637,10 @@ s-expression like this one in your .vm file:
':visible '(eq vm-toolbar-helper-command
'vm-get-new-mail)
':enable (aref t-spec 2)
- ':button '(:toggle nil)
+; ':button '(:toggle nil)
':image images))
(define-key vm-mode-map (vector 'tool-bar 'help-getmail) item)
- (if (string= extension "xpm")
- (setq name "mime-colorful")
- (setq name "mime"))
+ (setq name "mime")
(setq images (vm-toolbar-make-fsfemacs-toolbar-image-spec
name extension dir nil))
(setq item
@@ -628,7 +650,7 @@ s-expression like this one in your .vm file:
':visible '(eq vm-toolbar-helper-command
'vm-decode-mime-message)
':enable (aref t-spec 2)
- ':button '(:toggle nil)
+; ':button '(:toggle nil)
':image images))
(define-key vm-mode-map (vector 'tool-bar 'help-mime) item)))
(setq button-list (cdr button-list))))
@@ -696,3 +718,5 @@ s-expression like this one in your .vm file:
dir)))))
(provide 'vm-toolbar)
+
+;;; vm-toolbar.el ends here
diff --git a/vm-undo.el b/lisp/vm-undo.el
index a562816..b51697d 100644
--- a/vm-undo.el
+++ b/lisp/vm-undo.el
@@ -1,22 +1,23 @@
-;;; Commands to undo message attribute changes in VM
-;;; Copyright (C) 1989-1995 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-undo)
-
+;;; vm-undo.el --- Commands to undo message attribute changes in VM
+;;
+;; Copyright (C) 1989-1995 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+;;; Code:
(defun vm-set-buffer-modified-p (flag &optional buffer)
(save-excursion
(and buffer (set-buffer buffer))
@@ -156,6 +157,7 @@
(let ((vm-folder-read-only t))
(vm-preview-current-message)))))
+;;;###autoload
(defun vm-undo ()
"Undo last change to message attributes in the current folder.
Consecutive invocations of this command cause sequentially earlier
@@ -182,6 +184,7 @@ the undos themselves become undoable."
(delete-auto-save-file-if-necessary))
(vm-update-summary-and-mode-line)))
+;;;###autoload
(defun vm-set-message-attributes (string count)
"Set message attributes.
Use this command to change attributes like `deleted' or
@@ -265,6 +268,7 @@ COUNT-1 messages to be altered. COUNT defaults to one."
(setq m-list (cdr m-list)))
(vm-update-summary-and-mode-line)))
+;;;###autoload
(defun vm-add-message-labels (string count)
"Attach some labels to a message.
These are arbitrary user-defined labels, not to be confused with
@@ -299,6 +303,7 @@ COUNT-1 messages to be altered. COUNT defaults to one."
(vm-error-if-folder-empty)
(vm-add-or-delete-message-labels string count 'all))
+;;;###autoload
(defun vm-add-existing-message-labels (string count)
"Attach some already existing labels to a message.
Only labels that are currently attached to some message in this
@@ -348,6 +353,7 @@ COUNT-1 messages to be altered. COUNT defaults to one."
(setq ignored-labels (cdr ignored-labels)))
(display-buffer (current-buffer))))))
+;;;###autoload
(defun vm-delete-message-labels (string count)
"Delete some labels from a message.
These are arbitrary user-defined labels, not to be confused with
@@ -563,3 +569,5 @@ COUNT-1 messages to be altered. COUNT defaults to one."
(aset v 0 flag))
(provide 'vm-undo)
+
+;;; vm-undo.el ends here
diff --git a/vm-user.el b/lisp/vm-user.el
index b9e5d10..3cf136d 100644
--- a/vm-user.el
+++ b/lisp/vm-user.el
@@ -1,24 +1,25 @@
-;;; Interface functions to VM internal data
-;;; Copyright (C) 1997 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 2, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-user)
+;;; vm-user.el --- Interface functions to VM internal data
+;;
+;; Copyright (C) 1997 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+;;; Code:
(defun vm-user-composition-folder-buffer ()
- "Returns the folder buffer associated with the current buffer.
+ "Return the folder buffer associated with the current buffer.
The current buffer must be a composition buffer created by VM for
a reply, resend or forward.
@@ -54,3 +55,5 @@ by VM for a reply, resend or forward."
nil ))
(provide 'vm-user)
+
+;;; vm-user.el ends here
diff --git a/vm-vars.el b/lisp/vm-vars.el
index e13763f..de0f0ef 100644
--- a/vm-vars.el
+++ b/lisp/vm-vars.el
@@ -1,48 +1,37 @@
-;;; VM user and internal variable initialization
-;;; Copyright (C) 1989-2003 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-vars)
-
-;; Emacs 19.34 doesn't have defcustom but we want to continue to
-;; supoprt that Emacs version. So fake up some definitions if we
-;; need them and erase them after we're done.
-
-(defconst vm-faked-defcustom nil)
-
-(eval-and-compile
- (condition-case ()
- (require 'custom)
- (error nil))
- (if (and (featurep 'custom) (fboundp 'custom-declare-variable))
- nil ;; We've got what we needed
- ;; We have the old custom-library, or no library at all so
- ;; hack around it!
- (setq vm-faked-defcustom t)
- (defmacro defgroup (&rest args) nil)
- (defmacro defcustom (var value doc &rest args)
- (` (defvar (, var) (, value) (, doc))))))
+;;; vm-vars.el --- VM user and internal variable initialization
+;;
+;; Copyright (C) 1989-2003 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+;;; Code:
(defgroup vm nil
"The VM mail reader."
:group 'mail)
+(defcustom vm-assimilate-new-messages-sorted nil
+ "*When enabled new messages will be inserted in current sort order.
+Otherwise they are appended to the folder, which is VM default."
+ :group 'vm
+ :type 'boolean)
+
(defcustom vm-init-file "~/.vm"
"*Startup file for VM that is loaded the first time you run VM
in an Emacs session."
+ :group 'vm
:type 'file)
(defcustom vm-preferences-file "~/.vm.preferences"
@@ -50,23 +39,31 @@ in an Emacs session."
*Secondary startup file for VM, loaded after `vm-init-file'.
This file is written and overwritten by VM and is not meant for
users to edit directly."
+ :group 'vm
:type 'file)
(defcustom vm-folder-directory nil
"*Directory where folders of mail are kept."
+ :group 'vm
:type '(choice (const nil) directory))
(defcustom vm-primary-inbox "~/INBOX"
"*Mail is moved from the system mailbox to this file for reading."
+ :group 'vm
:type 'file)
-(defcustom vm-crash-box "~/INBOX.CRASH"
+(defcustom vm-crash-box nil
"*File in which to store mail temporarily while it is transferred from
the system mailbox to the primary inbox. If a crash occurs
during this mail transfer, any missing mail will be found in this
file. VM will do crash recovery from this file automatically at
-startup, as necessary."
- :type 'file)
+startup, as necessary.
+
+If nil, `vm-primary-inbox' with `vm-crash-box-suffix' appende will be used as
+crash boxdot set."
+ :group 'vm
+ :type '(choice file
+ (const :tag "Automatic" nil)))
(defcustom vm-keep-crash-boxes nil
"*Non-nil value should be a string specifying a directory where
@@ -84,7 +81,9 @@ clean out this directory from time to time; VM does not do so.
A nil value means VM should just delete crash boxes after it
has copied out the mail."
- :type 'boolean)
+ :group 'vm
+ :type '(choice directory
+ (const :tag "No not keep crash boxes" nil)))
(defcustom vm-index-file-suffix nil
"*Suffix used to construct VM index file names.
@@ -98,6 +97,7 @@ When you save a folder, the index file will be rewritten with
updated information about the folder.
A nil value means VM should not read or write index files."
+ :group 'vm
:type '(choice string (const nil)))
;; use this function to access vm-spool-files on the fly. this
@@ -116,7 +116,7 @@ A nil value means VM should not read or write index files."
(list vm-spool-files))))))
(defcustom vm-spool-files nil
- "*If non-nil this variable's value should be a list of strings
+ "*If non-nil this variable's value should be a list of strings
or a list of lists.
If the value is a list of strings, the strings should name files
@@ -155,13 +155,13 @@ SPOOLNAME can also be a POP maildrop.
The second form is used to speak POP over an SSL connection.
You must have the stunnel program installed and the variable
- vm-stunnel-program naming it in order for IMAP over SSL to
+ `vm-stunnel-program' naming it in order for POP over SSL to
work. The SSL version of the POP server will not use the
same port as the non-SSL version.
The third form is used to speak POP over an SSH connection.
You must have the ssh program installed and the variable
- `vm-ssh-program' must name it in order for IMAP over SSH to
+ `vm-ssh-program' must name it in order for POP over SSH to
work. SSH must be able to authenticate without a password,
which means you must be using either .shosts authentication
or RSA authentication.
@@ -265,8 +265,13 @@ CRASHBOX/INBOX pair with a different SPOOLNAME.
environmental variables MAILPATH or MAIL if either of these
variables are defined and no particular value for `vm-spool-files'
has been specified."
- :type '(choice (repeat string)
- (repeat (list string string string))))
+ :group 'vm
+ :type '(choice (repeat :tag "List of spool files"
+ (file :tag "Spoolfile"))
+ (repeat :tag "List of (inbox spoolfile crashbox) elements"
+ (list (file :tag "Inbox")
+ (file :tag "Spoolfile")
+ (file :tag "Crashbox")))))
(defcustom vm-spool-file-suffixes nil
"*List of suffixes to be used to create possible spool file names
@@ -282,13 +287,15 @@ scanning `vm-spool-files' for matches.
The value of `vm-spool-files-suffixes' will not be used unless
`vm-crash-box-suffix' is also defined, since a crash box is
required for all mail retrieval from spool files."
+ :group 'vm
:type '(repeat string))
-(defcustom vm-crash-box-suffix nil
+(defcustom vm-crash-box-suffix ".crash"
"*String suffix used to create possible crash box file names for folders.
When VM uses `vm-spool-file-suffixes' to create a spool file name,
it will append the value of `vm-crash-box-suffix' to the folder's
file name to create a crash box name."
+ :group 'vm
:type 'string)
(defcustom vm-make-spool-file-name nil
@@ -296,6 +303,7 @@ file name to create a crash box name."
for a folder. The function will be called with one argument, the
folder's file name. If the folder does not have a file name,
the function will not be called."
+ :group 'vm
:type 'function)
(defcustom vm-make-crash-box-name nil
@@ -303,11 +311,13 @@ the function will not be called."
for a folder. The function will be called with one argument, the
folder's file name. If the folder does not have a file name,
the function will not be called."
+ :group 'vm
:type 'function)
(defcustom vm-pop-md5-program "md5"
"*Program that reads a message on its standard input and writes an
MD5 digest on its output."
+ :group 'vm
:type 'string)
(defcustom vm-pop-max-message-size nil
@@ -323,6 +333,7 @@ warning message. You will be able to retrieved any skipped messages
later by running `vm-get-new-mail' interactively.
A nil value for `vm-pop-max-message-size' means no size limit."
+ :group 'vm
:type '(choice (const nil) integer))
(defcustom vm-pop-messages-per-session nil
@@ -332,6 +343,7 @@ will only retrieve that many messages from any particular POP maildrop.
To retrieve more messages, type 'g' again.
A nil value means there's no limit."
+ :group 'vm
:type '(choice (const nil) integer))
(defcustom vm-pop-bytes-per-session nil
@@ -342,6 +354,7 @@ any particular POP maildrop. To retrieve more messages, type 'g'
again.
A nil value means there's no limit."
+ :group 'vm
:type '(choice (const nil) integer))
(defcustom vm-pop-expunge-after-retrieving t
@@ -356,6 +369,7 @@ messages from the server.
This variable only affects POP mailboxes not listed in
`vm-pop-auto-expunge-alist' (which see)."
+ :group 'vm
:type 'boolean)
(defcustom vm-pop-auto-expunge-alist nil
@@ -381,6 +395,7 @@ remote POP server supports the UIDL command. If the server does
not support UIDL and you've asked to VM leave messages on the server,
VM will complain about the lack of UIDL support and not retrieve
messages from the server."
+ :group 'vm
:type '(repeat (cons string boolean)))
(defcustom vm-pop-read-quit-response t
@@ -391,6 +406,7 @@ useful to be able to tell VM not to wait. Some other
servers will not expunge messages unless the QUIT response is
read, so for these servers you should set the variable's value to
t."
+ :group 'vm
:type 'boolean)
(defcustom vm-recognize-pop-maildrops "^\\(pop:\\|pop-ssl:\\|pop-ssh:\\)?[^:]+:[^:]+:[^:]+:[^:]+:.+"
@@ -398,6 +414,7 @@ t."
spool names found in `vm-spool-files' that should be considered POP
maildrops. A nil value tells VM that all the spool names are to
be considered files except those matched by `vm-recognize-imap-maildrops'."
+ :group 'vm
:type 'regexp)
(defcustom vm-pop-folder-alist nil
@@ -407,10 +424,11 @@ The alist format is:
((POPDROP NAME) ...)
POPDROP is a POP maildrop specification in the same format used
-by vm-spool-files (which see).
+by `vm-spool-files' (which see).
NAME is a string that should give a less cumbersome name that you
will use to refer to this maildrop when using `vm-visit-pop-folder'."
+ :group 'vm
:type '(repeat (list string string)))
(defcustom vm-pop-folder-cache-directory nil
@@ -420,6 +438,7 @@ have a mailbox) it stores the retrieved message on your computer
so that they need not be retrieved each time you visit the folder.
The cached copies are stored in the directory specified by this
variable."
+ :group 'vm
:type '(choice (const nil) directory))
(defcustom vm-imap-max-message-size nil
@@ -431,9 +450,10 @@ is set to a numeric value then you will not be prompted about large
messages. This is to avoid prompting you while you're typing in
another buffer. In this case the large message will be skipped with a
warning message. You will be able to retrieved any skipped messages
-later by running vm-get-new-mail interactively.
+later by running `vm-get-new-mail' interactively.
A nil value for `vm-imap-max-message-size' means no size limit."
+ :group 'vm
:type '(choice (const nil) integer))
(defcustom vm-imap-messages-per-session nil
@@ -443,6 +463,7 @@ will only retrieve that many messages from any particular IMAP maildrop.
To retrieve more messages, type 'g' again.
A nil value means there's no limit."
+ :group 'vm
:type '(choice (const nil) integer))
(defcustom vm-imap-bytes-per-session nil
@@ -453,6 +474,7 @@ any particular IMAP maildrop. To retrieve more messages, type 'g'
again.
A nil value means there's no limit."
+ :group 'vm
:type '(choice (const nil) integer))
(defcustom vm-imap-expunge-after-retrieving t
@@ -462,6 +484,7 @@ in the IMAP mailbox until you run `vm-expunge-imap-messages'.
This variable only affects IMAP mailboxes not listed in
`vm-imap-auto-expunge-alist' (which see)."
+ :group 'vm
:type 'boolean)
(defcustom vm-imap-auto-expunge-alist nil
@@ -481,6 +504,7 @@ still understand that this mailbox is the same as the one in
VAL should be nil if retrieved messages should be left in the
corresponding IMAP mailbox, t if retrieved messages should be
deleted from the mailbox immediately after retrieval."
+ :group 'vm
:type '(repeat (cons string boolean)))
(defcustom vm-recognize-imap-maildrops "^\\(imap\\|imap-ssl\\|imap-ssh\\):[^:]+:[^:]+:[^:]+:[^:]+:[^:]+:.+"
@@ -488,12 +512,13 @@ deleted from the mailbox immediately after retrieval."
spool names found in `vm-spool-files' that should be considered IMAP
maildrops. A nil value tells VM that all the spool names are to
be considered files except those matched by `vm-recognize-pop-maildrops'."
+ :group 'vm
:type 'regexp)
(defcustom vm-imap-server-list nil
"*List of IMAP maildrop specifications that tell VM the IMAP servers
you have access to and how to log into them. The IMAP maildrop
-specification in the same format used by vm-spool-files (which
+specification in the same format used by `vm-spool-files' (which
see). The mailbox part of the specifiation is ignored and should
be asterisk or some other placeholder.
@@ -504,6 +529,7 @@ Example:
\"imap:crickle.lex.ky.us:143:inbox:login:becky:*\"
)
)"
+ :group 'vm
:type '(repeat string))
(defcustom vm-imap-folder-cache-directory nil
@@ -513,8 +539,15 @@ have a mailbox) it stores the retrieved message on your computer
so that they need not be retrieved each time you visit the folder.
The cached copies are stored in the directory specified by this
variable."
+ :group 'vm
:type '(choice (const nil) directory))
+(defcustom vm-imap-save-to-server nil
+ "If this variable is non-NIL, then the save-message command should
+save to IMAP folders on the server, rather than to local files."
+ :group 'vm
+ :type '(choice (const nil) (const t)))
+
(defcustom vm-auto-get-new-mail t
"*Non-nil value causes VM to automatically move mail from spool files
to a mail folder when the folder is first visited. Nil means
@@ -525,6 +558,7 @@ seconds) VM should check for new mail and try to retrieve it.
This is done asynchronously and may occur while you are editing
other files. It should not disturb your editing, except perhaps
for a pause while the check is being done."
+ :group 'vm
:type '(choice boolean integer))
(defcustom vm-mail-check-interval 300
@@ -538,6 +572,7 @@ buffer local variable `vm-spooled-mail-waiting' is set non-nil in
the buffers of those folders that have mail waiting. VM
displays \"Mail\" in the mode line of folders that have mail
waiting."
+ :group 'vm
:type '(choice (const nil) integer))
(defvar vm-spooled-mail-waiting nil
@@ -575,6 +610,7 @@ in your .emacs or .vm file.
If you set this variable's value to From_-with-Content-Length you
must set `vm-trust-From_-with-Content-Length' non-nil."
+ :group 'vm
:type '(choice (const From_)
(const From_-with-Content-Length)
(const BellFrom_)
@@ -597,6 +633,7 @@ Since BellFrom_ and From_ folders cannot be reliably distinguished
from each other, you must tell VM which one your system uses by
setting the variable `vm-default-From_-folder-type' to either From_
or BellFrom_."
+ :group 'vm
:type '(choice (const From_)
(const BellFrom_)))
@@ -613,6 +650,7 @@ CRLF if you're on a Windows system, LF for UNIXish systems.
`crlf' means use CRLF.
`lf' mean use LF.
`cr' means use CR (old Macs use this)."
+ :group 'vm
:type '(choice (const nil)
(const crlf)
(const cr)
@@ -634,6 +672,7 @@ If non-nil, VM will either convert the messages to the appropriate
type before saving or incorporating them, or it will signal an
error. The value of `vm-convert-folder-types' determines which
action VM will take."
+ :group 'vm
:type 'boolean)
(defcustom vm-convert-folder-types t
@@ -643,6 +682,7 @@ source messages to the type of the destination folder, if it can.
If `vm-check-folder-types' is nil, then this variable isn't
consulted."
+ :group 'vm
:type 'boolean)
(defcustom vm-trust-From_-with-Content-Length
@@ -657,6 +697,7 @@ line that begins with \"From \".
If you set `vm-default-folder-type' to From_-with-Content-Length you
must set this variable non-nil."
+ :group 'vm
:type 'boolean)
(defcustom vm-visible-headers
@@ -679,6 +720,7 @@ Otherwise all headers are displayed except those matched by
`vm-invisible-header-regexp'. In this case `vm-visible-headers'
specifies the order in which headers are displayed. Headers not
matching `vm-visible-headers' are displayed last."
+ :group 'vm
:type '(list regexp))
(defcustom vm-invisible-header-regexp nil
@@ -690,6 +732,7 @@ the presentation order of headers; headers not matched by
Nil value causes VM to display ONLY those headers specified in
`vm-visible-headers'."
+ :group 'vm
:type '(choice (const nil) regexp))
(defcustom vm-highlighted-header-regexp nil
@@ -705,6 +748,7 @@ the variable `vm-use-lucid-highlighting' non-nil. You'll need to
set the various variables used by the highlight-headers package
to customize highlighting. `vm-highlighted-header-regexp' is
ignored in this case."
+ :group 'vm
:type '(choice (const nil) regexp))
(defcustom vm-use-lucid-highlighting (condition-case nil
@@ -716,8 +760,13 @@ ignored in this case."
Nil means just use VM's builtin header highlighting code.
FSF Emacs always uses VM's builtin highlighting code."
+ :group 'vm
:type 'boolean)
+(defgroup vm-faces nil
+ "VM additional virtual folder selectors and functions."
+ :group 'vm)
+
(defcustom vm-highlighted-header-face 'bold
"*Face to be used to highlight headers.
The headers to highlight are specified by the `vm-highlighted-header-regexp'
@@ -727,6 +776,7 @@ This variable is ignored under XEmacs if `vm-use-lucid-highlighting' is
non-nil. XEmacs' highlight-headers package is used instead. See the
documentation for the function `highlight-headers' to find out how to
customize header highlighting using this package."
+ :group 'vm-faces
:type 'symbol)
(defcustom vm-preview-lines 0
@@ -737,27 +787,40 @@ flagged as read until it is exposed in its entirety.
A value of t causes VM to display as much of the message as will
fit in the window associated with the folder buffer.
-A nil value causes VM not to preview messages; no text lines are hidden and
+A nil value causes VM not to preview messages; no text lines are hidden and
messages are immediately flagged as read."
+ :group 'vm
:type '(choice boolean integer))
(defcustom vm-preview-read-messages nil
"*Non-nil value means to preview messages even if they've already been read.
A nil value causes VM to preview messages only if new or unread."
+ :group 'vm
+ :type 'boolean)
+
+(defcustom vm-always-use-presentation-buffer nil
+ "*Non-nil means to always use a presentation buffer for displaying messages.
+It will also be used if no decoding or other modification of the message are
+necessary."
+ :group 'vm
:type 'boolean)
(defcustom vm-fill-paragraphs-containing-long-lines nil
- "*Non-nil numeric value N causes VM to fill paragraphs that
-contain lines spanning N columns or more. Only plain text
+ "*Non-nil numeric value N or symbol 'window-width causes VM to fill
+paragraphs that contain lines spanning that columns or more. Only plain text
messages and text/plain MIME parts will be filled. The message
itself is not modified; its text is copied into a presentation
buffer before the filling is done."
- :type '(choice (const nil) integer))
+ :group 'vm
+ :type '(choice (const nil)
+ (const window-width)
+ integer))
(defcustom vm-paragraph-fill-column (default-value 'fill-column)
"*Column beyond which automatic line-wrapping should happen when
re-filling lines longer than the value of
`vm-fill-paragraphs-containing-long-lines'."
+ :group 'vm
:type 'integer)
(defcustom vm-display-using-mime t
@@ -773,6 +836,7 @@ various MIME standards specifications.
A nil value means VM will not display MIME messages any
differently than any other message."
+ :group 'vm
:type 'boolean)
;; this is t because at this time (11 April 1997) Solaris is
@@ -785,6 +849,7 @@ messages. Some systems scramble the MIME-Version header, causing
VM to believe that it cannot display a message that it actually
can display. You can set `vm-mime-ignore-mime-version' non-nil if
you use such systems."
+ :group 'vm
:type 'boolean)
(defcustom vm-mime-require-mime-version-header t
@@ -793,6 +858,7 @@ The MIME standard requires that MIME messages contain a MIME-Version,
but some mailers ignore the standard and do not send the header. Set
this variable to nil if you want VM to be lax and parse such messages
as MIME anyway."
+ :group 'vm
:type 'boolean)
(defcustom vm-mime-ignore-composite-type-opaque-transfer-encoding t
@@ -803,6 +869,7 @@ use either 7bit, 8bit, or binary transfer encodings but some
mailers declare quoted-printable and base64 even when they are
not used. Set this variable non-nil if you want VM to be lax and
ignore this problem and try to display the object anyway."
+ :group 'vm
:type 'boolean)
(defcustom vm-mime-ignore-missing-multipart-boundary t
@@ -811,6 +878,7 @@ as if the marker were at the end of the current enclosing MIME
object or, if there is no enclosing object, at the end of the
message. A nil value means VM will complain about missing
boundaries and refuse to parse such MIME messages."
+ :group 'vm
:type 'boolean)
(defcustom vm-send-using-mime t
@@ -828,6 +896,7 @@ A non-nil value for this variable means that VM will
A nil value means VM will not offer any support for composing
MIME messages."
+ :group 'vm
:type 'boolean)
(defcustom vm-honor-mime-content-disposition nil
@@ -838,6 +907,7 @@ treated as an attachment. For VM, ``inline'' display means
displaying the object in the Emacs buffer, if possible.
Attachments will be displayed as a button that you can use
mouse-2 to activate or mouse-3 to pull up a menu of options."
+ :group 'vm
:type 'boolean)
(defcustom vm-auto-decode-mime-messages t
@@ -846,6 +916,7 @@ when a message containing MIME objects is exposed. A nil value
means that you will have to run the `vm-decode-mime-message'
command (normally bound to `D') manually to decode and display
MIME objects."
+ :group 'vm
:type 'boolean)
(defcustom vm-mime-decode-for-preview t
@@ -855,6 +926,7 @@ this is if `vm-preview-lines' is set to a non-nil, non-zero
value you can see readable text instead of a potentially inscrutable
MIME jumble. `vm-auto-decode-mime-messages' must also be set non-nil
for this variable to have effect."
+ :group 'vm
:type 'boolean)
(defcustom vm-auto-displayed-mime-content-types '("text" "image" "multipart")
@@ -887,6 +959,7 @@ apply to them.
Any type that cannot be displayed internally or externally will
be displayed as a button that allows you to save the body of the MIME
object to a file."
+ :group 'vm
:type '(choice (const t) (repeat string)))
(defcustom vm-auto-displayed-mime-content-type-exceptions nil
@@ -904,6 +977,7 @@ should all be types or type/subtype pairs. Example:
If a top-level type is listed without a subtype, all subtypes of
that type are assumed to be included."
+ :group 'vm
:type '(repeat string))
(defcustom vm-mime-internal-content-types t
@@ -923,6 +997,7 @@ that type are assumed to be included.
Note that all multipart types are always handled internally.
There is no need to list them here."
+ :group 'vm
:type '(choice (const t) (const nil) (repeat string)))
(defcustom vm-mime-internal-content-type-exceptions nil
@@ -937,6 +1012,7 @@ The value should be a list of strings. Example:
If a top-level type is listed without a subtype, all subtypes of
that type are assumed to be included."
+ :group 'vm
:type '(repeat string))
(defcustom vm-mime-external-content-types-alist nil
@@ -966,6 +1042,9 @@ into a temporary file and the name of the file can be inserted
into an ARG string by writing %f. In earlier versions of VM the
filename was always added as the last argument; as of VM 6.49 this
is only done if %f does not appear in any of the ARG strings.
+The filename inserted by %f will be quoted by `shell-quote-argument'
+and thus no single quotes should be used, i.e. do not use the following
+\"...'%f'...\".
If the COMMAND-LINE form is used, the program and its arguments
are specified as a single string and that string is passed to the
@@ -998,6 +1077,7 @@ Example:
The first matching list element will be used.
No multipart message will ever be sent to an external viewer."
+ :group 'vm
:type '(repeat (list string string)))
(defcustom vm-mime-external-content-type-exceptions nil
@@ -1013,12 +1093,14 @@ The value should be a list of strings. Example:
If a top-level type is listed without a subtype, all subtypes of
that type are assumed to be included."
+ :group 'vm
:type '(repeat string))
(defcustom vm-mime-delete-viewer-processes t
"*Non-nil value causes VM to kill external MIME viewer processes
when you switch to a different message or quit the current message's
folder."
+ :group 'vm
:type 'boolean)
(defcustom vm-mime-type-converter-alist nil
@@ -1051,7 +1133,11 @@ Example:
)
)
-The first matching list element will be used.")
+The first matching list element will be used."
+ :group 'vm
+ :type '(repeat (list (string :tag "From type")
+ (string :tag "To type")
+ (string :tag "Converter program"))))
(defcustom vm-mime-charset-converter-alist nil
"*Alist of MIME charsets and programs that can convert between them.
@@ -1084,6 +1170,7 @@ Example:
)
The first matching list element will be used."
+ :group 'vm
:type '(repeat (list string string string)))
(defcustom vm-mime-alternative-select-method 'best-internal
@@ -1113,6 +1200,7 @@ choose the first matching alternative found that can be displayed.
If the symbol 'favorite' is 'favorite-internal' instead, the first TYPE
that matches an alternative that can be displayed internally will be
chosen."
+ :group 'vm
:type '(choice (choice (const best-internal)
(const best))
(cons (const favorite) (repeat string))
@@ -1121,6 +1209,7 @@ chosen."
(defcustom vm-mime-use-w3-for-text/html t
"*Non-nil means use Emacs W3 to display text/html MIME objects
Nil means don't use W3 for this."
+ :group 'vm
:type 'boolean)
(defcustom vm-mime-default-face-charsets
@@ -1151,6 +1240,7 @@ Content-Type header.
To tell VM how to display other character sets, see
`vm-mime-charset-font-alist'."
+ :group 'vm
:type '(choice (const t) (repeat string)))
(defcustom vm-mime-default-face-charset-exceptions nil
@@ -1158,6 +1248,7 @@ To tell VM how to display other character sets, see
This variable acts as an exception list for `vm-mime-default-face-charsets'.
Character sets listed here will not be considered displayable using the
default face even if they are also listed in `vm-mime-default-face-charsets'."
+ :group 'vm
:type '(repeat string))
(defcustom vm-mime-charset-font-alist nil
@@ -1192,6 +1283,7 @@ compiled in MULE support, this value of this variable is ignored.
Note that under FSF Emacs 19, any fonts you use must be the
same height as your default font. XEmacs does not have this
limitation."
+ :group 'vm
:type '(repeat (cons string string)))
(defcustom vm-mime-use-image-strips t
@@ -1206,31 +1298,42 @@ must point to them.
A nil value means VM should display images without cutting them
into strips."
+ :group 'vm
:type 'boolean)
(defcustom vm-mime-display-image-strips-incrementally t
"*Non-nil means display image strips as they are created
rather than waiting until all the strips are created and displaying
them all at once. See `vm-mime-use-image-strips'."
+ :group 'vm
:type 'boolean)
(defun vm-locate-executable-file (name)
- (cond ((fboundp 'locate-file)
- (locate-file name exec-path nil 1))
- (t
- (let (file done (dirs exec-path))
- (while (and dirs (not done))
- (setq file (expand-file-name name (car dirs)))
- (if (file-executable-p file)
- (setq done t)
- (setq dirs (cdr dirs))))
- (and dirs file)))))
+ (or (cond ((fboundp 'locate-file)
+ (locate-file name exec-path nil 1))
+ (t
+ (let (file done (dirs exec-path))
+ (while (and dirs (not done))
+ (setq file (expand-file-name name (car dirs)))
+ (if (file-executable-p file)
+ (setq done t)
+ (setq dirs (cdr dirs))))
+ (and dirs file))))
+ (let ((vmdir (file-name-directory (locate-library "vm")))
+ file)
+ (setq vmdir (expand-file-name "../src/" vmdir)
+ file (expand-file-name name vmdir))
+ (if (file-exists-p file)
+ file
+; (message "VM could not find executable %S!" name)
+ nil))))
(defcustom vm-imagemagick-convert-program (vm-locate-executable-file "convert")
"*Name of ImageMagick 'convert' program.
VM uses this program to convert between image formats and to slice up
images for display. Set this to nil and VM will not use the
'convert' program."
+ :group 'vm
:type '(choice string (const nil)))
(defcustom vm-imagemagick-identify-program
@@ -1238,6 +1341,7 @@ images for display. Set this to nil and VM will not use the
"*Name of ImageMagick 'identify' program.
VM uses this program to gather information about images. Set this to nil
and VM will not use the 'convert' program."
+ :group 'vm
:type '(choice string (const nil)))
(defvar vm-mime-image-type-converter-alist
@@ -1258,15 +1362,18 @@ and VM will not use the 'convert' program."
after the MIME object has been saved to disk. The MIME object is replaced
with a message/external-body object that points to the disk copy of the
object."
+ :group 'vm
:type 'boolean)
(defcustom vm-mime-confirm-delete t
"*Non-nil value causes VM to request confirmation from the user before
-deleting a MIME object with vm-delete-mime-object."
+deleting a MIME object with `vm-delete-mime-object'."
+ :group 'vm
:type 'boolean)
(defcustom vm-mime-button-face 'gui-button-face
"*Face used for text in buttons that trigger the display of MIME objects."
+ :group 'vm-faces
:type 'boolean)
(defcustom vm-mime-button-format-alist
@@ -1291,7 +1398,7 @@ The format of the list is
((TYPE . FORMAT) (TYPE . FORMAT) ...)
-The list is searched sequentially and the FORMAT corresponding to
+The list is searched sequentially and the FORMAT corresponding to
the first TYPE that matches the type of the button's object is
used.
@@ -1326,16 +1433,16 @@ Recognized specifiers are:
s - an empty string if %n would display \"1\", otherwise
\"s\".
t - the content type of the object, e.g. \"text/enriched\".
- T - for message/partial objects, the total number of expected
+ T - for message/partial objects, the total number of expected
parts. \"?\" is displayed if the object doesn't specify
the total number of parts expected.
x - the content type of the external body of a message/external-body
object.
( - starts a group, terminated by %). Useful for specifying
the field width and precision for the concatentation of
- group of format specifiers. Example: \"%.35(%d, %t, %f%)\"
- specifies a maximum display width of 35 characters for the
- concatenation of the content description, content type and
+ group of format specifiers. Example: \"%.25(%d, %t, %f%)\"
+ specifies a maximum display width of 25 characters for the
+ concatenation of the content description, content type and
suggested file name.
) - ends a group.
@@ -1350,6 +1457,7 @@ the maximum allowed length of the substituted string. If the
string is longer than this value the right end of the string is
truncated. If the value is negative, the string is truncated on
the left instead of the right."
+ :group 'vm
:type '(repeat (cons string string)))
(defcustom vm-mime-7bit-composition-charset "us-ascii"
@@ -1363,6 +1471,7 @@ This variable is unused in XEmacs/MULE. Since multiple character
sets can be displayed in a single buffer under MULE, VM will map
the file coding system of the composition buffer to a single MIME
character set that can display all the buffer's characters."
+ :group 'vm
:type 'string)
(defcustom vm-mime-8bit-composition-charset "iso-8859-1"
@@ -1377,6 +1486,7 @@ with version 20. Since multiple character sets can be displayed
in a single buffer under MULE, VM will map the file coding system
of the buffer to a single MIME character set that can display all
the buffer's characters."
+ :group 'vm
:type 'string)
(defcustom vm-mime-8bit-text-transfer-encoding 'quoted-printable
@@ -1400,6 +1510,7 @@ which moves them outside the scope of this variable. For
example, messages with line lengths of 1000 characters or more
are considered binary, as are messages that contain carriage
returns (ascii code 13) or NULs (ascii code 0)."
+ :group 'vm
:type '(choice (const quoted-printable) (const base64) (const 8bit)))
(defcustom vm-mime-composition-armor-from-lines nil
@@ -1415,6 +1526,7 @@ If `vm-mime-composition-armor-from-lines' is non-nil, a line
beginning with \"From \" will cause VM to encode the message
using either quoted-printable or BASE64 encoding so that the From
line can be protected."
+ :group 'vm
:type 'boolean)
(defcustom vm-mime-attachment-auto-type-alist
@@ -1427,14 +1539,16 @@ line can be protected."
("\\.au$" . "audio/basic")
("\\.mpe?g$" . "video/mpeg")
("\\.mov$" . "video/quicktime")
+ ("\\.zip$" . "application/zip")
("\\.e?ps$" . "application/postscript")
("\\.pdf$" . "application/pdf")
- ("\\.xls$" . "application/vnd.ms-excel")
("\\.doc$" . "application/msword")
+ ("\\.xls$" . "application/vnd.ms-excel")
("\\.ppt$" . "application/vnd.ms-powerpoint")
+ ("\\.hqx$" . "application/mac-binhex40")
)
"*Alist used to guess a MIME content type based on a file name.
-The list format is
+The list format is
((REGEXP . TYPE) ...)
@@ -1450,6 +1564,7 @@ type.
The value of this variable is also used to guess the MIME type of
application/octet-stream objects for display purposes if the
value of `vm-infer-mime-types' is non-nil."
+ :group 'vm
:type '(repeat (cons regexp string)))
(defcustom vm-mime-attachment-auto-suffix-alist
@@ -1457,19 +1572,21 @@ value of `vm-infer-mime-types' is non-nil."
("image/jpeg" . ".jpg")
("image/gif" . ".gif")
("image/png" . ".png")
+ ("image/tiff" . ".tif")
("text/html" . ".html")
("audio/basic" . ".au")
("video/mpeg" . ".mpg")
("video/quicktime" . ".mov")
+ ("application/zip" . ".zip")
("application/postscript" . ".ps")
("application/pdf" . ".pdf")
+ ("application/msword" . ".doc")
("application/vnd.ms-excel" . ".xls")
+ ("application/vnd.ms-powerpoint" . ".ppt")
("application/mac-binhex40" . ".hqx")
- ("application/pdf" . ".pdf")
- ("application/zip" . ".zip")
)
"*Alist used to select a filename suffix for MIME object temporary files.
-The list format is
+The list format is
((TYPE . SUFFIX) ...)
@@ -1488,6 +1605,7 @@ such as '.html' or '.jpg'. You can use this variable to map MIME
types to extensions that your external viewers will recognize. VM
will search the list for a matching type. The suffix associated
with the first type that matches will be used."
+ :group 'vm
:type '(repeat (cons string string)))
(defcustom vm-mime-max-message-size nil
@@ -1495,18 +1613,21 @@ with the first type that matches will be used."
The value should be an integer which specifies the size in bytes.
A message larger than this value will be split into multiple parts
for transmission using the MIME message/partial type."
+ :group 'vm
:type '(choice (const nil) integer))
-(defcustom vm-mime-attachment-save-directory nil
+(defcustom vm-mime-attachment-save-directory (expand-file-name "~/")
"*Non-nil value is a default directory for saving MIME attachments.
When VM prompts you for a target file name when saving a MIME body,
any relative pathnames will be relative to this directory."
+ :group 'vm
:type '(choice (const nil) directory))
-(defcustom vm-mime-attachment-source-directory nil
+(defcustom vm-mime-attachment-source-directory (expand-file-name "~/")
"*Non-nil value is a default source directory for MIME attachments.
-When vm-mime-attach-file prompts you for the name of a file to
+When `vm-mime-attach-file' prompts you for the name of a file to
attach, any relative pathnames will be relative to this directory."
+ :group 'vm
:type '(choice (const nil) directory))
(defcustom vm-infer-mime-types nil
@@ -1516,6 +1637,14 @@ displayed and how it should be displayed. This will be done only
for objects of type application/octet-stream. The object's filename
is checked against the regexps in `vm-mime-attachment-auto-type-alist'
and the type corresponding to the first match found is used."
+ :group 'vm
+ :type 'boolean)
+
+(defcustom vm-mime-attachment-infer-type-for-text-attachments nil
+ "*Non-nil value means VM should try to infer a MIME object's
+ type from its filename also for text attachments, not only for
+ application/octet-stream."
+ :group 'vm
:type 'boolean)
(defcustom vm-mime-avoid-folding-content-type t
@@ -1531,6 +1660,7 @@ version is,
If you see one of these, setting `vm-mime-avoid-folding-content-type'
non-nil may let your mail get through."
+ :group 'vm
:type 'boolean)
(defcustom vm-mime-base64-decoder-program
@@ -1540,11 +1670,13 @@ If the program is in your executable search path, you need not
specify a full pathname. The program should expect to read
base64 data on its standard input and write the converted data
to its standard output."
+ :group 'vm
:type '(choice string (const nil)))
(defcustom vm-mime-base64-decoder-switches nil
"*List of command line flags passed to the command named by
`vm-mime-base64-decoder-program'."
+ :group 'vm
:type '(repeat string))
(defcustom vm-mime-base64-encoder-program
@@ -1554,11 +1686,13 @@ If the program is in your executable search path, you need not
specify a full pathname. The program should expect arbitrary
data on its standard input and write base64 data to its standard
output."
+ :group 'vm
:type '(choice string (const nil)))
(defcustom vm-mime-base64-encoder-switches nil
"*List of command line flags passed to the command named by
`vm-mime-base64-encoder-program'."
+ :group 'vm
:type '(repeat string))
(defcustom vm-mime-qp-decoder-program (vm-locate-executable-file "qp-decode")
@@ -1567,11 +1701,13 @@ decoder. If the program is in your executable search path, you
need not specify a full pathname. The program should expect to
read quoted-printable data on its standard input and write the
converted data to its standard output."
+ :group 'vm
:type '(choice string (const nil)))
(defcustom vm-mime-qp-decoder-switches nil
"*List of command line flags passed to the command named by
`vm-mime-qp-decoder-program'."
+ :group 'vm
:type '(repeat string))
(defcustom vm-mime-qp-encoder-program (vm-locate-executable-file "qp-encode")
@@ -1580,11 +1716,13 @@ encoder. If the program is in your executable search path, you
need not specify a full pathname. The program should expect
arbitrary data on its standard input and write quoted-printable
data to its standard output."
+ :group 'vm
:type '(choice string (const nil)))
(defcustom vm-mime-qp-encoder-switches nil
"*List of command line flags passed to the command named by
`vm-mime-qp-encoder-program'."
+ :group 'vm
:type '(repeat string))
(defcustom vm-mime-uuencode-decoder-program "uudecode"
@@ -1594,17 +1732,20 @@ specify a full pathname. The program should expect to read
uuencoded data on its standard input and write the converted
data to the file specified in the ``begin'' line at the start of
the data."
+ :group 'vm
:type '(choice string (const nil)))
(defcustom vm-mime-uuencode-decoder-switches nil
"*List of command line flags passed to the command named by
`vm-mime-uuencode-decoder-program'."
+ :group 'vm
:type '(repeat string))
(defcustom vm-auto-next-message t
"*Non-nil value causes VM to use `vm-next-message' to advance to the next
message in the folder if the user attempts to scroll past the end of the
current messages. A nil value disables this behavior."
+ :group 'vm
:type 'boolean)
(defcustom vm-honor-page-delimiters nil
@@ -1618,6 +1759,7 @@ displayed. Scrolling backward past a page delimiter reverses this
process.
A nil value means ignore page-delimiters."
+ :group 'vm
:type 'boolean)
(defcustom vm-page-continuation-glyph "...press SPACE to see more..."
@@ -1631,6 +1773,7 @@ Under XEmacs, the value of `vm-page-continuation-glyph' can be a
string or a glyph object.
Under FSF Emacs, `vm-page-continuation-glyph' must be a string."
+ :group 'vm
:type 'boolean)
(defvar vm-default-window-configuration
@@ -1717,6 +1860,7 @@ WARNING: Don't point `vm-window-configuration-file' at your .vm or
an empty or nonexistent file. VM will repeatedly overwrite this
file as you update your window configuration settings, so
anything else you put into this file will go away."
+ :group 'vm
:type 'file)
(defcustom vm-confirm-quit 0
@@ -1726,11 +1870,13 @@ will be lost unwittingly by quitting, i.e. not removed by intentional
delete and expunge. A value that is not nil and not t causes VM to ask
only when there are unsaved changes to message attributes, or when messages
will be unwittingly lost."
+ :group 'vm
:type '(choice (const t) (const nil) (const if-something-will-be-lost)))
(defcustom vm-confirm-new-folders nil
"*Non-nil value causes interactive calls to `vm-save-message'
to ask for confirmation before creating a new folder."
+ :group 'vm
:type 'boolean)
(defcustom vm-delete-empty-folders t
@@ -1738,6 +1884,7 @@ to ask for confirmation before creating a new folder."
A value of t means always remove the folders.
A value of nil means never remove empty folders.
A value that's not t or nil means ask before removing empty folders."
+ :group 'vm
:type '(choice (const nil) (const t) (const ask)))
(defcustom vm-folder-file-precious-flag t
@@ -1746,6 +1893,7 @@ A non-nil value causes folders to be saved by writing to a
temporary file and then replacing the folder with that file. A
nil value causes folders to be saved by writing directly to the
folder without the use of a temporary file."
+ :group 'vm
:type 'boolean)
(defcustom vm-flush-interval 90
@@ -1767,6 +1915,7 @@ internal memory caches to be periodically flushed to the folder
buffer. This is done non-obtrusively, so that if you type
something while flushing is occurring, the flush will abort
cleanly and Emacs will respond to your keystrokes as usual."
+ :group 'vm
:type '(choice boolean integer))
(defcustom vm-visit-when-saving 0
@@ -1787,6 +1936,7 @@ consistent.
A value that is not nil and not t means VM will save to a folder's
buffer if that folder is being visited, otherwise VM saves to the folder
file itself."
+ :group 'vm
:type '(choice boolean (const if-already-visited)))
(defcustom vm-auto-folder-alist nil
@@ -1819,12 +1969,14 @@ and will be descended recursively.
Whether REGEXP is matched case sensitively depends on the value
of the variable `vm-auto-folder-case-fold-search'. Header names
are always matched case insensitively."
+ :group 'vm
:type '(repeat (cons regexp (repeat (cons regexp sexp)))))
(defcustom vm-auto-folder-case-fold-search nil
"*Non-nil value means VM will ignore case when matching header
contents while doing automatic folder selection via the variable
`vm-auto-folder-alist'."
+ :group 'vm
:type 'boolean)
(defcustom vm-virtual-folder-alist nil
@@ -1867,7 +2019,7 @@ The recognized SELECTORs are:
selectors match the message. Example:
(and (author \"Derek McGinty\") (new))
matches all new messages from Derek McGinty.
- `and' takes any number of arguments.
+ `and' takes any number of arguments.
any - matches any message.
deleted - matches message if it is flagged for deletion.
edited - matches message if it has been edited.
@@ -1876,7 +2028,7 @@ The recognized SELECTORs are:
a variant of `vm-forward-message' or `vm-send-digest'.
header - matches message if ARG matches any part of the header
portion of the message; ARG should be a
- regular expression.
+ regular expression.
header-or-text - matches message if ARG matches any part of the
headers or the text portion of the message;
ARG should be a regular expression.
@@ -1950,6 +2102,7 @@ The recognized SELECTORs are:
being visited.
written - matches message if it has been saved without its headers.
"
+ :group 'vm
:type 'sexp)
(defcustom vm-virtual-mirror t
@@ -1965,6 +2118,7 @@ fashion. You should set this variable only in your .vm or .emacs
file. Use setq-default. Once VM has been started, you should not
set this variable directly, rather you should use the command
`vm-toggle-virtual-mirror', normally bound to `V M'."
+ :group 'vm
:type 'boolean)
(make-variable-buffer-local 'vm-virtual-mirror)
@@ -1980,11 +2134,13 @@ fashion. You should set this variable only in your .vm or .emacs
file. Use setq-default. Once VM has been started, you should not
set this variable directly, rather you should use the command
`vm-toggle-read-only', normally bound to C-x C-q."
+ :group 'vm
:type 'boolean)
(make-variable-buffer-local 'vm-folder-read-only)
(defcustom vm-included-text-prefix " > "
"*String used to prefix included text in replies."
+ :group 'vm
:type 'string)
(defcustom vm-keep-sent-messages 1
@@ -1996,11 +2152,13 @@ of t causes VM never to kill such buffers.
Note that these buffers will vanish once you exit Emacs. To keep a permanent
record of your outgoing mail, use the `mail-archive-file-name' variable."
+ :group 'vm
:type '(choice boolean integer))
(defcustom vm-confirm-mail-send nil
"*Non-nil means ask before sending a mail message.
This affects `vm-mail-send' and `vm-mail-send-and-exit' in Mail mode."
+ :group 'vm
:type 'boolean)
(defcustom vm-mail-header-from nil
@@ -2009,6 +2167,7 @@ of the From header in outbound mail messages. A nil value means don't
insert a From header. This variable also controls the inclusion and
format of the Resent-From header, when resending a message with
`vm-resend-message'."
+ :group 'vm
:type '(choice (const nil) string))
(defcustom vm-mail-header-insert-date t
@@ -2022,6 +2181,7 @@ This is useful if you set mail-archive-file-name,
because your archived message will contain a Date header.
A nil value means don't insert a Date header."
+ :group 'vm
:type 'boolean)
(defcustom vm-mail-header-insert-message-id t
@@ -2036,12 +2196,14 @@ archived messages will contain a Message-ID header, which may be
useful later for threading messages.
A nil value means don't insert a Message-ID header."
+ :group 'vm
:type 'boolean)
(defcustom vm-reply-subject-prefix nil
"*Non-nil value should be a string that VM should add to the beginning
of the Subject header in replies, if the string is not already present.
Nil means don't prefix the Subject header."
+ :group 'vm
:type '(choice (const nil) string))
(defcustom vm-reply-ignored-addresses nil
@@ -2053,6 +2215,7 @@ you see an address in the header you don't want you should remove
it yourself.
Case is ignored when matching the addresses."
+ :group 'vm
:type '(repeat regexp))
(defcustom vm-reply-ignored-reply-tos nil
@@ -2066,14 +2229,23 @@ Case is ignored when matching the addresses.
This variable exists solely to provide an escape chute from
mailing lists that add a Reply-To: mailing list header, thereby
leaving no way to reply to just the author of a message."
+ :group 'vm
:type '(repeat regexp))
+(defcustom vm-reply-include-presentation nil
+ "*If true a reply will include the presentation of a message.
+This might give better results when using filling or MIME encoded messages,
+e.g. HTML message."
+ :group 'vm
+ :type 'boolean)
+
(defcustom vm-in-reply-to-format "%i"
"*String which specifies the format of the contents of the In-Reply-To
header that is generated for replies. See the documentation for the
variable `vm-summary-format' for information on what this string may
contain. The format should *not* end with a newline.
Nil means don't put an In-Reply-To header in replies."
+ :group 'vm
:type '(choice (const nil) string))
(defcustom vm-included-text-attribution-format "%F writes:\n"
@@ -2081,8 +2253,15 @@ Nil means don't put an In-Reply-To header in replies."
included text from a message in a reply. See the documentation for the
variable `vm-summary-format' for information on what this string may contain.
Nil means don't attribute included text in replies."
+ :group 'vm
:type '(choice (const nil) string))
+(defcustom vm-included-mime-types-list
+ '("text/plain" "text/enriched" "message/rfc822")
+ "*List of mime types that should be retained in a reply message."
+ :group 'vm
+ :type '(repeat string))
+
(defcustom vm-included-text-headers nil
"*List of headers that should be retained in a message included in
a reply. These should be listed in the order you wish them to
@@ -2103,6 +2282,7 @@ be included. `vm-included-text-headers' determines the header
order in that case, with headers not matching any in the
`vm-included-text-headers' list appearing last in the header
section of the included text."
+ :group 'vm
:type '(repeat regexp))
(defcustom vm-included-text-discard-header-regexp nil
@@ -2121,6 +2301,7 @@ others will be included. `vm-included-text-headers' determines the
header order in that case, with headers not matching any in
the `vm-included-text-headers' list appearing last in the header
section of the included text."
+ :group 'vm
:type 'regexp)
(defcustom vm-forwarding-subject-format "forwarded message from %F"
@@ -2129,6 +2310,7 @@ header that is generated for a forwarded message. See the documentation
for the variable `vm-summary-format' for information on what this string
may contain. The format should *not* end with nor contain a newline.
Nil means leave the Subject header empty when forwarding."
+ :group 'vm
:type 'string)
(defcustom vm-forwarded-headers nil
@@ -2151,6 +2333,7 @@ forwarded. `vm-forwarded-headers' determines the forwarding order
in that case, with headers not matching any in the
`vm-forwarded-headers' list appearing last in the header section of
the forwarded message."
+ :group 'vm
:type '(repeat regexp))
(defcustom vm-unforwarded-header-regexp "only-drop-this-header"
@@ -2169,7 +2352,10 @@ be forwarded. `vm-forwarded-headers' determines the forwarding
order in that case, with headers not matching any in the
`vm-forwarded-headers' list appearing last in the header section of
the forwarded message."
- :type 'regexp)
+ :group 'vm
+ :type '(choice
+ (const nil)
+ regexp))
(defcustom vm-forwarding-digest-type "mime"
"*Non-nil value should be a string that specifies the type of
@@ -2183,7 +2369,12 @@ nil
A nil value means don't use a digest, just mark the beginning and
end of the forwarded message."
- :type '(choice (const "rfc934") (const "rfc1153") (const "mime")))
+ :group 'vm
+ :type '(choice
+ (const "rfc934")
+ (const "rfc1153")
+ (const "mime")
+ (const :tag "Do not use digests" nil)))
(defcustom vm-mime-forward-local-external-bodies nil
"*Non-nil value means forward messages that contain
@@ -2201,27 +2392,32 @@ the recipient doesn't have access to your local filesystems then
they will not be able to use the message/external-body reference.
That is why the default value of this variable is nil, which
forces such referneces to be converted to objects present in the
-message itself.")
+message itself."
+ :group 'vm
+ :type 'boolean)
(defcustom vm-burst-digest-messages-inherit-labels t
"*Non-nil values means messages from a digest inherit the digest's labels.
Labels are added to messages with `vm-add-message-labels', normally
bound to `l a'."
+ :group 'vm
:type 'boolean)
(defcustom vm-digest-preamble-format "\"%s\" (%F)"
- "*String which specifies the format of the preamble lines generated by
+ "*String which specifies the format of the preamble lines generated by
`vm-send-digest' when it is invoked with a prefix argument. One
line will be generated for each message put into the digest. See the
documentation for the variable `vm-summary-format' for information
on what this string may contain. The format should *not* end
with nor contain a newline."
+ :group 'vm
:type 'string)
(defcustom vm-digest-center-preamble t
"*Non-nil value means VM will center the preamble lines that precede
the start of a digest. How the lines will be centered depends on the
ambient value of fill-column. A nil value suppresses centering."
+ :group 'vm
:type 'boolean)
(defcustom vm-digest-identifier-header-format "X-Digest: %s\n"
@@ -2229,6 +2425,7 @@ ambient value of fill-column. A nil value suppresses centering."
Value should be a format string of the same type as `vm-summary-format'
that describes a header to be inserted into each message burst from a
digest. The format string must end with a newline."
+ :group 'vm
:type 'string)
(defcustom vm-digest-burst-type "guess"
@@ -2256,6 +2453,7 @@ boundary parameter in the Content-Type header of the digest.
If the value is \"guess\", and you take the default
response when `vm-burst-digest' queries you, VM will try to guess
the digest type."
+ :group 'vm
:type '(choice (const "rfc934") (const "rfc1153") (const "mime")
(const "guess")))
@@ -2268,6 +2466,7 @@ Legal values of this variable are:
\"mime\"
"
+ :group 'vm
:type '(choice (const "rfc934") (const "rfc1153") (const "mime")))
(defcustom vm-rfc934-digest-headers
@@ -2297,6 +2496,7 @@ will be kept. `vm-rfc934-digest-headers' determines the order of
appearance in that case, with headers not matching any in the
`vm-rfc934-digest-headers' list appearing last in the headers
of the digestified messages."
+ :group 'vm
:type '(repeat regexp))
(defcustom vm-rfc934-digest-discard-header-regexp nil
@@ -2315,6 +2515,7 @@ will be kept. `vm-rfc934-digest-headers' determines the order of
appearance in that case, with headers not matching any in the
`vm-rfc934-digest-headers' list appearing last in the headers
of the digestified messages."
+ :group 'vm
:type 'regexp)
(defcustom vm-rfc1153-digest-headers
@@ -2344,6 +2545,7 @@ will be kept. `vm-rfc1153-digest-headers' determines the order of
appearance in that case, with headers not matching any in the
`vm-rfc1153-digest-headers' list appearing last in the headers of
the digestified messages."
+ :group 'vm
:type '(repeat regexp))
(defcustom vm-rfc1153-digest-discard-header-regexp "\\(X400-\\)?Received:"
@@ -2362,6 +2564,7 @@ will be kept. `vm-rfc1153-digest-headers' determines the order of
appearance in that case, with headers not matching any in the
`vm-rfc1153-digest-headers' list appearing last in the headers of
the digestified messages."
+ :group 'vm
:type 'regexp)
(defcustom vm-mime-digest-headers
@@ -2393,6 +2596,7 @@ will be kept. `vm-mime-digest-headers' determines the order of
appearance in that case, with headers not matching any in the
`vm-mime-digest-headers' list appearing last in the headers
of the digestified messages."
+ :group 'vm
:type '(repeat regexp))
(defcustom vm-mime-digest-discard-header-regexp nil
@@ -2411,6 +2615,7 @@ will be kept. `vm-mime-digest-headers' determines the order of
appearance in that case, with headers not matching any in the
`vm-mime-digest-headers' list appearing last in the headers
of the digestified messages."
+ :group 'vm
:type 'regexp)
(defcustom vm-resend-bounced-headers
@@ -2441,6 +2646,7 @@ will be kept. `vm-resend-bounced-headers' determines the order of
appearance in that case, with headers not matching any in the
`vm-resend-bounced-headers' list appearing last in the headers of
the message."
+ :group 'vm
:type '(repeat regexp))
(defcustom vm-resend-bounced-discard-header-regexp nil
@@ -2459,6 +2665,7 @@ will be kept. `vm-resend-bounced-headers' determines the order of
appearance in that case, with headers not matching any in the
`vm-resend-bounced-headers' list appearing last in the headers of
the message."
+ :group 'vm
:type 'regexp)
(defcustom vm-resend-headers nil
@@ -2481,6 +2688,7 @@ will be kept. `vm-resend-headers' determines the order of
appearance in that case, with headers not matching any in the
`vm-resend-headers' list appearing last in the headers of
the message."
+ :group 'vm
:type '(repeat regexp))
(defcustom vm-resend-discard-header-regexp "\\(\\(X400-\\)?Received:\\|Resent-\\)"
@@ -2499,6 +2707,7 @@ will be kept. `vm-resend-headers' determines the order of
appearance in that case, with headers not matching any in the
`vm-resend-headers' list appearing last in the headers of
the message."
+ :group 'vm
:type 'regexp)
(defcustom vm-summary-format "%n %*%a %-17.17F %-3.3m %2d %4l/%-5c %I\"%s\"\n"
@@ -2577,6 +2786,7 @@ the left instead of the right.
The summary format need not be one line per message but it must end with
a newline, otherwise the message pointer will not be displayed correctly
in the summary window."
+ :group 'vm
:type 'string)
(defcustom vm-summary-arrow "->"
@@ -2584,16 +2794,19 @@ in the summary window."
message VM consider to be the current message. The value takes
effect when the summary buffer is created. Changing this
variable's value has no effect on existing summary buffers."
+ :group 'vm
:type 'string)
(defcustom vm-summary-highlight-face 'bold
"*Face to use to highlight the summary entry for the current message.
Nil means don't highlight the current message's summary entry."
+ :group 'vm-faces
:type 'symbol)
(defcustom vm-mouse-track-summary t
"*Non-nil value means highlight summary lines as the mouse passes
over them."
+ :group 'vm
:type 'boolean)
(defcustom vm-summary-show-threads nil
@@ -2614,6 +2827,7 @@ fashion. You should set this variable only in your .vm or .emacs
file. Use setq-default. Once VM has been started, you should not
set this variable directly, rather you should use the command
`vm-toggle-threads-display', normally bound to C-t."
+ :group 'vm
:type 'boolean)
(make-variable-buffer-local 'vm-summary-show-threads)
@@ -2629,6 +2843,7 @@ Therefore it has no ancestor and would cause %I to generate no
indentation. A reply to this message will be indented by the value
of `vm-summary-thread-indent-level'. A reply to that reply will be
indented twice the value of `vm-summary-thread-indent-level'."
+ :group 'vm
:type 'integer)
(defcustom vm-thread-using-subject t
@@ -2637,6 +2852,7 @@ Messages with the same subject will be grouped together.
A nil value means VM will disregard the Subject header when
threading messages."
+ :group 'vm
:type 'boolean)
(defcustom vm-summary-uninteresting-senders nil
@@ -2647,11 +2863,13 @@ the %F or %f summary format specifiers VM will substitute the
value of `vm-summary-uninteresting-senders-arrow' (default \"To:
\") followed by what would be shown by the %T and %t specifiers
respectively."
+ :group 'vm
:type '(choice (const nil) regexp))
(defcustom vm-summary-uninteresting-senders-arrow "To: "
"*String to display before the string that is displayed instead of an
\"uninteresting\" sender. See `vm-summary-uninteresting-senders'."
+ :group 'vm
:type 'string)
(defcustom vm-auto-center-summary 0
@@ -2660,6 +2878,7 @@ centered within the summary window. A value of t causes VM to always
keep arrow centered. A value of nil means VM will never bother centering
the arrow. A value that is not nil and not t causes VM to center the
arrow only if the summary window is not the only existing window."
+ :group 'vm
:type '(choice (const nil) (const t) (const yes-if-not-only-window)))
(defcustom vm-subject-ignored-prefix "^\\(re: *\\)+"
@@ -2668,6 +2887,7 @@ strings at the beginning of the Subject header that you want VM to ignore
when threading, sorting, marking, and killing messages by subject.
Matches are done case-insensitively."
+ :group 'vm
:type 'regexp)
(defcustom vm-subject-ignored-suffix "\\( (fwd)\\| \\)+$"
@@ -2676,6 +2896,7 @@ strings at the end of the Subject header that you want VM to ignore
when threading, sorting, marking and killing messages by subject.
Matches are done case-insensitively."
+ :group 'vm
:type 'regexp)
(defcustom vm-subject-significant-chars nil
@@ -2690,11 +2911,13 @@ ignored.
A nil value for this variable means all characters in the message
subject are significant."
+ :group 'vm
:type '(choice (const nil) integer))
(defcustom vm-folders-summary-database "~/.vm.folders.db"
"*Name of Berkeley DB file used to store summary information about folders.
This file is consulted to produce the folders summary."
+ :group 'vm
:type 'file)
(defcustom vm-folders-summary-format
@@ -2713,7 +2936,7 @@ Recognized specifiers are:
the field width and precision for the concatentation of
group of format specifiers. Example: \"%.35(%d, %t, %f%)\"
specifies a maximum display width of 35 characters for the
- concatenation of the content description, content type and
+ concatenation of the content description, content type and
suggested file name.
) - ends a group.
@@ -2731,12 +2954,14 @@ the left instead of the right.
The summary format need not be one line per folder, but it should end with
a newline."
+ :group 'vm
:type 'string)
(defcustom vm-folders-summary-directories
(list (or vm-folder-directory (file-name-directory vm-primary-inbox)))
"*List of directories containing folders to be listed in the folders summary.
List the directories in the order you wish them to appear in the summary."
+ :group 'vm
:type '(repeat directory))
(defcustom vm-mutable-windows pop-up-windows
@@ -2748,6 +2973,7 @@ the entire screen for its purposes.
A value of nil restricts VM's window usage to the window from which
it was invoked. VM will not create, delete, or use any other windows,
nor will it resize its own window."
+ :group 'vm
:type 'boolean)
(defcustom vm-mutable-frames t
@@ -2762,6 +2988,7 @@ delete frames.
This variable does not apply to the VM commands whose
names end in -other-frame, which always create a new frame."
+ :group 'vm
:type 'boolean)
(defcustom vm-raise-frame-at-startup t
@@ -2769,6 +2996,7 @@ names end in -other-frame, which always create a new frame."
A value of nil means never raise the frame.
A value of t means always raise the frame.
Other values are reserved for future use."
+ :group 'vm
:type 'boolean)
(defcustom vm-frame-per-folder t
@@ -2781,6 +3009,7 @@ This variable has no meaning if you're not running under an Emacs
capable of displaying multiple real or virtual frames. Note that
Emacs supports multiple virtual frames on dumb terminals, and
VM will use them."
+ :group 'vm
:type 'boolean)
(defcustom vm-frame-per-summary nil
@@ -2793,6 +3022,7 @@ This variable has no meaning if you're not running under an Emacs
capable of displaying multiple real or virtual frames. Note that
Emacs supports multiple virtual frames on dumb terminals, and
VM will use them."
+ :group 'vm
:type 'boolean)
(defcustom vm-frame-per-folders-summary nil
@@ -2803,6 +3033,7 @@ This variable has no meaning if you're not running under an Emacs
capable of displaying multiple real or virtual frames. Note that
Emacs supports multiple virtual frames on dumb terminals, and
VM will use them."
+ :group 'vm
:type 'boolean)
(defcustom vm-frame-per-composition t
@@ -2815,6 +3046,7 @@ This variable has no meaning if you're not running under an Emacs
capable of displaying multiple real or virtual frames. Note that
Emacs supports multiple virtual frames on dumb terminals, and
VM will use them."
+ :group 'vm
:type 'boolean)
(defcustom vm-frame-per-edit t
@@ -2827,6 +3059,7 @@ This variable has no meaning if you're not running under an Emacs
capable of displaying multiple real or virtual frames. Note that
Emacs support multiple virtual frames on dumb terminals, and
VM will use them."
+ :group 'vm
:type 'boolean)
(defcustom vm-frame-per-help nil
@@ -2837,6 +3070,7 @@ This variable has no meaning if you're not running under an Emacs
capable of displaying multiple real or virtual frames. Note that
Emacs supports multiple virtual frames on dumb terminals, and
VM will use them."
+ :group 'vm
:type 'boolean)
(defcustom vm-frame-per-completion t
@@ -2857,6 +3091,7 @@ This variable has no meaning if you're not running Emacs native
under X Windows or some other window system that allows multiple
real Emacs frames. Note that Emacs supports virtual frames under
ttys but VM will not use these to display completion information."
+ :group 'vm
:type 'boolean)
(defcustom vm-frame-parameter-alist nil
@@ -2889,6 +3124,7 @@ of frame that the following PARAMLIST applies to.
PARAMLIST is a list of pairs as described in the documentation for
the function `make-frame'."
+ :group 'vm
:type '(repeat (cons (choice (const completion)
(const composition)
(const edit)
@@ -2902,37 +3138,50 @@ the function `make-frame'."
"*Non-nil means VM should search frames other than the selected frame
when looking for a window that is already displaying a buffer that
VM wants to display or undisplay."
+ :group 'vm
:type 'boolean)
-(defcustom vm-image-directory
- (if (fboundp 'locate-data-directory)
- (locate-data-directory "vm")
- (expand-file-name (concat data-directory "vm/")))
- "*Value specifies the directory where VM should find its artwork."
+(defcustom vm-configure-datadir nil
+ "A directory VM will search for data files."
+ :group 'vm
+ :type 'directory)
+
+(defcustom vm-configure-pixmapdir nil
+ "A directory VM will search for pixmap files."
+ :group 'vm
:type 'directory)
+(defun vm-pixmap-directory ()
+ (interactive)
+ (let* ((vm-dir (file-name-directory (locate-library "vm")))
+ (image-dirs (list (expand-file-name vm-configure-pixmapdir)
+ (expand-file-name vm-configure-datadir)
+ (expand-file-name "pixmaps" vm-dir)
+ (expand-file-name "../pixmaps" vm-dir)
+ (expand-file-name (concat data-directory "vm/"))))
+ image-dir)
+ (while image-dirs
+ (setq image-dir (car image-dirs))
+ (if (file-exists-p (expand-file-name "visit-up.xpm" image-dir))
+ (setq image-dirs nil)
+ (setq image-dirs (cdr image-dirs))))
+ image-dir))
+
+(defun vm-image-directory ()
+ (or vm-image-directory (vm-pixmap-directory)))
+
+(defcustom vm-image-directory nil
+ "*Value specifies the directory where VM should find its artwork."
+ :group 'vm
+ :type '(choice directory (const :tag "Automatic" nil)))
+
(defcustom vm-use-toolbar
- '(next previous delete/undelete autofile file
- reply compose print visit quit nil help)
+ '(getmail
+ next previous delete/undelete autofile file
+ reply followup forward compose print visit quit help)
"*Non-nil value causes VM to provide a toolbar interface.
Value should be a list of symbols and integers that will determine which
-toolbar buttons will appear and in what order. Valid symbol
-value within the list are:
-
- autofile
- compose
- delete/undelete
- file
- getmail
- help
- mime
- next
- previous
- print
- quit
- reply
- visit
- nil
+toolbar buttons will appear and in what order.
If nil appears in the list, it should appear exactly once. All
buttons after nil in the list will be displayed flushright in
@@ -2942,10 +3191,8 @@ If a positive integer N appears in the list, a blank space will
appear in the toolbar with a width of N pixels for top/bottom
toolbars, and a height of N for left/right toolbars.
-This variable only has meaning under XEmacs 19.12 and beyond, and under
-Emacs 21 and beyond.
-
See also `vm-toolbar-orientation' to control where the toolbar is placed."
+ :group 'vm
:type '(repeat (choice integer
(const autofile)
(const compose)
@@ -2959,24 +3206,34 @@ See also `vm-toolbar-orientation' to control where the toolbar is placed."
(const print)
(const quit)
(const reply)
+ (const followup)
+ (const forward)
(const visit)
(const nil))))
-(defcustom vm-toolbar-orientation 'left
+(defcustom vm-toolbar-orientation 'top
"*Value is a symbol that specifies where the VM toolbar is located.
Legal values are `left', `right' `top' and `bottom'. Any other
value will be interpreted as `top'.
This variable only has meaning under XEmacs 19.12 and beyond.
Under FSF Emacs 21 the toolbar is always at the top of the frame."
+ :group 'vm
:type '(choice (const left)
(const right)
(const top)
(const bottom)))
-(defcustom vm-toolbar-pixmap-directory vm-image-directory
+(defun vm-toolbar-pixmap-directory ()
+ (or vm-toolbar-pixmap-directory
+ (if (string-match "'--with-gtk'" system-configuration-options)
+ (concat (vm-pixmap-directory) "/gtk")
+ (vm-pixmap-directory))))
+
+(defcustom vm-toolbar-pixmap-directory nil
"*Value specifies the directory VM should find its toolbar pixmaps."
- :type 'directory)
+ :group 'vm
+ :type '(choice directory (const :tag "Automatic" nil)))
(defcustom vm-toolbar nil
"*Non-nil value should be a list of toolbar button descriptors.
@@ -2989,9 +3246,10 @@ list based on the value of `vm-use-toolbar'. `vm-use-toolbar' still
must be set non-nil for a toolbar to appear, however.
Consider this variable experimental; it may not be supported forever."
+ :group 'vm
:type 'sexp)
-(defcustom vm-use-menus
+(defcustom vm-use-menus
(nconc (list 'folder 'motion 'send 'mark 'label 'sort 'virtual)
(cond ((string-match ".*-.*-\\(win95\\|nt\\)" system-configuration)
nil)
@@ -3030,6 +3288,7 @@ menubar.
This variable only has meaning in Emacs environments where menus
are provided, which usually means Emacs has to be running under a
window system."
+ :group 'vm
:type '(choice (const 1)
(repeat (choice (const dispose)
(const emacs)
@@ -3047,6 +3306,7 @@ window system."
(defcustom vm-popup-menu-on-mouse-3 t
"*Non-nil value means VM should provide context-sensitive menus on mouse-3.
A nil value means VM should not change the binding of mouse-3."
+ :group 'vm
:type 'boolean)
(defcustom vm-warp-mouse-to-new-frame nil
@@ -3055,6 +3315,7 @@ This is useful to give the new frame the focus under some window managers
that randomly place newly created frames.
Nil means don't move the mouse cursor."
+ :group 'vm
:type 'boolean)
(defcustom vm-url-retrieval-methods '(lynx wget fetch curl w3m)
@@ -3077,6 +3338,7 @@ retrieval method.
If `vm-url-retrieval-methods' value is nil, VM will not try to
use any URL retrieval methods."
+ :group 'vm
:type '(set (const lynx)
(const wget)
(const w3m)
@@ -3127,6 +3389,7 @@ for Mosaic. The advantage of using them is that they will display
an URL using an existing Mosaic or Netscape process, if possible.
A nil value means VM should not enable URL passing to browsers."
+ :group 'vm
:type '(choice (const nil)
function
string))
@@ -3135,11 +3398,13 @@ A nil value means VM should not enable URL passing to browsers."
"*List of command line flags passed to the command named by
`vm-url-browser'. VM uses `vm-url-browser' to display URLs
in messages when you click on them."
+ :group 'vm
:type '(repeat string))
(defcustom vm-highlight-url-face 'bold-italic
"*Non-nil value should be a face to use display URLs found in messages.
Nil means don't highlight URLs."
+ :group 'vm-faces
:type 'symbol)
(defcustom vm-url-search-limit 12000
@@ -3150,11 +3415,13 @@ will search from the beginning of the message to a point
`vm-url-search-limit' / 2 characters into the message. Then VM will
search from a point `vm-url-search-limit' / 2 characters from the
end of the message to the end of message."
+ :group 'vm
:type '(choice (const nil) integer))
(defcustom vm-display-xfaces nil
"*Non-nil means display images as specified in X-Face headers.
This requires at least XEmacs 19.12 with native xface support compiled in."
+ :group 'vm
:type 'boolean)
(defcustom vm-startup-with-summary t
@@ -3168,12 +3435,14 @@ are N or more messages.
A negative numeric value -N means only generate a summary if
there are N or less messages."
+ :group 'vm
:type '(choice (const t) (const nil) integer))
(defcustom vm-follow-summary-cursor t
"*Non-nil value causes VM to select the message under the cursor in the
summary window before executing commands that operate on the current message.
This occurs only when the summary buffer window is the selected window."
+ :group 'vm
:type 'boolean)
(defcustom vm-jump-to-new-messages t
@@ -3182,6 +3451,7 @@ whenever such messages arrive in a folder or the first time a
folder is visited.
See also `vm-jump-to-unread-messages'."
+ :group 'vm
:type 'boolean)
(defcustom vm-jump-to-unread-messages t
@@ -3195,6 +3465,7 @@ setting of this variable. So if there are unread messages and
new messages VM will jump to the first new message, even if an
unread message appears before it in the folder, provided
`vm-jump-to-new-messages' is non-nil."
+ :group 'vm
:type 'boolean)
(defcustom vm-skip-deleted-messages t
@@ -3203,6 +3474,7 @@ deleted messages. A value of t causes deleted messages to always be skipped.
A value that is not nil and not t causes deleted messages to be skipped only
if there are other messages that are not flagged for deletion in the desired
direction of motion."
+ :group 'vm
:type '(choice (const nil) (const t) (const skip-if-some-undeleted)))
(defcustom vm-skip-read-messages nil
@@ -3211,6 +3483,7 @@ messages that have already been read, in favor of new or unread messages.
A value of t causes read messages to always be skipped. A value that is
not nil and not t causes read messages to be skipped only if there are
unread messages in the desired direction of motion."
+ :group 'vm
:type '(choice (const nil) (const t) (const skip-if-some-undeleted)))
(defcustom vm-move-after-deleting nil
@@ -3220,6 +3493,7 @@ past the deleted messages. A value of t means motion should
honor the value of `vm-circular-folders'. A value that is not t
and not nil means that motion should be done as if
`vm-circular-folders' is set to nil."
+ :group 'vm
:type '(choice (const nil) (const t) (const skip-if-some-undeleted)))
(defcustom vm-move-after-undeleting nil
@@ -3229,6 +3503,7 @@ past the undeleted messages. A value of t means motion should
honor the value of `vm-circular-folders'. A value that is not t
and not nil means that motion should be done as if
`vm-circular-folders' is set to nil."
+ :group 'vm
:type '(choice (const nil) (const t) (const skip-if-some-undeleted)))
(defcustom vm-move-after-killing nil
@@ -3238,22 +3513,26 @@ to move past the deleted messages. A value of t means motion
should honor the value of `vm-circular-folders'. A value that is
not t and not nil means that motion should be done as if
`vm-circular-folders' is set to nil."
+ :group 'vm
:type '(choice (const nil) (const t) (const skip-if-some-undeleted)))
(defcustom vm-delete-after-saving nil
"*Non-nil value causes VM automatically to mark messages for deletion
after successfully saving them to a folder."
+ :group 'vm
:type 'boolean)
(defcustom vm-delete-after-archiving nil
"*Non-nil value causes VM automatically to mark messages for deletion
after successfully auto-archiving them with the `vm-auto-archive-messages'
command."
+ :group 'vm
:type 'boolean)
(defcustom vm-delete-after-bursting nil
"*Non-nil value causes VM automatically to mark a message for deletion
after it has been successfully burst by the `vm-burst-digest' command."
+ :group 'vm
:type 'boolean)
(defcustom vm-circular-folders nil
@@ -3275,11 +3554,13 @@ entirety.
A value that is not nil and not t causes only VM's movement commands to
consider folders circular. Saves, deletes and undelete commands will
behave the same as if the value is nil."
+ :group 'vm
:type '(choice (const nil) (const t) (const for-movement-only)))
(defcustom vm-search-using-regexps nil
"*Non-nil value causes VM's search command to interpret user input as a
regular expression instead of as a literal string."
+ :group 'vm
:type 'boolean)
(defcustom vm-move-messages-physically nil
@@ -3288,15 +3569,18 @@ of a folder to always move the physical messages involved and not
just change the presentation order. Nil means that commands just
change the order in which VM displays messages and leave the
folder itself undisturbed."
+ :group 'vm
:type 'boolean)
(defcustom vm-edit-message-mode 'text-mode
"*Major mode to use when editing messages in VM."
+ :group 'vm
:type 'function)
(defvar lpr-command)
(defcustom vm-print-command (if (boundp 'lpr-command) lpr-command "lpr")
"*Command VM uses to print messages."
+ :group 'vm
:type '(choice string (const nil)))
(defvar lpr-switches)
@@ -3304,6 +3588,7 @@ folder itself undisturbed."
"*List of command line flags passed to the command named by
`vm-print-command'. VM uses `vm-print-command' to print
messages."
+ :group 'vm
:type '(repeat string))
(defcustom vm-berkeley-mail-compatibility
@@ -3311,6 +3596,7 @@ messages."
"*Non-nil means to read and write BSD Mail(1) style Status: headers.
This makes sense if you plan to use VM to read mail archives created by
Mail."
+ :group 'vm
:type 'boolean)
(defcustom vm-strip-reply-headers nil
@@ -3319,6 +3605,7 @@ from the headers generated in reply messages. If you use the \"fakemail\"
program as distributed with Emacs, you probably want to set this variable
to t, because as of Emacs v18.52 \"fakemail\" could not handle unstripped
headers."
+ :group 'vm
:type 'boolean)
(defcustom vm-select-new-message-hook nil
@@ -3327,6 +3614,7 @@ attribute is made to be the current message. When the hooks are run, the
current buffer will be the folder containing the message and the
start and end of the message will be bracketed by (point-min) and
(point-max)."
+ :group 'vm
:type 'hook)
(defcustom vm-select-unread-message-hook nil
@@ -3335,6 +3623,7 @@ attribute is made to be the current message. When the hooks are run, the
current buffer will be the folder containing the message and the
start and end of the message will be bracketed by (point-min) and
(point-max)."
+ :group 'vm
:type 'hook)
(defcustom vm-select-message-hook nil
@@ -3342,7 +3631,16 @@ start and end of the message will be bracketed by (point-min) and
is made to be the current message. When the hooks are run, the
current buffer will be the folder containing the message and the
start and end of the message will be bracketed by (point-min) and
-(point-max)."
+ (point-max)."
+ :group 'vm
+ :type 'hook)
+
+(defcustom vm-showing-message-hook nil
+ "*List of hook functions called every time a message is showed.
+When the hooks are run, the current buffer will be the folder containing the
+message and the start and end of the message will be bracketed by (point-min)
+and (point-max)."
+ :group 'vm
:type 'hook)
(defcustom vm-arrived-message-hook nil
@@ -3352,12 +3650,14 @@ the system mail spool, or from another folder with
hooks are run, the current buffer will be the folder containing
the message and the start and end of the message will be
bracketed by (point-min) and (point-max)."
+ :group 'vm
:type 'hook)
(defcustom vm-spooled-mail-waiting-hook nil
"*List of functions called when VM first notices mail is spooled
for a folder. The folder buffer will be current when the hooks are
run."
+ :group 'vm
:type 'hook)
(defcustom vm-arrived-messages-hook nil
@@ -3368,6 +3668,7 @@ hooks are run, the new messages will have already been added to
the message list but may not yet appear in the summary.
Also, the current buffer will be the folder containing
the messages."
+ :group 'vm
:type 'hook)
(defcustom vm-reply-hook nil
@@ -3375,6 +3676,7 @@ the messages."
composition buffer has been created for a reply. VM runs this
hook and then runs `vm-mail-mode-hook' before leaving the user in
the Mail mode buffer."
+ :group 'vm
:type 'hook)
(defcustom vm-forward-message-hook nil
@@ -3382,6 +3684,7 @@ the Mail mode buffer."
composition buffer has been created to forward a message. VM
runs this hook and then runs `vm-mail-mode-hook' before leaving the
user in the Mail mode buffer."
+ :group 'vm
:type 'hook)
(defcustom vm-resend-bounced-message-hook nil
@@ -3389,6 +3692,7 @@ user in the Mail mode buffer."
composition buffer has been created to resend a bounced message.
VM runs this hook and then runs `vm-mail-mode-hook' before leaving
the user in the Mail mode buffer."
+ :group 'vm
:type 'hook)
(defcustom vm-resend-message-hook nil
@@ -3396,6 +3700,7 @@ the user in the Mail mode buffer."
composition buffer has been created to resend a message.
VM runs this hook and then runs `vm-mail-mode-hook' before leaving
the user in the Mail mode buffer."
+ :group 'vm
:type 'hook)
(defcustom vm-send-digest-hook nil
@@ -3403,6 +3708,7 @@ the user in the Mail mode buffer."
composition buffer has been created to send a digest.
VM runs this hook and then runs `vm-mail-mode-hook' before leaving
the user in the Mail mode buffer."
+ :group 'vm
:type 'hook)
(defcustom vm-mail-hook nil
@@ -3411,16 +3717,19 @@ composition buffer has been created to send a non specialized
message, i.e. a message that is not a reply, forward, digest,
etc. VM runs this hook and then runs `vm-mail-mode-hook' before
leaving the user in the Mail mode buffer."
+ :group 'vm
:type 'hook)
(defcustom vm-summary-update-hook nil
"*List of hook functions called just after VM updates an existing
entry a folder summary."
+ :group 'vm
:type 'hook)
(defcustom vm-summary-redo-hook nil
"*List of hook functions called just after VM adds or deletes
entries from a folder summary."
+ :group 'vm
:type 'hook)
(defcustom vm-visit-folder-hook nil
@@ -3428,6 +3737,7 @@ entries from a folder summary."
It doesn't matter if the folder buffer already exists, this hook
is run each time `vm' or `vm-visit-folder' is called interactively.
It is NOT run after `vm-mode' is called."
+ :group 'vm
:type 'hook)
(defcustom vm-retrieved-spooled-mail-hook nil
@@ -3437,51 +3747,60 @@ hooks are run, the messages have been added to the folder buffer
but not the message list or summary. When the hooks are run, the
current buffer will be the folder where the messages were
incorporated."
+ :group 'vm
:type 'hook)
(defcustom vm-edit-message-hook nil
"*List of hook functions to be run just before a message is edited.
This is the last thing `vm-edit-message' does before leaving the user
in the edit buffer."
+ :group 'vm
:type 'hook)
(defcustom vm-mail-mode-hook nil
"*List of hook functions to be run after a Mail mode
composition buffer has been created. This is the last thing VM
does before leaving the user in the Mail mode buffer."
+ :group 'vm
:type 'hook)
(defcustom vm-mode-hook nil
"*List of hook functions to run when a buffer enters `vm-mode'.
These hook functions should generally be used to set key bindings
and local variables."
+ :group 'vm
:type 'hook)
(defcustom vm-mode-hooks nil
"*Old name for `vm-mode-hook'.
Supported for backward compatibility.
You should use the new name."
+ :group 'vm
:type 'hook)
(defcustom vm-summary-mode-hook nil
"*List of hook functions to run when a VM summary buffer is created.
The current buffer will be that buffer when the hooks are run."
+ :group 'vm
:type 'hook)
(defcustom vm-summary-mode-hooks nil
"*Old name for `vm-summary-mode-hook'.
Supported for backward compatibility.
You should use the new name."
+ :group 'vm
:type 'hook)
(defcustom vm-folders-summary-mode-hook nil
"*List of hook functions to run when a VM folders summary buffer is created.
The current buffer will be that buffer when the hooks are run."
+ :group 'vm
:type 'hook)
(defcustom vm-virtual-mode-hook nil
"*List of hook functions to run when a VM virtual folder buffer is created.
The current buffer will be that buffer when the hooks are run."
+ :group 'vm
:type 'hook)
(defcustom vm-presentation-mode-hook nil
@@ -3489,16 +3808,19 @@ The current buffer will be that buffer when the hooks are run."
The current buffer will be the new presentation buffer when the hooks are run.
Presentation buffers are used to display messages when some type of decoding
must be done to the message to make it presentable. E.g. MIME decoding."
+ :group 'vm
:type 'hook)
(defcustom vm-quit-hook nil
"*List of hook functions to run when you quit VM.
This applies to any VM quit command."
+ :group 'vm
:type 'hook)
(defcustom vm-summary-pointer-update-hook nil
"*List of hook functions to run when the VM summary pointer is updated.
When the hooks are run, the current buffer will be the summary buffer."
+ :group 'vm
:type 'hook)
(defcustom vm-display-buffer-hook nil
@@ -3510,6 +3832,7 @@ window.
If you use display hooks, you should not use VM's builtin window
configuration system as the result is likely to be confusing."
+ :group 'vm
:type 'hook)
(defcustom vm-undisplay-buffer-hook nil
@@ -3522,18 +3845,21 @@ the display. The hook functions should not kill the buffer.
If you use undisplay hooks, you should not use VM's builtin
window configuration system as the result is likely to be
confusing."
+ :group 'vm
:type 'hook)
(defcustom vm-iconify-frame-hook nil
"*List of hook functions that are run whenever VM iconifies a frame."
+ :group 'vm
:type 'hook)
(defcustom vm-menu-setup-hook nil
"*List of hook functions that are run just after all menus are initialized."
+ :group 'vm
:type 'hook)
(defcustom vm-mime-display-function nil
- "*If non-nil, this should name a function to be called inside
+ "*If non-nil, this should name a function to be called inside
`vm-decode-mime-message' to do the MIME display the current
message. The function is called with no arguments, and at the
time of the call the current buffer will be the `presentation'
@@ -3542,14 +3868,26 @@ for the display of MIME messages. A copy of the current message
will be in the presentation buffer at that time. The normal work
that `vm-decode-mime-message' would do is not done, because this
function is expected to subsume all of it."
+ :group 'vm
:type 'function)
+(defcustom vm-mime-deleted-object-label "[Deleted %f (%d;%t)]\n"
+ "*The label that will be inserted instead of the original mime object.
+See `vm-mime-compile-format-1' for valid format specifiers."
+ :group 'vm
+ :type 'string)
+
+(defcustom vm-mime-show-alternatives nil
+ "*Show alternative for multipart/alternative parts."
+ :group 'vm
+ :type 'boolean)
+
(defcustom vm-imap-session-preauth-hook nil
"*List of hook functions to call to generate an preauthenticated
IMAP session process. This hook is only run if the
authentication method for the IMAP mailbox is ``preauth''. Each
hook is called with five arguments: HOST, PORT, MAILBOX, USER,
-PASSWORD. (See the documentation for vm-spool-files to find out
+PASSWORD. (See the documentation for `vm-spool-files' to find out
about these arguments.) It is the responsibility of the hook
function to create an Emacs process whose input/output streams
are connected to an authenticated IMAP session, and to return
@@ -3561,6 +3899,7 @@ At the time the hook is run, the current buffer will be the
buffer any created process should be associated with. (The BUFFER
argument to start-process or open-network-stream should be
(current-bfufer).)"
+ :group 'vm
:type 'hook)
(defcustom vm-mail-send-hook nil
@@ -3568,6 +3907,7 @@ argument to start-process or open-network-stream should be
The hooks are run after confirming that you want to send the
message (see `vm-confirm-mail-send') but before MIME encoding and
FCC processing."
+ :group 'vm
:type 'hook)
(defvar mail-yank-hooks nil
@@ -3590,17 +3930,20 @@ text as modified.
If this hook is entirely empty (nil), a default action is taken
instead of no action."
+ :group 'vm
:type 'hook)
(defcustom mail-default-headers nil
"*A string containing header lines, to be inserted in outgoing messages.
It is inserted before you edit the message,
so you can edit or delete these lines."
+ :group 'vm
:type '(choice (const nil) string))
(defcustom mail-signature nil
"*Text inserted at end of mail buffer when a message is initialized.
If t, it means to insert the contents of the file `~/.signature'."
+ :group 'vm
:type '(choice (const nil) (const t) string))
(defcustom vm-rename-current-buffer-function nil
@@ -3609,6 +3952,7 @@ Value should be something that can be passed to `funcall'. If
this variable is non-nil, VM will use this function instead of
its own buffer renaming code. The buffer to be renamed will be
the current buffer when the function is called."
+ :group 'vm
:type 'function)
(defvar mode-popup-menu nil
@@ -3623,94 +3967,157 @@ program distributed with Emacs. If you use another program, it must
accept as its last two arguments the spool file (or maildrop) from which
mail is retrieved, and the local file where the retrieved mail
should be stored."
+ :group 'vm
:type 'string)
(defcustom vm-movemail-program-switches nil
"*List of command line flags to pass to the movemail program
named by `vm-movemail-program'."
+ :group 'vm
:type '(repeat string))
(defcustom vm-netscape-program "netscape"
"*Name of program to use to run Netscape.
`vm-mouse-send-url-to-netscape' uses this."
+ :group 'vm
:type 'string)
(defcustom vm-netscape-program-switches nil
"*List of command line switches to pass to Netscape."
+ :group 'vm
+ :type '(repeat string))
+
+(defcustom vm-opera-program "opera"
+ "*Name of program to use to run Opera.
+`vm-mouse-send-url-to-opera' uses this."
+ :group 'vm
+ :type 'string)
+
+(defcustom vm-opera-program-switches nil
+ "*List of command line switches to pass to Opera."
+ :group 'vm
+ :type '(repeat string))
+
+(defcustom vm-mozilla-program "mozilla"
+ "*Name of program to use to run Mozilla.
+`vm-mouse-send-url-to-mozilla' uses this."
+ :group 'vm
+ :type 'string)
+
+(defcustom vm-mozilla-program-switches nil
+ "*List of command line switches to pass to Mozilla."
+ :group 'vm
:type '(repeat string))
(defcustom vm-mosaic-program "Mosaic"
"*Name of program to use to run Mosaic.
`vm-mouse-send-url-to-mosaic' uses this."
+ :group 'vm
:type 'string)
(defcustom vm-mosaic-program-switches nil
"*List of command line switches to pass to Mosaic."
+ :group 'vm
:type '(repeat string))
(defcustom vm-mmosaic-program "mMosaic"
"*Name of program to use to run mMosaic.
`vm-mouse-send-url-to-mosaic' uses this."
+ :group 'vm
:type 'string)
(defcustom vm-mmosaic-program-switches nil
"*List of command line switches to pass to mMosaic."
+ :group 'vm
:type '(repeat string))
(defcustom vm-konqueror-program "konqueror"
"*Name of program to use to run Konqueror.
`vm-mouse-send-url-to-konqueror' uses this."
+ :group 'vm
:type 'string)
(defcustom vm-konqueror-program-switches nil
"*List of command line switches to pass to Konqueror."
+ :group 'vm
:type '(repeat string))
(defcustom vm-konqueror-client-program "kfmclient"
- "*Name of program to use to issue requests to Konqueror.
+ "*Name of program to use to issue requests to Konqueror.
`vm-mouse-send-url-to-konqueror' uses this."
+ :group 'vm
:type 'string)
(defcustom vm-konqueror-client-program-switches nil
"*List of command line switches to pass to Konqueror client."
+ :group 'vm
+ :type '(repeat string))
+
+(defcustom vm-firefox-program "firefox"
+ "*Name of program to use to run Mozilla Firefox.
+`vm-mouse-send-url-to-firefox' uses this."
+ :group 'vm
+ :type 'string)
+
+(defcustom vm-firefox-program-switches nil
+ "*List of command line switches to pass to Mozilla Firefox."
+ :group 'vm
+ :type '(repeat string))
+
+(defcustom vm-firefox-client-program "firefox"
+ "*Name of program to use to issue requests to Mozilla Firefox.
+`vm-mouse-send-url-to-firefox' uses this."
+ :group 'vm
+ :type 'string)
+
+(defcustom vm-firefox-client-program-switches '("-remote")
+ "*List of command line switches to pass to Mozilla Firefox client."
+ :group 'vm
:type '(repeat string))
(defcustom vm-wget-program "wget"
"*Name of program to use to run wget.
This is used to retrieve URLs."
+ :group 'vm
:type 'string)
(defcustom vm-w3m-program "w3m"
"*Name of program to use to run w3m.
This is used to retrieve URLs."
+ :group 'vm
:type 'string)
(defcustom vm-fetch-program "fetch"
"*Name of program to use to run fetch.
This is used to retrieve URLs. Fetch is part of the standard
FreeBSD installation."
+ :group 'vm
:type 'string)
(defcustom vm-curl-program "curl"
"*Name of program to use to run curl.
This is used to retrieve URLs."
+ :group 'vm
:type 'string)
(defcustom vm-lynx-program "lynx"
"*Name of program to use to run lynx.
This is used to retrieve URLs."
+ :group 'vm
:type 'string)
(defcustom vm-grep-program "grep"
"*Name of program to use to run grep.
This is used to count message separators in folders.
Set this to nil and VM will not use it."
+ :group 'vm
:type '(choice string (const nil)))
(defcustom vm-stunnel-program "stunnel"
"*Name of program to use to run stunnel.
This is used to make SSL connections to POP and IMAP servers that
support SSL. Set this to nil and VM will not use it."
+ :group 'vm
:type '(choice string (const nil)))
(defcustom vm-stunnel-program-switches nil
@@ -3720,6 +4127,7 @@ and know that you need to change something to get stunnel working.
This variable is ignored if you're running stunnel version 4 or
later versions, since those versions of stunnel are configurable
only with a configuration file."
+ :group 'vm
:type '(list string))
(defcustom vm-stunnel-program-additional-configuration-file nil
@@ -3738,6 +4146,7 @@ name of that file.
This variable is ignored if you're running stunnel versions prior
to version 4 as VM uses command line argument to control stunnel
in those cases."
+ :group 'vm
:type 'string)
(defcustom vm-stunnel-random-data-method 'generate
@@ -3757,16 +4166,19 @@ tells VM to generate the random data.
A nil value tells VM to do nothing and let stunnel find the data
if it can."
+ :group 'vm
:type '(choice (const nil) (const generate)))
(defcustom vm-ssh-program "ssh"
"*Name of program to use to run SSH.
This is used to build an SSH tunnel to remote POP and IMAP servers.
Set this to nil and VM will not use it."
+ :group 'vm
:type '(choice string (const nil)))
(defcustom vm-ssh-program-switches nil
"*List of command line switches to pass to SSH."
+ :group 'vm
:type '(repeat string))
(defcustom vm-ssh-remote-command "echo ready; sleep 15"
@@ -3774,6 +4186,7 @@ Set this to nil and VM will not use it."
This command must generate one line of output and then
sleep long enough for VM to open a port-forwarded connection.
The default should work on UNIX systems."
+ :group 'vm
:type 'string)
(defcustom vm-uncompface-program (and vm-fsfemacs-p
@@ -3783,6 +4196,7 @@ The default should work on UNIX systems."
Or if the program version is new enough, it will be called with
-X to produce XBM data. This program is needed to support he
display of X-Faces under Emacs 21."
+ :group 'vm
:type '(choice string (const nil)))
(defcustom vm-icontopbm-program (and vm-fsfemacs-p
@@ -3792,6 +4206,7 @@ display of X-Faces under Emacs 21."
This program is needed to support the display of X-Faces under
Emacs 21 if the uncompface program can't convert X-Face image
data to XBM data."
+ :group 'vm
:type '(choice string (const nil)))
(defvar vm-uncompface-accepts-dash-x
@@ -3814,6 +4229,7 @@ An older stunnel version used command line arguments instead.")
(and (file-directory-p "C:\\") "C:\\")
"/tmp")
"*Name of a directory where VM can put temporary files."
+ :group 'vm
:type 'directory)
(defcustom vm-tale-is-an-idiot nil
@@ -3821,6 +4237,7 @@ An older stunnel version used command line arguments instead.")
headers of outbound mail for lines that don't end with a
comma. If such a line is found, an error is signaled and the
mail is not sent."
+ :group 'vm
:type 'boolean)
(defun vm-octal (n)
@@ -3836,9 +4253,30 @@ mail is not sent."
(defcustom vm-default-folder-permission-bits (vm-octal 600)
"*Default UNIX permission bits for newly created folders."
+ :group 'vm
:type 'integer)
-(defconst vm-maintainer-address "bug-vm@wonderworks.com"
+(defcustom vm-coding-system-priorities '(iso-8859-1 iso-8859-15 utf-8)
+ "*List of coding systems for VM-MIME to use, in order of preference."
+ :group 'vm
+ :type 'sexp)
+
+(defcustom vm-mime-ucs-list '(utf-8 iso-2022-jp ctext escape-quoted)
+ "*List of coding systems that can encode all characters known to emacs."
+ :group 'vm
+ :type 'sexp)
+
+(defcustom vm-drop-buffer-name-chars nil
+ "*Regexp used to replace chars in composition buffer names.
+If non-nil buffer names will be cleaned to avoid save problems.
+If t, 8bit chars are replaced by a \"_\", if a string it should
+be a regexp matching all chars to be replaced by a \"_\"."
+ :group 'vm
+ :type '(choice (const :tag "Disabled" nil)
+ (regexp :tag "8bit chars" "[^\x0-\x80]")
+ (regexp :tag "Custom regexp")))
+
+(defconst vm-maintainer-address "hack@robf.de"
"Where to send VM bug reports.")
(defvar vm-mode-map
@@ -3892,7 +4330,10 @@ mail is not sent."
(define-key map "w" 'vm-save-message-sans-headers)
(define-key map "A" 'vm-auto-archive-messages)
(define-key map "S" 'vm-save-folder)
- (define-key map "|" 'vm-pipe-message-to-command)
+ (define-key map "||" 'vm-pipe-message-to-command)
+ (define-key map "|d" 'vm-pipe-message-to-command-discard-output)
+ (define-key map "|s" 'vm-pipe-messages-to-command)
+ (define-key map "|n" 'vm-pipe-messages-to-command-discard-output)
(define-key map "###" 'vm-expunge-folder)
(cond ((fboundp 'set-keymap-prompt)
(set-keymap-prompt (lookup-key map "#")
@@ -3914,6 +4355,7 @@ mail is not sent."
(define-key map "\M-s" 'vm-isearch-forward)
(define-key map "=" 'vm-summarize)
(define-key map "L" 'vm-load-init-file)
+ (define-key map "\M-l" 'vm-edit-init-file)
(define-key map "l" (make-sparse-keymap))
(define-key map "la" 'vm-add-message-labels)
(define-key map "le" 'vm-add-existing-message-labels)
@@ -3929,7 +4371,7 @@ mail is not sent."
(define-key map "M" (make-sparse-keymap))
(define-key map "MN" 'vm-next-command-uses-marks)
(define-key map "Mn" 'vm-next-command-uses-marks)
- (define-key map "MM" 'vm-mark-message)
+ (define-key map "MM" 'vm-mark-message)
(define-key map "MU" 'vm-unmark-message)
(define-key map "Mm" 'vm-mark-all-messages)
(define-key map "Mu" 'vm-clear-all-marks)
@@ -3992,10 +4434,11 @@ mail is not sent."
(defvar vm-folders-summary-mode-map vm-mode-map
"Keymap for VM Folders Summary mode")
-(defvar vm-mail-mode-map
+(defvar vm-mail-mode-map
(let ((map (make-sparse-keymap)))
(define-key map "\C-c\C-v" vm-mode-map)
(define-key map "\C-c\C-p" 'vm-preview-composition)
+ (define-key map "\C-c\C-d" 'vm-postpone-message)
(define-key map "\C-c\C-e" 'vm-mime-encode-composition)
(define-key map "\C-c\C-a" 'vm-mime-attach-file)
(define-key map "\C-c\C-b" 'vm-mime-attach-buffer)
@@ -4018,7 +4461,7 @@ Its parent keymap is mail-mode-map.")
(cond ((fboundp 'set-keymap-name)
(set-keymap-name map 'vm-edit-message-map)))
map )
- "Keymap for the buffers created by VM's vm-edit-message command.")
+ "Keymap for the buffers created by VM's `vm-edit-message' command.")
(defvar vm-mime-reader-map
(let ((map (make-sparse-keymap)))
@@ -4340,16 +4783,21 @@ Its parent keymap is mail-mode-map.")
("vm-yank-message")
("vm-yank-message-other-folder")
))
+
(defconst vm-supported-sort-keys
'("date" "reversed-date"
"author" "reversed-author"
+ "full-name" "reversed-full-name"
"subject" "reversed-subject"
"recipients" "reversed-recipients"
"line-count" "reversed-line-count"
"byte-count" "reversed-byte-count"
+ "spam-score" "reversed-spam-score"
"physical-order" "reversed-physical-order"))
+
(defconst vm-supported-interactive-virtual-selectors
'(("any")
+ ("sexp")
("virtual-folder-member")
("header")
("label")
@@ -4386,6 +4834,7 @@ Its parent keymap is mail-mode-map.")
("unwritten")
("unedited")
("unmarked")))
+
(defconst vm-virtual-selector-function-alist
'((any . vm-vs-any)
(virtual-folder-member . vm-vs-virtual-folder-member)
@@ -4462,13 +4911,13 @@ Its parent keymap is mail-mode-map.")
the trailing part of a word that caused completion to fail, and retry
the completion with the resulting word.")
(defvar vm-minibuffer-completion-table nil
- "Completion table used by vm-minibuffer-complete-word.
+ "Completion table used by `vm-minibuffer-complete-word'.
Should be just a list of strings, not an alist or an obarray.")
(defvar vm-completion-auto-space t
- "Non-nil value means that vm-minibuffer-complete-word should automatically
+ "Non-nil value means that `vm-minibuffer-complete-word' should automatically
append a space to words that complete unambiguously.")
(defconst vm-attributes-vector-length 9)
-(defconst vm-cache-vector-length 25)
+(defconst vm-cache-vector-length 26)
(defconst vm-softdata-vector-length 20)
(defconst vm-location-data-vector-length 6)
(defconst vm-mirror-data-vector-length 6)
@@ -4573,17 +5022,20 @@ append a space to words that complete unambiguously.")
(defvar vm-reply-list nil)
(defvar vm-forward-list nil)
(defvar vm-redistribute-list nil)
-(defvar current-itimer nil)
-(defvar current-menubar nil)
-(defvar scrollbar-height nil)
-(defvar top-toolbar nil)
-(defvar top-toolbar-height nil)
-(defvar bottom-toolbar nil)
-(defvar bottom-toolbar-height nil)
-(defvar right-toolbar nil)
-(defvar right-toolbar-width nil)
-(defvar left-toolbar nil)
-(defvar left-toolbar-width nil)
+
+(eval-when-compile
+ (defvar current-itimer nil)
+ (defvar current-menubar nil)
+ (defvar scrollbar-height nil)
+ (defvar top-toolbar nil)
+ (defvar top-toolbar-height nil)
+ (defvar bottom-toolbar nil)
+ (defvar bottom-toolbar-height nil)
+ (defvar right-toolbar nil)
+ (defvar right-toolbar-width nil)
+ (defvar left-toolbar nil)
+ (defvar left-toolbar-width nil))
+
(defvar vm-fsfemacs-toolbar-installed-p nil)
;; this defvar matches the XEmacs one so it doesn't matter if VM
;; is loaded before highlight-headers.el
@@ -4755,7 +5207,7 @@ that has a match.")
("iso-8859-3" iso-8859-3)
("iso-8859-4" iso-8859-4)
("iso-8859-5" iso-8859-5)
- ("iso-8859-6" iso-8859-6)
+; ("iso-8859-6" iso-8859-6)
("iso-8859-7" iso-8859-7)
("iso-8859-8" iso-8859-8)
("iso-8859-9" iso-8859-9)
@@ -4848,8 +5300,10 @@ that has a match.")
("message/rfc822")
("message/news")
))
+
(defconst vm-mime-encoded-word-regexp
"=\\?\\([^?*]+\\)\\(\\*\\([^?*]+\\)\\)?\\?\\([BbQq]\\)\\?\\([^?]+\\)\\?=")
+
;; for MS-DOS and Windows NT
;; nil value means text file
;; t value means binary file
@@ -4865,8 +5319,50 @@ that has a match.")
(defvar vm-fsfemacs-cached-scroll-bar-width nil)
(defvar vm-update-composition-buffer-name-timer nil)
-(cond (vm-faked-defcustom
- (fmakunbound 'defcustom)
- (fmakunbound 'defgroup)))
+(defcustom vm-enable-addons '(check-recipients
+ check-for-empty-subject
+ encode-headers
+ take-action-on-attachment)
+ "*A list of addons to enable, t for all and nil to disable all.
+Most addons are from `vm-rfaddons-infect-vm'.
+
+You must restart VM after a change to cause any effects."
+ :group 'vm
+ :type '(set (const :tag "Enable faces in the summary buffer"
+ summary-faces)
+ (const :tag "Enable shrinking of multi-line headers to one line."
+ shrunken-headers)
+ (const :tag "Open a line when typing in quoted text"
+ open-line)
+ (const :tag "Check the recipients before sending a message"
+ check-recipients)
+ (const :tag "Check for an empty subject before sending a message"
+ check-for-empty-subject)
+ (const :tag "MIME encode headers before sending a message"
+ encode-headers)
+ (const :tag "Clean up subject prefixes before sending a message"
+ clean-subject)
+ (const :tag "Do not replace Date: header when sending a message"
+ fake-date)
+ (const :tag "Bind '.' on attachment buttons to 'vm-mime-take-action-on-attachment'"
+ take-action-on-attachment)
+ (const :tag "Bind 'C-c C-s' to `vm-mime-save-all-attachments'"
+ save-all-attachments)
+ (const :tag "Automatically save attachments of new messages"
+ auto-save-all-attachments)
+ (const :tag "Delete external attachments of a message when expunging it."
+ auto-delete-message-external-body)
+ (const :tag "Enable all addons" t)))
+
+(defcustom vm-disable-modes-before-encoding
+ '(auto-fill-mode font-lock-mode ispell-minor-mode flyspell-mode
+ abbrev-mode adaptive-fill-mode)
+ "*A list of minor modes to disable before encoding a message.
+These modes may slow down (font-lock and *spell) encoding and may
+cause trouble (abbrev-mode)."
+ :group 'vm
+ :type '(repeat symbol))
(provide 'vm-vars)
+
+;;; vm-vars.el ends here
diff --git a/lisp/vm-vcard.el b/lisp/vm-vcard.el
new file mode 100644
index 0000000..7c9eb73
--- /dev/null
+++ b/lisp/vm-vcard.el
@@ -0,0 +1,79 @@
+;;; vm-vcard.el --- vcard parsing and formatting routines for VM
+
+;; Copyright (C) 1997, 2000 Noah S. Friedman
+
+;; Author: Noah Friedman <friedman@splode.com>
+;; Maintainer: friedman@splode.com
+;; Keywords: extensions
+;; Created: 1997-10-03
+
+;; $Id: vm-vcard.el,v 1.6 2000/02/03 17:55:10 friedman Exp $
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, you can either send email to this
+;; program's maintainer or write to: The Free Software Foundation,
+;; Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+;;; Code:
+
+(require 'vcard)
+
+(and (string-lessp vcard-api-version "2.0")
+ (error "vm-vcard.el requires vcard API version 2.0 or later."))
+
+;;;###autoload
+(defvar vm-vcard-format-function nil
+ "*Function to use for formatting vcards; if nil, use default.")
+
+;;;###autoload
+(defvar vm-vcard-filter nil
+ "*Filter function to use for formatting vcards; if nil, use default.")
+
+;;;###autoload
+(defun vm-mime-display-internal-text/x-vcard (layout)
+ (let ((inhibit-read-only t)
+ (buffer-read-only nil))
+ (insert (vm-vcard-format-layout layout)))
+ t)
+
+(defun vm-vcard-format-layout (layout)
+ (let* ((beg (vm-mm-layout-body-start layout))
+ (end (vm-mm-layout-body-end layout))
+ (buf (if (markerp beg) (marker-buffer beg) (current-buffer)))
+ (raw (vm-vcard-decode (save-excursion
+ (set-buffer buf)
+ (save-restriction
+ (widen)
+ (buffer-substring beg end)))
+ layout))
+ (vcard-pretty-print-function (or vm-vcard-format-function
+ vcard-pretty-print-function)))
+ (vcard-pretty-print (vcard-parse-string raw vm-vcard-filter))))
+
+(defun vm-vcard-decode (string layout)
+ (let ((buf (generate-new-buffer " *vcard decoding*")))
+ (save-excursion
+ (set-buffer buf)
+ (insert string)
+ (vm-mime-transfer-decode-region layout (point-min) (point-max))
+ (setq string (buffer-substring (point-min) (point-max))))
+ (kill-buffer buf))
+ string)
+
+(defun vm-vcard-format-simple (vcard)
+ (concat "\n\n--\n" (vcard-format-sample-string vcard) "\n\n"))
+
+(provide 'vm-vcard)
+
+;;; vm-vcard.el ends here.
diff --git a/lisp/vm-version.el b/lisp/vm-version.el
new file mode 100755
index 0000000..dda9e0d
--- /dev/null
+++ b/lisp/vm-version.el
@@ -0,0 +1,170 @@
+;;; vm-version.el --- Version information about VM and the Emacs running VM.
+;;
+;; Copyright (C) Kyle E. Jones, Robert Widhopf-Fenk
+;; Copyright (C) 2003-2007 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+;;; Code:
+(defvar vm-version nil
+ "Version number of VM.
+Call `vm-version' instead of accessing this variable!")
+
+(defvar vm-version-info nil
+ "The exact version information for tarbundles.")
+
+(defun vm-version ()
+ "Return the value of the variable `vm-version'."
+ (interactive)
+ (unless vm-version
+ (save-excursion
+ (set-buffer (get-buffer-create " *vm-version*"))
+ (let* ((f (locate-library "vm"))
+ (d (file-name-directory f))
+ (b (get-buffer " *vm-version*"))
+ (bzrdir (expand-file-name ".bzr" (concat d "../")))
+ (bzr (and (file-exists-p bzrdir)
+ (if (functionp 'locate-file)
+ (or (locate-file "bzr.exe" exec-path)
+ (locate-file "bzr.bat" exec-path)
+ (locate-file "bzr" exec-path))
+ "bzr"))))
+ (setq default-directory d)
+ (erase-buffer)
+ (cond ((and bzr
+ (condition-case nil
+ (= 0 (call-process bzr nil b))
+ (error nil)))
+ (erase-buffer)
+ ;; get the current branch nick and revno from bzr
+ (call-process bzr nil b nil "--no-aliases" "--no-plugins" "nick")
+ (insert "-")
+ (call-process bzr nil b nil "--no-aliases" "--no-plugins" "revno"))
+ ((and (not bzr)
+ (locate-library "vm-revno")
+ (load-library "vm-revno"))
+ (insert vm-version))
+ (t
+ (insert "?bug?")
+ (message "ERROR: Cannot determine VM version!")
+ (sit-for 5)))
+ (goto-char (point-min))
+ (if (looking-at "vm-")
+ (replace-match ""))
+ ;; remove any whitespace
+ (while (re-search-forward "[\n\t\r ]+" (point-max) t)
+ (replace-match "")))
+ (setq vm-version (buffer-substring (point-min) (point-max)))))
+ vm-version)
+
+(defconst vm-xemacs-p
+ (featurep 'xemacs))
+(defconst vm-xemacs-mule-p
+ (and vm-xemacs-p (featurep 'mule)))
+(defconst vm-xemacs-file-coding-p
+ (and vm-xemacs-p (featurep 'file-coding)
+ ;; paranoia
+ (fboundp
+ 'set-buffer-file-coding-system)))
+(defconst vm-fsfemacs-p
+ (not vm-xemacs-p))
+(defconst vm-fsfemacs-mule-p
+ (and (not vm-xemacs-mule-p) (featurep 'mule)
+ (fboundp 'set-buffer-file-coding-system)))
+
+(defun vm-xemacs-p () vm-xemacs-p)
+(defun vm-xemacs-mule-p () vm-xemacs-mule-p)
+(defun vm-xemacs-file-coding-p () vm-xemacs-file-coding-p)
+(defun vm-fsfemacs-p () vm-fsfemacs-p)
+(defun vm-fsfemacs-mule-p () vm-fsfemacs-mule-p)
+
+(defun vm-mouse-fsfemacs-mouse-p ()
+ (and vm-fsfemacs-p
+ (fboundp 'set-mouse-position)))
+
+(defun vm-mouse-xemacs-mouse-p ()
+ (and vm-xemacs-p
+ (fboundp 'set-mouse-position)))
+
+(defun vm-menu-fsfemacs-menus-p ()
+ (and vm-fsfemacs-p
+ (fboundp 'menu-bar-mode)))
+
+(defun vm-menu-fsfemacs19-menus-p ()
+ (and vm-fsfemacs-p
+ (fboundp 'menu-bar-mode)
+ (= emacs-major-version 19)))
+
+(defun vm-menu-xemacs-menus-p ()
+ (and vm-xemacs-p
+ (fboundp 'set-buffer-menubar)))
+
+(defun vm-menu-can-eval-item-name ()
+ (and vm-xemacs-p
+ (fboundp 'check-menu-syntax)
+ (condition-case nil
+ (check-menu-syntax '("bar" ((identity "foo") 'ding t)))
+ (error nil))))
+
+(defun vm-multiple-frames-possible-p ()
+ (cond (vm-xemacs-p
+ (or (memq 'win (device-matching-specifier-tag-list))
+ (featurep 'tty-frames)))
+ (vm-fsfemacs-p
+ (fboundp 'make-frame))))
+
+(defun vm-mouse-support-possible-p ()
+ (cond (vm-xemacs-p
+ (featurep 'window-system))
+ (vm-fsfemacs-p
+ (fboundp 'track-mouse))))
+
+(defun vm-mouse-support-possible-here-p ()
+ (cond (vm-xemacs-p
+ (memq 'win (device-matching-specifier-tag-list)))
+ (vm-fsfemacs-p
+ (memq window-system '(x mac w32 win32)))))
+
+(defun vm-menu-support-possible-p ()
+ (cond (vm-xemacs-p
+ (featurep 'menubar))
+ (vm-fsfemacs-p
+ (fboundp 'menu-bar-mode))))
+
+(defun vm-toolbar-support-possible-p ()
+ (or (and vm-xemacs-p (featurep 'toolbar))
+ (and vm-fsfemacs-p (fboundp 'tool-bar-mode) (boundp 'tool-bar-map))))
+
+(defun vm-multiple-fonts-possible-p ()
+ (cond (vm-xemacs-p
+ (memq (device-type) '(x gtk mswindows)))
+ (vm-fsfemacs-p
+ (memq window-system '(x mac w32 win32)))))
+
+(defun vm-images-possible-here-p ()
+ (or (and vm-xemacs-p (memq (device-type) '(x gtk mswindows)))
+ (and vm-fsfemacs-p window-system
+ (or (fboundp 'image-type-available-p)
+ (and (stringp vm-imagemagick-convert-program)
+ (stringp vm-imagemagick-identify-program))))))
+
+(defun vm-image-type-available-p (type)
+ (if (fboundp 'image-type-available-p)
+ (image-type-available-p type)
+ (or (featurep type) (eq type 'xbm))))
+
+(provide 'vm-version)
+
+;;; vm-version.el ends here
diff --git a/vm-virtual.el b/lisp/vm-virtual.el
index a9acf43..1c8776b 100644
--- a/vm-virtual.el
+++ b/lisp/vm-virtual.el
@@ -1,22 +1,25 @@
-;;; Virtual folders for VM
-;;; Copyright (C) 1990-1997 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-virtual)
-
+;;; vm-virtual.el --- Virtual folders for VM
+;;
+;; Copyright (C) 1990-1997 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+;;; Code:
+
+;;;###autoload
(defun vm-build-virtual-message-list (new-messages &optional dont-finalize)
"Builds a list of messages matching the virtual folder definition
stored in the variable vm-virtual-folder-definition.
@@ -248,6 +251,7 @@ all the real folder buffers involved."
(setq vm-message-list new-message-list))
new-message-list ))))
+;;;###autoload
(defun vm-create-virtual-folder (selector &optional arg read-only name
bookmark)
"Create a new virtual folder from messages in the current folder.
@@ -287,6 +291,7 @@ Prefix arg means the new virtual folder should be visited read only."
(vm-menu-install-known-virtual-folders-menu)))
+;;;###autoload
(defun vm-apply-virtual-folder (name &optional read-only)
"Apply the selectors of a named virtual folder to the current folder
and create a virtual folder containing the selected messages.
@@ -324,6 +329,7 @@ Prefix arg means the new virtual folder should be visited read only."
(if vm-use-menus
(vm-menu-install-known-virtual-folders-menu)))
+;;;###autoload
(defun vm-create-virtual-folder-same-subject ()
(interactive)
(vm-follow-summary-cursor)
@@ -343,6 +349,7 @@ Prefix arg means the new virtual folder should be visited read only."
'sortable-subject subject nil
(format "%s %s %s" (buffer-name) 'subject displayed-subject) bookmark)))
+;;;###autoload
(defun vm-create-virtual-folder-same-author ()
(interactive)
(vm-follow-summary-cursor)
@@ -411,8 +418,9 @@ Prefix arg means the new virtual folder should be visited read only."
(if vm-virtual-mirror "mirrors" "does not mirror")
(if (cdr vm-real-buffers) "s" "")))
+;;;###autoload
(defun vm-virtual-help ()
- (interactive)
+(interactive)
(vm-display nil nil '(vm-virtual-help) '(vm-virtual-help))
(message "VV = visit, VX = apply selectors, VC = create, VM = toggle virtual mirror"))
@@ -496,16 +504,16 @@ Prefix arg means the new virtual folder should be visited read only."
(re-search-forward arg (vm-text-end-of (vm-real-message-of m)) t))))
(defun vm-vs-more-chars-than (m arg)
- (> (string-to-int (vm-su-byte-count m)) arg))
+ (> (string-to-number (vm-su-byte-count m)) arg))
(defun vm-vs-less-chars-than (m arg)
- (< (string-to-int (vm-su-byte-count m)) arg))
+ (< (string-to-number (vm-su-byte-count m)) arg))
(defun vm-vs-more-lines-than (m arg)
- (> (string-to-int (vm-su-line-count m)) arg))
+ (> (string-to-number (vm-su-line-count m)) arg))
(defun vm-vs-less-lines-than (m arg)
- (< (string-to-int (vm-su-line-count m)) arg))
+ (< (string-to-number (vm-su-line-count m)) arg))
(defun vm-vs-virtual-folder-member (m)
(vm-virtual-messages-of m))
@@ -535,6 +543,7 @@ Prefix arg means the new virtual folder should be visited read only."
(defun vm-vs-unmarked (m) (not (vm-mark-of m)))
(defun vm-vs-unedited (m) (not (vm-edited-flag m)))
+(put 'sexp 'vm-virtual-selector-clause "matching S-expression selector")
(put 'header 'vm-virtual-selector-clause "with header matching")
(put 'label 'vm-virtual-selector-clause "with label of")
(put 'text 'vm-virtual-selector-clause "with text matching")
@@ -553,6 +562,7 @@ Prefix arg means the new virtual folder should be visited read only."
"with less characters than")
(put 'more-lines-than 'vm-virtual-selector-clause "with more lines than")
(put 'less-lines-than 'vm-virtual-selector-clause "with less lines than")
+(put 'sexp 'vm-virtual-selector-arg-type 'string)
(put 'header 'vm-virtual-selector-arg-type 'string)
(put 'label 'vm-virtual-selector-arg-type 'label)
(put 'text 'vm-virtual-selector-arg-type 'string)
@@ -568,6 +578,7 @@ Prefix arg means the new virtual folder should be visited read only."
(put 'more-lines-than 'vm-virtual-selector-arg-type 'number)
(put 'less-lines-than 'vm-virtual-selector-arg-type 'number)
+;;;###autoload
(defun vm-read-virtual-selector (prompt)
(let (selector (arg nil))
(setq selector
@@ -592,12 +603,20 @@ Prefix arg means the new virtual folder should be visited read only."
vm-label-obarray)
nil)))))
(t (setq arg (read-string prompt))))))
- (or (fboundp (intern (concat "vm-vs-" (symbol-name selector))))
- (error "Invalid selector"))
- (list selector arg)))
+ (let ((real-selector
+ (if (eq selector 'sexp)
+ (let ((read-arg (read arg)))
+ (if (listp read-arg) read-arg (list read-arg)))
+ (list selector arg))))
+ (or (fboundp (intern (concat "vm-vs-"
+ (symbol-name (car real-selector)))))
+ (error "Invalid selector"))
+ real-selector)))
+
;; clear away links between real and virtual folders when
;; a vm-quit is performed in either type folder.
+;;;###autoload
(defun vm-virtual-quit ()
(save-excursion
(cond ((eq major-mode 'vm-virtual-mode)
@@ -688,6 +707,7 @@ Prefix arg means the new virtual folder should be visited read only."
(vm-update-summary-and-mode-line))
(setq bp (cdr bp))))))))
+;;;###autoload
(defun vm-virtual-save-folder (prefix)
(save-excursion
;; don't trust blindly, user might have killed some of
@@ -702,6 +722,7 @@ Prefix arg means the new virtual folder should be visited read only."
(vm-clear-modification-flag-undos)
(vm-update-summary-and-mode-line))
+;;;###autoload
(defun vm-virtual-get-new-mail ()
(save-excursion
;; don't trust blindly, user might have killed some of
@@ -723,6 +744,7 @@ Prefix arg means the new virtual folder should be visited read only."
(setq bp (cdr bp)))))
(vm-emit-totals-blurb))
+;;;###autoload
(defun vm-make-virtual-copy (m)
(widen)
(let ((virtual-buffer (current-buffer))
@@ -755,5 +777,9 @@ Prefix arg means the new virtual folder should be visited read only."
(vm-start-of real-m))))
(set-marker (vm-end-of m) (+ (vm-start-of m) (- (vm-end-of real-m)
(vm-start-of real-m))))))
-
(provide 'vm-virtual)
+
+;; now load vm-avirtual to avoid a loading loop
+(require 'vm-avirtual)
+
+;;; vm-virtual.el ends here
diff --git a/vm-window.el b/lisp/vm-window.el
index a97c113..b23eddc 100644
--- a/vm-window.el
+++ b/lisp/vm-window.el
@@ -1,22 +1,23 @@
-;;; Window management code for VM
-;;; Copyright (C) 1989-1997 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-window)
+;;; vm-window.el --- Window management code for VM
+;;
+;; Copyright (C) 1989-1997 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+;;; Code:
(defun vm-display (buffer display commands configs
&optional do-not-raise)
;; the clearinghouse VM display function.
@@ -230,6 +231,7 @@
(vm-maybe-delete-windows-or-frames-on nonexistent-summary)))
config )))
+;;;###autoload
(defun vm-save-window-configuration (tag)
"Name and save the current window configuration.
With this command you associate the current window setup with an
@@ -296,6 +298,7 @@ window configurations."
'edit)
(t buf))))
+;;;###autoload
(defun vm-delete-window-configuration (tag)
"Delete the configuration saved for a particular action.
This action will no longer have an associated window configuration.
@@ -325,6 +328,7 @@ The action will be read from the minibuffer."
(vm-store-window-configurations vm-window-configuration-file)
(message "%s configuration deleted" tag))
+;;;###autoload
(defun vm-apply-window-configuration (tag)
"Change the current window configuration to be one
associated with a particular action. The action will be read
@@ -697,3 +701,5 @@ Run the hooks in vm-iconify-frame-hook before doing so."
(fset 'vm-select-frame 'ignore)))
(provide 'vm-window)
+
+;;; vm-window.el ends here
diff --git a/vm-startup.el b/lisp/vm.el
index 4e58372..48aec34 100644
--- a/vm-startup.el
+++ b/lisp/vm.el
@@ -1,24 +1,39 @@
-;;; Entry points for VM
-;;; Copyright (C) 1994-1998, 2003 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-startup)
-
+;;; vm.el --- Entry points for VM
+;;
+;; Copyright (C) 1994-1998, 2003 Kyle E. Jones
+;; Copyright (C) 2003-2006 Robert Widhopf-Fenk
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License along
+;; with this program; if not, write to the Free Software Foundation, Inc.,
+;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+
+;;; History:
+;;
+;; This files was vm-startup.el!
+
+;;; Code:
(defvar enable-multibyte-characters)
+(require 'vm-version)
+
+;;;###autoload
+(defun vm-recover-folder ()
+"Recover the autosave file for the current folder."
+ (interactive)
+ (vm-select-folder-buffer)
+ (recover-file (buffer-file-name)))
+
;;;###autoload
(defun vm (&optional folder read-only access-method)
"Read mail under Emacs.
@@ -43,6 +58,9 @@ deleted messages. Use `###' to expunge deleted messages.
See the documentation for vm-mode for more information."
(interactive (list nil current-prefix-arg))
(vm-session-initialization)
+ ;; recursive call to vm in order to allow defadvice on its first call
+ (unless (boundp 'vm-session-beginning)
+ (vm folder read-only access-method))
;; set inhibit-local-variables non-nil to protect
;; against letter bombs.
;; set enable-local-variables to nil for newer Emacses
@@ -237,7 +255,7 @@ See the documentation for vm-mode for more information."
(default-value 'vm-folder-read-only)
(and first-time buffer-read-only)))
;; If this is not a VM mode buffer then some initialization
- ;; needs to be done
+ ;; needs to be done
(if first-time
(progn
(buffer-disable-undo (current-buffer))
@@ -353,9 +371,9 @@ See the documentation for vm-mode for more information."
;; Warn user about auto save file, if appropriate.
(if (and full-startup preserve-auto-save-file)
- (message
+ (message
(substitute-command-keys
- "Auto save file is newer; consider \\[recover-file]. FOLDER IS READ ONLY.")))
+ "Auto save file is newer; consider \\[vm-recover-folder]. FOLDER IS READ ONLY.")))
;; if we're not doing a full startup or if doing more would
;; trash the auto save file that we need to preserve,
;; stop here.
@@ -419,386 +437,15 @@ See the documentation for vm-mode for more information."
(defun vm-mode (&optional read-only)
"Major mode for reading mail.
-This is VM 7.19.
+This is VM.
+
+Use M-x vm-submit-bug-report to submit a bug report.
Commands:
- h - summarize folder contents
- H - summarize contents of all folders
- C-t - toggle threads display
-
- n - go to next message
- p - go to previous message
- N - like `n' but ignores skip-variable settings
- P - like `p' but ignores skip-variable settings
- M-n - go to next unread message
- M-p - go to previous unread message
- RET - go to numbered message (uses prefix arg or prompts in minibuffer)
- M-g - go to numbered message (uses prefix arg or prompts in minibuffer)
- TAB - go to last message seen
- ^ - go to parent of this message
- M-s - incremental search through the folder
-
- t - display hidden headers
- SPC - expose message body or scroll forward a page
- b - scroll backward a page
- < - go to beginning of current message
- > - go to end of current message
- [ - go to previous button
- ] - go to next button
- D - decode MIME if not already decoded. If already decoded,
- display all MIME objects as tags. If already displaying
- tags, show raw unecoded MIME>
-
- d - delete message, prefix arg deletes messages forward
- C-d - delete message, prefix arg deletes messages backward
- u - undelete
- k - delete all messages with same subject as the current message
-
- r - reply (only to the sender of the message)
- R - reply with included text from the current message
- M-r - extract and resend bounced message
- f - followup (reply to all recipients of message)
- F - followup with included text from the current message
- z - forward the current message
- m - send a message
- B - resend the current message to another user.
- c - continue composing the most recent message you were composing
-
- @ - digestify and mail entire folder contents (the folder is not modified)
- * - burst a digest into individual messages, and append and assimilate these
- messages into the current folder.
-
- G - sort messages by various keys
-
- g - get any new mail that has arrived in the system mailbox
- (new mail is appended to the disk and buffer copies of the
- primary inbox.)
- v - visit another mail folder
-
- e - edit the current message
- j - discard cached information about the current message
-
- s - save current message in a folder (appends if folder already exists)
- w - write current message to a file without its headers (appends if exists)
- S - save entire folder to disk, does not expunge
- A - save unfiled messages to their vm-auto-folder-alist specified folders
- ### - expunge deleted messages (without saving folder)
- q - quit VM, deleted messages are not expunged, folder is
- saved to disk if it is modified. new messages are changed
- to be flagged as just unread.
- x - exit VM with no change to the folder
-
- M N - use marks; the next vm command will affect only marked messages
- if it makes sense for the command to do so. These commands
- apply and remove marks to messages:
-
- M M - mark the current message
- M U - unmark the current message
- M m - mark all messages
- M u - unmark all messages
- M C - mark messages matched by a virtual folder selector
- M c - unmark messages matched by a virtual folder selector
- M T - mark thread tree rooted at the current message
- M t - unmark thread tree rooted at the current message
- M S - mark messages with the same subject as the current message
- M s - unmark messages with the same subject as the current message
- M A - mark messages with the same author as the current message
- M a - unmark messages with the same author as the current message
- M R - mark messages within the point/mark region in the summary
- M r - unmark messages within the point/mark region in the summary
- M V - toggle the marked-ness of all messages
- M X - apply the selectors of a named virtual folder to the
- messages in the current folder and mark all messages
- that match those selectors.
- M x - apply the selectors of a named virtual folder to the
- messages in the current folder and unmark all messages
- that match those selectors.
- M ? - partial help for mark commands
-
- W - prefix for window configuration commands:
- W S - save the current window configuration to a name
- W D - delete a window configuration
- W W - apply a configuration
- W ? - help for the window configuration commands
-
- V - prefix for virtual folder commands:
- V V - visit a virtual folder (folder must be defined in
- vm-virtual-folder-alist)
- V C - create a virtual folder composed of a subset of
- the current folder's messages.
- V A - create a virtual folder containing all the messages in
- the current folder with the same author as the current message.
- V S - create a virtual folder containing all the messages in
- the current folder with the same subject as the current message.
- V X - apply the selectors of a named virtual folder to the messages in
- the current folder and create a virtual folder
- containing the selected messages.
- V M - toggle whether this virtual folder's messages mirror the
- underlying real messages' attributes.
- V ? - help for virtual folder commands
-
- C-_ - undo, special undo that retracts the most recent
- changes in message attributes and labels. Expunges,
- message edits, and saves cannot be undone. C-x u is
- also bound to this command.
-
- a - set message attributes
-
- l - prefix for label commands:
- l a - add labels to message
- l d - delete labels from message
-
- $ - prefix for MIME commands. Position the cursor over a MIME
- tag and use these keystrokes to operate on a MIME object.
-
- RET - display the MIME object according to its type.
- $ s - save the MIME object
- $ p - print the MIME object
- $ | - pipe the MIME object to a shell command.
- $ RET - display the MIME object's text using the \"default\" face.
- $ e - display the MIME object with an external viewer.
- $ d - delete the MIME object from the message.
- $ v - display the MIME object as some other type.
- $ w - write the MIME object to a file.
- $ a - attach the MIME object to a composition buffer.
-
- L - reload your VM init file, ~/.vm
-
- % - change a folder to another type
-
- ? - help
-
- ! - run a shell command
- | - run a shell command with the current message as input
-
- M-C - view conditions under which you may redistribute VM
- M-W - view the details of VM's lack of a warranty
+\\{vm-mode-map}
-Use M-x vm-submit-bug-report to submit a bug report.
-Variables:
- vm-arrived-message-hook
- vm-arrived-messages-hook
- vm-auto-center-summary
- vm-auto-decode-mime-messages
- vm-auto-displayed-mime-content-type-exceptions
- vm-auto-displayed-mime-content-types
- vm-auto-folder-alist
- vm-auto-folder-case-fold-search
- vm-auto-get-new-mail
- vm-auto-next-message
- vm-berkeley-mail-compatibility
- vm-burst-digest-messages-inherit-labels
- vm-check-folder-types
- vm-circular-folders
- vm-confirm-new-folders
- vm-confirm-quit
- vm-convert-folder-types
- vm-crash-box
- vm-crash-box-suffix
- vm-default-From_-folder-type
- vm-default-folder-permission-bits
- vm-default-folder-type
- vm-delete-after-archiving
- vm-delete-after-bursting
- vm-delete-after-saving
- vm-delete-empty-folders
- vm-digest-burst-type
- vm-digest-center-preamble
- vm-digest-preamble-format
- vm-digest-send-type
- vm-display-buffer-hook
- vm-display-using-mime
- vm-edit-message-hook
- vm-fill-paragraphs-containing-long-lines
- vm-flush-interval
- vm-folder-directory
- vm-folder-read-only
- vm-folders-summary-database
- vm-folders-summary-directories
- vm-folders-summary-format
- vm-follow-summary-cursor
- vm-forward-message-hook
- vm-forwarded-headers
- vm-forwarding-digest-type
- vm-forwarding-subject-format
- vm-frame-parameter-alist
- vm-frame-per-completion
- vm-frame-per-composition
- vm-frame-per-edit
- vm-frame-per-folder
- vm-frame-per-folders-summary
- vm-frame-per-help
- vm-frame-per-summary
- vm-highlighted-header-face
- vm-highlighted-header-regexp
- vm-honor-mime-content-disposition
- vm-honor-page-delimiters
- vm-icontopbm-program
- vm-image-directory
- vm-imagemagick-convert-program
- vm-imagemagick-identify-program
- vm-imap-auto-expunge-alist
- vm-imap-bytes-per-session
- vm-imap-expunge-after-retrieving
- vm-imap-max-message-size
- vm-imap-messages-per-session
- vm-imap-session-preauth-hook
- vm-index-file-suffix
- vm-in-reply-to-format
- vm-included-text-attribution-format
- vm-included-text-discard-header-regexp
- vm-included-text-headers
- vm-included-text-prefix
- vm-infer-mime-types
- vm-invisible-header-regexp
- vm-jump-to-new-messages
- vm-jump-to-unread-messages
- vm-keep-crash-boxes
- vm-keep-sent-messages
- vm-lynx-program
- vm-mail-check-interval
- vm-mail-header-from
- vm-mail-header-insert-date
- vm-mail-header-insert-message-id
- vm-mail-mode-hook
- vm-mail-send-hook
- vm-make-crash-box-name
- vm-make-spool-file-name
- vm-mime-7bit-composition-charset
- vm-mime-8bit-composition-charset
- vm-mime-8bit-text-transfer-encoding
- vm-mime-alternative-select-method
- vm-mime-attachment-auto-type-alist
- vm-mime-attachment-save-directory
- vm-mime-avoid-folding-content-type
- vm-mime-base64-decoder-program
- vm-mime-base64-decoder-switches
- vm-mime-base64-encoder-program
- vm-mime-base64-encoder-switches
- vm-mime-button-face
- vm-mime-button-format-alist
- vm-mime-charset-converter-alist
- vm-mime-charset-font-alist
- vm-mime-confirm-delete
- vm-mime-decode-for-preview
- vm-mime-default-face-charset-exceptions
- vm-mime-default-face-charsets
- vm-mime-delete-after-saving
- vm-mime-delete-viewer-processes
- vm-mime-digest-discard-header-regexp
- vm-mime-digest-headers
- vm-mime-display-function
- vm-mime-external-content-types-alist
- vm-mime-forward-local-external-bodies
- vm-mime-ignore-composite-type-opaque-transfer-encoding
- vm-mime-ignore-mime-version
- vm-mime-ignore-missing-multipart-boundary
- vm-mime-internal-content-type-exceptions
- vm-mime-internal-content-types
- vm-mime-max-message-size
- vm-mime-qp-decoder-program
- vm-mime-qp-decoder-switches
- vm-mime-qp-encoder-program
- vm-mime-qp-encoder-switches
- vm-mime-require-mime-version-header
- vm-mime-type-converter-alist
- vm-mime-use-image-strips
- vm-mime-use-w3-for-text/html
- vm-mime-uuencode-decoder-program
- vm-mime-uuencode-decoder-switches
- vm-mode-hook
- vm-mosaic-program
- vm-mosaic-program-switches
- vm-move-after-deleting
- vm-move-after-killing
- vm-move-after-undeleting
- vm-move-messages-physically
- vm-mutable-frames
- vm-mutable-windows
- vm-netscape-program
- vm-netscape-program-switches
- vm-page-continuation-glyph
- vm-paragraph-fill-column
- vm-pop-auto-expunge-alist
- vm-pop-bytes-per-session
- vm-pop-expunge-after-retrieving
- vm-pop-folder-alist
- vm-pop-max-message-size
- vm-pop-md5-program
- vm-pop-messages-per-session
- vm-popup-menu-on-mouse-3
- vm-preferences-file
- vm-preview-lines
- vm-preview-read-messages
- vm-primary-inbox
- vm-quit-hook
- vm-recognize-imap-maildrops
- vm-recognize-pop-maildrops
- vm-reply-hook
- vm-reply-ignored-addresses
- vm-reply-ignored-reply-tos
- vm-reply-subject-prefix
- vm-resend-bounced-discard-header-regexp
- vm-resend-bounced-headers
- vm-resend-bounced-message-hook
- vm-resend-discard-header-regexp
- vm-resend-headers
- vm-resend-message-hook
- vm-retrieved-spooled-mail-hook
- vm-rfc1153-digest-discard-header-regexp
- vm-rfc1153-digest-headers
- vm-rfc934-digest-discard-header-regexp
- vm-rfc934-digest-headers
- vm-search-using-regexps
- vm-select-message-hook
- vm-select-new-message-hook
- vm-select-unread-message-hook
- vm-send-digest-hook
- vm-send-using-mime
- vm-skip-deleted-messages
- vm-skip-read-messages
- vm-spool-file-suffixes
- vm-spool-files
- vm-spooled-mail-waiting-hook
- vm-ssh-program
- vm-ssh-program-switches
- vm-ssh-remote-command
- vm-startup-with-summary
- vm-strip-reply-headers
- vm-stunnel-program
- vm-stunnel-program-switches
- vm-stunnel-random-data-method
- vm-subject-significant-chars
- vm-summary-arrow
- vm-summary-format
- vm-summary-highlight-face
- vm-summary-mode-hook
- vm-summary-redo-hook
- vm-summary-show-threads
- vm-summary-thread-indent-level
- vm-tale-is-an-idiot
- vm-temp-file-directory
- vm-thread-using-subject
- vm-toolbar-pixmap-directory
- vm-trust-From_-with-Content-Length
- vm-uncompface-program
- vm-undisplay-buffer-hook
- vm-unforwarded-header-regexp
- vm-url-browser
- vm-url-browser-switches
- vm-url-retrieval-methods
- vm-url-search-limit
- vm-use-menus
- vm-use-toolbar
- vm-virtual-folder-alist
- vm-virtual-mirror
- vm-visible-headers
- vm-visit-folder-hook
- vm-visit-when-saving
- vm-warp-mouse-to-new-frame
- vm-wget-program
- vm-window-configuration-file
+Customize VM by setting variables and store them in the file ~/.vm.
"
(interactive "P")
(vm (current-buffer) read-only)
@@ -940,6 +587,7 @@ visited folder."
(vm-session-initialization)
(vm-check-for-killed-folder)
(vm-select-folder-buffer-if-possible)
+ (require 'vm-pop)
(let ((completion-list (mapcar (function (lambda (x) (nth 1 x)))
vm-pop-folder-alist))
(default vm-last-visit-pop-folder)
@@ -972,6 +620,7 @@ visited folder."
(vm-session-initialization)
(vm-check-for-killed-folder)
(vm-select-folder-buffer-if-possible)
+ (require 'vm-pop)
(let ((completion-list (mapcar (function (lambda (x) (nth 1 x)))
vm-pop-folder-alist))
(default vm-last-visit-pop-folder)
@@ -1002,6 +651,7 @@ visited folder."
(vm-session-initialization)
(vm-check-for-killed-folder)
(vm-select-folder-buffer-if-possible)
+ (require 'vm-pop)
(let ((completion-list (mapcar (function (lambda (x) (nth 1 x)))
vm-pop-folder-alist))
(default vm-last-visit-pop-folder)
@@ -1045,6 +695,7 @@ visited folder."
(vm-session-initialization)
(vm-check-for-killed-folder)
(vm-select-folder-buffer-if-possible)
+ (require 'vm-imap)
(let ((this-command this-command)
(last-command last-command))
(list (vm-read-imap-folder-name
@@ -1066,6 +717,7 @@ visited folder."
(vm-session-initialization)
(vm-check-for-killed-folder)
(vm-select-folder-buffer-if-possible)
+ (require 'vm-imap)
(let ((this-command this-command)
(last-command last-command))
(list (vm-read-imap-folder-name
@@ -1090,6 +742,7 @@ visited folder."
(vm-session-initialization)
(vm-check-for-killed-folder)
(vm-select-folder-buffer-if-possible)
+ (require 'vm-imap)
(let ((this-command this-command)
(last-command last-command))
(list (vm-read-imap-folder-name
@@ -1132,6 +785,7 @@ vm-visit-virtual-folder.")
vm-virtual-folder-alist)
current-prefix-arg)))
(vm-session-initialization)
+ (require 'vm-virtual)
(if (not (assoc folder-name vm-virtual-folder-alist))
(error "No such virtual folder, %s" folder-name))
(let ((buffer-name (concat "(" folder-name ")"))
@@ -1271,7 +925,7 @@ vm-visit-virtual-folder.")
(vm-visit-virtual-folder folder-name read-only)))
;;;###autoload
-(defun vm-mail (&optional to)
+(defun vm-mail (&optional to subject)
"Send a mail message from within VM, or from without.
Optional argument TO is a string that should contain a comma separated
recipient list."
@@ -1280,7 +934,7 @@ recipient list."
(vm-check-for-killed-folder)
(vm-select-folder-buffer-if-possible)
(vm-check-for-killed-summary)
- (vm-mail-internal nil to)
+ (vm-mail-internal nil to subject)
(run-hooks 'vm-mail-hook)
(run-hooks 'vm-mail-mode-hook))
@@ -1316,6 +970,7 @@ recipient list."
(fset 'vm-folders-summary-mode 'vm-mode)
(put 'vm-folders-summary-mode 'mode-class 'special)
+
;;;###autoload
(defun vm-folders-summarize (&optional display raise)
"Generate a summary of the folders in your folder directories.
@@ -1446,259 +1101,49 @@ summary buffer to select a folder."
;; time we'll be fine and users like to use MIME to attach
;; stuff to the reports.
(let ((reporter-mailer '(vm-mail))
- (mail-user-agent 'vm-user-agent))
+ (mail-user-agent 'vm-user-agent)
+ varlist)
+ (setq varlist (apropos-internal "^\\(vm\\|vmpc\\)-" 'user-variable-p)
+ varlist (sort varlist
+ (lambda (v1 v2)
+ (string-lessp (format "%s" v1) (format "%s" v2)))))
+ (let ((vars-to-delete '(
+ ;; passwords might be listed here
+ vm-spool-files
+ vm-imap-auto-expunge-alist
+ vm-pop-auto-expunge-alist
+ vm-pop-folder-alist
+ )))
+ (while vars-to-delete
+ (setq varlist (delete (car vars-to-delete) varlist)
+ vars-to-delete (cdr vars-to-delete))))
+ ;; see what the user had loaded
+ (setq varlist (append (list 'features) varlist))
(delete-other-windows)
(reporter-submit-bug-report
vm-maintainer-address
- (concat "VM " vm-version)
- (list
- 'vm-arrived-message-hook
- 'vm-arrived-messages-hook
- 'vm-auto-center-summary
- 'vm-auto-decode-mime-messages
- 'vm-auto-displayed-mime-content-type-exceptions
- 'vm-auto-displayed-mime-content-types
-;; don't send this by default, might be personal stuff in here.
-;; 'vm-auto-folder-alist
- 'vm-auto-folder-case-fold-search
- 'vm-auto-get-new-mail
- 'vm-auto-next-message
- 'vm-berkeley-mail-compatibility
- 'vm-check-folder-types
- 'vm-circular-folders
- 'vm-confirm-new-folders
- 'vm-confirm-quit
- 'vm-convert-folder-types
- 'vm-crash-box
- 'vm-crash-box-suffix
- 'vm-default-From_-folder-type
- 'vm-default-folder-permission-bits
- 'vm-default-folder-type
- 'vm-delete-after-archiving
- 'vm-delete-after-bursting
- 'vm-delete-after-saving
- 'vm-delete-empty-folders
- 'vm-digest-burst-type
- 'vm-digest-identifier-header-format
- 'vm-digest-center-preamble
- 'vm-digest-preamble-format
- 'vm-digest-send-type
- 'vm-display-buffer-hook
- 'vm-display-using-mime
- 'vm-edit-message-hook
- 'vm-edit-message-mode
- 'vm-fill-paragraphs-containing-long-lines
- 'vm-flush-interval
- 'vm-folder-directory
- 'vm-folder-read-only
- 'vm-folders-summary-database
- 'vm-folders-summary-directories
- 'vm-folders-summary-format
- 'vm-follow-summary-cursor
- 'vm-forward-message-hook
- 'vm-forwarded-headers
- 'vm-forwarding-digest-type
- 'vm-forwarding-subject-format
- 'vm-frame-parameter-alist
- 'vm-frame-per-completion
- 'vm-frame-per-composition
- 'vm-frame-per-edit
- 'vm-frame-per-folder
- 'vm-frame-per-folders-summary
- 'vm-frame-per-help
- 'vm-frame-per-summary
- 'vm-highlight-url-face
- 'vm-highlighted-header-regexp
- 'vm-honor-mime-content-disposition
- 'vm-honor-page-delimiters
- 'vm-icontopbm-program
- 'vm-image-directory
- 'vm-imagemagick-convert-program
- 'vm-imagemagick-identify-program
-;; IMAP passwords might be listed here
-;; 'vm-imap-auto-expunge-alist
- 'vm-imap-bytes-per-session
- 'vm-imap-expunge-after-retrieving
- 'vm-imap-max-message-size
- 'vm-imap-messages-per-session
- 'vm-imap-session-preauth-hook
- 'vm-in-reply-to-format
- 'vm-included-text-attribution-format
- 'vm-included-text-discard-header-regexp
- 'vm-included-text-headers
- 'vm-included-text-prefix
- 'vm-index-file-suffix
- 'vm-init-file
- 'vm-infer-mime-types
- 'vm-invisible-header-regexp
- 'vm-jump-to-new-messages
- 'vm-jump-to-unread-messages
- 'vm-keep-crash-boxes
- 'vm-keep-sent-messages
- 'vm-lynx-program
- 'vm-mail-header-from
- 'vm-mail-header-insert-date
- 'vm-mail-header-insert-message-id
- 'vm-mail-hook
- 'vm-mail-check-interval
- 'vm-mail-mode-hook
- 'vm-mail-send-hook
- 'vm-make-crash-box-name
- 'vm-make-spool-file-name
- 'vm-mime-7bit-composition-charset
- 'vm-mime-8bit-composition-charset
- 'vm-mime-8bit-text-transfer-encoding
- 'vm-mime-alternative-select-method
- 'vm-mime-attachment-auto-type-alist
- 'vm-mime-attachment-save-directory
- 'vm-mime-avoid-folding-content-type
- 'vm-mime-base64-decoder-program
- 'vm-mime-base64-decoder-switches
- 'vm-mime-base64-encoder-program
- 'vm-mime-base64-encoder-switches
- 'vm-mime-button-face
- 'vm-mime-button-format-alist
- 'vm-mime-charset-converter-alist
- 'vm-mime-charset-font-alist
- 'vm-mime-confirm-delete
- 'vm-mime-decode-for-preview
- 'vm-mime-default-face-charset-exceptions
- 'vm-mime-default-face-charsets
- 'vm-mime-delete-after-saving
- 'vm-mime-delete-viewer-processes
- 'vm-mime-digest-discard-header-regexp
- 'vm-mime-digest-headers
- 'vm-mime-display-function
- 'vm-mime-external-content-types-alist
- 'vm-mime-forward-local-external-bodies
- 'vm-mime-ignore-composite-type-opaque-transfer-encoding
- 'vm-mime-ignore-mime-version
- 'vm-mime-ignore-missing-multipart-boundary
- 'vm-mime-internal-content-type-exceptions
- 'vm-mime-internal-content-types
- 'vm-mime-max-message-size
- 'vm-mime-qp-decoder-program
- 'vm-mime-qp-decoder-switches
- 'vm-mime-qp-encoder-program
- 'vm-mime-qp-encoder-switches
- 'vm-mime-require-mime-version-header
- 'vm-mime-type-converter-alist
- 'vm-mime-use-image-strips
- 'vm-mime-use-w3-for-text/html
- 'vm-mime-uuencode-decoder-program
- 'vm-mime-uuencode-decoder-switches
- 'vm-mode-hook
- 'vm-mode-hooks
- 'vm-mosaic-program
- 'vm-mosaic-program-switches
- 'vm-move-after-deleting
- 'vm-move-after-undeleting
- 'vm-move-after-killing
- 'vm-move-messages-physically
- 'vm-movemail-program
- 'vm-mutable-frames
- 'vm-mutable-windows
- 'vm-netscape-program
- 'vm-netscape-program-switches
- 'vm-page-continuation-glyph
- 'vm-paragraph-fill-column
-;; POP passwords might be listed here
-;; 'vm-pop-auto-expunge-alist
- 'vm-pop-bytes-per-session
- 'vm-pop-expunge-after-retrieving
-;; POP passwords might be listed here
-;; 'vm-pop-folder-alist
- 'vm-pop-max-message-size
- 'vm-pop-messages-per-session
- 'vm-pop-md5-program
- 'vm-popup-menu-on-mouse-3
- 'vm-preferences-file
- 'vm-preview-lines
- 'vm-preview-read-messages
- 'vm-primary-inbox
- 'vm-quit-hook
- 'vm-recognize-imap-maildrops
- 'vm-recognize-pop-maildrops
- 'vm-reply-hook
-;; don't feed the spammers or crackers
-;; 'vm-reply-ignored-addresses
- 'vm-reply-ignored-reply-tos
- 'vm-reply-subject-prefix
- 'vm-resend-bounced-discard-header-regexp
- 'vm-resend-bounced-headers
- 'vm-resend-bounced-message-hook
- 'vm-resend-discard-header-regexp
- 'vm-resend-headers
- 'vm-resend-message-hook
- 'vm-retrieved-spooled-mail-hook
- 'vm-rfc1153-digest-discard-header-regexp
- 'vm-rfc1153-digest-headers
- 'vm-rfc934-digest-discard-header-regexp
- 'vm-rfc934-digest-headers
- 'vm-search-using-regexps
- 'vm-select-message-hook
- 'vm-select-new-message-hook
- 'vm-select-unread-message-hook
- 'vm-send-digest-hook
- 'vm-send-using-mime
- 'vm-skip-deleted-messages
- 'vm-skip-read-messages
-;; don't send vm-spool-files by default, might contain passwords
-;; 'vm-spool-files
- 'vm-spool-file-suffixes
- 'vm-spooled-mail-waiting-hook
- 'vm-ssh-program
- 'vm-ssh-program-switches
- 'vm-ssh-remote-command
- 'vm-startup-with-summary
- 'vm-strip-reply-headers
- 'vm-stunnel-program
- 'vm-stunnel-program-switches
- 'vm-stunnel-random-data-method
- 'vm-subject-significant-chars
- 'vm-summary-format
- 'vm-summary-highlight-face
- 'vm-summary-mode-hook
- 'vm-summary-mode-hooks
- 'vm-summary-redo-hook
- 'vm-summary-show-threads
- 'vm-summary-thread-indent-level
- 'vm-summary-uninteresting-senders
- 'vm-summary-uninteresting-senders-arrow
- 'vm-tale-is-an-idiot
- 'vm-temp-file-directory
- 'vm-thread-using-subject
- 'vm-toolbar-pixmap-directory
- 'vm-trust-From_-with-Content-Length
- 'vm-uncompface-program
- 'vm-undisplay-buffer-hook
- 'vm-unforwarded-header-regexp
- 'vm-url-browser
- 'vm-url-browser-switches
- 'vm-url-retrieval-methods
- 'vm-url-search-limit
- 'vm-use-menus
- 'vm-use-toolbar
- 'vm-virtual-folder-alist
- 'vm-virtual-mirror
- 'vm-visible-headers
- 'vm-visit-folder-hook
- 'vm-visit-when-saving
- 'vm-warp-mouse-to-new-frame
- 'vm-wget-program
- 'vm-window-configuration-file
-;; see what the user had loaded
- 'features
- )
+ (concat "VM " (vm-version))
+ varlist
nil
nil
- "Please change the Subject header to a concise bug description.\nIn this report, remember to cover the basics, that is, what you expected to\nhappen and what in fact did happen. Please remove these\ninstructions from your message.")
+ "Please change the Subject header to a concise bug description.
+
+Consider to post this to the News group gnu.emacs.vm.bug instead.
+
+In this report, remember to cover the basics, that is, what you expected to
+happen and what in fact did happen and how to reproduce it.
+
+Please remove these instructions and other stuff which is unrelated to the bug
+from your message.")
(save-excursion
(goto-char (point-min))
- (mail-position-on-field "Subject"))))
-;; (beginning-of-line)
-;; (delete-region (point) (progn (forward-line) (point)))
-;; (insert "Subject: VM " vm-version " induces a brain tumor in the user.\n It is the tumor that creates the hallucinations.\n"))))
+ (mail-position-on-field "Subject")
+ (insert "VM-BUG: "))))
+
+(defun vm-edit-init-file ()
+ "Edit the ~/.vm."
+ (interactive)
+ (find-file-other-frame "~/.vm"))
(defun vm-load-init-file (&optional interactive)
(interactive "p")
@@ -1711,18 +1156,12 @@ summary buffer to select a folder."
(vm-display nil nil '(vm-load-init-file) '(vm-load-init-file)))
(defun vm-check-emacs-version ()
- (cond ((and vm-xemacs-p
- (or (< emacs-major-version 19)
- (and (= emacs-major-version 19)
- (< emacs-minor-version 14))))
- (error "VM %s must be run on XEmacs 19.14 or a later version."
- vm-version))
- ((and vm-fsfemacs-p
- (or (< emacs-major-version 19)
- (and (= emacs-major-version 19)
- (< emacs-minor-version 34))))
- (error "VM %s must be run on Emacs 19.34 or a later v19 version."
- vm-version))))
+ (cond ((and vm-xemacs-p (< emacs-major-version 21))
+ (error "VM %s must be run on XEmacs 21 or a later version."
+ (vm-version)))
+ ((and vm-fsfemacs-p (< emacs-major-version 21))
+ (error "VM %s must be run on GNU Emacs 21 or a later version."
+ (vm-version)))))
(defun vm-set-debug-flags ()
(or stack-trace-on-error
@@ -1738,18 +1177,41 @@ summary buffer to select a folder."
))))
(defun vm-session-initialization ()
- (require 'vm)
- (vm-note-emacs-version)
- (vm-check-emacs-version)
- (add-hook 'kill-emacs-hook 'vm-garbage-collect-global)
-;; (vm-set-debug-flags)
+ ;; (vm-set-debug-flags)
;; If this is the first time VM has been run in this Emacs session,
;; do some necessary preparations.
(if (or (not (boundp 'vm-session-beginning))
vm-session-beginning)
(progn
+ (vm-check-emacs-version)
+ (require 'vm-vars)
+ (require 'vm-macro)
+ (require 'vm-misc)
+ (require 'vm-message)
+ (require 'vm-minibuf)
+ (require 'vm-motion)
+ (require 'vm-page)
+ (require 'vm-mouse)
+ (require 'vm-summary)
+ (require 'vm-undo)
+ (require 'vm-mime)
+ (require 'vm-folder)
+ (require 'vm-toolbar)
+ (require 'vm-window)
+ (require 'vm-menu)
+ (require 'vm-rfaddons)
+ (if (locate-library "pgg")
+ (require 'vm-pgg)
+ (message "vm-pgg disabled since pgg is missing!"))
+ (add-hook 'kill-emacs-hook 'vm-garbage-collect-global)
(random t)
(vm-load-init-file)
+ (when vm-enable-addons
+ (vm-rfaddons-infect-vm 0 vm-enable-addons)
+ (when (or (member 'summary-faces vm-enable-addons)
+ (eq t vm-enable-addons))
+ (require 'vm-summary-faces)
+ (vm-summary-faces-mode 1)))
(if (not vm-window-configuration-file)
(setq vm-window-configurations vm-default-window-configuration)
(or (vm-load-window-configurations vm-window-configuration-file)
@@ -1757,7 +1219,7 @@ summary buffer to select a folder."
(setq vm-buffers-needing-display-update (make-vector 29 0))
(setq vm-buffers-needing-undo-boundaries (make-vector 29 0))
(add-hook 'post-command-hook 'vm-add-undo-boundaries)
- (if (if (fboundp 'find-face)
+ (if (if vm-xemacs-p
(find-face 'vm-monochrome-image)
(facep 'vm-monochrome-image))
nil
@@ -1809,6 +1271,7 @@ summary buffer to select a folder."
(vm-menu-initialize-vm-mode-menu-map))
(setq vm-session-beginning nil))))
+;;;###autoload
(if (fboundp 'define-mail-user-agent)
(define-mail-user-agent 'vm-user-agent
(function vm-compose-mail) ; compose function
@@ -1834,4 +1297,6 @@ summary buffer to select a folder."
(autoload 'vm-easy-menu-define "vm-easymenu" nil 'macro)
(autoload 'vm-easy-menu-do-define "vm-easymenu")
-(provide 'vm-startup)
+(provide 'vm)
+
+;;; vm.el ends here
diff --git a/make-autoloads b/make-autoloads
deleted file mode 100755
index 743e0fd..0000000
--- a/make-autoloads
+++ /dev/null
@@ -1,52 +0,0 @@
-(defun member (e list)
- (while (and list (not (equal e (car list))))
- (setq list (cdr list)))
- list )
-
-(defun print-autoloads ()
- (let ((files (cdr (member "print-autoloads" command-line-args)))
- ;; kludge for broken v19 emacs. it's supposed to accept
- ;; t in autoloads to mean 'macro but it doesn't. this
- ;; kludge will screw people who try to byte-compile VM
- ;; with emacs18 for emacs19.
- (macro-flag (if (string-match "^19" emacs-version) ''macro t))
- sexp function doc interactive macro)
- (setq expanded-files (mapcar (function expand-file-name) files))
- (while files
- (set-buffer (find-file-noselect (car expanded-files)))
- (goto-char (point-min))
- (condition-case nil
- (while t
- (setq sexp (read (current-buffer)))
- (if (and (consp sexp) (cdr sexp)
- (memq (car sexp) '(defun defmacro defsubst fset)))
- (progn
- (if (memq (car sexp) '(defmacro defsubst))
- (setq macro macro-flag)
- (setq macro nil))
- (if (eq (car sexp) 'fset)
- (setq sexp (cdr sexp)
- function (eval (car sexp))
- interactive nil
- doc nil)
- (setq sexp (cdr sexp)
- function (car sexp)
- sexp (cdr (cdr sexp)))
- (if (stringp (car sexp))
- (setq doc (car sexp)
- sexp (cdr sexp))
- (setq doc nil))
- (if (and (consp (car sexp))
- (eq (car (car sexp)) 'interactive))
- (setq interactive t)
- (setq interactive nil)))
- (if (string-match "\\.el$" (car files))
- (setq file (substring (car files) 0 -3))
- (setq file (car files)))
- (print (list 'autoload (list 'quote function) file
- doc interactive macro)))))
- (end-of-file nil))
- (kill-buffer (current-buffer))
- (setq files (cdr files)
- expanded-files (cdr expanded-files))))
- (kill-emacs))
diff --git a/pixmaps/Makefile.in b/pixmaps/Makefile.in
new file mode 100644
index 0000000..8fe0db5
--- /dev/null
+++ b/pixmaps/Makefile.in
@@ -0,0 +1,56 @@
+@SET_MAKE@
+
+# no csh please
+SHELL = /bin/sh
+
+##############################################################################
+# location of required programms
+prefix = @prefix@
+MKDIR = @MKDIR@
+RM = @RM@
+LS = @LS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+srcdir = @srcdir@
+datadir= @datadir@/vm
+datarootdir= @datarootdir@
+pixmapdir = @pixmapdir@
+
+SYMLINKS = @SYMLINKS@
+LINKPATH = @LINKPATH@
+
+##############################################################################
+
+all:
+
+Makefile: @srcdir@/Makefile.in
+ cd @srcdir@/..; ./config.status
+
+install: install-pkg
+
+install-pkg:
+ $(MKDIR) -p "$(DESTDIR)$(pixmapdir)"
+ for i in `$(LS) *.xpm` ; do \
+ echo "Installing $$i in '$(DESTDIR)$(pixmapdir)'" ; \
+ $(INSTALL_DATA) $$i "$(DESTDIR)$(pixmapdir)" ; \
+ done ;
+ $(MKDIR) -p "$(DESTDIR)$(pixmapdir)/mime"
+ for i in `ls mime/*.xpm` ; do \
+ echo "Installing $$i in '$(DESTDIR)$(pixmapdir)'" ; \
+ $(INSTALL_DATA) $$i "$(DESTDIR)$(pixmapdir)/mime" ; \
+ done ;
+ $(MKDIR) -p "$(DESTDIR)$(pixmapdir)/gtk"
+ for i in `ls gtk/*.xpm` ; do \
+ echo "Installing $$i in '$(DESTDIR)$(pixmapdir)'" ; \
+ $(INSTALL_DATA) $$i "$(DESTDIR)$(pixmapdir)/gtk" ; \
+ done ;
+ @echo VM pixmaps successfully installed\!
+
+##############################################################################
+clean:
+ -$(RM) -f *~
+
+distclean: clean
+ -$(RM) -f Makefile
+
diff --git a/pixmaps/audio_stamp-colorful.xpm b/pixmaps/audio_stamp-colorful.xpm
deleted file mode 100644
index 5baf9a3..0000000
--- a/pixmaps/audio_stamp-colorful.xpm
+++ /dev/null
@@ -1,43 +0,0 @@
-/* XPM */
-static char *audio_stamp[] = {
-/* width height num_colors chars_per_pixel */
-" 18 24 12 1",
-/* colors */
-". c #000000",
-"# c #00ffff",
-"a c #00ff00",
-"b c #bebebe s background",
-"c c #ff00ff",
-"d c #ff0000",
-"e c #6e6e6e",
-"f c #ffffff",
-"g c #ffff00",
-"h c #e7e7e7",
-"i c #bfbfbf",
-"j c #0000ff",
-/* pixels */
-"bbbbbbbbbbbbbbbbbb",
-"bbbbbbbbbbbbabbbbb",
-"bbbbbbbbbbbebbbbbb",
-"bbbbbbbeebbbbbebbb",
-"bbbbbbbe.bbbbjebbb",
-"bbbbbbeh.bbejijhbb",
-"bbbbbebh.bijhieiib",
-"bbbbiehh.bieiejibb",
-"b..e.hhh.biebjjiib",
-"b.hehhhh.bejibebci",
-"b.hhhhhh.ijjiibiib",
-"b.hhhhhh.ihiiieiii",
-"b.hhhhhh.ibiiieiii",
-"b.hhhhhh.bhfbbdhii",
-"b.hhhhhh.bbbbieiib",
-"b.hehhhh.bbbideiib",
-"b..e.hhh.bbbidebbb",
-"bbbbbehh.bbbiibbbb",
-"bbbbbebh.bbbbbbbgi",
-"bbbbiieh.bbbbbbbgg",
-"bbbbiibe.bb#bbbbib",
-"bbbbbbbeebbbh#bbgb",
-"bbbbbbbbbbbbbbbbii",
-"bbbbbbbbbbbbbbbbgb"
-};
diff --git a/pixmaps/audio_stamp-simple.xpm b/pixmaps/audio_stamp-simple.xpm
deleted file mode 100644
index 5baf9a3..0000000
--- a/pixmaps/audio_stamp-simple.xpm
+++ /dev/null
@@ -1,43 +0,0 @@
-/* XPM */
-static char *audio_stamp[] = {
-/* width height num_colors chars_per_pixel */
-" 18 24 12 1",
-/* colors */
-". c #000000",
-"# c #00ffff",
-"a c #00ff00",
-"b c #bebebe s background",
-"c c #ff00ff",
-"d c #ff0000",
-"e c #6e6e6e",
-"f c #ffffff",
-"g c #ffff00",
-"h c #e7e7e7",
-"i c #bfbfbf",
-"j c #0000ff",
-/* pixels */
-"bbbbbbbbbbbbbbbbbb",
-"bbbbbbbbbbbbabbbbb",
-"bbbbbbbbbbbebbbbbb",
-"bbbbbbbeebbbbbebbb",
-"bbbbbbbe.bbbbjebbb",
-"bbbbbbeh.bbejijhbb",
-"bbbbbebh.bijhieiib",
-"bbbbiehh.bieiejibb",
-"b..e.hhh.biebjjiib",
-"b.hehhhh.bejibebci",
-"b.hhhhhh.ijjiibiib",
-"b.hhhhhh.ihiiieiii",
-"b.hhhhhh.ibiiieiii",
-"b.hhhhhh.bhfbbdhii",
-"b.hhhhhh.bbbbieiib",
-"b.hehhhh.bbbideiib",
-"b..e.hhh.bbbidebbb",
-"bbbbbehh.bbbiibbbb",
-"bbbbbebh.bbbbbbbgi",
-"bbbbiieh.bbbbbbbgg",
-"bbbbiibe.bb#bbbbib",
-"bbbbbbbeebbbh#bbgb",
-"bbbbbbbbbbbbbbbbii",
-"bbbbbbbbbbbbbbbbgb"
-};
diff --git a/pixmaps/autofile-dn.xbm b/pixmaps/autofile-dn.xbm
deleted file mode 100644
index 3be324a..0000000
--- a/pixmaps/autofile-dn.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,
- 0xfe,0xff,0xff,0xff,0xff,0x7f,0xfb,0xdf,0xfe,0xff,0xff,0xff,0xff,0x7f,0xfb,
- 0xdf,0xfe,0xff,0xff,0xff,0xff,0x7f,0xfb,0x5f,0xfe,0xff,0xff,0xff,0xff,0x7f,
- 0xfb,0xdf,0xfe,0xff,0xff,0xff,0xff,0x7f,0xfb,0xdf,0xfe,0xff,0xff,0xff,0xff,
- 0x7f,0xfb,0xdf,0xfe,0xff,0xff,0xff,0xff,0x7f,0xfb,0xdf,0xfe,0xff,0xff,0xff,
- 0xff,0x7f,0xfb,0xdf,0xfe,0xff,0xff,0xff,0xff,0x7f,0x03,0xc0,0xfe,0xff,0xff,
- 0xff,0xff,0x7f,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xfe,0xff,
- 0xff,0xff,0xff,0x7f,0x03,0xc0,0xfe,0xff,0xff,0xff,0xff,0x7f,0xfb,0xdb,0xfe,
- 0xff,0xff,0xff,0xff,0x7f,0xfb,0xdb,0xfe,0xff,0xff,0xff,0xff,0x7f,0xfb,0xdb,
- 0xfe,0xff,0xff,0xff,0xff,0xff,0xfa,0xdb,0xfe,0xff,0xff,0xff,0xff,0xff,0x01,
- 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xe7,0xff,0xfc,0x0f,0x90,0xff,0xff,0xff,0xc3,
- 0xff,0xfc,0xcf,0x9f,0xff,0xff,0xff,0xdb,0x4c,0x18,0xce,0x93,0xe1,0xff,0xff,
- 0x99,0xcc,0xcc,0xcc,0x93,0xcc,0xff,0xff,0x99,0xcc,0xcc,0x0c,0x92,0xcc,0xff,
- 0xff,0x81,0xcc,0xcc,0xcc,0x93,0xc0,0xff,0xff,0x3c,0xcc,0xcc,0xcc,0x93,0xfc,
- 0xff,0xff,0x3c,0xc4,0xc4,0xcc,0x93,0xcc,0xff,0xff,0x3c,0xc9,0x19,0xce,0x93,
- 0xe1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff};
diff --git a/pixmaps/autofile-dn.xpm b/pixmaps/autofile-dn.xpm
index 541134d..bd128d7 100644
--- a/pixmaps/autofile-dn.xpm
+++ b/pixmaps/autofile-dn.xpm
@@ -1,50 +1,44 @@
/* XPM */
-static char * autofile_xpm[] = {
-"64 42 5 1",
-"X c Gray75 s backgroundToolBarColor",
-"o c Gray60",
-"O c Gray60",
-"+ c Gray90",
-"@ c Gray40",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXooooooooooooooooooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOooooooooooooOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOooooooooooooOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo@@@@@@@o++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo@@@@@@@o++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo@@@@@@@o++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOo@@@@@@@o++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXooXXXXXXXXXXXooXXXXXXXXXXooooooooXooXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXooooXXXXXXXXXXooXXXXXXXXXXooXXXXXXXooXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXoXXoXXooXXooXooooXXooooXXXooXXXXooXooXXooooXXXXXXXXXXX",
-"XXXXXXXXXooXXooXooXXooXXooXXooXXooXXooXXXXooXooXooXXooXXXXXXXXXX",
-"XXXXXXXXXooXXooXooXXooXXooXXooXXooXXoooooXooXooXooXXooXXXXXXXXXX",
-"XXXXXXXXXooooooXooXXooXXooXXooXXooXXooXXXXooXooXooooooXXXXXXXXXX",
-"XXXXXXXXooXXXXooooXXooXXooXXooXXooXXooXXXXooXooXooXXXXXXXXXXXXXX",
-"XXXXXXXXooXXXXooooXoooXXooXoooXXooXXooXXXXooXooXooXXooXXXXXXXXXX",
-"XXXXXXXXooXXXXooXooXooXXXooXXooooXXXooXXXXooXooXXooooXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * autofile_up_xpm[] = {
+"32 32 9 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #666666",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"= c #666666",
+"# c #808080",
+" ",
+" ",
+" ",
+" BBBBBBBBBBBBBB ",
+" B B......B B_ ",
+" B B......B_BB_x ",
+" B B.%%%%%B_xB_x ",
+" B B.%++++B_xB_x ",
+" B B.%++++B_xB_x ",
+" B BBBBBBBB_xB_x ",
+" B ________xB_x ",
+" B xxxxxxxxB_x ",
+" B BBBBBBBB B_x ",
+" B B====B.B B_x ",
+" B B====B.B B_x ",
+" xB B====B.B B_x ",
+" _BBBBBBBBBBBB_x ",
+" x_____________x ",
+" xxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" # # ",
+" # # # ",
+" # # # # ### ## ",
+" ##### # # # # # ",
+" # # # # # # # ",
+" # # # ## # # # ",
+" # # # # # ## ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/autofile-up.xbm b/pixmaps/autofile-up.xbm
deleted file mode 100644
index d92d8f2..0000000
--- a/pixmaps/autofile-up.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,
- 0x01,0x00,0x00,0x00,0x00,0x80,0x04,0x20,0x01,0x00,0x00,0x00,0x00,0x80,0x04,
- 0x20,0x01,0x00,0x00,0x00,0x00,0x80,0x04,0xa0,0x01,0x00,0x00,0x00,0x00,0x80,
- 0x04,0x20,0x01,0x00,0x00,0x00,0x00,0x80,0x04,0x20,0x01,0x00,0x00,0x00,0x00,
- 0x80,0x04,0x20,0x01,0x00,0x00,0x00,0x00,0x80,0x04,0x20,0x01,0x00,0x00,0x00,
- 0x00,0x80,0x04,0x20,0x01,0x00,0x00,0x00,0x00,0x80,0xfc,0x3f,0x01,0x00,0x00,
- 0x00,0x00,0x80,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x01,0x00,
- 0x00,0x00,0x00,0x80,0xfc,0x3f,0x01,0x00,0x00,0x00,0x00,0x80,0x04,0x24,0x01,
- 0x00,0x00,0x00,0x00,0x80,0x04,0x24,0x01,0x00,0x00,0x00,0x00,0x80,0x04,0x24,
- 0x01,0x00,0x00,0x00,0x00,0x00,0x05,0x24,0x01,0x00,0x00,0x00,0x00,0x00,0xfe,
- 0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x03,0xf0,0x6f,0x00,0x00,0x00,0x3c,
- 0x00,0x03,0x30,0x60,0x00,0x00,0x00,0x24,0xb3,0xe7,0x31,0x6c,0x1e,0x00,0x00,
- 0x66,0x33,0x33,0x33,0x6c,0x33,0x00,0x00,0x66,0x33,0x33,0xf3,0x6d,0x33,0x00,
- 0x00,0x7e,0x33,0x33,0x33,0x6c,0x3f,0x00,0x00,0xc3,0x33,0x33,0x33,0x6c,0x03,
- 0x00,0x00,0xc3,0x3b,0x3b,0x33,0x6c,0x33,0x00,0x00,0xc3,0x36,0xe6,0x31,0x6c,
- 0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/autofile-up.xpm b/pixmaps/autofile-up.xpm
index 776d0f2..1fec9b0 100644
--- a/pixmaps/autofile-up.xpm
+++ b/pixmaps/autofile-up.xpm
@@ -1,51 +1,44 @@
/* XPM */
-static char * autofile_xpm[] = {
-"64 42 6 1",
-"X c Gray75 s backgroundToolBarColor",
-", c black s foregroundToolBarColor",
-"o c black",
-"O c Gray60",
-"+ c Gray90",
-"@ c Gray40",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXooooooooooooooooooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOooooooooooooOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOooooooooooooOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo@@@@@@@o++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo@@@@@@@o++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo@@@@@@@o++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOo@@@@@@@o++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXX,,XXXXXXXXXXX,,XXXXXXXXXX,,,,,,,,X,,XXXXXXXXXXXXXXXXX",
-"XXXXXXXXXX,,,,XXXXXXXXXX,,XXXXXXXXXX,,XXXXXXX,,XXXXXXXXXXXXXXXXX",
-"XXXXXXXXXX,XX,XX,,XX,,X,,,,XX,,,,XXX,,XXXX,,X,,XX,,,,XXXXXXXXXXX",
-"XXXXXXXXX,,XX,,X,,XX,,XX,,XX,,XX,,XX,,XXXX,,X,,X,,XX,,XXXXXXXXXX",
-"XXXXXXXXX,,XX,,X,,XX,,XX,,XX,,XX,,XX,,,,,X,,X,,X,,XX,,XXXXXXXXXX",
-"XXXXXXXXX,,,,,,X,,XX,,XX,,XX,,XX,,XX,,XXXX,,X,,X,,,,,,XXXXXXXXXX",
-"XXXXXXXX,,XXXX,,,,XX,,XX,,XX,,XX,,XX,,XXXX,,X,,X,,XXXXXXXXXXXXXX",
-"XXXXXXXX,,XXXX,,,,X,,,XX,,X,,,XX,,XX,,XXXX,,X,,X,,XX,,XXXXXXXXXX",
-"XXXXXXXX,,XXXX,,X,,X,,XXX,,XX,,,,XXX,,XXXX,,X,,XX,,,,XXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * autofile_up_xpm[] = {
+"32 32 9 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"= c #666666",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" BBBBBBBBBBBBBB ",
+" B B......B B_ ",
+" B B......B_BB_x ",
+" B B.%%%%%B_xB_x ",
+" B B.%++++B_xB_x ",
+" B B.%++++B_xB_x ",
+" B BBBBBBBB_xB_x ",
+" B ________xB_x ",
+" B xxxxxxxxB_x ",
+" B BBBBBBBB B_x ",
+" B B====B.B B_x ",
+" B B====B.B B_x ",
+" xB B====B.B B_x ",
+" _BBBBBBBBBBBB_x ",
+" x_____________x ",
+" xxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" # # ",
+" # # # ",
+" # # # # ### ## ",
+" ##### # # # # # ",
+" # # # # # # # ",
+" # # # ## # # # ",
+" # # # # # ## ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/autofile-xx.xbm b/pixmaps/autofile-xx.xbm
deleted file mode 100644
index 979348f..0000000
--- a/pixmaps/autofile-xx.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x20,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0xa0,0x01,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x20,0x01,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x20,0x01,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfc,0x3f,0x01,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x01,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x24,0x01,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x24,
- 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,
- 0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,
- 0x00,0x03,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x66,0x33,0x33,0x33,0x6c,0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x7e,0x33,0x33,0x33,0x6c,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xc3,0x3b,0x3b,0x33,0x6c,0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/compose-dn.xbm b/pixmaps/compose-dn.xbm
deleted file mode 100644
index a4f8132..0000000
--- a/pixmaps/compose-dn.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x01,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0xe7,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xfd,0xd7,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0x87,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0xbf,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,
- 0x00,0xf0,0xff,0xff,0xff,0xff,0xef,0xff,0xff,0xf7,0xff,0xff,0xff,0xff,0x2f,
- 0xff,0x7f,0xf4,0xff,0xff,0xff,0xff,0xef,0xff,0x7f,0xf5,0xff,0xff,0xff,0xff,
- 0xef,0xff,0x7f,0xf5,0xff,0xff,0xff,0xff,0xef,0x03,0x78,0xf4,0xff,0xff,0xff,
- 0xff,0xef,0xff,0xff,0xf7,0xff,0xff,0xff,0xff,0xef,0x03,0xfe,0xf7,0xff,0xff,
- 0xff,0xff,0xef,0xff,0xff,0xf7,0xff,0xff,0xff,0xff,0xef,0x83,0xff,0xf7,0xff,
- 0xff,0xff,0xff,0xef,0xff,0xff,0xf7,0xff,0xff,0xff,0xff,0xef,0xff,0xff,0xf7,
- 0xff,0xff,0xff,0xff,0xef,0xff,0xff,0xf7,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,
- 0xf0,0xff,0xff,0xff,0xff,0xff,0xfd,0xbf,0xff,0xff,0xff,0xff,0xff,0xff,0x01,
- 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xe6,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x3f,0x2c,0x62,0x72,0x38,0x1c,0xfe,0x3f,
- 0x9f,0xc9,0x4c,0x24,0x93,0xc9,0xfc,0x3f,0x9f,0xc9,0x4c,0x26,0x13,0xcf,0xfc,
- 0x3f,0x9f,0xc9,0x4c,0x26,0x73,0x0c,0xfc,0x3f,0x9f,0xc9,0x4c,0x26,0xf3,0xc8,
- 0xff,0x7f,0x86,0xc9,0x4c,0x24,0x93,0xc9,0xfc,0xff,0x30,0xcc,0x4c,0x72,0x38,
- 0x1c,0xfe,0xff,0xff,0xff,0x7f,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xfe,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff};
diff --git a/pixmaps/compose-dn.xpm b/pixmaps/compose-dn.xpm
index bcc4f4a..cc2e2cb 100644
--- a/pixmaps/compose-dn.xpm
+++ b/pixmaps/compose-dn.xpm
@@ -1,50 +1,43 @@
/* XPM */
-static char * compose_xpm[] = {
-"64 42 5 1",
-"X c Gray75 s backgroundToolBarColor",
-"o c Gray60",
-"O c Gray90",
-"+ c Gray60",
-"@ c white",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoooooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOooXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOo+oXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXooooooooooooooooooooooooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@oo@@@@@@@@@@@@@@@ooo@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@o+o@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@o+o@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@ooooooooo@@@@ooo@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@ooooooo@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@ooooo@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXooooooooooooooooooooooooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXooXXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXooXXXXXXooooXXoXoooXoooXXooXooXXXooooXXXooooXXXooooXXXXXXX",
-"XXXXXXooXXXXXooXXooXooXXooXXooXoooXooXooXXooXooXXooXooXXooXXXXXX",
-"XXXXXXooXXXXXooXXooXooXXooXXooXooXXooXooXXooXoooXXXXooXXooXXXXXX",
-"XXXXXXooXXXXXooXXooXooXXooXXooXooXXooXooXXooXXXoooXXooooooXXXXXX",
-"XXXXXXooXXXXXooXXooXooXXooXXooXooXXooXooXXooXXXXoooXooXXXXXXXXXX",
-"XXXXXXXooXXooooXXooXooXXooXXooXoooXooXooXXooXooXXooXooXXooXXXXXX",
-"XXXXXXXXooooXXooooXXooXXooXXooXooXooXXXooooXXXooooXXXooooXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * compose-up_xpm[] = {
+"32 32 8 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #666666",
+"+ c #CCCCCC",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"# c #808080",
+" ",
+" ",
+" B ",
+" B B B ",
+" B B B ",
+" BBB ",
+" BBBBBBBBB ",
+" BBB ",
+" B B_B_BBBBBBBBBBBBBBB ",
+" B B_.B..............B_ ",
+" Bx.............BB.B_x ",
+" x.............BB.B_x ",
+" B....BBBBBB......B_x ",
+" B................B_x ",
+" B....BBBBB.......B_x ",
+" B................B_x ",
+" BBBBBBBBBBBBBBBBBB_x ",
+" __________________x ",
+" xxxxxxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" # # ",
+" ## # ",
+" # # # ## # # ",
+" # ## # # # # # ",
+" # # #### # # # ",
+" # # # # # # ",
+" # # ### # # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/compose-up.xbm b/pixmaps/compose-up.xbm
deleted file mode 100644
index f3a0849..0000000
--- a/pixmaps/compose-up.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfe,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x18,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x02,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x78,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x40,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,
- 0xff,0x0f,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0xd0,
- 0x00,0x80,0x0b,0x00,0x00,0x00,0x00,0x10,0x00,0x80,0x0a,0x00,0x00,0x00,0x00,
- 0x10,0x00,0x80,0x0a,0x00,0x00,0x00,0x00,0x10,0xfc,0x87,0x0b,0x00,0x00,0x00,
- 0x00,0x10,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x10,0xfc,0x01,0x08,0x00,0x00,
- 0x00,0x00,0x10,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x10,0x7c,0x00,0x08,0x00,
- 0x00,0x00,0x00,0x10,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x08,
- 0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,
- 0x0f,0x00,0x00,0x00,0x00,0x00,0x02,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,
- 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x19,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xc0,0xd3,0x9d,0x8d,0xc7,0xe3,0x01,0xc0,
- 0x60,0x36,0xb3,0xdb,0x6c,0x36,0x03,0xc0,0x60,0x36,0xb3,0xd9,0xec,0x30,0x03,
- 0xc0,0x60,0x36,0xb3,0xd9,0x8c,0xf3,0x03,0xc0,0x60,0x36,0xb3,0xd9,0x0c,0x37,
- 0x00,0x80,0x79,0x36,0xb3,0xdb,0x6c,0x36,0x03,0x00,0xcf,0x33,0xb3,0x8d,0xc7,
- 0xe3,0x01,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/compose-up.xpm b/pixmaps/compose-up.xpm
index 4ca2dc7..4a5ec7b 100644
--- a/pixmaps/compose-up.xpm
+++ b/pixmaps/compose-up.xpm
@@ -1,51 +1,43 @@
/* XPM */
-static char * compose_xpm[] = {
-"64 42 6 1",
-"X c Gray75 s backgroundToolBarColor",
-", c black s foregroundToolBarColor",
-"o c black",
-"O c Gray90",
-"+ c Gray60",
-"@ c white",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoooooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOooXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOo+oXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXooooooooooooooooooooooooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@oo@@@@@@@@@@@@@@@ooo@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@o+o@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@o+o@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@ooooooooo@@@@ooo@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@ooooooo@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@ooooo@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXooooooooooooooooooooooooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXX,,,,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXX,,XX,,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXX,,XXXXXX,,,,XX,X,,,X,,,XX,,X,,XXX,,,,XXX,,,,XXX,,,,XXXXXXX",
-"XXXXXX,,XXXXX,,XX,,X,,XX,,XX,,X,,,X,,X,,XX,,X,,XX,,X,,XX,,XXXXXX",
-"XXXXXX,,XXXXX,,XX,,X,,XX,,XX,,X,,XX,,X,,XX,,X,,,XXXX,,XX,,XXXXXX",
-"XXXXXX,,XXXXX,,XX,,X,,XX,,XX,,X,,XX,,X,,XX,,XXX,,,XX,,,,,,XXXXXX",
-"XXXXXX,,XXXXX,,XX,,X,,XX,,XX,,X,,XX,,X,,XX,,XXXX,,,X,,XXXXXXXXXX",
-"XXXXXXX,,XX,,,,XX,,X,,XX,,XX,,X,,,X,,X,,XX,,X,,XX,,X,,XX,,XXXXXX",
-"XXXXXXXX,,,,XX,,,,XX,,XX,,XX,,X,,X,,XXX,,,,XXX,,,,XXX,,,,XXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * compose-up_xpm[] = {
+"32 32 8 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #330099",
+"+ c #CCCCCC",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" B ",
+" B B B ",
+" B B B ",
+" BBB ",
+" BBBBBBBBB ",
+" BBB ",
+" B B_B_BBBBBBBBBBBBBBB ",
+" B B_.B..............B_ ",
+" Bx.............BB.B_x ",
+" x.............BB.B_x ",
+" B....BBBBBB......B_x ",
+" B................B_x ",
+" B....BBBBB.......B_x ",
+" B................B_x ",
+" BBBBBBBBBBBBBBBBBB_x ",
+" __________________x ",
+" xxxxxxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" # # ",
+" ## # ",
+" # # # ## # # ",
+" # ## # # # # # ",
+" # # #### # # # ",
+" # # # # # # ",
+" # # ### # # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/compose-xx.xbm b/pixmaps/compose-xx.xbm
deleted file mode 100644
index 6da6daa..0000000
--- a/pixmaps/compose-xx.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfe,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x02,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x80,0x0a,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0xfc,0x87,0x0b,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0xfc,0x01,0x08,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x7c,0x00,0x08,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x08,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,
- 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,
- 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x19,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
- 0x60,0x36,0xb3,0xdb,0x6c,0x36,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xc0,0x60,0x36,0xb3,0xd9,0x8c,0xf3,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x80,0x79,0x36,0xb3,0xdb,0x6c,0x36,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/delete-dn.xbm b/pixmaps/delete-dn.xbm
deleted file mode 100644
index 49acddf..0000000
--- a/pixmaps/delete-dn.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0xf8,
- 0xf1,0xff,0xff,0xff,0xff,0xff,0xfd,0x33,0xf0,0xff,0xff,0xff,0xff,0x1f,0xf0,
- 0x0b,0xfc,0xff,0xff,0xff,0xff,0x0f,0x80,0x83,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x05,0x82,0xff,0xff,0xff,0xff,0xff,0xff,0x3d,0xb0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x7d,0xb8,0xff,0xff,0xff,0xff,0xff,0xff,0x3d,0xa0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x1d,0x83,0xff,0xff,0xff,0xff,0xff,0xff,0x8d,0x0f,0xfe,0xff,0xff,
- 0xff,0xff,0xff,0xc5,0x3f,0xfc,0xff,0xff,0xff,0xff,0xff,0xe1,0xbf,0xf0,0xff,
- 0xff,0xff,0xff,0xff,0xf0,0xbf,0xe1,0xff,0xff,0xff,0xff,0x3f,0xfc,0xbf,0xc3,
- 0xff,0xff,0xff,0xff,0x1f,0xfc,0xbf,0xc7,0xff,0xff,0xff,0xff,0xff,0xfd,0xbf,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0xbf,0xff,0xff,0xff,0xff,0xff,0xff,0x01,
- 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xf8,0x9f,0xff,0xfc,0xff,0xff,0xff,0x3f,
- 0xf3,0x9f,0xff,0xfc,0xff,0xff,0xff,0x3f,0x67,0x98,0x61,0x18,0xfe,0xff,0xff,
- 0x3f,0x27,0x93,0xcc,0xcc,0xfc,0xff,0xff,0x3f,0x27,0x93,0xcc,0xcc,0xfc,0xff,
- 0xff,0x3f,0x27,0x90,0xc0,0x0c,0xfc,0xff,0xff,0x3f,0x27,0x9f,0xfc,0xcc,0xff,
- 0xff,0xff,0x3f,0x33,0x93,0xcc,0xc4,0xfc,0xff,0xff,0x3f,0x78,0x98,0xe1,0x19,
- 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff};
diff --git a/pixmaps/delete-dn.xpm b/pixmaps/delete-dn.xpm
index fbedbb2..345b0e2 100644
--- a/pixmaps/delete-dn.xpm
+++ b/pixmaps/delete-dn.xpm
@@ -1,49 +1,43 @@
/* XPM */
-static char * delete_xpm[] = {
-"64 42 4 1",
-"X c Gray75 s backgroundToolBarColor",
-"o c Gray60",
-"O c white",
-"+ c Gray60",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooooooooooXXXXXXoooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOooXXooooooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXoooooooOOOOOOo+ooooooXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXoooooooooooOOOoooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOooooooOoooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOooooooOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOooooOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOoooooooOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOoooOOoooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOoooOOOOOoooooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOoooOOOOOOOOooooXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooooOOOOOOOOOoXooooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXooooOOOOOOOOOOoXXooooXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXooooOOOOOOOOOOOOoXXXooooXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXoooooOOOOOOOOOOOOoXXXXoooXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXoooooXXXXXXXXXXooXXXXXXXXXooXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXooXXooXXXXXXXXXooXXXXXXXXXooXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXooXXXooXXooooXXooXXooooXXooooXXooooXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXooXXXooXooXXooXooXooXXooXXooXXooXXooXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXooXXXooXooXXooXooXooXXooXXooXXooXXooXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXooXXXooXooooooXooXooooooXXooXXooooooXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXooXXXooXooXXXXXooXooXXXXXXooXXooXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXooXXooXXooXXooXooXooXXooXXooXoooXXooXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXoooooXXXXooooXXooXXooooXXXXooXXooooXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * delete_up_xpm[] = {
+"32 32 8 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #666666",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BBBBB ",
+" BB B...BB BB_x ",
+" _BB B%%%B.B BB___x ",
+" x__BB%++BBBBB__xxxx ",
+" xx_BBB++BBB_xx ",
+" xB__BB__B_x ",
+" BBB__BBB_x ",
+" BB__..__BBx ",
+" BB_B..%%%%B_BB ",
+" BB__xB%%++++B___BB_x ",
+" _xx BBBBBBBB_xx___x ",
+" ________x xxxx ",
+" xxxxxxx ",
+" ",
+" ",
+" ",
+" ",
+" #### # # ",
+" # # # # ",
+" # # ## # ## ### ## ",
+" # # # # # # # # # # ",
+" # # #### # #### # #### ",
+" # # # # # # # ",
+" #### ### # ### # ### ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/delete-up.xbm b/pixmaps/delete-up.xbm
deleted file mode 100644
index c7b25ff..0000000
--- a/pixmaps/delete-up.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x07,
- 0x0e,0x00,0x00,0x00,0x00,0x00,0x02,0xcc,0x0f,0x00,0x00,0x00,0x00,0xe0,0x0f,
- 0xf4,0x03,0x00,0x00,0x00,0x00,0xf0,0x7f,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfa,0x7d,0x00,0x00,0x00,0x00,0x00,0x00,0xc2,0x4f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x82,0x47,0x00,0x00,0x00,0x00,0x00,0x00,0xc2,0x5f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xe2,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x72,0xf0,0x01,0x00,0x00,
- 0x00,0x00,0x00,0x3a,0xc0,0x03,0x00,0x00,0x00,0x00,0x00,0x1e,0x40,0x0f,0x00,
- 0x00,0x00,0x00,0x00,0x0f,0x40,0x1e,0x00,0x00,0x00,0x00,0xc0,0x03,0x40,0x3c,
- 0x00,0x00,0x00,0x00,0xe0,0x03,0x40,0x38,0x00,0x00,0x00,0x00,0x00,0x02,0x40,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,
- 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x07,0x60,0x00,0x03,0x00,0x00,0x00,0xc0,
- 0x0c,0x60,0x00,0x03,0x00,0x00,0x00,0xc0,0x98,0x67,0x9e,0xe7,0x01,0x00,0x00,
- 0xc0,0xd8,0x6c,0x33,0x33,0x03,0x00,0x00,0xc0,0xd8,0x6c,0x33,0x33,0x03,0x00,
- 0x00,0xc0,0xd8,0x6f,0x3f,0xf3,0x03,0x00,0x00,0xc0,0xd8,0x60,0x03,0x33,0x00,
- 0x00,0x00,0xc0,0xcc,0x6c,0x33,0x3b,0x03,0x00,0x00,0xc0,0x87,0x67,0x1e,0xe6,
- 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/delete-up.xpm b/pixmaps/delete-up.xpm
index fbb5d9b..e893eb8 100644
--- a/pixmaps/delete-up.xpm
+++ b/pixmaps/delete-up.xpm
@@ -1,50 +1,43 @@
/* XPM */
-static char * delete_xpm[] = {
-"64 42 5 1",
-"X c Gray75 s backgroundToolBarColor",
-", c black s foregroundToolBarColor",
-"o c black",
-"O c white",
-"+ c Gray60",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooooooooooXXXXXXoooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOooXXooooooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXoooooooOOOOOOo+ooooooXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXoooooooooooOOOoooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOooooooOoooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOooooooOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOooooOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOoooooooOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOoooOOoooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOoooOOOOOoooooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOoooOOOOOOOOooooXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooooOOOOOOOOOoXooooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXooooOOOOOOOOOOoXXooooXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXooooOOOOOOOOOOOOoXXXooooXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXoooooOOOOOOOOOOOOoXXXXoooXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXX,,,,,XXXXXXXXXX,,XXXXXXXXX,,XXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXX,,XX,,XXXXXXXXX,,XXXXXXXXX,,XXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXX,,XXX,,XX,,,,XX,,XX,,,,XX,,,,XX,,,,XXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXX,,XXX,,X,,XX,,X,,X,,XX,,XX,,XX,,XX,,XXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXX,,XXX,,X,,XX,,X,,X,,XX,,XX,,XX,,XX,,XXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXX,,XXX,,X,,,,,,X,,X,,,,,,XX,,XX,,,,,,XXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXX,,XXX,,X,,XXXXX,,X,,XXXXXX,,XX,,XXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXX,,XX,,XX,,XX,,X,,X,,XX,,XX,,X,,,XX,,XXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXX,,,,,XXXX,,,,XX,,XX,,,,XXXX,,XX,,,,XXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * delete_up_xpm[] = {
+"32 32 8 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BBBBB ",
+" BB B...BB BB_x ",
+" _BB B%%%B.B BB___x ",
+" x__BB%++BBBBB__xxxx ",
+" xx_BBB++BBB_xx ",
+" xB__BB__B_x ",
+" BBB__BBB_x ",
+" BB__..__BBx ",
+" BB_B..%%%%B_BB ",
+" BB__xB%%++++B___BB_x ",
+" _xx BBBBBBBB_xx___x ",
+" ________x xxxx ",
+" xxxxxxx ",
+" ",
+" ",
+" ",
+" ",
+" #### # # ",
+" # # # # ",
+" # # ## # ## ### ## ",
+" # # # # # # # # # # ",
+" # # #### # #### # #### ",
+" # # # # # # # ",
+" #### ### # ### # ### ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/delete-xx.xbm b/pixmaps/delete-xx.xbm
deleted file mode 100644
index 1682610..0000000
--- a/pixmaps/delete-xx.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x07,
- 0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x0f,
- 0xf4,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfa,0x7d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x82,0x47,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xe2,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x3a,0xc0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x0f,0x40,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xe0,0x03,0x40,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x07,0x60,0x00,0x03,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x98,0x67,0x9e,0xe7,0x01,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xd8,0x6c,0x33,0x33,0x03,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xd8,0x60,0x03,0x33,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x87,0x67,0x1e,0xe6,
- 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/document-colorful.xpm b/pixmaps/document-colorful.xpm
deleted file mode 100644
index 89c80db..0000000
--- a/pixmaps/document-colorful.xpm
+++ /dev/null
@@ -1,69 +0,0 @@
-/* XPM */
-static char *document2[] = {
-/* width height num_colors chars_per_pixel */
-" 24 30 32 1",
-/* colors */
-". c #000000",
-"# c #a4a5a4",
-"a c #9f9f9f",
-"b c #999999",
-"c c #919191",
-"d c #818181",
-"e c #6d6d6d",
-"f c #5d5d5d",
-"g c #494949",
-"h c #eaeaea",
-"i c #373737",
-"j c #e3e4e3",
-"k c #d4d4d4",
-"l c #c8c8c8",
-"m c #0d0d0d",
-"n c #b4b4b4",
-"o c #b0aeb0",
-"p c #aeaeae",
-"q c #aaaaaa s background",
-"r c #888888",
-"s c #767676",
-"t c #646464",
-"u c #545454",
-"v c #ffffff",
-"w c #f6f7f6",
-"x c #efefef",
-"y c #dfdfdf",
-"z c #dad9da",
-"A c #242424",
-"B c #cfcfcf",
-"C c #bfbfbf",
-"D c #b9b9b9",
-/* pixels */
-"qqqqqaetr#qqqqqqqqqqqqqq",
-"qqqq#errefd#qqqqqqqqqqqq",
-"qqq#rzklCqcdsdra#qqqqqqq",
-"qqqrkvvxzkkln#rtfdaqqqqq",
-"qq#dvvvvvvxxzklCqcrdsr#q",
-"qq#rresr#lxvvvvxhzl#tisq",
-"qqqqqdsefgieCxvvvvxiAiiq",
-"qqqqqrCttffuuuernkagtiiq",
-"qqqq#nxvxxcsuetsuigrsitq",
-"qqqqczhzxhzzlC#seffscifq",
-"qqqqrvlyxxzlCCzxxkCaCmrq",
-"qqqq#vvlzqhzvvvklalvciaq",
-"qqqckhlkzzhlCCkhhxvvguqq",
-"qqqrvvxvklalxxxlq#xvmd#q",
-"qqqcvxklkvxvxllkhxvlArqq",
-"qq#Cvvvvvvvvvvvvhxvtgqqq",
-"qqrxxvvvvvvvvvvvvvvAeqqq",
-"qqrvkzhzhxxvvvvvvvkmrqqq",
-"qqqlhvvlCrnkhvvvvvci#qqq",
-"qckxxxhxxkzzllllvvguqqqq",
-"qrvklklxxxhlnlzxvhmrqqqq",
-"qahzvvhCcCnxvxlhvqicqqqq",
-"clxkkqlzhkkklCzvvfg#qqqq",
-"txvvvvxlrzlzvvkvvAeqqqqq",
-"dtalvvvvvvxknzhvlArqqqqq",
-"rgimmgdqhvvvvvvvei#qqqqq",
-"qq#rtiA..i#xvvvvitqqqqqq",
-"qqqqqarsgimmis#Cmrqqqqqq",
-"qqqqqqqqq#ceiA..icqqqqqq",
-"qqqqqqqqqqqq#rdfeqqqqqqq"
-};
diff --git a/pixmaps/document-simple.xpm b/pixmaps/document-simple.xpm
deleted file mode 100644
index 5d22158..0000000
--- a/pixmaps/document-simple.xpm
+++ /dev/null
@@ -1,45 +0,0 @@
-/* XPM */
-static char *noname[] = {
-/* width height ncolors chars_per_pixel */
-"24 30 8 1",
-/* colors */
-"` c #000000",
-"a c #818181",
-"b c #EAEAEA",
-"c c #D4D4D4",
-"d c #AAAAAA s background",
-"e c #545454",
-"f c #FFFFFF",
-"g c #242424",
-/* pixels */
-"ddddddaeaddddddddddddddd",
-"dddddaaaaeaddddddddddddd",
-"ddddacccddaaaaaddddddddd",
-"dddacffbccccddaeeadddddd",
-"dddaffffffbbcccddaaaaadd",
-"dddaaaaadcbffffbbccdegad",
-"dddddaaaeegadbffffbggggd",
-"dddddadeeeeeeeaadcdeeggd",
-"ddddddbfbbaaeaeaegeaaged",
-"ddddacbcbbcccddaaeeaaged",
-"ddddafccbbccddcbbcddd`ad",
-"dddddffccdbcfffccdcfagdd",
-"dddacbccccbcddcbbbffeedd",
-"dddaffbfccdcbbbcddbf`add",
-"dddafbcccfbfbcccbbfcgadd",
-"ddddffffffffffffbbfeeddd",
-"ddabbffffffffffffffgaddd",
-"ddafccbcbbbfffffffc`addd",
-"dddcbffcdadcbfffffagdddd",
-"dacbbbbbbcccccccffeedddd",
-"dafccccbbbbcdccbfb`adddd",
-"ddbcffbdaddbfbcbfdgadddd",
-"acbccdccbccccdcffeeddddd",
-"ebffffbcacccffcffgaddddd",
-"aedcffffffbcdcbfcgaddddd",
-"aeg``eadbfffffffagdddddd",
-"dddaegg``gdbffffgedddddd",
-"ddddddaaeg``gadd`adddddd",
-"ddddddddddaagg``gadddddd",
-"dddddddddddddaaeaddddddd"
-};
diff --git a/pixmaps/file-dn.xbm b/pixmaps/file-dn.xbm
deleted file mode 100644
index 67ba91c..0000000
--- a/pixmaps/file-dn.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,
- 0xfe,0xff,0xff,0xff,0xff,0x7f,0xfb,0xdf,0xfe,0xff,0xff,0xff,0xff,0x7f,0xfb,
- 0xdf,0xfe,0xff,0xff,0xff,0xff,0x7f,0xfb,0x5f,0xfe,0xff,0xff,0xff,0xff,0x7f,
- 0xfb,0xdf,0xfe,0xff,0xff,0xff,0xff,0x7f,0xfb,0xdf,0xfe,0xff,0xff,0xff,0xff,
- 0x7f,0xfb,0xdf,0xfe,0xff,0xff,0xff,0xff,0x7f,0xfb,0xdf,0xfe,0xff,0xff,0xff,
- 0xff,0x7f,0xfb,0xdf,0xfe,0xff,0xff,0xff,0xff,0x7f,0x03,0xc0,0xfe,0xff,0xff,
- 0xff,0xff,0x7f,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xfe,0xff,
- 0xff,0xff,0xff,0x7f,0x03,0xc0,0xfe,0xff,0xff,0xff,0xff,0x7f,0xfb,0xdb,0xfe,
- 0xff,0xff,0xff,0xff,0x7f,0xfb,0xdb,0xfe,0xff,0xff,0xff,0xff,0x7f,0xfb,0xdb,
- 0xfe,0xff,0xff,0xff,0xff,0xff,0xfa,0xdb,0xfe,0xff,0xff,0xff,0xff,0xff,0x01,
- 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x80,0xfc,0xff,0xff,0xff,0xff,0xff,
- 0x7f,0xfe,0xfc,0xff,0xff,0xff,0xff,0xff,0x7f,0x9e,0x0c,0xff,0xff,0xff,0xff,
- 0xff,0x7f,0x9e,0x64,0xfe,0xff,0xff,0xff,0xff,0x7f,0x90,0x64,0xfe,0xff,0xff,
- 0xff,0xff,0x7f,0x9e,0x04,0xfe,0xff,0xff,0xff,0xff,0x7f,0x9e,0xe4,0xff,0xff,
- 0xff,0xff,0xff,0x7f,0x9e,0x64,0xfe,0xff,0xff,0xff,0xff,0x7f,0x9e,0x0c,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff};
diff --git a/pixmaps/file-dn.xpm b/pixmaps/file-dn.xpm
index 2ec8b3d..d3aa629 100644
--- a/pixmaps/file-dn.xpm
+++ b/pixmaps/file-dn.xpm
@@ -1,50 +1,44 @@
/* XPM */
-static char * file_xpm[] = {
-"64 42 5 1",
-"X c Gray75 s backgroundToolBarColor",
-"o c Gray60",
-"O c Gray60",
-"+ c Gray90",
-"@ c Gray40",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXooooooooooooooooooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOooooooooooooOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOooooooooooooOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo@@@@@@@o++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo@@@@@@@o++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo@@@@@@@o++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOo@@@@@@@o++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXooooooooXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXooXXXXXXXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXooXXXXooXooXXooooXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXooXXXXooXooXooXXooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoooooXooXooXooXXooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXooXXXXooXooXooooooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXooXXXXooXooXooXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXooXXXXooXooXooXXooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXooXXXXooXooXXooooXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * file_up_xpm[] = {
+"32 32 9 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #666666",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"= c #666666",
+"# c #808080",
+" ",
+" ",
+" ",
+" BBBBBBBBBBBBBB ",
+" B B......B B_ ",
+" B B......B_BB_x ",
+" B B.%%%%%B_xB_x ",
+" B B.%++++B_xB_x ",
+" B B.%++++B_xB_x ",
+" B BBBBBBBB_xB_x ",
+" B ________xB_x ",
+" B xxxxxxxxB_x ",
+" B BBBBBBBB B_x ",
+" B B====B.B B_x ",
+" B B====B.B B_x ",
+" xB B====B.B B_x ",
+" _BBBBBBBBBBBB_x ",
+" x_____________x ",
+" xxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" #### # ",
+" # # ",
+" # # # ## ",
+" ### # # # ",
+" # # # #### ",
+" # # # # ",
+" # # # ### ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/file-up.xbm b/pixmaps/file-up.xbm
deleted file mode 100644
index fe9a875..0000000
--- a/pixmaps/file-up.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,
- 0x01,0x00,0x00,0x00,0x00,0x80,0x04,0x20,0x01,0x00,0x00,0x00,0x00,0x80,0x04,
- 0x20,0x01,0x00,0x00,0x00,0x00,0x80,0x04,0xa0,0x01,0x00,0x00,0x00,0x00,0x80,
- 0x04,0x20,0x01,0x00,0x00,0x00,0x00,0x80,0x04,0x20,0x01,0x00,0x00,0x00,0x00,
- 0x80,0x04,0x20,0x01,0x00,0x00,0x00,0x00,0x80,0x04,0x20,0x01,0x00,0x00,0x00,
- 0x00,0x80,0x04,0x20,0x01,0x00,0x00,0x00,0x00,0x80,0xfc,0x3f,0x01,0x00,0x00,
- 0x00,0x00,0x80,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x01,0x00,
- 0x00,0x00,0x00,0x80,0xfc,0x3f,0x01,0x00,0x00,0x00,0x00,0x80,0x04,0x24,0x01,
- 0x00,0x00,0x00,0x00,0x80,0x04,0x24,0x01,0x00,0x00,0x00,0x00,0x80,0x04,0x24,
- 0x01,0x00,0x00,0x00,0x00,0x00,0x05,0x24,0x01,0x00,0x00,0x00,0x00,0x00,0xfe,
- 0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x7f,0x03,0x00,0x00,0x00,0x00,0x00,
- 0x80,0x01,0x03,0x00,0x00,0x00,0x00,0x00,0x80,0x61,0xf3,0x00,0x00,0x00,0x00,
- 0x00,0x80,0x61,0x9b,0x01,0x00,0x00,0x00,0x00,0x80,0x6f,0x9b,0x01,0x00,0x00,
- 0x00,0x00,0x80,0x61,0xfb,0x01,0x00,0x00,0x00,0x00,0x80,0x61,0x1b,0x00,0x00,
- 0x00,0x00,0x00,0x80,0x61,0x9b,0x01,0x00,0x00,0x00,0x00,0x80,0x61,0xf3,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/file-up.xpm b/pixmaps/file-up.xpm
index 255fd69..fae676a 100644
--- a/pixmaps/file-up.xpm
+++ b/pixmaps/file-up.xpm
@@ -1,51 +1,44 @@
/* XPM */
-static char * file_xpm[] = {
-"64 42 6 1",
-"X c Gray75 s backgroundToolBarColor",
-", c black s foregroundToolBarColor",
-"o c black",
-"O c Gray60",
-"+ c Gray90",
-"@ c Gray40",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXooooooooooooooooooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo++++++++++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOooooooooooooOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOooooooooooooOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo@@@@@@@o++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo@@@@@@@o++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOo@@@@@@@o++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOo@@@@@@@o++oOOoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXX,,,,,,,,X,,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXX,,XXXXXXX,,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXX,,XXXX,,X,,XX,,,,XXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXX,,XXXX,,X,,X,,XX,,XXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXX,,,,,X,,X,,X,,XX,,XXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXX,,XXXX,,X,,X,,,,,,XXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXX,,XXXX,,X,,X,,XXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXX,,XXXX,,X,,X,,XX,,XXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXX,,XXXX,,X,,XX,,,,XXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * file_up_xpm[] = {
+"32 32 9 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"= c #666666",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" BBBBBBBBBBBBBB ",
+" B B......B B_ ",
+" B B......B_BB_x ",
+" B B.%%%%%B_xB_x ",
+" B B.%++++B_xB_x ",
+" B B.%++++B_xB_x ",
+" B BBBBBBBB_xB_x ",
+" B ________xB_x ",
+" B xxxxxxxxB_x ",
+" B BBBBBBBB B_x ",
+" B B====B.B B_x ",
+" B B====B.B B_x ",
+" xB B====B.B B_x ",
+" _BBBBBBBBBBBB_x ",
+" x_____________x ",
+" xxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" #### # ",
+" # # ",
+" # # # ## ",
+" ### # # # ",
+" # # # #### ",
+" # # # # ",
+" # # # ### ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/file-xx.xbm b/pixmaps/file-xx.xbm
deleted file mode 100644
index 04c6a18..0000000
--- a/pixmaps/file-xx.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x20,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0xa0,0x01,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x20,0x01,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x20,0x01,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfc,0x3f,0x01,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x01,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x24,0x01,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x24,
- 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,
- 0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x80,0x01,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x80,0x61,0x9b,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x80,0x61,0xfb,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x80,0x61,0x9b,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/film-colorful.xpm b/pixmaps/film-colorful.xpm
deleted file mode 100644
index 724ba24..0000000
--- a/pixmaps/film-colorful.xpm
+++ /dev/null
@@ -1,69 +0,0 @@
-/* XPM */
-static char *film[] = {
-/* width height num_colors chars_per_pixel */
-" 24 30 32 1",
-/* colors */
-". c #000000",
-"# c #799fa1",
-"a c #060919",
-"b c #411707",
-"c c #8fc7ff",
-"d c #3f4040",
-"e c #873d06",
-"f c #62b1e6",
-"g c #392e26",
-"h c #292a2a",
-"i c #9a9e9f",
-"j c #284367",
-"k c #646666",
-"l c #aacae6",
-"m c #238fc1",
-"n c #182a50",
-"o c #93673e",
-"p c #7f7f80",
-"q c #131516",
-"r c #aaaaaa s background",
-"s c #ddf2fd",
-"t c #6991ac",
-"u c #1c0804",
-"v c #494b4a",
-"w c #948b79",
-"x c #733006",
-"y c #151c34",
-"z c #592009",
-"A c #9f4c05",
-"B c #54585d",
-"C c #376389",
-"D c #231305",
-/* pixels */
-"rrrrrrrrwirrrrrrrrrrrrrr",
-"rrrrpddv..prrrrrrrrrrrrr",
-"rrrpjdkyajjprriiiwiiwirr",
-"rrrnf.pfu.tgri.q....agir",
-"rrktC.dlC.hCpiivqCCjjhBr",
-"rrdcv..lca.tjrrddoBoogdr",
-"rptcj.ulcj.djrrvdAAAAzBr",
-"rBtcj..lcCuapprvgxxxxbdr",
-"rvcfB.alkr..#BrBdDDDDuBr",
-"rdjkt.kB.#..#vrBgnnnhadr",
-"rjq.lCla.kq.BvrBgttmtjhr",
-"rn..llc..Bh.BvrkvAAAAbBr",
-"rh..rjl..Bh.kvrkgAAAAzdr",
-"rn..#tla.pa.pdrBgxxxxbdr",
-"rv..rccq.py.pBrvgzbzbqkr",
-"rjhhlniC.ra.rdrvha.auhBr",
-"rv#lt.Bctc..fBrdgCmCChkr",
-"rvcct.qlc#.utkrhztCtpnBr",
-"rBflC..lcC.nCiidxAAAxdkr",
-"rptcB..lcj.Cvrphbeeezhpr",
-"rrdcC.qlfuutkrkhDbzbqhrr",
-"rrktt.Bcv.Cnrrkq....ddrr",
-"rrihtnrtaaBkrrhnCCCnhBrr",
-"rrrdq#t..avrrpBepppDqwrr",
-"rrrp..BipwrrrvDeeexqdrrr",
-"rrrrh.krrrrrkqDbDbDhkrrr",
-"rrrrp.qrrrrphynnyaudrrrr",
-"rrrrrd.hkpBqhoBkjqdprrrr",
-"rrrrrrv......u.qhhprrrrr",
-"rrrrrrrpvqu..uadpirrrrrr"
-};
diff --git a/pixmaps/film-simple.xpm b/pixmaps/film-simple.xpm
deleted file mode 100644
index bea3fba..0000000
--- a/pixmaps/film-simple.xpm
+++ /dev/null
@@ -1,45 +0,0 @@
-/* XPM */
-static char *noname[] = {
-/* width height ncolors chars_per_pixel */
-"24 30 8 1",
-/* colors */
-"` c #000000",
-"a c #8FC7FF",
-"b c #284367",
-"c c #238FC1",
-"d c #7F7F80",
-"e c #AAAAAA s background",
-"f c #592009",
-"g c #9F4C05",
-/* pixels */
-"eeeeeeeedeeeeeeeeeeeeeee",
-"eeeedbbb``deeeeeeeeeeeee",
-"eeedbbd``bbdeeeeedeedeee",
-"eeeba`da``dfee```````fee",
-"eeddb`bab`fbdeeb`bbbbfbe",
-"eebab``aa``dbeebbgbggfbe",
-"eddab``aab`bbeebbggggfbe",
-"ebdab``aab``ddebffffffbe",
-"ebaab``ade``dbebb`````be",
-"ebbdd`db`d``dbebfbbbf`be",
-"eb``aba``d``bbebfddcdbfe",
-"eb``aaa``bf`bbedbggggfbe",
-"ef``eba``bf`dbedfggggfbe",
-"eb``dda``d``dbebffffffbe",
-"eb``eaa``d``dbebfffff`de",
-"ebffabeb`e``ebebf````fbe",
-"ebdad`bada``abebfbcbbfde",
-"ebaad``aad``ddeffdbddbbe",
-"ebaab``aab`bbeebfgggfbde",
-"eddab``aab`bbedffgggffde",
-"eebab``aa``ddedf`fff`fee",
-"eeddd`bab`bbeed`````bbee",
-"eeefdbed``bdeefbbbbbfbee",
-"eeeb`dd```beedbgddd``dee",
-"eeed``beddeeeb`gggf`beee",
-"eeeef`deeeeed``f`f`fdeee",
-"eeeed``eeeedf`bb```beeee",
-"eeeeeb`fddb`fgbdb`bdeeee",
-"eeeeeeb`````````ffdeeeee",
-"eeeeeeedb``````bdeeeeeee"
-};
diff --git a/pixmaps/followup-dn.xpm b/pixmaps/followup-dn.xpm
new file mode 100644
index 0000000..fe98c6d
--- /dev/null
+++ b/pixmaps/followup-dn.xpm
@@ -0,0 +1,43 @@
+/* XPM */
+static char * followup_up_xpm[] = {
+"32 32 8 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #666666",
+"_ c #888888",
+"+ c #CCCCCC",
+". c #FFFFFF",
+"% c #EEEEEE",
+"x c #AAAAAA",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B ",
+" B B BB_BBBBBBBBBBBBBB ",
+" B% B% B.B..............B_ ",
+" B%xB%xB.%BBBBBB......BB.B_x ",
+" B%xB%xB.%+%%%%%B......BB.B_x ",
+" B%xB%xB.%+++++++BxBB......B_x ",
+" B%xB%xB%+++++++B_........B_x ",
+" _B%xB%xB%%BBBBBB_B.......B_x ",
+" _B%xB%xB%B______........B_x ",
+" _B%xB%xBB_BBBBBBBBBBBBBB_x ",
+" _______B________________x ",
+" xx xx __xxxxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" #### # # ",
+" # # # ",
+" # ## # # ## # # # ",
+" ### # # # # # # # # # ",
+" # # # # # # # # # # ",
+" # # # # # # # # # # ",
+" # ## # # ## ### ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/followup-up.xpm b/pixmaps/followup-up.xpm
new file mode 100644
index 0000000..b3f8467
--- /dev/null
+++ b/pixmaps/followup-up.xpm
@@ -0,0 +1,43 @@
+/* XPM */
+static char * followup_up_xpm[] = {
+"32 32 8 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #330099",
+"_ c #888888",
+"+ c #CCCCCC",
+". c #FFFFFF",
+"% c #EEEEEE",
+"x c #AAAAAA",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B ",
+" B B BB_BBBBBBBBBBBBBB ",
+" B% B% B.B..............B_ ",
+" B%xB%xB.%BBBBBB......BB.B_x ",
+" B%xB%xB.%+%%%%%B......BB.B_x ",
+" B%xB%xB.%+++++++BxBB......B_x ",
+" B%xB%xB%+++++++B_........B_x ",
+" _B%xB%xB%%BBBBBB_B.......B_x ",
+" _B%xB%xB%B______........B_x ",
+" _B%xB%xBB_BBBBBBBBBBBBBB_x ",
+" _______B________________x ",
+" xx xx __xxxxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" #### # # ",
+" # # # ",
+" # ## # # ## # # # ",
+" ### # # # # # # # # # ",
+" # # # # # # # # # # ",
+" # # # # # # # # # # ",
+" # ## # # ## ### ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/forward-dn.xpm b/pixmaps/forward-dn.xpm
new file mode 100644
index 0000000..b61023c
--- /dev/null
+++ b/pixmaps/forward-dn.xpm
@@ -0,0 +1,43 @@
+/* XPM */
+static char * forward_up_xpm[] = {
+"32 32 8 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #666666",
+". c #FFFFFF",
+"_ c #888888",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"x c #AAAAAA",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B ",
+" BBBBBBBBBBBBBBBBBB BB ",
+" B................B_B%B ",
+" B.BB..........BBBBBB%%B ",
+" B.............B%%%%%+%%B ",
+" B....BBBBBB...B%++++++%%B ",
+" B.............B%++++++%B_x ",
+" B....BBBBB....BBBBBB+%B_x ",
+" B..............____B%B_x ",
+" BBBBBBBBBBBBBBBBBB_BB_x ",
+" __________________B_x ",
+" xxxxxxxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ### # ",
+" # # ",
+" # # ## # # # ## ## ",
+" ## # # # # # # # # # # # # # ",
+" # # # # # # # # # # # # ",
+" # # # # # # # # # # # # ",
+" # # # # # ## # ## ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/forward-up.xpm b/pixmaps/forward-up.xpm
new file mode 100644
index 0000000..6f86dd8
--- /dev/null
+++ b/pixmaps/forward-up.xpm
@@ -0,0 +1,43 @@
+/* XPM */
+static char * forward_up_xpm[] = {
+"32 32 8 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"x c #AAAAAA",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B ",
+" BBBBBBBBBBBBBBBBBB BB ",
+" B................B_B%B ",
+" B.BB..........BBBBBB%%B ",
+" B.............B%%%%%+%%B ",
+" B....BBBBBB...B%++++++%%B ",
+" B.............B%++++++%B_x ",
+" B....BBBBB....BBBBBB+%B_x ",
+" B..............____B%B_x ",
+" BBBBBBBBBBBBBBBBBB_BB_x ",
+" __________________B_x ",
+" xxxxxxxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ### # ",
+" # # ",
+" # # ## # # # ## ## ",
+" ## # # # # # # # # # # # # # ",
+" # # # # # # # # # # # # ",
+" # # # # # # # # # # # # ",
+" # # # # # ## # ## ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gear-colorful.xpm b/pixmaps/gear-colorful.xpm
deleted file mode 100644
index c12e506..0000000
--- a/pixmaps/gear-colorful.xpm
+++ /dev/null
@@ -1,279 +0,0 @@
-/* XPM */
-static char *gear[] = {
-/* width height num_colors chars_per_pixel */
-" 24 30 242 2",
-/* colors */
-".. c #aaaaaa s background",
-"zz c #aaaaaa",
-".# c #8e8e8e",
-".a c #4d4d4d",
-".b c #9f9f9f",
-".c c #888888",
-".d c #848484",
-".e c #838383",
-".f c #828282",
-".g c #484848",
-".h c #303030",
-".i c #131313",
-".j c #141414",
-".k c #707070",
-".l c #777777",
-".m c #2b2b2b",
-".n c #1d1d1d",
-".o c #121212",
-".p c #393939",
-".q c #727272",
-".r c #a0a0a0",
-".s c #8b8b8b",
-".t c #3e3e3e",
-".u c #878787",
-".v c #151515",
-".w c #2d2d2d",
-".x c #8a8a8a",
-".y c #171717",
-".z c #202020",
-".A c #0c0c0c",
-".B c #191919",
-".C c #222222",
-".D c #333333",
-".E c #2f2f2f",
-".F c #353535",
-".G c #cacaca",
-".H c #e9e9e9",
-".I c #5c5c5c",
-".J c #c5c5c5",
-".K c #323232",
-".L c #d9d9d9",
-".M c #f9f9f9",
-".N c #ffffff",
-".O c #fbfbfb",
-".P c #c7c7c7",
-".Q c #1e1e1e",
-".R c #6c6c6c",
-".S c #a7a7a7",
-".T c #242424",
-".U c #1a1a1a",
-".V c #6e6e6e",
-".W c #bababa",
-".X c #efefef",
-".Y c #fefefe",
-".Z c #f6f6f6",
-".0 c #eaeaea",
-".1 c #e8e8e8",
-".2 c #454545",
-".3 c #d3d3d3",
-".4 c #e0e0e0",
-".5 c #f7f7f7",
-".6 c #4f4f4f",
-".7 c #232323",
-".8 c #e4e4e4",
-".9 c #f0f0f0",
-"#. c #e7e7e7",
-"## c #e5e5e5",
-"#a c #bfbfbf",
-"#b c #fcfcfc",
-"#c c #d1d1d1",
-"#d c #d2d2d2",
-"#e c #ececec",
-"#f c #f5f5f5",
-"#g c #111111",
-"#h c #363636",
-"#i c #7f7f7f",
-"#j c #e6e6e6",
-"#k c #e2e2e2",
-"#l c #e1e1e1",
-"#m c #f4f4f4",
-"#n c #cfcfcf",
-"#o c #cdcdcd",
-"#p c #d5d5d5",
-"#q c #1c1c1c",
-"#r c #101010",
-"#s c #919191",
-"#t c #666666",
-"#u c #dfdfdf",
-"#v c #dddddd",
-"#w c #2e2e2e",
-"#x c #dbdbdb",
-"#y c #cecece",
-"#z c #cccccc",
-"#A c #c8c8c8",
-"#B c #c6c6c6",
-"#C c #c3c3c3",
-"#D c #a3a3a3",
-"#E c #1f1f1f",
-"#F c #212121",
-"#G c #a1a1a1",
-"#H c #272727",
-"#I c #565656",
-"#J c #4e4e4e",
-"#K c #b2b2b2",
-"#L c #dedede",
-"#M c #5d5d5d",
-"#N c #6a6a6a",
-"#O c #dadada",
-"#P c #d0d0d0",
-"#Q c #cbcbcb",
-"#R c #c9c9c9",
-"#S c #c4c4c4",
-"#T c #c2c2c2",
-"#U c #c1c1c1",
-"#V c #373737",
-"#W c #0f0f0f",
-"#X c #969696",
-"#Y c #d7d7d7",
-"#Z c #d8d8d8",
-"#0 c #d6d6d6",
-"#1 c #d4d4d4",
-"#2 c #bdbdbd",
-"#3 c #494949",
-"#4 c #181818",
-"#5 c #343434",
-"#6 c #dcdcdc",
-"#7 c #bebebe",
-"#8 c #bcbcbc",
-"#9 c #0e0e0e",
-"a. c #c0c0c0",
-"a# c #bbbbbb",
-"aa c #b8b8b8",
-"ab c #414141",
-"ac c #b6b6b6",
-"ad c #f8f8f8",
-"ae c #b9b9b9",
-"af c #b7b7b7",
-"ag c #b5b5b5",
-"ah c #3d3d3d",
-"ai c #404040",
-"aj c #7b7b7b",
-"ak c #b4b4b4",
-"al c #afafaf",
-"am c #444444",
-"an c #161616",
-"ao c #4b4b4b",
-"ap c #b3b3b3",
-"aq c #b1b1b1",
-"ar c #adadad",
-"as c #ababab",
-"at c #8f8f8f",
-"au c #b0b0b0",
-"av c #aeaeae",
-"aw c #acacac",
-"ax c #a9a9a9",
-"ay c #a6a6a6",
-"az c #a4a4a4",
-"aA c #9d9d9d",
-"aB c #9b9b9b",
-"aC c #a8a8a8",
-"aD c #a5a5a5",
-"aE c #9e9e9e",
-"aF c #9c9c9c",
-"aG c #9a9a9a",
-"aH c #989898",
-"aI c #383838",
-"aJ c #8c8c8c",
-"aK c #959595",
-"aL c #939393",
-"aM c #6d6d6d",
-"aN c #a2a2a2",
-"aO c #999999",
-"aP c #979797",
-"aQ c #949494",
-"aR c #929292",
-"aS c #909090",
-"aT c #8d8d8d",
-"aU c #292929",
-"aV c #858585",
-"aW c #3f3f3f",
-"aX c #474747",
-"aY c #868686",
-"aZ c #525252",
-"a0 c #2c2c2c",
-"a1 c #7a7a7a",
-"a2 c #4c4c4c",
-"a3 c #585858",
-"a4 c #686868",
-"a5 c #7e7e7e",
-"a6 c #898989",
-"a7 c #717171",
-"a8 c #3a3a3a",
-"a9 c #515151",
-"b. c #5a5a5a",
-"b# c #424242",
-"ba c #818181",
-"bb c #050505",
-"bc c #797979",
-"bd c #505050",
-"be c #747474",
-"bf c #808080",
-"bg c #7c7c7c",
-"bh c #2a2a2a",
-"bi c #4a4a4a",
-"bj c #fafafa",
-"bk c #1b1b1b",
-"bl c #767676",
-"bm c #737373",
-"bn c #262626",
-"bo c #f1f1f1",
-"bp c #0d0d0d",
-"bq c #0b0b0b",
-"br c #787878",
-"bs c #757575",
-"bt c #6f6f6f",
-"bu c #434343",
-"bv c #3b3b3b",
-"bw c #5e5e5e",
-"bx c #696969",
-"by c #252525",
-"bz c #5f5f5f",
-"bA c #575757",
-"bB c #282828",
-"bC c #010101",
-"bD c #6b6b6b",
-"bE c #676767",
-"bF c #646464",
-"bG c #636363",
-"bH c #616161",
-"bI c #000000",
-"bJ c #5b5b5b",
-"bK c #464646",
-"bL c #656565",
-"bM c #595959",
-"bN c #3c3c3c",
-"bO c #606060",
-"bP c #555555",
-"bQ c #545454",
-"bR c #626262",
-"bS c #535353",
-"bT c #7d7d7d",
-"bU c #313131",
-/* pixels */
-"................................................",
-"..................aB.I.l.#.a.a.IaB..............",
-".................l.n.i.m.n.i.i.i.i#t............",
-"...............p.i.i#N.i.i.i.i.n.n.a............",
-"...........H.0.z.iab.M.Gab.i.n.i.i#t............",
-".......W.M.0.H.l.i#N.H.3.0#N.i.i.i.m.r...r......",
-"......#K#X.H.4...p...3.G.J.I.i.i.i.i.6ab.z.r....",
-"......#N.m.4.3.3.G.G.J.J.W.z.i.i.i.n.i.i.i.I....",
-".....J.6.r.4.3.G.G.J.W.W#K#X.n.6#t.i.i.i.i.n.#..",
-"..#K.0.0.0.3.G.J.J.W.W#Kzzzz.#.H.#.n.i.i.i.i#t..",
-"...G.H.3.3.G.J.J.W.W#Kzzzz.r.raB#X.6.i.i.i.aaB..",
-"...4.3.G.G.J.J.W#K#Kzzzz.r.raB#X#X#i.n.i.n#i....",
-"..#X.r.G.J.J#K.W#K.raB.r.raB#X.#.#.c.a.n.i.6....",
-"..aB.p.r.J.W#K#KaB.p.m#NaB#X.#.#.c.l.z.i.i.m....",
-"....aBaB.W#K#Kzz#t.n.i.h.#.#.#.c#iab.i.i.i.i#g.I",
-"....#K#K#Kzzzz.r.a.z.a.i#X.c.c#i.l.a.i.i.i.i.i.6",
-"...W.Hzzzz.r.raB.a.I.m.i.l.##i.l.l.I.i.i.i.n.h#t",
-"...J.Gzz.r.raB#X#tab#t.i.Izz.l#N#N#N.a.p.n.h.6#t",
-".....3.r.raB#X#X#N.p.p#g.m#K.l#N#N#t.I.I.h.6ab.l",
-".....3aBaB#X#X.#.c.c.i.i#t.r#N#t#t.I.6.6ababab..",
-".....3.#.c.#.c.c.czz.l.p.J.l#t.I.I.I.6.6.pab....",
-"....#X.a.p#N.c#i#i#i#K.G.c#t.I.I.6.6abab.n.p....",
-"..........#t#i#i.l#N#N#t.I.I.I.6.6ab.m.z.i.naB..",
-"...........J.l#N#N#N#t.I.I.6.6.a.a.h.i.i.i#i....",
-"........#K.r.l#N#N#t.I.I.6.6.aabab.h.i.i.a......",
-"..........#N#t#t#t.I.I.6.6.aabab.p.p.z.p.r......",
-"...........rab.6.m.p.6.6.aab.p.p.h.h.p.r........",
-".............r.I.c.c.p.aab.h.n.n.h.h#X..........",
-"..................aB.mab.p.p.i.i.z.#............",
-"...................r.z.m.m.mab#N................"
-};
diff --git a/pixmaps/gear-simple.xpm b/pixmaps/gear-simple.xpm
deleted file mode 100644
index c492b03..0000000
--- a/pixmaps/gear-simple.xpm
+++ /dev/null
@@ -1,46 +0,0 @@
-/* XPM */
-static char *noname[] = {
-/* width height ncolors chars_per_pixel */
-"24 30 9 1",
-/* colors */
-"` c #7F7F7F",
-"a c #393939",
-"b c #111111",
-"c c #AAAAAA s background",
-"C c #AAAAAA",
-"d c #969696",
-"e c #5C5C5C",
-"f c #F9F9F9",
-"g c #D3D3D3",
-/* pixels */
-"cccccccccccccccccccccccc",
-"cccccccccde`deeedccccccc",
-"cccccccc`bbabbbbbecccccc",
-"cccccccabbebbbbbbecccccc",
-"cccccffbbafgabbbbecccccc",
-"ccccfff`befgfebbbacccccc",
-"ccccdfgCaCgggebbbbeabccc",
-"ccceagggggggCbbbbbbbbecc",
-"ccgeCgggggCCCdbeebbbbbdc",
-"ccfffggggCCCCCdfdbbbbbec",
-"cgfgggggCCCCCCCddebbbedc",
-"cggggggCCCCCCCddd`bbb`cc",
-"cdCgggCCCCdCCdddd`ebbecc",
-"cdaCgCCCdaaedddd``bbbacc",
-"ccddCCCCebbaddd``abbbbbe",
-"ccCCCCCCebebd````ebbbbbe",
-"ccfCCCCdeeab`d```ebbbbae",
-"cggCCCddeaebec`eeeeabaee",
-"ccgCCdddeaabac`eeeeeaea`",
-"ccgddddd``bbeCeeeeeeaaac",
-"ccgd`d```C`ag`eeeeeeaacc",
-"ccdeae````Cg`eeeeeaabacc",
-"ccccce```eeeeeeeeaabbbdc",
-"cccccg`eeeeeeeeeeabbb`cc",
-"cccccc`eeeeeeeeaaabbeccc",
-"ccccceeeeeeeeeaaaabacccc",
-"ccccccaeaaeeeaaaaaaccccc",
-"ccccccce``aeaabbaadccccc",
-"cccccccccdaaaabbbdcccccc",
-"ccccccccccbaaaaecccccccc"
-};
diff --git a/pixmaps/getmail-dn.xbm b/pixmaps/getmail-dn.xbm
deleted file mode 100644
index 0f98cdc..0000000
--- a/pixmaps/getmail-dn.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define getmail-dn_width 64
-#define getmail-dn_height 42
-static char getmail-dn_bits[] = {
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xf0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x9f,0xc3,0xff,0xff,0xff,0xff,0xff,0xff,0x8f,0x0f,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x4f,0x3d,0xfc,0xff,0xff,0xff,0xff,0xff,0x07,0xea,0xf0,
- 0xff,0xff,0xff,0xff,0xff,0x07,0xd0,0xc3,0xff,0xff,0xff,0xff,0xff,0x13,0xa0,
- 0x0e,0xff,0xff,0xff,0xff,0xff,0xab,0x00,0x3d,0xfc,0xff,0xff,0xff,0xff,0x53,
- 0x05,0x2a,0xf9,0xff,0xff,0xff,0xff,0xfb,0x0a,0x90,0xf2,0xff,0xff,0xff,0xff,
- 0x1b,0x57,0x40,0xf5,0xff,0xff,0xff,0xff,0x1b,0xac,0xaa,0xe8,0xff,0xff,0xff,
- 0xff,0x1b,0x70,0x55,0xe0,0xff,0xff,0xff,0xff,0x1b,0xc0,0x22,0xe3,0xff,0xff,
- 0xff,0xff,0x1b,0x02,0x55,0xe0,0xff,0xff,0xff,0xff,0x1b,0x0e,0xa4,0xe0,0xff,
- 0xff,0xff,0xff,0x33,0x3e,0x56,0xe1,0xff,0xff,0xff,0xff,0xcf,0xff,0xa6,0xea,
- 0xff,0xff,0xff,0xff,0x3f,0xff,0x57,0xe5,0xff,0xff,0xff,0xff,0xff,0xfc,0xa7,
- 0xea,0xff,0xff,0xff,0xff,0xff,0xf1,0x57,0xe5,0xff,0xff,0xff,0xff,0xff,0xcf,
- 0xa7,0xf8,0xff,0xff,0xff,0xff,0xff,0x1f,0x57,0xfe,0xff,0xff,0xff,0xff,0xff,
- 0x7f,0x84,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe1,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xfd,0xff,0xff,0xff,0xff,0xff,0x83,0xff,0xf9,0xf3,0xf9,0x27,0xff,
- 0xff,0x39,0xff,0xf9,0xf3,0xf9,0x3f,0xff,0xff,0xfc,0xc3,0xf0,0xe3,0x18,0x26,
- 0xff,0xff,0xfc,0x99,0xf9,0xe3,0xc8,0x24,0xff,0xff,0x0c,0x99,0xf9,0x43,0xf8,
- 0x24,0xff,0xff,0x3c,0x81,0xf9,0x53,0x19,0x24,0xff,0xff,0x3c,0xf9,0xf9,0x13,
- 0xc9,0x24,0xff,0xff,0x39,0x99,0xe9,0xb3,0xc9,0x24,0xff,0xff,0x43,0xc3,0xf3,
- 0xb3,0x19,0x21,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff};
diff --git a/pixmaps/getmail-dn.xpm b/pixmaps/getmail-dn.xpm
index 85c7547..200983d 100644
--- a/pixmaps/getmail-dn.xpm
+++ b/pixmaps/getmail-dn.xpm
@@ -1,51 +1,44 @@
/* XPM */
-static char * getmail-up_xpm[] = {
-"64 42 6 1",
-" c gray75 s backgroundToolBarColor",
-"@ c #C0C0C0C0C0C0",
-". c gray60",
-"X c #808080808080",
-"o c #FFFFFFFFFFFF",
-"O c gray60",
-" ",
-" ..... ",
-" ..@@@XX.. ",
-" .Xo@@@@@XX.. ",
-" .o@o@o@@@@XX.. ",
-" .ooooo@o@o@@@XX.. ",
-" .oooooooo@o@@@@XX.. ",
-" .o@oooooooo@o@o@@@XX.. ",
-" .@o@o@oooooooo@o@@@@XX.. ",
-" .o@o@o@o@oooooo@o@o@..@X. ",
-" .@@@@@o@o@oooooooo@.X@X@X. ",
-" .@@..X@@@o@o@ooooo.X@X@X@. ",
-" .@@.O..X@@o@o@o@o@.@X@..X@. ",
-" .@@.OO...X@@@o@o@.@X@.XX.X. ",
-" .@@.OO.....X@@o@o.X@X.@@X.. ",
-" .@@.OO.@X....X@o@.@X@X.oX.. ",
-" .@@..O.@@@X....X@.X@X@.oX.. ",
-" ..@@X..@@@@@X..@@.@X@X@..X. ",
-" ..@@@@@@@@@@X@@.X@X@X@X@. ",
-" ..@@@@@@@@@@@.@X@X@X@X. ",
-" ..@@@@@@@@@.X@X@X@X@. ",
-" ...@@@@@@@.@X@X@X@.. ",
-" ..@@@@@.X@X@X.. ",
-" ...@@@.@X@.. ",
-" X..@.X.. ",
-" .... ",
-" ",
-" ",
-" . ",
-" ..... .. .. .. .. .. ",
-" .. .. .. .. .. .. ",
-" .. .... .... ... ... .... .. .. ",
-" .. .. .. .. ... ... .. .. .. .. ",
-" .. .... .. .. .. .... .... .. .. .. ",
-" .. .. ...... .. .. . . .. ..... .. .. ",
-" .. .. .. .. .. ... .. .. .. .. .. ",
-" .. .. .. .. .. . .. . .. .. .. .. .. ",
-" .... . .... .. .. . .. ... .... .. ",
-" ",
-" ",
-" ",
-" "};
+static char * getmail_up_xpm[] = {
+"32 32 9 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #666666",
+". c #FFFFFF",
+"_ c #888888",
+"+ c #CCCCCC",
+"x c #AAAAAA",
+"% c #EEEEEE",
+": c #F2F2F2",
+"# c #808080",
+" ",
+" ",
+" BBBBBBBBBBBBBBBBBB ",
+" B................B_ ",
+" B.BB..........BB.B_# ",
+" B.............BB.B_# ",
+" B....BBBBBB......B_# ",
+" B................B_# ",
+" B....BBBBBB......B_# ",
+" B.....B%%%B_.....B_# ",
+" BBBBBBB++%B_#BBBBB_# ",
+" _____B++%B_#______# ",
+" ####B++%B_######## ",
+" BBBB++%BBBB ",
+" B:++++%%B_# ",
+" B:++%%B_# ",
+" B:%%B_# ",
+" B:B_# ",
+" B_# ",
+" # ",
+" ",
+" ",
+" ### # ",
+" # # # ",
+" # ## ### ",
+" # ### # # # ",
+" # # #### # ",
+" # # # # ",
+" ### ### # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/getmail-up.xbm b/pixmaps/getmail-up.xbm
deleted file mode 100644
index c85eb99..0000000
--- a/pixmaps/getmail-up.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define getmail-up_width 64
-#define getmail-up_height 42
-static char getmail-up_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x0f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x60,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0xf0,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xb0,0xc2,0x03,0x00,0x00,0x00,0x00,0x00,0xf8,0x15,0x0f,
- 0x00,0x00,0x00,0x00,0x00,0xf8,0x2f,0x3c,0x00,0x00,0x00,0x00,0x00,0xec,0x5f,
- 0xf1,0x00,0x00,0x00,0x00,0x00,0x54,0xff,0xc2,0x03,0x00,0x00,0x00,0x00,0xac,
- 0xfa,0xd5,0x06,0x00,0x00,0x00,0x00,0x04,0xf5,0x6f,0x0d,0x00,0x00,0x00,0x00,
- 0xe4,0xa8,0xbf,0x0a,0x00,0x00,0x00,0x00,0xe4,0x53,0x55,0x17,0x00,0x00,0x00,
- 0x00,0xe4,0x8f,0xaa,0x1f,0x00,0x00,0x00,0x00,0xe4,0x3f,0xdd,0x1c,0x00,0x00,
- 0x00,0x00,0xe4,0xfd,0xaa,0x1f,0x00,0x00,0x00,0x00,0xe4,0xf1,0x5b,0x1f,0x00,
- 0x00,0x00,0x00,0xcc,0xc1,0xa9,0x1e,0x00,0x00,0x00,0x00,0x30,0x00,0x59,0x15,
- 0x00,0x00,0x00,0x00,0xc0,0x00,0xa8,0x1a,0x00,0x00,0x00,0x00,0x00,0x03,0x58,
- 0x15,0x00,0x00,0x00,0x00,0x00,0x0e,0xa8,0x1a,0x00,0x00,0x00,0x00,0x00,0x30,
- 0x58,0x07,0x00,0x00,0x00,0x00,0x00,0xe0,0xa8,0x01,0x00,0x00,0x00,0x00,0x00,
- 0x80,0x7b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x06,0x0c,0x06,0xd8,0x00,
- 0x00,0xc6,0x00,0x06,0x0c,0x06,0xc0,0x00,0x00,0x03,0x3c,0x0f,0x1c,0xe7,0xd9,
- 0x00,0x00,0x03,0x66,0x06,0x1c,0x37,0xdb,0x00,0x00,0xf3,0x66,0x06,0xbc,0x07,
- 0xdb,0x00,0x00,0xc3,0x7e,0x06,0xac,0xe6,0xdb,0x00,0x00,0xc3,0x06,0x06,0xec,
- 0x36,0xdb,0x00,0x00,0xc6,0x66,0x16,0x4c,0x36,0xdb,0x00,0x00,0xbc,0x3c,0x0c,
- 0x4c,0xe6,0xde,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/getmail-up.xpm b/pixmaps/getmail-up.xpm
index 71f0ca4..465fc76 100644
--- a/pixmaps/getmail-up.xpm
+++ b/pixmaps/getmail-up.xpm
@@ -1,52 +1,44 @@
/* XPM */
-static char * getmail-up_xpm[] = {
-"64 42 7 1",
-" c #C3C3C3C3C3C3 s backgroundToolBarColor",
-", c black s foregroundToolBarColor",
-"@ c #C0C0C0C0C0C0",
-". c #000000000000",
-"X c #808080808080",
-"o c #FFFFFFFFFFFF",
-"O c #FFFF00000000",
-" ",
-" ..... ",
-" ..@@@XX.. ",
-" .Xo@@@@@XX.. ",
-" .o@o@o@@@@XX.. ",
-" .ooooo@o@o@@@XX.. ",
-" .oooooooo@o@@@@XX.. ",
-" .o@oooooooo@o@o@@@XX.. ",
-" .@o@o@oooooooo@o@@@@XX.. ",
-" .o@o@o@o@oooooo@o@o@..@X. ",
-" .@@@@@o@o@oooooooo@.X@X@X. ",
-" .@@..X@@@o@o@ooooo.X@X@X@. ",
-" .@@.O..X@@o@o@o@o@.@X@..X@. ",
-" .@@.OO...X@@@o@o@.@X@.XX.X. ",
-" .@@.OO.....X@@o@o.X@X.@@X.. ",
-" .@@.OO.@X....X@o@.@X@X.oX.. ",
-" .@@..O.@@@X....X@.X@X@.oX.. ",
-" ..@@X..@@@@@X..@@.@X@X@..X. ",
-" ..@@@@@@@@@@X@@.X@X@X@X@. ",
-" ..@@@@@@@@@@@.@X@X@X@X. ",
-" ..@@@@@@@@@.X@X@X@X@. ",
-" ...@@@@@@@.@X@X@X@.. ",
-" ..@@@@@.X@X@X.. ",
-" ...@@@.@X@.. ",
-" X..@.X.. ",
-" .... ",
-" ",
-" ",
-" , ",
-" ,,,,, ,, ,, ,, ,, ,, ",
-" ,, ,, ,, ,, ,, ,, ",
-" ,, ,,,, ,,,, ,,, ,,, ,,,, ,, ,, ",
-" ,, ,, ,, ,, ,,, ,,, ,, ,, ,, ,, ",
-" ,, ,,,, ,, ,, ,, ,,,, ,,,, ,, ,, ,, ",
-" ,, ,, ,,,,,, ,, ,, , , ,, ,,,,, ,, ,, ",
-" ,, ,, ,, ,, ,, ,,, ,, ,, ,, ,, ,, ",
-" ,, ,, ,, ,, ,, , ,, , ,, ,, ,, ,, ,, ",
-" ,,,, , ,,,, ,, ,, , ,, ,,, ,,,, ,, ",
-" ",
-" ",
-" ",
-" "};
+static char * getmail_up_xpm[] = {
+"32 32 9 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"+ c #CCCCCC",
+"x c #AAAAAA",
+"% c #EEEEEE",
+": c #F2F2F2",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" BBBBBBBBBBBBBBBBBB ",
+" B................B_ ",
+" B.BB..........BB.B_# ",
+" B.............BB.B_# ",
+" B....BBBBBB......B_# ",
+" B................B_# ",
+" B....BBBBBB......B_# ",
+" B.....B%%%B_.....B_# ",
+" BBBBBBB++%B_#BBBBB_# ",
+" _____B++%B_#______# ",
+" ####B++%B_######## ",
+" BBBB++%BBBB ",
+" B:++++%%B_# ",
+" B:++%%B_# ",
+" B:%%B_# ",
+" B:B_# ",
+" B_# ",
+" # ",
+" ",
+" ",
+" ### # ",
+" # # # ",
+" # ## ### ",
+" # ### # # # ",
+" # # #### # ",
+" # # # # ",
+" ### ### # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/getmail-xx.xbm b/pixmaps/getmail-xx.xbm
deleted file mode 100644
index 17c8947..0000000
--- a/pixmaps/getmail-xx.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x80,0x10,0x00,0x80,0x04,0x20,0x00,0x10,0x29,0x84,0xaa,0x2a,0xa0,0x0a,0x4a,
- 0x45,0x84,0x10,0x20,0x94,0x12,0xa0,0x20,0x10,0x21,0x45,0x95,0x52,0x04,0x15,
- 0x88,0x44,0x04,0x08,0x00,0x40,0x51,0x40,0x21,0x02,0xa1,0xa2,0x0a,0x88,0x0a,
- 0x12,0x8a,0x50,0x14,0x08,0x08,0x00,0x54,0x48,0x20,0x02,0x81,0x42,0x02,0x20,
- 0xa2,0x02,0x8a,0x50,0x24,0x08,0x09,0x00,0x48,0xaa,0x20,0x0a,0x08,0x52,0x00,
- 0x01,0x80,0x02,0x88,0x40,0xa2,0x80,0x2a,0x00,0x20,0x55,0x21,0x12,0x08,0x29,
- 0x84,0x12,0xa0,0x08,0x0a,0x44,0x22,0x84,0x50,0x82,0x48,0x92,0xa0,0x10,0x08,
- 0x21,0x44,0x29,0xa0,0x2a,0x12,0x44,0x20,0x84,0x92,0x92,0x18,0x85,0x48,0x11,
- 0x8a,0x22,0xa4,0xa8,0xa4,0x28,0x02,0x04,0x20,0x88,0x48,0x45,0x52,0x84,0x28,
- 0x51,0x4a,0x42,0x44,0x50,0x89,0x2a,0x42,0x04,0x00,0x09,0x11,0x01,0x51,0x84,
- 0x08,0x51,0x54,0x50,0xa4,0x54,0xa4,0x2a,0x42,0x04,0x02,0x05,0x01,0x01,0x49,
- 0x84,0x08,0x91,0x50,0x40,0x54,0x54,0x90,0x2a,0x42,0x20,0x82,0x8a,0x80,0x22,
- 0x55,0x82,0x28,0x85,0x28,0x20,0x29,0x88,0x20,0x21,0x02,0x20,0x82,0x12,0x84,
- 0x90,0x4a,0x94,0xa8,0x0a,0x20,0x04,0x21,0x24,0x14,0x01,0x02,0x40,0x8a,0x50,
- 0x84,0x82,0x40,0x54,0xa8,0x0a,0x20,0x04,0x51,0x50,0x14,0x01,0x02,0x40,0x82,
- 0x90,0x04,0x05,0x41,0x94,0x28,0x15,0x28,0x4a,0x40,0x42,0x14,0x02,0x89,0x40,
- 0x42,0x92,0x0a,0x14,0x49,0x2a,0x24,0x12,0x10,0x22,0x50,0x45,0x12,0x42,0x91,
- 0x44,0x42,0x89,0x4a,0x12,0xa4,0x14,0x49,0x10,0x28,0x52,0x22,0x04,0x11,0x45,
- 0x4a,0x45,0x82,0x80,0x54,0xa9,0xa4,0x90,0x90,0x10,0x20,0x55,0x04,0x04,0x48,
- 0x24,0x4a,0x04,0x0a,0x42,0x51,0x51,0x25,0x95,0x92,0x50,0xa0,0x28,0x2a,0x0a,
- 0x48,0xa2,0x48,0x0a,0x02,0x82,0x80,0x50,0x02,0x08,0x02,0x21,0xa8,0x28,0x28,
- 0x04,0xa4,0x82,0x50,0x48,0x02,0x82,0x82,0x50,0x11,0x14,0x05,0x01,0xa4,0x48,
- 0x20,0x04,0x04,0x41,0x50,0x54};
diff --git a/pixmaps/gtk/autofile-dn.xpm b/pixmaps/gtk/autofile-dn.xpm
new file mode 100644
index 0000000..443b72e
--- /dev/null
+++ b/pixmaps/gtk/autofile-dn.xpm
@@ -0,0 +1,36 @@
+/* XPM */
+static char * autofile_up_xpm[] = {
+"28 24 9 1",
+" c none",
+"B c #666666",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"= c #666666",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" BBBBBBBBBBBBBB ",
+" B B......B B_ ",
+" B B......B_BB_x ",
+" B B.%%%%%B_xB_x ",
+" B B.%++++B_xB_x ",
+" B B.%++++B_xB_x ",
+" B BBBBBBBB_xB_x ",
+" B ________xB_x ",
+" B xxxxxxxxB_x ",
+" B BBBBBBBB B_x ",
+" B B====B.B B_x ",
+" B B====B.B B_x ",
+" xB B====B.B B_x ",
+" _BBBBBBBBBBBB_x ",
+" x_____________x ",
+" xxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/autofile-up.xpm b/pixmaps/gtk/autofile-up.xpm
new file mode 100644
index 0000000..d5fa4e4
--- /dev/null
+++ b/pixmaps/gtk/autofile-up.xpm
@@ -0,0 +1,36 @@
+/* XPM */
+static char * autofile_up_xpm[] = {
+"28 24 9 1",
+" c none",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"= c #666666",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" BBBBBBBBBBBBBB ",
+" B B......B B_ ",
+" B B......B_BB_x ",
+" B B.%%%%%B_xB_x ",
+" B B.%++++B_xB_x ",
+" B B.%++++B_xB_x ",
+" B BBBBBBBB_xB_x ",
+" B ________xB_x ",
+" B xxxxxxxxB_x ",
+" B BBBBBBBB B_x ",
+" B B====B.B B_x ",
+" B B====B.B B_x ",
+" xB B====B.B B_x ",
+" _BBBBBBBBBBBB_x ",
+" x_____________x ",
+" xxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/compose-dn.xpm b/pixmaps/gtk/compose-dn.xpm
new file mode 100644
index 0000000..379427f
--- /dev/null
+++ b/pixmaps/gtk/compose-dn.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * compose-up_xpm[] = {
+"28 24 8 1",
+" c none",
+"B c #666666",
+"+ c #CCCCCC",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"# c #808080",
+" ",
+" ",
+" ",
+" B ",
+" B B B ",
+" B B B ",
+" BBB ",
+"BBBBBBBBB ",
+" BBB ",
+" B B_B_BBBBBBBBBBBBBBB ",
+" B B_.B..............B_ ",
+" Bx.............BB.B_x ",
+" x.............BB.B_x ",
+" B....BBBBBB......B_x ",
+" B................B_x ",
+" B....BBBBB.......B_x ",
+" B................B_x ",
+" BBBBBBBBBBBBBBBBBB_x ",
+" __________________x ",
+" xxxxxxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/compose-up.xpm b/pixmaps/gtk/compose-up.xpm
new file mode 100644
index 0000000..fbd875f
--- /dev/null
+++ b/pixmaps/gtk/compose-up.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * compose-up_xpm[] = {
+"28 24 8 1",
+" c none",
+"B c #330099",
+"+ c #CCCCCC",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" B ",
+" B B B ",
+" B B B ",
+" BBB ",
+"BBBBBBBBB ",
+" BBB ",
+" B B_B_BBBBBBBBBBBBBBB ",
+" B B_.B..............B_ ",
+" Bx.............BB.B_x ",
+" x.............BB.B_x ",
+" B....BBBBBB......B_x ",
+" B................B_x ",
+" B....BBBBB.......B_x ",
+" B................B_x ",
+" BBBBBBBBBBBBBBBBBB_x ",
+" __________________x ",
+" xxxxxxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/delete-dn.xpm b/pixmaps/gtk/delete-dn.xpm
new file mode 100644
index 0000000..5ffba01
--- /dev/null
+++ b/pixmaps/gtk/delete-dn.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * delete_up_xpm[] = {
+"28 24 8 1",
+" c none",
+"B c #666666",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BBBBB ",
+" BB B...BB BB_x ",
+" _BB B%%%B.B BB___x ",
+" x__BB%++BBBBB__xxxx ",
+" xx_BBB++BBB_xx ",
+" xB__BB__B_x ",
+" BBB__BBB_x ",
+" BB__..__BBx ",
+" BB_B..%%%%B_BB ",
+" BB__xB%%++++B___BB_x ",
+" _xx BBBBBBBB_xx___x ",
+" ________x xxxx ",
+" xxxxxxx ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/delete-up.xpm b/pixmaps/gtk/delete-up.xpm
new file mode 100644
index 0000000..d068f6f
--- /dev/null
+++ b/pixmaps/gtk/delete-up.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * delete_up_xpm[] = {
+"28 24 8 1",
+" c none",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BBBBB ",
+" BB B...BB BB_x ",
+" _BB B%%%B.B BB___x ",
+" x__BB%++BBBBB__xxxx ",
+" xx_BBB++BBB_xx ",
+" xB__BB__B_x ",
+" BBB__BBB_x ",
+" BB__..__BBx ",
+" BB_B..%%%%B_BB ",
+" BB__xB%%++++B___BB_x ",
+" _xx BBBBBBBB_xx___x ",
+" ________x xxxx ",
+" xxxxxxx ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/file-dn.xpm b/pixmaps/gtk/file-dn.xpm
new file mode 100644
index 0000000..c28d251
--- /dev/null
+++ b/pixmaps/gtk/file-dn.xpm
@@ -0,0 +1,36 @@
+/* XPM */
+static char * file_up_xpm[] = {
+"28 24 9 1",
+" c none",
+"B c #666666",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"= c #666666",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" BBBBBBBBBBBBBB ",
+" B B......B B_ ",
+" B B......B_BB_x ",
+" B B.%%%%%B_xB_x ",
+" B B.%++++B_xB_x ",
+" B B.%++++B_xB_x ",
+" B BBBBBBBB_xB_x ",
+" B ________xB_x ",
+" B xxxxxxxxB_x ",
+" B BBBBBBBB B_x ",
+" B B====B.B B_x ",
+" B B====B.B B_x ",
+" xB B====B.B B_x ",
+" _BBBBBBBBBBBB_x ",
+" x_____________x ",
+" xxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/file-up.xpm b/pixmaps/gtk/file-up.xpm
new file mode 100644
index 0000000..6fb88ee
--- /dev/null
+++ b/pixmaps/gtk/file-up.xpm
@@ -0,0 +1,36 @@
+/* XPM */
+static char * file_up_xpm[] = {
+"28 24 9 1",
+" c none",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"= c #666666",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" BBBBBBBBBBBBBB ",
+" B B......B B_ ",
+" B B......B_BB_x ",
+" B B.%%%%%B_xB_x ",
+" B B.%++++B_xB_x ",
+" B B.%++++B_xB_x ",
+" B BBBBBBBB_xB_x ",
+" B ________xB_x ",
+" B xxxxxxxxB_x ",
+" B BBBBBBBB B_x ",
+" B B====B.B B_x ",
+" B B====B.B B_x ",
+" xB B====B.B B_x ",
+" _BBBBBBBBBBBB_x ",
+" x_____________x ",
+" xxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/followup-dn.xpm b/pixmaps/gtk/followup-dn.xpm
new file mode 100644
index 0000000..f6c8df5
--- /dev/null
+++ b/pixmaps/gtk/followup-dn.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * followup_up_xpm[] = {
+"28 24 8 1",
+" c none",
+"B c #666666",
+"_ c #888888",
+"+ c #CCCCCC",
+". c #FFFFFF",
+"% c #EEEEEE",
+"x c #AAAAAA",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B ",
+" B B BB_BBBBBBBBBBBBBB ",
+" B% B% B.B..............B_",
+" B%xB%xB.%BBBBBB......BB.B_",
+" B%xB%xB.%+%%%%%B......BB.B_",
+"B%xB%xB.%+++++++BxBB......B_",
+" B%xB%xB%+++++++B_........B_",
+" _B%xB%xB%%BBBBBB_B.......B_",
+" _B%xB%xB%B______........B_",
+" _B%xB%xBB_BBBBBBBBBBBBBB_",
+" _______B________________",
+" xx xx __xxxxxxxxxxxxxxx",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/followup-up.xpm b/pixmaps/gtk/followup-up.xpm
new file mode 100644
index 0000000..fdbe25d
--- /dev/null
+++ b/pixmaps/gtk/followup-up.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * followup_up_xpm[] = {
+"28 24 8 1",
+" c none",
+"B c #330099",
+"_ c #888888",
+"+ c #CCCCCC",
+". c #FFFFFF",
+"% c #EEEEEE",
+"x c #AAAAAA",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B ",
+" B B BB_BBBBBBBBBBBBBB ",
+" B% B% B.B..............B_",
+" B%xB%xB.%BBBBBB......BB.B_",
+" B%xB%xB.%+%%%%%B......BB.B_",
+"B%xB%xB.%+++++++BxBB......B_",
+" B%xB%xB%+++++++B_........B_",
+" _B%xB%xB%%BBBBBB_B.......B_",
+" _B%xB%xB%B______........B_",
+" _B%xB%xBB_BBBBBBBBBBBBBB_",
+" _______B________________",
+" xx xx __xxxxxxxxxxxxxxx",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/forward-dn.xpm b/pixmaps/gtk/forward-dn.xpm
new file mode 100644
index 0000000..db2adfe
--- /dev/null
+++ b/pixmaps/gtk/forward-dn.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * forward_up_xpm[] = {
+"28 24 8 1",
+" c none",
+"B c #666666",
+". c #FFFFFF",
+"_ c #888888",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"x c #AAAAAA",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B ",
+" BBBBBBBBBBBBBBBBBB BB ",
+" B................B_B%B ",
+" B.BB..........BBBBBB%%B ",
+" B.............B%%%%%+%%B ",
+" B....BBBBBB...B%++++++%%B ",
+" B.............B%++++++%B_x",
+" B....BBBBB....BBBBBB+%B_x ",
+" B..............____B%B_x ",
+" BBBBBBBBBBBBBBBBBB_BB_x ",
+" __________________B_x ",
+" xxxxxxxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/forward-up.xpm b/pixmaps/gtk/forward-up.xpm
new file mode 100644
index 0000000..df90975
--- /dev/null
+++ b/pixmaps/gtk/forward-up.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * forward_up_xpm[] = {
+"28 24 8 1",
+" c none",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"x c #AAAAAA",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B ",
+" BBBBBBBBBBBBBBBBBB BB ",
+" B................B_B%B ",
+" B.BB..........BBBBBB%%B ",
+" B.............B%%%%%+%%B ",
+" B....BBBBBB...B%++++++%%B ",
+" B.............B%++++++%B_x",
+" B....BBBBB....BBBBBB+%B_x ",
+" B..............____B%B_x ",
+" BBBBBBBBBBBBBBBBBB_BB_x ",
+" __________________B_x ",
+" xxxxxxxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/getmail-dn.xpm b/pixmaps/gtk/getmail-dn.xpm
new file mode 100644
index 0000000..88f3e8c
--- /dev/null
+++ b/pixmaps/gtk/getmail-dn.xpm
@@ -0,0 +1,36 @@
+/* XPM */
+static char * getmail_up_xpm[] = {
+"28 24 9 1",
+" c none",
+"B c #666666",
+". c #FFFFFF",
+"_ c #888888",
+"+ c #CCCCCC",
+"x c #AAAAAA",
+"% c #EEEEEE",
+": c #F2F2F2",
+"# c #808080",
+" ",
+" ",
+" ",
+" BBBBBBBBBBBBBBBBBB ",
+" B................B_ ",
+" B.BB..........BB.B_# ",
+" B.............BB.B_# ",
+" B....BBBBBB......B_# ",
+" B................B_# ",
+" B....BBBBBB......B_# ",
+" B.....B%%%B_.....B_# ",
+" BBBBBBB++%B_#BBBBB_# ",
+" _____B++%B_#______# ",
+" ####B++%B_######## ",
+" BBBB++%BBBB ",
+" B:++++%%B_# ",
+" B:++%%B_# ",
+" B:%%B_# ",
+" B:B_# ",
+" B_# ",
+" # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/getmail-up.xpm b/pixmaps/gtk/getmail-up.xpm
new file mode 100644
index 0000000..4e6eb21
--- /dev/null
+++ b/pixmaps/gtk/getmail-up.xpm
@@ -0,0 +1,36 @@
+/* XPM */
+static char * getmail_up_xpm[] = {
+"28 24 9 1",
+" c none",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"+ c #CCCCCC",
+"x c #AAAAAA",
+"% c #EEEEEE",
+": c #F2F2F2",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" BBBBBBBBBBBBBBBBBB ",
+" B................B_ ",
+" B.BB..........BB.B_# ",
+" B.............BB.B_# ",
+" B....BBBBBB......B_# ",
+" B................B_# ",
+" B....BBBBBB......B_# ",
+" B.....B%%%B_.....B_# ",
+" BBBBBBB++%B_#BBBBB_# ",
+" _____B++%B_#______# ",
+" ####B++%B_######## ",
+" BBBB++%BBBB ",
+" B:++++%%B_# ",
+" B:++%%B_# ",
+" B:%%B_# ",
+" B:B_# ",
+" B_# ",
+" # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/help-dn.xpm b/pixmaps/gtk/help-dn.xpm
new file mode 100644
index 0000000..86b64b3
--- /dev/null
+++ b/pixmaps/gtk/help-dn.xpm
@@ -0,0 +1,32 @@
+/* XPM */
+static char * quit_up_xpm[] = {
+"28 24 5 1",
+" c none",
+"B c #666666",
+"_ c #888888",
+"x c #AAAAAA",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BBBBBB ",
+" BBBBBBBB_ ",
+" BBBxxxxBBBx ",
+" BBBxBBBBxBBBx ",
+" BBBxBBBBxBBBx ",
+" BBBBBBBxBBBBx ",
+" BBBBBBxBBBBBx ",
+" BBBBBBxBBBBBx ",
+" BBBBBBBBBBBBx ",
+" BBBBBxBBBBx ",
+" BBBBBBBBx ",
+" BBBBBBx ",
+" xxxxx ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/help-up.xpm b/pixmaps/gtk/help-up.xpm
new file mode 100644
index 0000000..a9596e2
--- /dev/null
+++ b/pixmaps/gtk/help-up.xpm
@@ -0,0 +1,32 @@
+/* XPM */
+static char * quit_up_xpm[] = {
+"28 24 5 1",
+" c none",
+"B c #330099",
+"_ c #888888",
+"x c #AAAAAA",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BBBBBB ",
+" BBBBBBBB_ ",
+" BBBxxxxBBBx ",
+" BBBxBBBBxBBBx ",
+" BBBxBBBBxBBBx ",
+" BBBBBBBxBBBBx ",
+" BBBBBBxBBBBBx ",
+" BBBBBBxBBBBBx ",
+" BBBBBBBBBBBBx ",
+" BBBBBxBBBBx ",
+" BBBBBBBBx ",
+" BBBBBBx ",
+" xxxxx ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/mime-dn.xpm b/pixmaps/gtk/mime-dn.xpm
new file mode 100644
index 0000000..5bc2726
--- /dev/null
+++ b/pixmaps/gtk/mime-dn.xpm
@@ -0,0 +1,32 @@
+/* XPM */
+static char * mime_up_xpm[] = {
+"28 24 5 1",
+" c none",
+"B c #666666",
+"x c #AAAAAA",
+"+ c #CCCCCC",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BB B B ",
+" BB BB BB BB BBB BB ",
+" B BB B B B ",
+" ",
+" xx x x x x x x xxx xx x ",
+" x x xx xx x ",
+" x x x x x x x x x x x ",
+" ",
+" BB B BBB ",
+" BB BB BB BB BBB B BB ",
+" B BB B B BBB ",
+" ",
+" xx x x xxx x x x x xx ",
+" xxx x x x x xx x x x x ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/mime-up.xpm b/pixmaps/gtk/mime-up.xpm
new file mode 100644
index 0000000..c1ce8ad
--- /dev/null
+++ b/pixmaps/gtk/mime-up.xpm
@@ -0,0 +1,32 @@
+/* XPM */
+static char * mime_up_xpm[] = {
+"28 24 5 1",
+" c none",
+"B c #330099",
+"x c #AAAAAA",
+"+ c #CCCCCC",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BB B B ",
+" BB BB BB BB BBB BB ",
+" B BB B B B ",
+" ",
+" xx x x x x x x xxx xx x ",
+" x x xx xx x ",
+" x x x x x x x x x x x ",
+" ",
+" BB B BBB ",
+" BB BB BB BB BBB B BB ",
+" B BB B B BBB ",
+" ",
+" xx x x xxx x x x x xx ",
+" xxx x x x x xx x x x x ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/mime-xx.xpm b/pixmaps/gtk/mime-xx.xpm
new file mode 100644
index 0000000..ef7d217
--- /dev/null
+++ b/pixmaps/gtk/mime-xx.xpm
@@ -0,0 +1,33 @@
+/* XPM */
+static char * mime_up_xpm[] = {
+"28 24 5 1",
+" c none",
+"B c #330099",
+"x c #AAAAAA",
+"+ c #CCCCCC",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" # # # ",
+" # # # ",
+" ### ## # # ### # ",
+" # # # # # # # ",
+" # ### # # # ",
+" # # # # # # ",
+" # ### # # # # ",
+" ",
+" ",
+" # ",
+" # ",
+" ### # ## # ### ",
+" # # # # # # ",
+" # # # ### # # # ",
+" # # # # # # # # ",
+" ### # ### # # # ",
+" # ",
+" # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/next-dn.xpm b/pixmaps/gtk/next-dn.xpm
new file mode 100644
index 0000000..5c7e528
--- /dev/null
+++ b/pixmaps/gtk/next-dn.xpm
@@ -0,0 +1,34 @@
+/* XPM */
+static char * next_up_xpm[] = {
+"28 24 7 1",
+" c none",
+"B c #666666",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"_ c #888888",
+"x c #AAAAAA",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B B ",
+" BB BB ",
+" B%B B%B ",
+" BBBBBB%%B BBBBBB%%B ",
+" B%%%%%+%%B B%%%%%+%%B ",
+" B%++++++%%B B%++++++%%B ",
+" B%++++++%B_xB%++++++%B_x ",
+" BBBBBB+%B_x BBBBBB+%B_x ",
+" ____B%B_x ____B%B_x ",
+" BB_x BB_x ",
+" B_x B_x ",
+" x x ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/next-up.xpm b/pixmaps/gtk/next-up.xpm
new file mode 100644
index 0000000..6e3a9e7
--- /dev/null
+++ b/pixmaps/gtk/next-up.xpm
@@ -0,0 +1,34 @@
+/* XPM */
+static char * next_up_xpm[] = {
+"28 24 7 1",
+" c none",
+"B c #330099",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"_ c #888888",
+"x c #AAAAAA",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B B ",
+" BB BB ",
+" B%B B%B ",
+" BBBBBB%%B BBBBBB%%B ",
+" B%%%%%+%%B B%%%%%+%%B ",
+" B%++++++%%B B%++++++%%B ",
+" B%++++++%B_xB%++++++%B_x ",
+" BBBBBB+%B_x BBBBBB+%B_x ",
+" ____B%B_x ____B%B_x ",
+" BB_x BB_x ",
+" B_x B_x ",
+" x x ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/previous-dn.xpm b/pixmaps/gtk/previous-dn.xpm
new file mode 100644
index 0000000..0627635
--- /dev/null
+++ b/pixmaps/gtk/previous-dn.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * previous_up_xpm[] = {
+"28 24 8 1",
+" c none",
+"B c #666666",
+". c #FFFFFF",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"x c #AAAAAA",
+"_ c #888888",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B B ",
+" BB BB ",
+" B.B B.B ",
+" B.%BBBBBB B.%BBBBBB ",
+" B.%+%%%%%Bx B.%+%%%%%Bx ",
+" B.%+++++++BxB.%+++++++Bx ",
+" xB%+++++++B_xB%+++++++B_ ",
+" x_B%+BBBBBB_x_B%+BBBBBB_ ",
+" x_B%B______ x_B%B______ ",
+" x_BB_ x_BB_ ",
+" x_B_ x_B_ ",
+" x__ x__ ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/previous-up.xpm b/pixmaps/gtk/previous-up.xpm
new file mode 100644
index 0000000..62eef12
--- /dev/null
+++ b/pixmaps/gtk/previous-up.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * previous_up_xpm[] = {
+"28 24 8 1",
+" c none",
+"B c #330099",
+". c #FFFFFF",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"x c #AAAAAA",
+"_ c #888888",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B B ",
+" BB BB ",
+" B.B B.B ",
+" B.%BBBBBB B.%BBBBBB ",
+" B.%+%%%%%Bx B.%+%%%%%Bx ",
+" B.%+++++++BxB.%+++++++Bx ",
+" xB%+++++++B_xB%+++++++B_ ",
+" x_B%+BBBBBB_x_B%+BBBBBB_ ",
+" x_B%B______ x_B%B______ ",
+" x_BB_ x_BB_ ",
+" x_B_ x_B_ ",
+" x__ x__ ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/print-dn.xpm b/pixmaps/gtk/print-dn.xpm
new file mode 100644
index 0000000..1c477e9
--- /dev/null
+++ b/pixmaps/gtk/print-dn.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * print_up_xpm[] = {
+"28 24 8 1",
+" c none",
+"B c #666666",
+". c #FFFFFF",
+"% c #EEEEEE",
+"x c #AAAAAA",
+"+ c #CCCCCC",
+"_ c #888888",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" BBBBBBBBB ",
+" B.%%%%%%B ",
+" B.BBBBB%B ",
+" B.%%%%%%B ",
+" B.BBBBB%B ",
+" B.%%%%%%B ",
+" BBBBBBBBBBBBBBB ",
+" B.............Bx ",
+" B. ++++++++++B_x ",
+" B.++++++++++++B_x ",
+" B.++++++++++++B_x ",
+" BBBBBBBBBBBBBBB_x ",
+" B+_+_+_+_+_+B__x ",
+" BBBBBBBBBBBBB_xx ",
+" x____________x ",
+" xxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/print-up.xpm b/pixmaps/gtk/print-up.xpm
new file mode 100644
index 0000000..4866056
--- /dev/null
+++ b/pixmaps/gtk/print-up.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * print_up_xpm[] = {
+"28 24 8 1",
+" c none",
+"B c #330099",
+". c #FFFFFF",
+"% c #EEEEEE",
+"x c #AAAAAA",
+"+ c #CCCCCC",
+"_ c #888888",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" BBBBBBBBB ",
+" B.%%%%%%B ",
+" B.BBBBB%B ",
+" B.%%%%%%B ",
+" B.BBBBB%B ",
+" B.%%%%%%B ",
+" BBBBBBBBBBBBBBB ",
+" B.............Bx ",
+" B. ++++++++++B_x ",
+" B.++++++++++++B_x ",
+" B.++++++++++++B_x ",
+" BBBBBBBBBBBBBBB_x ",
+" B+_+_+_+_+_+B__x ",
+" BBBBBBBBBBBBB_xx ",
+" x____________x ",
+" xxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/quit-dn.xpm b/pixmaps/gtk/quit-dn.xpm
new file mode 100644
index 0000000..fde4542
--- /dev/null
+++ b/pixmaps/gtk/quit-dn.xpm
@@ -0,0 +1,32 @@
+/* XPM */
+static char * quit_up_xpm[] = {
+"28 24 5 1",
+" c none",
+"B c #666666",
+"_ c #888888",
+"x c #AAAAAA",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BBBBBB ",
+" Bx B_ ",
+" Bx Bx ",
+" Bx BB Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx xx Bx ",
+" BBBBBBx ",
+" xxxxx ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/quit-up.xpm b/pixmaps/gtk/quit-up.xpm
new file mode 100644
index 0000000..cf65002
--- /dev/null
+++ b/pixmaps/gtk/quit-up.xpm
@@ -0,0 +1,32 @@
+/* XPM */
+static char * quit_up_xpm[] = {
+"28 24 5 1",
+" c none",
+"B c #330099",
+"_ c #888888",
+"x c #AAAAAA",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BBBBBB ",
+" Bx B_ ",
+" Bx Bx ",
+" Bx BB Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx xx Bx ",
+" BBBBBBx ",
+" xxxxx ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/recover-dn.xpm b/pixmaps/gtk/recover-dn.xpm
new file mode 100644
index 0000000..9c8fe6d
--- /dev/null
+++ b/pixmaps/gtk/recover-dn.xpm
@@ -0,0 +1,30 @@
+/* XPM */
+static char * recover_up_xpm[] = {
+"28 24 3 1",
+" c none",
+"R c #666666",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/recover-up.xpm b/pixmaps/gtk/recover-up.xpm
new file mode 100644
index 0000000..aa09a30
--- /dev/null
+++ b/pixmaps/gtk/recover-up.xpm
@@ -0,0 +1,30 @@
+/* XPM */
+static char * recover_up_xpm[] = {
+"28 24 3 1",
+" c none",
+"R c #FF0000",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/reply-dn.xpm b/pixmaps/gtk/reply-dn.xpm
new file mode 100644
index 0000000..5d0a841
--- /dev/null
+++ b/pixmaps/gtk/reply-dn.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * reply_up_xpm[] = {
+"28 24 8 1",
+" c none",
+"B c #666666",
+". c #FFFFFF",
+"_ c #888888",
+"% c #EEEEEE",
+"x c #AAAAAA",
+"+ c #CCCCCC",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B ",
+" BB BBBBBBBBBBBBBBBBBB ",
+" B.B B................B_ ",
+" B.%BBBBBB..........BB.B_x",
+" B.%+%%%%%B..........BB.B_x",
+" B.%+++++++BxBBBBBB......B_x",
+" B%+++++++B_............B_x",
+" x_B%+BBBBBB_BBBBB.......B_x",
+" x_B%B______............B_x",
+" x_BB_BBBBBBBBBBBBBBBBBB_x",
+" x_B_ __________________x",
+" x__ xxxxxxxxxxxxxxxxxx",
+" x_ ",
+" x ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/reply-up.xpm b/pixmaps/gtk/reply-up.xpm
new file mode 100644
index 0000000..dc61da3
--- /dev/null
+++ b/pixmaps/gtk/reply-up.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * reply_up_xpm[] = {
+"28 24 8 1",
+" c none",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"% c #EEEEEE",
+"x c #AAAAAA",
+"+ c #CCCCCC",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B ",
+" BB BBBBBBBBBBBBBBBBBB ",
+" B.B B................B_ ",
+" B.%BBBBBB..........BB.B_x",
+" B.%+%%%%%B..........BB.B_x",
+" B.%+++++++BxBBBBBB......B_x",
+" B%+++++++B_............B_x",
+" x_B%+BBBBBB_BBBBB.......B_x",
+" x_B%B______............B_x",
+" x_BB_BBBBBBBBBBBBBBBBBB_x",
+" x_B_ __________________x",
+" x__ xxxxxxxxxxxxxxxxxx",
+" x_ ",
+" x ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/undelete-dn.xpm b/pixmaps/gtk/undelete-dn.xpm
new file mode 100644
index 0000000..53323e3
--- /dev/null
+++ b/pixmaps/gtk/undelete-dn.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * undelete_up_xpm[] = {
+"28 24 8 1",
+" c none",
+"B c #666666",
+". c #FFFFFF",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"_ c #888888",
+"+ c #CCCCCC",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BBBBB ",
+" B B...BB B x ",
+" B B%%%B.B B x ",
+" BB%..BBBB xx ",
+" BB...B.B_x ",
+" B..B...B_x ",
+" BB...B.B_x ",
+" BB.%%%%%B_x ",
+" B B%+++++B_B ",
+" B B%+++++B_ B x ",
+" BBBBBBBB_x x ",
+" ________x xx ",
+" xxxxxxx ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/undelete-up.xpm b/pixmaps/gtk/undelete-up.xpm
new file mode 100644
index 0000000..b875902
--- /dev/null
+++ b/pixmaps/gtk/undelete-up.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * undelete_up_xpm[] = {
+"28 24 8 1",
+" c none",
+"B c #330099",
+". c #FFFFFF",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"_ c #888888",
+"+ c #CCCCCC",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BBBBB ",
+" B B...BB B x ",
+" B B%%%B.B B x ",
+" BB%..BBBB xx ",
+" BB...B.B_x ",
+" B..B...B_x ",
+" BB...B.B_x ",
+" BB.%%%%%B_x ",
+" B B%+++++B_B ",
+" B B%+++++B_ B x ",
+" BBBBBBBB_x x ",
+" ________x xx ",
+" xxxxxxx ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/visit-dn.xpm b/pixmaps/gtk/visit-dn.xpm
new file mode 100644
index 0000000..d558bed
--- /dev/null
+++ b/pixmaps/gtk/visit-dn.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * visit_up_xpm[] = {
+"28 24 8 1",
+" c none",
+"B c #666666",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BBB ",
+" BB BBB..B_ BBB ",
+" B..BBB.....BBB__B_ ",
+" B........BBB_____B_x ",
+" B...%%BBB_______B__x ",
+" B..%%+B_____BB__B_xx ",
+" B.%++B__BBB____B_x ",
+" B%++B_________B__x ",
+" B%++B__BBB____B_xx ",
+" B++B_______BBB_x ",
+" B+B_____BBB____x ",
+" B+B__BBB____xxxx ",
+" BBBB____xxxx ",
+" ____ xxx ",
+" xxxx ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/gtk/visit-up.xpm b/pixmaps/gtk/visit-up.xpm
new file mode 100644
index 0000000..2969351
--- /dev/null
+++ b/pixmaps/gtk/visit-up.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * visit_up_xpm[] = {
+"28 24 8 1",
+" c none",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BBB ",
+" BB BBB..B_ BBB ",
+" B..BBB.....BBB__B_ ",
+" B........BBB_____B_x ",
+" B...%%BBB_______B__x ",
+" B..%%+B_____BB__B_xx ",
+" B.%++B__BBB____B_x ",
+" B%++B_________B__x ",
+" B%++B__BBB____B_xx ",
+" B++B_______BBB_x ",
+" B+B_____BBB____x ",
+" B+B__BBB____xxxx ",
+" BBBB____xxxx ",
+" ____ xxx ",
+" xxxx ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/help-dn.xbm b/pixmaps/help-dn.xbm
deleted file mode 100644
index 3429e95..0000000
--- a/pixmaps/help-dn.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0xf8,0xff,0xff,
- 0xff,0xff,0xff,0x7f,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0xbe,
- 0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x7c,0xeb,0xff,0xff,0xdf,0x07,0x48,0x12,
- 0x38,0xe0,0xff,0xff,0xd4,0x83,0x00,0x80,0x70,0xe0,0xff,0xff,0xc0,0x01,0x02,
- 0x00,0x00,0xc0,0xff,0xff,0x01,0x08,0x90,0x24,0x04,0xc9,0xff,0xff,0x03,0x40,
- 0x00,0x00,0x00,0xe0,0xff,0xff,0x0b,0x00,0x02,0x80,0x90,0xe1,0xff,0xff,0x63,
- 0x12,0x40,0x12,0x02,0xc1,0xff,0xff,0x23,0x80,0x08,0x00,0x00,0xc1,0xff,0xff,
- 0xb3,0x00,0x00,0x40,0x40,0x80,0xff,0xff,0x03,0x10,0x22,0x09,0x02,0x12,0xfe,
- 0xff,0x01,0x40,0x00,0x00,0x00,0x00,0xff,0xff,0x01,0x01,0x08,0x40,0x80,0xff,
- 0xff,0xff,0xff,0x00,0x81,0x04,0x90,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xc0,
- 0xff,0xff,0xff,0xff,0x05,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0x03,0x50,0x05,
- 0xf0,0xff,0xff,0xff,0xff,0x07,0xe0,0x0c,0xf8,0xff,0xff,0xff,0xff,0x0f,0x80,
- 0x35,0xfe,0xff,0xff,0xff,0xff,0x7f,0x00,0xad,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x81,0x56,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xba,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x7f,0xad,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xe5,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xc3,0xff,0x9f,0x7c,0xf0,0xff,0xf3,0xe7,0x93,0xff,0xbf,0x7c,0xe6,0xff,0xff,
- 0xe7,0x33,0x63,0xd9,0x78,0x66,0x2c,0x33,0xe6,0x33,0x49,0xf2,0x7c,0xa6,0x49,
- 0x92,0xe6,0x33,0x49,0xf2,0x7c,0x70,0x48,0x92,0xe7,0x33,0x49,0xf2,0x7c,0x3e,
- 0x49,0x92,0xe7,0x93,0x49,0xf2,0x7c,0x3e,0x49,0x92,0xfe,0xc3,0x63,0xf2,0x79,
- 0x7e,0x42,0x32,0xe6,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff};
diff --git a/pixmaps/help-dn.xpm b/pixmaps/help-dn.xpm
index 92c6ef3..92149b9 100644
--- a/pixmaps/help-dn.xpm
+++ b/pixmaps/help-dn.xpm
@@ -1,49 +1,40 @@
/* XPM */
-static char * help3_xpm[] = {
-"64 42 4 1",
-"X c Gray75 s backgroundToolBarColor",
-"i c Gray60",
-"@ c white",
-"o c Gray60",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXiiiiiiiiXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXiiii@@@@@@@@iiiXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXi@@@@@@@@@@@@@@@iiiXXXXXiXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXii@@@@@@@@@@@@@@@@@@@iXXXXX@XX@XiXXXXXXXXXXX",
-"XXXXXXXXXXXXXiXXXXXi@@@@@@@@@@@@@@@@@@@@@@iXXXi@@ii@@XXXXXXXXXXX",
-"XXXXXXXXiiXiXiXXXXi@@@@@@@@@@@@@@@@@@@@@@@@iXXXi@@@@iXXXXXXXXXXX",
-"XXXXXXXXi@@@@iXXXi@@@@@@@@@@@@@@@@@@@@@@@@@@iii@@@@@@iXXXXXXXXXX",
-"XXXXXXXXXi@@@@iii@@@@@@@@@@@@@@@@@@@@@@@@@@@@i@@@@@@@iXXXXXXXXXX",
-"XXXXXXXXXX@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@iiii@@iXXXXXXXXXXX",
-"XXXXXXXXXXi@@iii@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@iXXi@@iXXXXXXXXXXX",
-"XXXXXXXXXXi@@XXi@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@iXi@@@iXXXXXXXXXX",
-"XXXXXXXXXXi@iXi@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@iXi@@@iXXXXXXXXXX",
-"XXXXXXXXXXi@XXi@@@@@@@@@@@@@@@@@@@@@@@@@@@@ii@@@@iii@@iXXXXXXXXX",
-"XXXXXXXXXXi@iii@@@oo@@@@@@@@@@@@@@@@@@@@@@oooi@@@@@@@@@@iXXXXXXX",
-"XXXXXXXXXi@@@@@@@@oo@@@@@@@@@@@@@@@@@@@@@ooo@@@iiiiiiiiiXXXXXXXX",
-"XXXXXXXXXiiiiiii@@@ooi@@@@@@@@@@@@@@@@@ioooo@@iXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXi@@ioooi@@@@@@@@@@@i@@oooooo@@iXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXi@@@ooooooi@i@@@@iioooooooi@@iXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXi@@iooooooooooooooooooooi@@iXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXii@@ioooi@@@@i@@@oooooi@@iXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXi@@@iioooi@@@i@@@oo@@@iiXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXiii@@@iiio@@@i@@@@iiiXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXii@@@@@i@@@@@@@iXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXiiiiiX@@@@@@@@iXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXi@@@@@@@iXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXi@@@@@@iXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXi@@@iiXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiiiXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXooooXXXXXXXXXXXXXXXooXooXXXXXoooooXXXXXXXXXXXXXXooXXXXXXXooXXX",
-"XXooXooXXXXXXXXXXXXXXXoXooXXXXXooXXooXXXXXXXXXXXXXXXXXXXXXXooXXX",
-"XXooXXooXXoooXXoXooXXoXXoooXXXXooXXooXXoooXXoXooXXooXXoooXXooXXX",
-"XXooXXooXooXooXooXooXXXXooXXXXXooXXooXoXXooXooXooXooXooXoXXooXXX",
-"XXooXXooXooXooXooXooXXXXooXXXXXoooooXXXooooXooXooXooXooXXXXooXXX",
-"XXooXXooXooXooXooXooXXXXooXXXXXooXXXXXooXooXooXooXooXooXXXXooXXX",
-"XXooXooXXooXooXooXooXXXXooXXXXXooXXXXXooXooXooXooXooXooXoXXXXXXX",
-"XXooooXXXXoooXXooXooXXXXXooXXXXooXXXXXXooXooooXooXooXXoooXXooXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+static char * quit_up_xpm[] = {
+"32 32 5 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #666666",
+"_ c #888888",
+"x c #AAAAAA",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BBBBBB ",
+" BBBBBBBB_ ",
+" BBBxxxxBBBx ",
+" BBBxBBBBxBBBx ",
+" BBBxBBBBxBBBx ",
+" BBBBBBBxBBBBx ",
+" BBBBBBxBBBBBx ",
+" BBBBBBxBBBBBx ",
+" BBBBBBBBBBBBx ",
+" BBBBBxBBBBx ",
+" BBBBBBBBx ",
+" BBBBBBx ",
+" xxxxx ",
+" ",
+" ",
+" ",
+" ",
+" # # # ",
+" # # # ",
+" # # ## # ### ",
+" ##### # # # # # ",
+" # # #### # # # ",
+" # # # # # # ",
+" # # ### ## ### ",
+" # ",
+" # ",
+" "};
diff --git a/pixmaps/help-up.xbm b/pixmaps/help-up.xbm
deleted file mode 100644
index c90c5d5..0000000
--- a/pixmaps/help-up.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x07,0x00,0x00,
- 0x00,0x00,0x00,0x80,0x07,0x38,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0xc0,0x41,
- 0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x02,0x10,0x00,0x00,0x20,0x08,0x48,0x12,
- 0x44,0x06,0x00,0x00,0x2b,0x84,0x00,0x80,0x88,0x10,0x00,0x00,0x21,0x02,0x02,
- 0x00,0x70,0x20,0x00,0x00,0xc2,0x09,0x90,0x24,0x24,0x29,0x00,0x00,0x00,0x40,
- 0x00,0x00,0xc0,0x13,0x00,0x00,0xec,0x00,0x02,0x80,0x50,0x12,0x00,0x00,0x84,
- 0x12,0x40,0x12,0x82,0x22,0x00,0x00,0x54,0x80,0x08,0x00,0x80,0x22,0x00,0x00,
- 0xc4,0x00,0x00,0x40,0x58,0x4e,0x00,0x00,0x74,0x1c,0x22,0x09,0x3e,0x12,0x01,
- 0x00,0x02,0x4c,0x00,0x00,0x8e,0xff,0x00,0x00,0xfe,0x39,0x08,0xc0,0x4f,0x00,
- 0x00,0x00,0x00,0xf9,0x81,0xcc,0x5f,0x00,0x00,0x00,0x00,0xf1,0x17,0xfe,0x27,
- 0x00,0x00,0x00,0x00,0xf6,0xff,0xff,0x13,0x00,0x00,0x00,0x00,0xcc,0xff,0xff,
- 0x09,0x00,0x00,0x00,0x00,0x88,0xff,0x3d,0x06,0x00,0x00,0x00,0x00,0x70,0xbc,
- 0xf7,0x01,0x00,0x00,0x00,0x00,0x80,0x41,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfe,0xd6,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x7a,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x80,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1d,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x3c,0x00,0x60,0x83,0x0f,0x00,0x0c,0x18,0x6c,0x00,0x40,0x83,0x19,0x00,0x00,
- 0x18,0xcc,0x9c,0x26,0x87,0x99,0xd3,0xcc,0x19,0xcc,0xb6,0x0d,0x83,0x59,0xb6,
- 0x6d,0x19,0xcc,0xb6,0x0d,0x83,0x8f,0xb7,0x6d,0x18,0xcc,0xb6,0x0d,0x83,0xc1,
- 0xb6,0x6d,0x18,0x6c,0xb6,0x0d,0x83,0xc1,0xb6,0x6d,0x01,0x3c,0x9c,0x0d,0x86,
- 0x81,0xbd,0xcd,0x19,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/help-up.xpm b/pixmaps/help-up.xpm
index ad45974..60d4428 100644
--- a/pixmaps/help-up.xpm
+++ b/pixmaps/help-up.xpm
@@ -1,52 +1,40 @@
/* XPM */
-static char * help3_xpm[] = {
-"64 42 7 1",
-"X c Gray75 s backgroundToolBarColor",
-", c black s foregroundToolBarColor",
-"i c Gray20",
-"@ c rgb:e1/92/46",
-"T c red",
-"t c pink",
-"o c black",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXiiiiiiiiXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXiiii@@@@@@@@iiiXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXi@@@@@@@@@@@@@@@iiiXXXXXiXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXii@@@@@@@@@@@@@@@@@@@iXXXXX@XX@XiXXXXXXXXXXX",
-"XXXXXXXXXXXXXiXXXXXi@@@@@@@@@@@@@@@@@@@@@@iXXXi@@ii@@XXXXXXXXXXX",
-"XXXXXXXXiiXiXiXXXXi@@@@@@@@@@@@@@@@@@@@@@@@iXXXi@@@@iXXXXXXXXXXX",
-"XXXXXXXXi@@@@iXXXi@@@@@@@@@@@@@@@@@@@@@@@@@@iii@@@@@@iXXXXXXXXXX",
-"XXXXXXXXXi@@@@iii@@@@@@@@@@@@@@@@@@@@@@@@@@@@i@@@@@@@iXXXXXXXXXX",
-"XXXXXXXXXX@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@iiii@@iXXXXXXXXXXX",
-"XXXXXXXXXXi@@iii@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@iXXi@@iXXXXXXXXXXX",
-"XXXXXXXXXXi@@XXi@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@iXi@@@iXXXXXXXXXX",
-"XXXXXXXXXXi@iXi@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@iXi@@@iXXXXXXXXXX",
-"XXXXXXXXXXi@XXi@@@@@@@@@@@@@@@@@@@@@@@@@@@@ii@@@@iii@@iXXXXXXXXX",
-"XXXXXXXXXXi@iii@@@oo@@@@@@@@@@@@@@@@@@@@@@oooi@@@@@@@@@@iXXXXXXX",
-"XXXXXXXXXi@@@@@@@@oo@@@@@@@@@@@@@@@@@@@@@ooo@@@iiiiiiiiiXXXXXXXX",
-"XXXXXXXXXiiiiiii@@@ooi@@@@@@@@@@@@@@@@@ioooo@@iXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXi@@ioooi@@@@@@@@@@@i@@oooooo@@iXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXi@@@ooooooi@i@@@@iioooooooi@@iXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXi@@iooooooooooooooooooooi@@iXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXii@@ioooiiTiTiTiToooooi@@iXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXi@@@iioooiTTTiTTToo@@@iiXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXiii@@@iiioTTTiTTTTiiiXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXii@@@@@iTTTTTTTiXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXiiiiiiTtTTTtTTiXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiTtTTTTTiXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiTtTTTTiXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiTTTiiXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiiiXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XX,,,,XXXXXXXXXXXXXXX,,X,,XXXXX,,,,,XXXXXXXXXXXXXX,,XXXXXXX,,XXX",
-"XX,,X,,XXXXXXXXXXXXXXX,X,,XXXXX,,XX,,XXXXXXXXXXXXXXXXXXXXXX,,XXX",
-"XX,,XX,,XX,,,XX,X,,XX,XX,,,XXXX,,XX,,XX,,,XX,X,,XX,,XX,,,XX,,XXX",
-"XX,,XX,,X,,X,,X,,X,,XXXX,,XXXXX,,XX,,X,XX,,X,,X,,X,,X,,X,XX,,XXX",
-"XX,,XX,,X,,X,,X,,X,,XXXX,,XXXXX,,,,,XXX,,,,X,,X,,X,,X,,XXXX,,XXX",
-"XX,,XX,,X,,X,,X,,X,,XXXX,,XXXXX,,XXXXX,,X,,X,,X,,X,,X,,XXXX,,XXX",
-"XX,,X,,XX,,X,,X,,X,,XXXX,,XXXXX,,XXXXX,,X,,X,,X,,X,,X,,X,XXXXXXX",
-"XX,,,,XXXX,,,XX,,X,,XXXXX,,XXXX,,XXXXXX,,X,,,,X,,X,,XX,,,XX,,XXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+static char * quit_up_xpm[] = {
+"32 32 5 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #330099",
+"_ c #888888",
+"x c #AAAAAA",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BBBBBB ",
+" BBBBBBBB_ ",
+" BBBxxxxBBBx ",
+" BBBxBBBBxBBBx ",
+" BBBxBBBBxBBBx ",
+" BBBBBBBxBBBBx ",
+" BBBBBBxBBBBBx ",
+" BBBBBBxBBBBBx ",
+" BBBBBBBBBBBBx ",
+" BBBBBxBBBBx ",
+" BBBBBBBBx ",
+" BBBBBBx ",
+" xxxxx ",
+" ",
+" ",
+" ",
+" ",
+" # # # ",
+" # # # ",
+" # # ## # ### ",
+" ##### # # # # # ",
+" # # #### # # # ",
+" # # # # # # ",
+" # # ### ## ### ",
+" # ",
+" # ",
+" "};
diff --git a/pixmaps/help-xx.xbm b/pixmaps/help-xx.xbm
deleted file mode 100644
index 5f3d51f..0000000
--- a/pixmaps/help-xx.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x07,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0xc0,0x41,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x08,0x00,0x00,
- 0x44,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x02,0x88,
- 0x24,0x70,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
- 0x01,0x00,0xc0,0x13,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x84,
- 0x00,0x20,0x00,0x89,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x44,0x12,0x02,0x24,0x58,0x4e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x22,0x0c,0x80,0x00,0x8e,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xf9,0x11,0xc8,0x4f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xf2,0xff,0xff,0x13,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x88,0xff,0xbf,0x06,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x41,0x7b,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x6e,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1d,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6c,0x00,0x40,0x83,0x19,0x00,0x00,
- 0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcc,0xb6,0x0d,0x83,0x59,0xb6,
- 0x6d,0x19,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcc,0xb6,0x0d,0x83,0xc1,
- 0xb6,0x6d,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x9c,0x0d,0x86,
- 0x81,0xbd,0xcd,0x19,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/make-gtk-pixmaps.py b/pixmaps/make-gtk-pixmaps.py
new file mode 100755
index 0000000..5f1b461
--- /dev/null
+++ b/pixmaps/make-gtk-pixmaps.py
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+# -*- python -*-
+
+import os, sys
+
+if not os.path.exists("gtk"):
+ os.mkdir("gtk")
+
+for xpmfile in sys.argv[1:]:
+ fd = open(xpmfile, "r")
+ xpm = fd.readlines()
+ fd.close()
+ xpm[2] = xpm[2].replace("32 32", "28 24")
+ xpm[3] = xpm[3].replace("#B2B2B2 s backgroundToolBarColor", "none")
+ for i in range(4, 20):
+ if xpm[i].startswith('" '):
+ del xpm[i+22:i+31]
+ xpm.insert(i, xpm[i])
+ for j in range(i, i+24):
+ xpm[j] = '"' + xpm[j][3:3+28] + '"' + xpm[j][34:]
+ break
+ fd = open("gtk/" + xpmfile, "w")
+ fd.writelines(xpm)
+ fd.close()
diff --git a/pixmaps/message-colorful.xpm b/pixmaps/message-colorful.xpm
deleted file mode 100644
index 3ebaf1d..0000000
--- a/pixmaps/message-colorful.xpm
+++ /dev/null
@@ -1,62 +0,0 @@
-/* XPM */
-static char *message[] = {
-/* width height num_colors chars_per_pixel */
-" 24 30 25 1",
-/* colors */
-". c #000000",
-"# c #a4a579",
-"a c #9f9c66",
-"b c #918e5d",
-"c c #817f53",
-"d c #6d6b46",
-"e c #5d5b3c",
-"f c #49482f",
-"g c #eae696",
-"h c #373623",
-"i c #d4d088",
-"j c #c8c480",
-"k c #0d0d08",
-"l c #b4b173",
-"m c #aaa76d s background",
-"n c #888657",
-"o c #76744c",
-"p c #646240",
-"q c #545236",
-"r c #fffaa3",
-"s c #efeb99",
-"t c #dfdb8f",
-"u c #bac384",
-"v c #242317",
-"w c #bfbc7a",
-/* pixels */
-"mmmmmadpn#mmmmmmmmmmmmmm",
-"mmmm#dnndec#mmmmmmmmmmmm",
-"mmm#nuijwmbcocna#mmmmmmm",
-"mmmnirrsuiijl#npecammmmm",
-"mm#crrrrrrssuijwmbncon#m",
-"mm#nndon#jsrrrrsguj#phom",
-"mmmmmcodefhdwsrrrrshvhhm",
-"mmmmmnwppeeqqqdnliafphhm",
-"mmmm#lsrssboqdpoqhfnohpm",
-"mmmmbugusguujw#odeeobhem",
-"mmmmnrjtssujwwussiwawknm",
-"mmmm#rrjumgurrrijajrbham",
-"mmmbigjiuugjwwiggsrrfqmm",
-"mmmnrrsrijajsssjm#srkc#m",
-"mmmbrsijirsrsjjigsrjvnmm",
-"mm#wrrrrrrrrrrrrgsrpfmmm",
-"mmnssrrrrrrrrrrrrrrvdmmm",
-"mmnriugugssrrrrrrriknmmm",
-"mmmjgrrjwnligrrrrrbh#mmm",
-"mbisssgssiuujjjjrrfqmmmm",
-"mnrijijsssgjljusrgknmmmm",
-"magurrgwbwlsrsjgrmhbmmmm",
-"bjsiimjugiiijwurref#mmmm",
-"psrrrrsjnujurrirrvdmmmmm",
-"cpajrrrrrrsilugrjvnmmmmm",
-"nfhkkfcmgrrrrrrrdh#mmmmm",
-"mm#nphv..h#srrrrhpmmmmmm",
-"mmmmmanofhkkho#wknmmmmmm",
-"mmmmmmmmm#bdhv..hbmmmmmm",
-"mmmmmmmmmmmm#ncedmmmmmmm"
-};
diff --git a/pixmaps/message-simple.xpm b/pixmaps/message-simple.xpm
deleted file mode 100644
index 22f44d7..0000000
--- a/pixmaps/message-simple.xpm
+++ /dev/null
@@ -1,45 +0,0 @@
-/* XPM */
-static char *noname[] = {
-/* width height ncolors chars_per_pixel */
-"24 30 8 1",
-/* colors */
-"` c #000000",
-"a c #817F53",
-"b c #FFFAA3",
-"c c #545236",
-"d c #BFBC7A",
-"e c #AAA76D s background",
-"f c #242317",
-"g c #D4D088",
-/* pixels */
-"eeeeeeacaeeeeeeeeeeeeeee",
-"eeeeeaaaacaeeeeeeeeeeeee",
-"eeeeadgddeaaaaaeeeeeeeee",
-"eeeagbbbdggdeeaccaeeeeee",
-"eeeabbbbbbbbdgddeaaaaaee",
-"eeeaaaaaedbbbbbbbddecfae",
-"eeeeeaaaccfadbbbbbbffffe",
-"eeeeeadcccccccaaegeccffe",
-"eeeeeebbbbaacacacfcaafce",
-"eeeeadbdbbddddeaaccaafce",
-"eeeeabdgbbdddddbbgded`ae",
-"eeeeebbddebdbbbgdedbafee",
-"eeeagbdgddbdddgbbbbbccee",
-"eeeabbbbgdedbbbdeebb`aee",
-"eeeabbgdgbbbbddgbbbdfaee",
-"eeedbbbbbbbbbbbbbbbcceee",
-"eeabbbbbbbbbbbbbbbbfaeee",
-"eeabgdbdbbbbbbbbbbg`aeee",
-"eeedbbbddaegbbbbbbafeeee",
-"eagbbbbbbgddddddbbcceeee",
-"eabgdgdbbbbdeddbbb`aeeee",
-"eebdbbbdadebbbdbbefaeeee",
-"adbggeddbgggdddbbcceeeee",
-"cbbbbbbdadddbbgbbfaeeeee",
-"acedbbbbbbbgedbbdfaeeeee",
-"acf``caebbbbbbbbafeeeeee",
-"eeeacff``febbbbbfceeeeee",
-"eeeeeeaacf``faed`aeeeeee",
-"eeeeeeeeeeaaff``faeeeeee",
-"eeeeeeeeeeeeeaacaeeeeeee"
-};
diff --git a/pixmaps/mime-colorful-dn.xpm b/pixmaps/mime-colorful-dn.xpm
deleted file mode 100644
index dff7826..0000000
--- a/pixmaps/mime-colorful-dn.xpm
+++ /dev/null
@@ -1,137 +0,0 @@
-/* XPM */
-static char *mime-colorful-dn[] = {
-/* width height num_colors chars_per_pixel */
-" 64 42 88 2",
-/* colors */
-".. c #878787",
-".# c #818181",
-".a c #7f7f7f",
-".b c #939393",
-".c c #969696",
-".d c #979797",
-".e c #9f9f9f",
-".f c #a7a7a7",
-".g c #a1a1a1",
-".h c #a5a5a5",
-".i c #aeaeae",
-".j c #adadad",
-".k c #959595",
-".l c #9a9a9a",
-".m c #939393",
-".n c #868686",
-".o c #828282",
-".p c #8b8b8b",
-".q c #a3a3a3",
-".r c #838383",
-".s c #8e8e8e",
-".t c #a2a2a2",
-".u c #7d7d7d",
-".v c #7b7b7b",
-".w c #797979",
-".x c #767676",
-".y c #757575",
-".z c #757575",
-".A c #777777",
-".B c #727272",
-".C c #6f6f6f",
-".D c #6a6a6a",
-".E c #636363",
-".F c #6b6b6b",
-".G c #8a8a8a",
-".H c #8e8e8e",
-".I c #676767",
-".J c #6e6e6e",
-".K c #7a7a7a",
-".L c #626262",
-".M c #7e7e7e",
-".N c #8d8d8d",
-".O c #565656",
-".P c #505050",
-".Q c #4d4d4d",
-".R c #494949",
-".S c #434343",
-".T c #404040",
-".U c #575757",
-".V c #393939",
-".W c #3d3d3d",
-".X c #3f3f3f",
-".Y c #4f4f4f",
-".Z c #585858",
-".0 c #5b5b5b",
-".1 c #5a5a5a",
-".2 c #858585",
-".3 c #5e5e5e",
-".4 c #4b4b4b",
-".5 c #7b7b7b",
-".6 c #3a3a3a",
-".7 c #636363",
-".8 c #444444",
-".9 c #3c3c3c",
-"#. c #353535",
-"## c #515151",
-"#a c #323232",
-"#b c #6c6c6c",
-"#c c #6a6a6a",
-"#d c #6f6f6f",
-"#e c #2a2a2a",
-"#f c #666666",
-"#g c #838383",
-"#h c #2d2d2d",
-"#i c #737373",
-"#j c #8f8f8f",
-"#k c #6c6c6c",
-"#l c #a3a3a3",
-"#m c #9f9f9f",
-"#n c Gray60",
-"#o c #969696",
-"#p c #b0b0b0",
-"#q c #ababab",
-"#r c #9e9e9e",
-"#s c #9a9a9a",
-"#t c #8a8a8a",
-"#u c Gray60",
-"#v c #a7a7a7",
-/* pixels */
-"...#.#.......a.a.#.....b.b.c.d.d.d.e.d.e.e.e.e.e.e.f.g.g.h.h.e.f.h.i.h.h.f.h.h.f.h.j.j.f.h.f.j.f.h.j.h.j.h.g.e.e.e.d.d.k.c.l.b.m",
-".b.n...........o...p.b.b.b.b.c.d.d.e.c.d.e.e.e.d.g.e.e.e.g.l.g.e.e.g.g.e.g.q.f.h.h.h.g.h.h.h.j.i.h.h.h.h.e.e.e.e.l.e.c.d.e.c.m.c",
-".r.r...#...........b.b.b.s.b.m.d.d.c.l.e.d.l.e.d.e.m.d.l.d.e.e.e.e.e.e.e.e.d.g.d.e.e.e.h.g.f.h.h.h.h.f.h.g.t.e.e.d.e.d.c.c.d.c.c",
-".#.o.a.#.#.#...#.......p...b.b.b.m.k.d.b.d.d.m.b.b.d.d.b.b.b.m.k.d.d.d.d.d.b.m.k.d.d.d.d.g.g.g.e.e.g.e.g.e.e.d.d.d.d.d.b.k.b.b.d",
-".s.......#.#.#...#.o.#.....#.....p.....p.......#.a.#.#.......#.............b.b.b...b.b.k.e.c.e.d.e.d.e.d.e.e.d.d.k.c.b.b.m.b.m.d",
-".#.#.o.r.a.u.a.u.o.u.u.u.a.#.o.u.u.r.u.u.u.v.u.w.w.x.u.u.u.u.u.u.a.#.o.#.o.............s.s.b.k.k.k.b.k.b.m.b.b.s.......s...b.s.b",
-"...a.u.u.w.u.u.y.w.z.z.u.u.u.z.u.w.z.y.z.z.u.z.z.z.z.z.y.u.w.u.z.#.a.u.#.a.#.#.#...#.....#...........p.b.b...#.o.o.a.o.o.#.s.s.s",
-".a.w.z.u.w.z.w.w.w.z.A.u.z.z.z.B.z.z.A.z.A.z.A.y.z.C.A.z.z.y.w.w.w.a.o.a.#.#.o.a.o...o...#...#.#.#.#.r.#.#...o.a.a.o.u.a.o.o.#..",
-".#.o.u.z.z.z.z.B.B.z.y.B.z.B.B.B.B.B.B.B.B.B.B.B.C.B.B.w.w.w.w.x.u.w.u.u.o...a...#.....#.#...n.#.#.#.n...#.#.o.#.#.....#.o.r.#.#",
-".w.a.w.w.B.B.B.z.B.B.z.B.B.D.C.B.C.B.B.C.D.C.E.C.C.F.z.B.B.B.w.B.u.u.u.u.u.#.#.#.....G.......H...#.#.#.........#.....H..........",
-".w.x.z.z.B.B.z.C.z.B.B.B.C.C.D.C.E.I.C.E.E.D.D.C.B.F.B.B.F.z.w.w.w.u.#.v.o.a...........G...G...b.s.H.s.H.....G.s.H...G.b.s......",
-".w.x.z.B.B.z.A.z.B.B.B.F.C.B.F.E.C.E.E.C.E.F.E.B.J.B.B.B.w.w.w.w.w.o.u.#.o.#.#...n.#.....s...p.s.b...b.b...G.b...G.b...p.b...G..",
-".w.w.w.x.B.#.B.w.B.F.B.B.F.D.B.D.B.D.D.I.F.E.C.D.B.B.F.z.z.z.B.w.z.w.o.K.u.#.o.w.o.n...#.G.....H.b...s.G.b.b.s.H.p.b.b.s...G...#",
-".u.w.w.w.w.w.w.K.u.z.B.B.B.F.B.B.C.D.C.E.F.L.E.L.L.I.E.F.C.C.B.F.B.C.C.z.z.u.M.w.a.o.a.#.....H...s.G.b.b.N...b.....p...s.G.N...#",
-".a.w.a.w.a.o.a.u.y.w.B.B.B.B.C.E.L.O.P.P.Q.R.S.S.T.Q.R.R.R.P.P.U.O.L.L.L.E.B.F.B.B.x.w.M.w.#.o.o.#.#.......s.....s.s.G...s......",
-".#...o...o.r.a.#.u.u.B.C.F.E.P.U.R.V.P.R.V.W.T.V.V.X.S.S.T.Q.R.P.Y.Z.0.1.Z.1.L.1.E.L.B.B.B.x.w.w.o.2...#...G...#.n.s...G.....#..",
-".....#...#.o.r.a.w.w.B.F.3.P.Z.4.R.R.Q.V.S.S.T.W.V.S.V.S.V.S.S.W.R.P.Z.U.L.0.0.L.0.U.L.E.F.C.z.w.a.5.#.#.o.#...#...n.o.#...o....",
-".........#.o.a.o.x.x.C.O.Z.U.R.Y.R.R.R.W.W.S.S.W.W.V.6.6.W.S.W.W.R.S.W.R.S.R.P.Z.L.L.L.0.0.0.7.F.B.x.w.w.K.o.o.o.o...n.....n....",
-".s.H.......o.a.w.x.F.U.Z.U.Y.P.R.Y.R.S.S.8.R.6.S.S.6.S.W.6.9.9.9.9#..9#..6.S.R.Y.U.Z.P##.L.L.0.L.0.F.F.B.x.x.M.o.5...n.n.o...G..",
-".b.s.H...#.n.K.x.F.1.L.L.P.P.4.Y.R.8.Z.Y.L.Z.V.W.R.S.W#..9#.#..6.S.8.8.W.6.W.R.R.R.R.R.Z.L.L.F.L.L.U.0.F.F.M.w.M.o.n.2...o......",
-".s.s...n.#.o.w.F.L.L.L.1.L.L.U.Z.Z.Z.Z.5.7.R.S.S.R.S.9#a.9#.#.#b#b#c.Z.R.W.S.S.Y.R.Y.R.Y.Y.U.7.L.L.F.L.E.F.F.M.M.w.M.o.n.....G.s",
-".s.G.....o.K.M.1.F.F.E.F.L.L.Z#d.o.K.n.n.7.Z.Z.Y.S.W#a#e#a#e.6#d#d.5#b.R.8.S.Y#d.Z.R.R.R.8.Z.Z.U.7.F.B#d.C.B.x.A.#.o.a...G.H.b.k",
-".s.N.G...o.5.B.F.C.C.3.F.F#f#d.n.K.o.n#g#c.Z.Z.Z.S.6#.#e#h#..8#d.5#g.5.Z.8.Y.U.5.5#c.Y.Y.Y.R.Y.L.L.F.F.B.x.F.A.x.5..#g.....b.k.k",
-".H.s...n.o.w.C.F.B.C.C.F#f.M.o#g.n.n.H.G.5#d.U.Y.Y.6#.#a#.#..6#d#b.5#d.Z.Y.Z.7#g.n.5#d.Z.R.Y.Y.P.L.7.F.F.B.o.K.#.o.n...G.H.b.H.d",
-".s.H.....#.w.B.B#i.F#d.B.o.n.n.H.H.n.H#j.5.Z.Z.Z.L.U.Z.Y.6#..W.7#d.7#d.Z.7.7#d.H#j.H.G.5.Z.U.4.Z.Z.L.L#k.A.w.5.o.....G.m.b.k.b.k",
-".s.H...n.#.w.w.x.B.z.B.5.5.n#g.n.n.H#j.H#g#c.L.L#d#d#d.7.Y.R.W.Y.7#d.7.Y.Z#c.n#l#m.G#m.H.A.7.F.L.0.L.C.A.B.F.o.....G.b.H.k.d.d.g",
-".k.H.....n.#.o.w#n#n#n#n#n.n.n.n.H#m.k#o.H.5#c#c#b#b#c#d#d#d#d.7#b#b#d#c#d#d#p#q#l#n#n.5.A.x.M.M.A.A#d.F#d.#.N.G.b.k.k.k.d.g.k.g",
-".b.H.G...n.#.o.5#n#n.B.x#n#n.n.H.k#r.k.t.t.H#d#c#b#b#d#d#c.5#d#d#d#d#d#b#d#l#p.t#q#n#n.M.M.M.M.M.M.o.G.H.G.H.b.k.k.k.d.g#s.d.g#m",
-".H.k.H.H...o.n#n#n.B.B.B#n#n.n.G#n#n#n#n.t#m#g#n#n#n#n#d#d#d#n#n#n#n#d#d#r#n#n#l#n#n.5.5#n#n#n#n.M.5.n.b.k.k.k.k.g.b#m.b.g.g.g.k",
-".d#m.b.k.#.o.o#n#n.x.B.B#n#n.n#n#n.k#l#n#n#p#n#n#d#d#n#n#d#n#n#d#b#n#n.k#n#n#q#n#n#n.n#n#n.M.M#n.o.n.s.G.b.k.g.k.b#m.k.g.g#r.g.k",
-".b.k.b.k...o#n#n.o.w.B.B#n#n#n#n.G.k#r#n#n#n#n#r.5.5#b#d#n#n#b#d#d#n#n#n#n#p#r.H#n#n#n#n.M.A#g#n.o.n.H.H.d#m.d.g.g.g.g.g.e.g.g.g",
-".k.d.g.k.H.o#n#n.w.B.w#n#n.M#n#n#n#n#n#n#r#n#n#l.t#m.H#g#n#n.5.H#n#n#p#n#n#m.G#n#n#t#n#n#n#n#n#n.H.k.H.k.d.g#m.g.g.g.g.g.h.g.g.g",
-".g.e.d.d.H.o#n#n.x.w.w#n#n#n#n.o#g.n.o#g#n#n.s#m#r#n#n#n#n#m#m#u#u#n#n#n#m.G#u#u#n#u#u.n#u#u.n.n.H.H.k#u#u.e#u#u#u#u#u.g.h.h.f.h",
-".e.k.g.k.b#n#n.M.M.M#n#n.5#n#n.a.o#n#n.n#n#n.G.H#n#n.s#n#n.H.H#u#u#u#n#n.N#u#u#u#j#u#u.N#u#u#u.H.H.b#u#u#u.g#u#u.h.h.g#q.h#q.h.h",
-".e#m.d.d.b#n#n#n#n#n#n.o.w.M#n#n#n#n.w.5.##n#n#n#n.H.H.G#n#n#n#u#u#u.G#n#n#u#u#u.H#u#u#n#u#u#u.k.k.H#u#u#u.g#u#u.g.h.h.h.h.i.h.g",
-".d.g.g.k.d.k.p.s...#...n.5.5.#.5.M.A.M.#.5.o...5.n.G...n#g.G#g#u#u#u#u.n#u#u#u#u.k#u#u.b#u#u#u#u.g#u#u#u#u.h#u#u#u#u#u.h#v.f.f#q",
-".g.g.g.g.d.d.b.G.H...G.....n.o.o.A.o.s.M.#.n.5.o.o.n.o#g.x.n.n#u#u.b#u.G#u.k#u#u.H#u#u.g#u#u.g#u.g#u.h#u#u.i#u#u.i.g.i.f.i.g.h.i",
-".g.t.g.g.d.e.k.b.H.H.G.H.G.....5.o.n.o.5...5.G.o.n.....G.M.G..#u#u.d#u#u#u#m#u#u.k#u#u.g#u#u.g#u#u#u.h#u#u.h#u#u.h#q.f#q.h.i.h.j",
-".t.h.h.g.g#r.d.d.H.s.H.b.H.H.G.G.......n.G...G.n.G.H.H.H.n.H.H#u#u.g#m#u.g#m#u#u#r#u#u#r#u#u.h#q#u#q.h#u#u.i#u#u#q.h#q.h.i#q.i.h",
-".g.t.h.g.g.g.k.d.k.b.H.b.H.k.b.H.G.s.n.H.G.H.H.s.H.k.d.k.s.H.H#u#u#m#m#u#s#m#u#u#m#u#u#m#u#u#q.g#u.g#q#u#u.i#u#u#u#u#u#q.h.i.h#q",
-".h.h#v.h.g.g.g#m.d.d.k.d.k.k.k.d.H.k.G.s.H.b.b.k.b.d.b.H.e#m.H.k.g#m#m.g#r.g.g#q.g.h#q.h#q.g#q.h#q#q.h.i.i.h.i.i.i.i.h.i.h.i.h.f",
-".g.g.h.f.h.g.g.e.d.g.b.k.d.k.b.k.k.k.d.b.b.k.k.k.d.d.d.g.k.g.k.g#r.g.g.g.t.g.h#q#m.h#v#q.h#q.h#q#q#q.i#q.i.h.h#q.h.i.h.i.h.f.i.h"
-};
diff --git a/pixmaps/mime-colorful-up.xpm b/pixmaps/mime-colorful-up.xpm
deleted file mode 100644
index 0df7a06..0000000
--- a/pixmaps/mime-colorful-up.xpm
+++ /dev/null
@@ -1,133 +0,0 @@
-/* XPM */
-static char * mime-fancy-up_xpm[] = {
-"64 42 88 1",
-" c #B8B878785050",
-". c #B0B070705050",
-"X c #B0B070704848",
-"o c #C8C880806060",
-"O c #C8C888885858",
-"+ c #C8C888886060",
-"@ c #D0D090906868",
-"# c #D8D898987070",
-"$ c #D0D090907070",
-"% c #D0D098987070",
-"& c #D8D8A0A08080",
-"* c #D8D8A0A07878",
-"= c #C0C088886060",
-"- c #D0D088886060",
-"; c #C0C088885858",
-": c #B0B078785858",
-"> c #B0B070705858",
-", c #C0C078785858",
-"< c #D0D098986868",
-"1 c #B8B870705050",
-"2 c #C0C080805050",
-"3 c #C8C898987070",
-"4 c #A8A870704848",
-"5 c #B0B068684848",
-"6 c #A8A868684848",
-"7 c #A0A068684848",
-"8 c #A8A860604848",
-"9 c #A0A068684040",
-"0 c #A0A068685050",
-"q c #A0A060604848",
-"w c #989860604848",
-"e c #989858584040",
-"r c #909050504040",
-"t c #909060604040",
-"y c #B8B878786060",
-"u c #B8B880806060",
-"i c #909058584040",
-"p c #989860604040",
-"a c #A0A070704848",
-"s c #808058584040",
-"d c #A8A870705050",
-"f c #B8B880805858",
-"g c #787848483838",
-"h c #686848483838",
-"j c #686840404040",
-"k c #606040403838",
-"l c #585838383838",
-"z c #505038383838",
-"x c #787848484040",
-"c c #484830303838",
-"v c #484838383838",
-"b c #505038383030",
-"n c #606048484040",
-"m c #707050504040",
-"M c #787850504040",
-"N c #808048484040",
-"B c #B0B078785050",
-"V c #808050504040",
-"C c #606040404040",
-"Z c #A0A070705050",
-"A c #404038383838",
-"S c #808058584848",
-"D c #505040403838",
-"F c #484838383030",
-"G c #404030303030",
-"H c #686848484040",
-"J c #383830303030",
-"K c #808068685050",
-"L c #888860604848",
-"P c #888868685050",
-"I c #303028282828",
-"U c #888858584848",
-"Y c #A8A878785858",
-"T c #383828282828",
-"R c #989868684848",
-"E c #B8B880806868",
-"W c #909060604848",
-"Q c #C8C898987878",
-"! c #C8C890907878",
-"~ c #FFFFFFFFFFFF",
-"^ c #C0C088886868",
-"/ c #D0D0A8A88888",
-"( c #D0D0A0A08080",
-") c #C8C890907070",
-"_ c #C8C888887070",
-"` c #B0B080805858",
-"' c #000000000000",
-"] c #D0D098988080",
-" .. XX. ooO+++@+@@@@@@#$$%%@#%&%%#%%#%**#%#*#%*%*%$@@@++=O-o;",
-"o: > ,ooooO++@O+@@@+$@@@$-$@@$$@$<#%%%$%%%*&%%%%@@@@-@O+@O;O",
-"11 . ooo2o;++O-@+-@+@;+-+@@@@@@@@+$+@@@%$#%%%%#%$3@@+@+OO+OO",
-".>X... . , ooo;=+o++;oo++ooo;=+++++o;=++++$$$@@$@$@@+++++o=oo+",
-"2 ... .>. . , , .X.. . ooo oo=@O@+@+@+@@++=Ooo;o;+",
-"..>1X4X4>444X.>44144454667444444X.>.> 22o===o=o;oo2 2 o2o",
-" X446448699444946989949999984649.X4.X... . . ,oo .>>X>>.222",
-"X69469666904999q990909089w0998666X>X..>X> > . ....1.. >XX>4X>>. ",
-".>49999qq98q9qqqqqqqqqqqwqq666674644> X . .. :...: ..>.. .>1..",
-"6X66qqq9qq9qqewqwqqwewrwwt9qqq6q44444... y u ... . u ",
-"6799qq9w9qqqwwewriwrreewqtqqt96664.5>X y y o2u2u y2u yo2 ",
-"679qq909qqqtwqtrwrrwrtrqpqqq66666>4.>.. :. 2 ,2o oo yo yo ,o y ",
-"6667q.q6qtqqteqeqeeitrweqqt999q696>a4.>6>: .y uo 2yoo2u,oo2 y .",
-"4666666a49qqqtqqwewrtsrssirtwwqtqww994d6X>X. u 2yoof o , 2yf .",
-"X6X6X>X486qqqqwrsghhjkllzjkkkhhxgsssrqtqq76d6.>>.. 2 22y 2 ",
-". > >1X.44qwtrhxkchkcvzccbllzjkhnmMNmNsNrsqqq766>B . y .:2 y . ",
-" . .>1X66qtVhmCkkjcllzvclclcllvkhmxsMMsMxsrtw96XZ..>. . :>. > ",
-" .>X>77wgmxknkkkvvllvvcAAvlvvklvklkhmsssMMMStq766a>>>> : : ",
-"2u >X67txmxnhknkllDkAllAlvAFFFFGFGAlknxmhHssMsMttq77d>Z ::> y ",
-"o2u .:a7tNsshhCnkDmnsmcvklvGFGGAlDDvAvkkkkkmsstssxMttd6d>:B > ",
-"22 :.>6tsssNssxmmmmZSkllklFJFGGKKLmkvllnknknnxSsstsrttdd6d>: y2",
-"2y >adNttrtssmP>a::SmmnlvJIJIAPPZKkDlnPmkkkDmmxStqPwq70.>X yuo=",
-"2fy >ZqtwwVttUP:a>:YLmmmlAGITGDPZYZmDnxZZLnnnknssttq7t07Z Y o==",
-"u2 :>6wtqwwtUd>Y::uyZPxnnAGJGGAPKZPmnmSY:ZPmknnhsSttq>a.>: yuou+",
-"2u .6qqRtPq>::uu:uEZmmmsxmnAGvSPSPmSSPuEuyZmxCmmssW06Z> y;o=o=",
-"2u :.667q9qZZ:Y::uEuYLssPPPSnkvnSPSnmL:Q!y!u0StsMsw0qt> you=++$",
-"=u :.>6~~~~~:::u!=^uZLLKKLPPPPSKKPLPP/(Q~~Z07dd00PtP.fyo===+$=$",
-"ouy :.>Z~~q7~~:u=)=33uPLKKPPLZPPPPPKPQ/3(~~dddddd>yuyuo===+$_+$!",
-"u=uu >:~~qqq~~:y~~~~3!Y~~~~PPP~~~~PP)~~Q~~ZZ~~~~dZ:o====$o!o$$$=",
-"+!o=.>>~~7qq~~:~~=Q~~/~~PP~~P~~PK~~=~~(~~~:~~dd~>:2yo=$=o!=$$)$=",
-"o=o= >~~>6qq~~~~y=)~~~~)ZZKP~~KPP~~~~/)u~~~~d0Y~>:uu+!+$$$$$@$$$",
-"=+$=u>~~6q6~~d~~~~~~)~~Q3!uY~~Zu~~/~~!y~~`~~~~~~u=u=+$!$$$$$%$$$",
-"$@++u>~~766~~~~>Y:>Y~~2!)~~~~!!''~~~!y''~'':''::uu=''@'''''$%%#%",
-"@=$=o~~ddd~~Z~~X>~~:~~yu~~2~~uu'''~~f'''E''f'''uuo'''$''%%$(%(%%",
-"@!++o~~~~~~>6d~~~~6Z.~~~~uuy~~~'''y~~'''u''~'''==u'''$''$%%%%&%$",
-"+$$=+=,2 . :ZZ.Zd0d.Z> Z:y :YyY'''':''''=''o''''$''''%'''''%]##(",
-"$$$$++oyu y :>>0>2d.:Z>>:>Y7::''o'y'=''u''$''$'$'%''&''&$&#&$%&",
-"$3$$+@=ouuyuy Z>:>Z Zy>: ydy ''+'''!''=''$''$'''%''%''%(#(%&%*",
-"3%%$$)++u2uouuyy :y y:yuuu:uu''$!'$!'')'')''%('(%''&''(%(%&(&%",
-"$3%$$$=+=ouou=ouy2:uyuu2u=+=2uu''!!'_!''!''!''($'$(''&'''''(%&%(",
-"%%]%$$$!++=+===+u=y2uoo=o+ou@!u=$!!$)$$($%(%($(%((%&&%&&&&%&%&%#",
-"$$%#%$$@+$o=+=o===+oo===+++$=$=$)$$$3$%(!%](%(%(((&(&%%(%&%&%#&%"};
diff --git a/pixmaps/mime-colorful-xx.xpm b/pixmaps/mime-colorful-xx.xpm
deleted file mode 100644
index 4ae0088..0000000
--- a/pixmaps/mime-colorful-xx.xpm
+++ /dev/null
@@ -1,134 +0,0 @@
-/* XPM */
-static char * mime-fancy-up_xpm[] = {
-"64 42 89 1",
-" c #B8B878785050",
-". c #B0B070705050",
-"X c #B0B070704848",
-"o c #C8C880806060",
-"O c #C8C888885858",
-"+ c #C8C888886060",
-"@ c #D0D090906868",
-"# c #D8D898987070",
-"$ c #D0D090907070",
-"% c #D0D098987070",
-"& c #D8D8A0A08080",
-"* c #D8D8A0A07878",
-"= c #C0C088886060",
-"- c #D0D088886060",
-"; c #C0C088885858",
-": c #B0B078785858",
-"> c #B0B070705858",
-", c #C0C078785858",
-"< c #D0D098986868",
-"1 c #B8B870705050",
-"2 c #C0C080805050",
-"3 c #C8C898987070",
-"4 c #A8A870704848",
-"5 c #B0B068684848",
-"6 c #A8A868684848",
-"7 c #A0A068684848",
-"8 c #A8A860604848",
-"9 c #A0A068684040",
-"0 c #A0A068685050",
-"q c #A0A060604848",
-"w c #989860604848",
-"e c #989858584040",
-"r c #909050504040",
-"t c #909060604040",
-"y c #B8B878786060",
-"u c #B8B880806060",
-"i c #909058584040",
-"p c #989860604040",
-"a c #A0A070704848",
-"s c #808058584040",
-"d c #A8A870705050",
-"f c #B8B880805858",
-"g c #787848483838",
-"h c #686848483838",
-"j c #686840404040",
-"k c #606040403838",
-"l c #585838383838",
-"z c #505038383838",
-"x c #787848484040",
-"c c #484830303838",
-"v c #484838383838",
-"b c #505038383030",
-"n c #606048484040",
-"m c #707050504040",
-"M c #787850504040",
-"N c #808048484040",
-"B c #B0B078785050",
-"V c #808050504040",
-"C c #606040404040",
-"Z c #A0A070705050",
-"A c #404038383838",
-"S c #808058584848",
-"D c #505040403838",
-"F c #484838383030",
-"G c #404030303030",
-"H c #686848484040",
-"J c #383830303030",
-"K c #808068685050",
-"L c #888860604848",
-"P c #888868685050",
-"I c #303028282828",
-"U c #888858584848",
-"Y c #A8A878785858",
-"T c #383828282828",
-"R c #989868684848",
-"E c #B8B880806868",
-"W c #909060604848",
-"Q c #C8C898987878",
-"! c #C8C890907878",
-"~ c Gray60",
-"^ c #C0C088886868",
-"/ c #D0D0A8A88888",
-"( c #D0D0A0A08080",
-") c #C8C890907070",
-"_ c #C8C888887070",
-"` c #B0B080805858",
-"' c Gray60",
-"] c #D0D098988080",
-"[ c black s backgroundToolBarColor",
-" [.[ [X[.[ [o[+[+[+[@[@[@[$[%[@[%[%[#[%[%[*[%[*[%[%[%[@[@[+[O[o[",
-"[:[ [ [>[,[o[o[+[@[+[@[+[@[@[-[@[$[@[<[%[%[%[%[&[%[%[@[@[@[+[O[O",
-"1[ [ [ [ [o[2[;[+[-[+[@[@[+[+[@[@[@[@[$[@[@[$[%[%[#[$[@[+[+[O[O[",
-"[>[.[.[.[ [,[o[o[=[o[+[o[+[o[o[=[+[+[o[=[+[+[$[@[$[$[@[+[+[o[o[+",
-"2[ [.[.[.[.[ [ [,[ [ [ [X[.[ [.[ [ [ [o[ [o[@[@[@[@[@[+[=[o[;[;[",
-"[.[1[4[4[4[4[.[4[1[4[5[6[7[4[4[4[.[.[ [ [ [2[o[=[o[o[o[2[ [2[o[o",
-" [4[6[4[6[9[4[9[6[8[9[9[9[9[4[4[.[4[X[.[ [ [.[ [ [,[o[.[>[>[.[2[",
-"[6[4[9[6[9[4[9[q[9[9[9[8[w[9[8[6[X[X[.[X[ [ [ [.[.[.[ [X[>[X[>[ ",
-".[4[9[9[q[8[9[q[q[q[q[q[w[q[6[6[4[4[>[X[.[ [.[:[.[:[.[>[.[ [>[.[",
-"[X[6[q[9[q[q[e[q[q[w[w[w[t[q[q[q[4[4[.[.[ [ [ [ [.[ [ [.[ [ [ [ ",
-"6[9[q[9[9[q[w[e[r[w[r[e[q[q[t[6[6[.[>[ [ [ [ [ [2[2[ [y[u[y[2[ [",
-"[7[q[9[9[q[t[q[r[r[w[t[q[q[q[6[6[>[.[.[ [.[ [ [2[ [o[y[ [o[,[ [ ",
-"6[6[q[q[q[q[t[q[q[e[t[w[q[t[9[q[9[>[4[>[>[ [y[ [o[2[o[2[,[o[ [ [",
-"[6[6[6[a[9[q[t[q[e[r[s[s[i[t[w[t[w[9[4[6[>[.[ [ [y[o[ [ [,[2[f[.",
-"X[X[X[X[8[q[q[w[s[h[j[l[z[k[k[h[g[s[r[t[q[6[6[>[.[ [ [ [2[y[2[ [",
-"[ [ [1[.[4[w[r[x[c[k[v[c[b[l[j[h[m[N[N[N[s[q[7[6[B[.[y[.[2[y[ [ ",
-" [.[.[1[6[q[V[m[k[j[l[z[c[c[c[l[k[m[s[M[M[s[t[9[X[.[>[ [ [>[ [ [",
-"[ [ [>[>[7[g[x[n[k[v[l[v[c[A[l[v[l[k[k[m[s[M[M[t[7[6[>[>[ [ [:[ ",
-"2[ [ [X[7[x[x[h[n[l[D[A[l[l[A[F[F[F[A[k[x[h[s[M[M[t[7[d[Z[:[>[y[",
-"[2[ [:[7[N[s[h[n[D[n[m[v[l[G[G[A[D[v[v[k[k[m[s[s[x[t[d[d[:[ [ [ ",
-"2[ [.[6[s[s[s[x[m[m[S[l[k[F[F[G[K[m[v[l[k[k[n[S[s[s[t[d[6[>[ [y[",
-"[y[ [a[N[t[t[s[P[a[:[m[n[v[I[I[P[Z[k[l[P[k[k[m[x[t[P[q[0[>[ [u[=",
-"2[y[>[q[w[V[t[P[a[:[L[m[l[G[T[D[Z[Z[D[x[Z[n[n[n[s[t[7[0[Z[Y[ [=[",
-"[2[:[6[t[w[t[d[Y[:[y[P[n[A[J[G[P[Z[m[m[Y[Z[m[n[h[S[t[>[.[:[y[o[+",
-"2[ [.[q[R[P[>[:[u[u[Z[m[s[m[A[v[P[P[S[P[E[y[m[C[m[s[0[Z[ [y[o[o[",
-"[u[:[6[7[9[Z[:[:[u[u[L[s[P[S[k[n[P[n[L[Q[y[u[S[s[s[0[t[ [y[u[+[$",
-"=[ [:[>[~[~[~[:[u[=[u[L[K[L[P[P[K[P[P[/[Q[~[0[d[0[P[P[f[o[=[+[=[",
-"[u[ [.[Z[~[7[~[u[)[3[u[L[K[P[Z[P[P[K[Q[3[~[d[d[d[>[u[u[=[=[$[+[!",
-"u[u[ [:[~[q[~[:[~[~[3[Y[~[~[P[~[~[P[)[~[~[Z[~[~[d[:[=[=[$[![$[$[",
-"[![=[>[~[7[q[~[~[=[~[/[~[P[~[~[P[~[=[~[~[~[~[d[~[:[y[=[=[![$[)[=",
-"o[o[ [~[>[q[~[~[y[)[~[~[Z[K[~[K[P[~[~[)[~[~[d[Y[>[u[+[+[$[$[@[$[",
-"[+[=[>[~[q[~[d[~[~[~[~[Q[![Y[~[u[~[~[![~[`[~[~[~[=[=[$[$[$[$[$[$",
-"$[+[u[~[7[6[~[~[Y[>[~[2[)[~[~[!['[~[!['[~['['[:[u[=['['['['[%[#[",
-"[=[=[~[d[d[~[~[X[~[:[~[u[~[~[u['['[~['['['[f['[u[o['[$['[%[([([%",
-"@[+[o[~[~[~[6[~[~[6[.[~[~[u[~[~['[y[~['[u['['['[=['['['[$[%[%[%[",
-"[$[=[=[2[.[:[Z[Z[0[.[>[Z[y[:[y['['[:['['['[o['['['['[%['['[%[#[(",
-"$[$[+[o[u[y[ [>[0[2[.[Z[>[>[7[:['['['['[u['['[$[$[%['['[&[&[&[%[",
-"[3[$[@[o[u[u[ [Z[:[Z[Z[>[ [y[y['[+['[!['['[$['['['['[%['[([([&[*",
-"3[%[$[+[u[u[u[y[ [ [y[y[y[u[:[u['[![$['[)['['[%['[%['['[([([&[&[",
-"[3[$[$[+[o[o[=[u[2[u[u[2[=[=[u['[!['[!['['[!['[$[$['[&['['[([&[(",
-"%[][$[$[+[=[=[=[u[y[u[o[o[o[@[u[$[![)[$[$[([([([([%[&[&[&[%[%[%[",
-"[$[#[$[@[$[=[=[=[=[o[=[=[+[$[$[$[$[$[$[([%[([([([([([%[([&[&[#[%"};
diff --git a/pixmaps/mime-dn.xbm b/pixmaps/mime-dn.xbm
deleted file mode 100644
index 83bef3c..0000000
--- a/pixmaps/mime-dn.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define e_width 64
-#define e_height 42
-static char e_bits[] = {
- 0x39,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x42,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x8f,0xda,0x7f,0xb8,0xff,0xff,0xff,0xff,0x0c,0x41,0x02,0x00,0xf4,
- 0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0xed,0xbf,0xed,0x00,0x00,0x00,0x00,
- 0x44,0x2f,0x64,0xb2,0x02,0x00,0x00,0x00,0xb0,0x66,0x4c,0x36,0x00,0x00,0x00,
- 0x00,0x00,0xff,0x78,0xff,0x00,0x00,0x00,0x00,0xd0,0xff,0xff,0xff,0x00,0x00,
- 0x00,0x00,0x92,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0x44,0xf7,0xff,0x7f,0x00,
- 0x00,0x00,0x00,0x00,0xf2,0xff,0x7f,0x20,0x00,0x00,0x00,0x00,0xc0,0xfc,0xff,
- 0x3e,0x00,0x00,0x00,0x00,0x00,0x77,0xbf,0x6b,0x00,0x00,0x00,0x00,0x00,0x50,
- 0xf7,0xaf,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0x3f,0x00,0x00,0x00,0x0a,0x00,
- 0x80,0xfe,0x2f,0x00,0x00,0x68,0x00,0x00,0x00,0xff,0x2f,0x00,0x00,0x68,0x00,
- 0x00,0x00,0xfc,0x1f,0x00,0x0d,0x3c,0x00,0x00,0x00,0xfa,0x1f,0x80,0x0e,0x3c,
- 0x02,0x00,0x00,0xfe,0x1f,0xc0,0x0f,0x3c,0x80,0x01,0x20,0xff,0x0f,0xf0,0x0f,
- 0x20,0x80,0x07,0x80,0xff,0x0f,0xe0,0x1f,0x00,0xc0,0x0f,0xc0,0xff,0x5f,0xff,
- 0x1f,0x00,0xc0,0x07,0xc0,0xff,0x5f,0xf3,0x3f,0x00,0xe0,0x07,0xfe,0xff,0xff,
- 0xf1,0xff,0xc7,0xf3,0xf3,0xfc,0xff,0xef,0xf1,0xff,0x6c,0xfe,0x9f,0xff,0xff,
- 0xff,0xf1,0xff,0x30,0xfe,0xcf,0xff,0xff,0xff,0xd8,0xff,0xbf,0xff,0xff,0xff,
- 0xff,0xff,0xf8,0xff,0x7f,0x3e,0xc9,0x27,0xf8,0x7f,0x6c,0xff,0x7f,0x1c,0x89,
- 0x23,0xff,0xff,0xcf,0xe3,0x7f,0x1c,0x89,0x23,0xff,0xff,0x0d,0x60,0x7f,0x08,
- 0x09,0x21,0xf8,0xff,0xff,0xa6,0x6f,0x2a,0x49,0x25,0xff,0xff,0x7f,0xd7,0x6f,
- 0x22,0x49,0x24,0xff,0xff,0xff,0xff,0x7f,0x36,0xc9,0x26,0xff,0xff,0xff,0xff,
- 0x7f,0x36,0xc9,0x26,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff};
diff --git a/pixmaps/mime-dn.xpm b/pixmaps/mime-dn.xpm
new file mode 100644
index 0000000..a49aa9f
--- /dev/null
+++ b/pixmaps/mime-dn.xpm
@@ -0,0 +1,40 @@
+/* XPM */
+static char * mime_up_xpm[] = {
+"32 32 5 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #666666",
+"x c #AAAAAA",
+"+ c #CCCCCC",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" BB B B ",
+" BB BB BB BB BBB BB ",
+" B BB B B B ",
+" ",
+" xx x x x x x x xxx xx x ",
+" x x xx xx x ",
+" x x x x x x x x x x x ",
+" ",
+" BB B BBB ",
+" BB BB BB BB BBB B BB ",
+" B BB B B BBB ",
+" ",
+" xx x x xxx x x x x xx ",
+" xxx x x x x xx x x x x ",
+" ",
+" ",
+" ",
+" ",
+" # # ",
+" ## ## ",
+" # # # # # ###### ## ",
+" # # # # # # # # ",
+" # # # # # # #### ",
+" # # # # # # # ",
+" # # # # # # ### ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/mime-simple-dn.xpm b/pixmaps/mime-simple-dn.xpm
deleted file mode 100644
index 3d4374e..0000000
--- a/pixmaps/mime-simple-dn.xpm
+++ /dev/null
@@ -1,57 +0,0 @@
-/* XPM */
-static char *noname[] = {
-/* width height ncolors chars_per_pixel */
-"64 42 8 1",
-/* colors */
-"` c Gray60",
-"a c #666666666666",
-"b c #9A9A9A9A9A9A",
-"c c #B0B0B0B0B0B0",
-"d c #2A2A2A2A2A2A",
-"e c #878787878787",
-"f c Gray60",
-"g c #434343434343",
-/* pixels */
-"eeeeeeeeeeebbbbbbbbbbbbbbcbbccbccccccccccccccccccccccbbbbbbbbbbb",
-"beeeeeeeeebbbbbbbbbbbbbbbbbbbbbbbbbbbbccccbcccccccccbbbbbbbbbbbb",
-"eeeeeeeeebbbebbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcbcccccccbbbbbbbbbbbb",
-"eeeeeeeeeeeeebbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
-"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeebbbebbbbbbbbbbbbbbbbbbbbbbb",
-"eeeeeeeeeeeeeeeeeeeeeeeeeaeeeeeeeeeeeeeeeeeeebbbbbbbbbbeeeeeebeb",
-"eeeeeeeaeaaeeeaeeaaaaeaaaaaaeeeaeeeeeeeeeeeeeeeeeeebbeeeeeeeeeee",
-"eeaeeaeeeaeeaaaaaaeaeaeaaaeaaaeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
-"eeeaaaaaaaaaaaaaaaaaaaaaaaaeeeeaeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
-"eeeeaaaaaaaaaaaaaaaaaaaaaaaaaaeaeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
-"eaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeeeeeeeeeeeeeeeeebeeeeeeeeeeebeeee",
-"eaaaaaeaaaaaaaaaaaaaaaaaaaaaeeeeeeeeeeeeeeeeeeeebebbeebeebeebeee",
-"eeeaaeaeaaaaaaaaaaaaaaaaaaaaaaaeaeeeeeeeeeeeeeeebeeebbeeebbeeeee",
-"eeeeeeeeeaaaaaaaaaaaaaaaaaaaaaaaaaaaaeeeeeeeeeeeeebbeebeeeeeeeee",
-"eeeeeeeeaeaaaaaaaagggggggggggggaaaaaaaaaaaeeeeeeeeeeeeeeeeeeeeee",
-"eeeeeeeeeeaaaagagggggggggggggggggaaaaaaaaaaaaaeeeeeeeeeeeeeeeeee",
-"eeeeeeeeeeaaagagggggggggggggggggggaaaaaaaaaaaaaeeeeeeeeeeeeeeeee",
-"eeeeeeeeaaaaaagggggggggggggggggggggggggaaaaaaaaaaaeeeeeeeeeeeeee",
-"eeeeeeeeaaaaaggggggggggggggggggggdgdggggaaggaaaaaaaaaaeeeeeeeeee",
-"beeeeeeaaaaaggggggagaagggggdgddggggggggggggaaaaaaaaaaeeeeeeeeeee",
-"eeeeeeeaaaaaaaaaaaaeaggggggdgddaaaaggggggggggaaaaaaaaaeeeeeeeeee",
-"eeeeeeeaaaaaaaaaeeeeaaagggddddgaaeaggggaaggggaaaaaaaaaaeeeeeeebb",
-"eeeeeeaaaaaaaaaeeeeeaaaaggddddgaeeeaggaeeagggggaaaaaaaeaeeeeebbb",
-"eeeeeeaaaaaaaeeeeeeeeaagggddddgaaeaagaaeeeaaggggaaaaaeeeeeeeebeb",
-"eeeeeeaaaaaaeeeeeeeeeaaaaaaggdgaaaaaaaaeeeeeaagaaaaaeeeeeeebbbbb",
-"eeeeeeeaaaaeeeeeeeeeeaaaaaaaggggaaagaaebbebeeaaaaaaeaaeeeebebbbb",
-"beeeeeeefffffeeeebbbeeaaaaaaaaaaaaaaaaccbffeeaeeeeaaaeeebbbbbbbb",
-"beeeeeeeffaaffeebbbbbeaaaaaaaeaaaaaaabcbcffeeeeeeeeeeebbbbbbbbbb",
-"ebeeeeeffaaaffeeffffbbeffffaaaffffaabffbffeeffffeeebbbbbbbbbbbbb",
-"bbbbeeeffaaaffeffbbffcffaaffaffaaffbffcfffeffeefeeeebbbbbbbbbbbb",
-"bbbbeeffeeaaffffebbffffbeeaaffaaaffffcbeffffeeefeeeebbbbbbbbbbbb",
-"bbbbeeffeaeffeffffffbffbbbeeffeeffcffbeffeffffffebebbbbbbbbbcbbb",
-"bbbbeeffaeeffffeeeeeffebbffffbb``fffbe``f``e``eeeeb``b`````bcccc",
-"bbbbbffeeeffeffeeffeffeeffeffee```ffe```e``e```eeb```b``ccbccccc",
-"bbbbbffffffeeeffffeeeffffeeefff```eff```e``f```bbe```b``bccccccb",
-"bbbbbbeeeeeeeeeeeeeeeeeeeeeeeee````e````b``b````b````c`````ccccc",
-"bbbbbbbeeeeeeeeeeeeeeeeeeeeeaee``b`e`b``e``b``b`b`c``c``cbcccbcc",
-"bbbbbbbbeeeeeeeeeeeeeeeeeeeeeee``b```b``b``b``b```c``c``cccccccc",
-"bccbbbbbeeebeeeeeeeeeeeeeeeeeee``bb`bb``b``b``cc`cc``c``cccccccc",
-"bbcbbbbbbbebebbeeeeeeeeeebbbeee``bb`bb``b``b``cb`bc``c`````ccccc",
-"ccccbbbbbbbbbbbbebeeebbbbbbebbebbbbbbbbcbccccbcccccccccccccccccc",
-"bbcccbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbccbccccccccccccccccccccccc"
-};
diff --git a/pixmaps/mime-simple-up.xpm b/pixmaps/mime-simple-up.xpm
deleted file mode 100644
index ca94ab9..0000000
--- a/pixmaps/mime-simple-up.xpm
+++ /dev/null
@@ -1,57 +0,0 @@
-/* XPM */
-static char *noname[] = {
-/* width height ncolors chars_per_pixel */
-"64 42 8 1",
-/* colors */
-"` c #000000000000",
-"a c #B8B878785050",
-"b c #D0D0A8A88888",
-"c c #585838383838",
-"d c #303028282828",
-"e c #FFFFFFFFFFFF",
-"f c #D0D090906868",
-"g c #909050504040",
-/* pixels */
-"aaaaaaaaaaaffffffffffffffffffffffbfffffffbbfffbffbfbfffffffffffa",
-"faaaaaaaaaffffffffffffffffffffffffffffffffffffbbffffffffffffffaf",
-"aaaaaaaaafffafaffffffffffaffffffffffffffffffffffffffffffffffffff",
-"aaaaaaaaaaaaafffafffffafffffffafffffffafffffffffffffffffffffffff",
-"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafffafffffffffffffffffffafaf",
-"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafffffffaffaaaaaafaf",
-"aaaaaaaaaggaaagaagaggagggggaaaagaaaaaaaaaaaaaaaaaaaffaaaaaaaaaaa",
-"aagaagaaagaaggggggagagaaggaggaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
-"aaagggggggaggggggggggggggggaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
-"aaaaggggggggggggggggggggggggggagaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
-"aaggggggggggggggggggggggggggggaaaaaaaaaaaaaaaaafaaaaaaaaaaafaaaa",
-"aaggggagggggggggggggggggggggaaaaaaaaaaaaaaaaaaaafaffaafaafaafaaa",
-"aaaagagagggggggggggggggggggggggagaaaaaaaaaaaaaaafaaaffaaaffaaaaa",
-"aaaaaaaaaggggggggggggggggggggggggggggaaaaaaaaaaaaaffaafaaaaaaaaa",
-"aaaaaaaaaaggggggggcccccccccccccggggggggggaaaaaaaaaaaaaaaaaaaaaaa",
-"aaaaaaaaaaggggcgcccccccccccccccccggggggggggggaaaaaaaaaaaaaaaaaaa",
-"aaaaaaaaaagggcgcccccccccccccccccccgggggggggggggaaaaaaaaaaaaaaaaa",
-"aaaaaaaaaaggggcccccccccccccccccccccccccggggggggggaaaaaaaaaaaaaaa",
-"aaaaaaaaaggggccccccccccccccccccccdcdccccggccggggggggaaaaaaaaaaaa",
-"faaaaaaaggggccccccgcggcccccdcddccccccccccccggggggggggaaaaaaaaaaa",
-"aaaaaaaggggggggggggagccccccdcddggggccccccccccgggggggggaaaaaaaaaa",
-"aaaaaaagggggggggaaaagggcccddddcggagccccggccccgggggggggaaaaaaaaff",
-"aaaaaagggggggggaaaaaggggccddddcgaaagccgaagcccccgggggagaaaaaaafff",
-"aaaaaagggggggaaaaaaaaggcccddddcggaggcggaaaggccccgggggaaaaaaaafaf",
-"aaaaaaggggggaaaaaaaaaggggggccdcggggggggaaaaaggcgggggaaaaaaaaffff",
-"aaaaaaaagggaaaaaaaaaagggggggccccgggcggaffafaaggggggaggaaaafaffff",
-"faaaaaaaeeeeeaaaafffaaggggggggggggggggbbfeeaaaaaaagggaaaffffffff",
-"faaaaaaaeegaeeaafffffagggggggagggggggfbfbeeaaaaaaaaaaaffffffffff",
-"afaaaaaeegggeeaaeeeeffaeeeegggeeeeggfeefeeaaeeeeaaafffffffffffff",
-"ffffaaaeeaggeeaeeffeebeeggeegeeggeefeebeeeaeeaaeaaaaffffffffffff",
-"ffffaaeeaaggeeeeaffeeeefaaggeegggeeeebfaeeeeaaaeaaaaffffffffffff",
-"ffffaaeeagaeeaeeeeeefeefffaaeeaaeebeefaeeaeeeeeeafafffffffffffff",
-"ffffaaeeaaaeeeeaaaaaeeaffeeeeff``eeefa``e``a``aaaaf``f`````fffff",
-"fffffeeaaaeeaeeaaeeaeeaaeeaeeaa```eea```a``a```aaf```f``fffbfbff",
-"fffffeeeeeeaaaeeeeaaaeeeeaaaeee```aee```a``e```ffa```f``fffffbff",
-"ffffffaaaaaaaaaaaaaaaaaaaaaaaaa````a````f``f````f````f`````fbffb",
-"fffffffaaaaaaaaaaaaaaaaaaaaaaaa``f`a`f``a``f``f`f`f``b``bfbfbffb",
-"ffffffffaaaaaaaaaaaaaaaaaaaaaaa``f```f``f``f``f```f``f``fbfbfbfb",
-"ffffffffaaafaaaaaaaaaaaaaaaaaaa``ff`ff``f``f``fb`bf``b``bfbfbbbf",
-"ffffffffffafaffaaaaaaaaaafffaaa``ff`ff``f``f``bf`fb``b`````bfbfb",
-"ffbfffffffffffffafaaaffffffaffaffffffffbffbfbfbfbbfbbfbbbbfbfbff",
-"fffffffffffffffffffffffffffffffffffffffbffbbfbfbbbbbbffbfbfbffbf"
-};
diff --git a/pixmaps/mime-simple-xx.xpm b/pixmaps/mime-simple-xx.xpm
deleted file mode 100644
index b2dfff1..0000000
--- a/pixmaps/mime-simple-xx.xpm
+++ /dev/null
@@ -1,57 +0,0 @@
-/* XPM */
-static char *noname[] = {
-/* width height ncolors chars_per_pixel */
-"64 42 8 1",
-/* colors */
-"` c #000000000000",
-"a c #D0D0A8A88888",
-"b c #B8B870705050",
-"c c #888868685050",
-"d c #999999999999",
-"e c #505040403838",
-"f c #303028282828",
-"g c #787848483838",
-/* pixels */
-"b`b`b`b`b`b`b`b`b`b`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`b`b`b`",
-"`b`b`b`b`b`b`b`b`a`b`a`b`a`a`b`a`a`a`a`a`a`a`a`a`a`a`a`a`a`b`b`b",
-"b`b`b`b`b`b`b`b`b`b`b`a`a`b`b`a`a`a`a`a`a`a`a`a`a`a`a`a`b`b`b`b`",
-"`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`a`a`a`a`a`b`b`b`b`b",
-"b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`a`a`a`a`a`b`b`b`b`b`",
-"`b`b`b`b`b`b`b`b`b`b`b`b`c`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b",
-"b`b`b`b`b`c`b`c`b`b`c`c`c`c`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`",
-"`b`b`c`b`c`b`c`c`c`c`c`b`c`c`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b",
-"b`b`c`c`c`b`c`c`c`c`c`c`c`c`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`",
-"`b`b`c`c`c`c`c`c`c`c`c`c`c`c`c`c`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b",
-"b`c`c`c`c`c`c`c`g`c`g`c`c`c`c`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`",
-"`c`c`c`c`c`c`c`g`g`c`c`c`c`c`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b",
-"b`b`c`c`c`c`c`c`c`c`c`c`c`c`c`c`c`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`",
-"`b`b`b`b`c`c`c`c`c`g`g`g`c`c`c`c`c`c`b`b`b`b`b`b`b`b`b`b`b`b`b`b",
-"b`b`b`b`b`c`c`c`g`g`g`e`e`e`e`g`g`g`g`c`c`b`b`b`b`b`b`b`b`b`b`b`",
-"`b`b`b`b`b`c`g`g`e`e`e`e`e`e`g`g`g`g`g`g`g`c`c`b`b`b`b`b`b`b`b`b",
-"b`b`b`b`b`c`g`g`e`g`e`e`e`e`e`e`e`g`g`g`g`g`c`c`b`b`b`b`b`b`b`b`",
-"`b`b`b`b`c`g`g`e`e`e`e`e`e`e`e`e`e`e`e`g`g`g`g`c`c`b`b`b`b`b`b`b",
-"b`b`b`b`c`g`g`g`e`e`e`e`e`e`e`e`e`e`e`e`g`g`g`g`g`c`c`b`b`b`b`b`",
-"`b`b`b`c`g`g`g`e`e`e`g`e`e`f`f`e`e`e`e`e`e`g`g`g`g`c`b`b`b`b`b`b",
-"b`b`b`b`g`g`g`g`g`g`c`e`e`e`e`f`c`g`e`e`e`e`e`c`g`g`c`b`b`b`b`b`",
-"`b`b`b`g`c`c`g`c`b`b`g`e`e`f`f`c`b`e`e`c`e`e`g`g`c`c`c`c`b`b`b`b",
-"b`b`b`c`c`g`c`c`b`b`c`g`e`f`f`e`b`b`e`g`b`e`e`e`g`c`c`c`b`b`b`b`",
-"`b`b`b`c`c`c`b`b`b`b`c`e`e`f`f`c`b`g`g`b`b`g`e`g`c`c`b`b`b`b`b`b",
-"b`b`b`c`c`c`b`b`b`b`b`g`g`g`e`e`c`c`c`c`b`b`g`e`g`g`c`b`b`b`b`b`",
-"`b`b`b`c`c`b`b`b`b`b`c`g`c`c`e`e`c`e`c`a`b`b`c`g`g`c`c`b`b`b`b`a",
-"b`b`b`b`d`d`d`b`b`b`b`c`c`c`c`c`c`c`c`a`a`d`c`b`c`c`c`b`b`b`b`b`",
-"`b`b`b`b`d`c`d`b`a`a`b`c`c`c`b`c`c`c`a`a`d`b`b`b`b`b`b`b`b`a`b`a",
-"b`b`b`b`d`c`d`b`d`d`a`b`d`d`c`d`d`c`a`d`d`b`d`d`b`b`b`b`a`a`a`a`",
-"`a`b`b`d`c`c`d`d`b`d`a`d`c`d`d`c`d`b`d`d`d`d`b`d`b`b`b`b`a`a`a`b",
-"b`b`b`d`b`c`d`d`b`a`d`d`b`c`d`c`c`d`d`a`d`d`b`b`b`b`b`b`a`a`a`a`",
-"`b`b`b`d`c`d`b`d`d`d`d`a`a`b`d`b`d`d`a`d`b`d`d`d`b`b`a`a`a`a`a`a",
-"a`b`b`d`c`b`d`d`b`b`d`b`a`d`d`a`d`d`a`d`d`d`d`b`b`b`d`d`d`d`a`a`",
-"`b`b`d`b`b`d`d`b`d`b`d`b`d`d`b`d`d`d`d`d`d`b`d`b`b`d`a`d`a`a`a`a",
-"a`b`b`d`d`d`b`d`d`b`b`d`d`b`d`d`d`b`d`d`b`d`d`d`b`d`d`d`a`a`a`a`",
-"`a`b`b`b`b`b`b`b`c`b`b`b`b`b`b`d`d`b`d`d`d`b`d`d`d`d`a`d`d`a`a`a",
-"a`a`b`b`b`b`b`b`c`b`b`b`b`b`c`b`d`d`d`d`b`d`d`a`a`a`d`d`a`a`a`a`",
-"`a`a`a`b`b`b`b`b`b`b`b`b`b`b`b`d`b`d`a`d`d`a`d`d`d`d`a`d`a`a`a`a",
-"a`a`a`b`b`b`b`b`b`b`b`b`b`b`b`b`d`a`a`d`a`d`d`a`d`a`d`d`a`a`a`a`",
-"`a`a`a`b`b`b`b`b`b`b`b`b`b`b`b`d`a`d`a`d`d`a`d`a`a`d`a`d`d`a`a`a",
-"a`a`a`a`b`b`b`b`b`b`b`b`b`b`a`b`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`",
-"`a`a`a`a`a`b`b`b`b`b`b`b`b`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a`a"
-};
diff --git a/pixmaps/mime-up.xbm b/pixmaps/mime-up.xbm
deleted file mode 100644
index 2952852..0000000
--- a/pixmaps/mime-up.xbm
+++ /dev/null
@@ -1,32 +0,0 @@
-#define e_width 64
-#define e_height 42
-static unsigned char e_bits[] = {
- 0xc6, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xbd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x25, 0x80, 0x47,
- 0x00, 0x00, 0x00, 0x00, 0xf3, 0xbe, 0xfd, 0xff, 0x0b, 0x00, 0x00, 0x00,
- 0xfe, 0xff, 0xff, 0xff, 0xff, 0x12, 0x40, 0x12, 0xff, 0xff, 0xff, 0xff,
- 0xbb, 0xd0, 0x9b, 0x4d, 0xfd, 0xff, 0xff, 0xff, 0x4f, 0x99, 0xb3, 0xc9,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x87, 0x00, 0xff, 0xff, 0xff, 0xff,
- 0x2f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x6d, 0x02, 0x00, 0x00,
- 0xff, 0xff, 0xff, 0xff, 0xbb, 0x08, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x0d, 0x00, 0x80, 0xdf, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x03, 0x00,
- 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0x88, 0x40, 0x94, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xaf, 0x08, 0x50, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00,
- 0xc0, 0xff, 0xff, 0xff, 0xf5, 0xff, 0x7f, 0x01, 0xd0, 0xff, 0xff, 0x97,
- 0xff, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x97, 0xff, 0xff, 0xff, 0x03,
- 0xe0, 0xff, 0xf2, 0xc3, 0xff, 0xff, 0xff, 0x05, 0xe0, 0x7f, 0xf1, 0xc3,
- 0xfd, 0xff, 0xff, 0x01, 0xe0, 0x3f, 0xf0, 0xc3, 0x7f, 0xfe, 0xdf, 0x00,
- 0xf0, 0x0f, 0xf0, 0xdf, 0x7f, 0xf8, 0x7f, 0x00, 0xf0, 0x1f, 0xe0, 0xff,
- 0x3f, 0xf0, 0x3f, 0x00, 0xa0, 0x00, 0xe0, 0xff, 0x3f, 0xf8, 0x3f, 0x00,
- 0xa0, 0x0c, 0xc0, 0xff, 0x1f, 0xf8, 0x01, 0x00, 0x00, 0x0e, 0x00, 0x38,
- 0x0c, 0x0c, 0x03, 0x00, 0x10, 0x0e, 0x00, 0x93, 0x01, 0x60, 0x00, 0x00,
- 0x00, 0x0e, 0x00, 0xcf, 0x01, 0x30, 0x00, 0x00, 0x00, 0x27, 0x00, 0x40,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x80, 0xc1, 0x36, 0xd8, 0x07,
- 0x80, 0x93, 0x00, 0x80, 0xe3, 0x76, 0xdc, 0x00, 0x00, 0x30, 0x1c, 0x80,
- 0xe3, 0x76, 0xdc, 0x00, 0x00, 0xf2, 0x9f, 0x80, 0xf7, 0xf6, 0xde, 0x07,
- 0x00, 0x00, 0x59, 0x90, 0xd5, 0xb6, 0xda, 0x00, 0x00, 0x80, 0x28, 0x90,
- 0xdd, 0xb6, 0xdb, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc9, 0x36, 0xd9, 0x00,
- 0x00, 0x00, 0x00, 0x80, 0xc9, 0x36, 0xd9, 0x07, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- };
diff --git a/pixmaps/mime-up.xpm b/pixmaps/mime-up.xpm
new file mode 100644
index 0000000..26190f1
--- /dev/null
+++ b/pixmaps/mime-up.xpm
@@ -0,0 +1,40 @@
+/* XPM */
+static char * mime_up_xpm[] = {
+"32 32 5 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #330099",
+"x c #AAAAAA",
+"+ c #CCCCCC",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" BB B B ",
+" BB BB BB BB BBB BB ",
+" B BB B B B ",
+" ",
+" xx x x x x x x xxx xx x ",
+" x x xx xx x ",
+" x x x x x x x x x x x ",
+" ",
+" BB B BBB ",
+" BB BB BB BB BBB B BB ",
+" B BB B B BBB ",
+" ",
+" xx x x xxx x x x x xx ",
+" xxx x x x x xx x x x x ",
+" ",
+" ",
+" ",
+" ",
+" # # ",
+" ## ## ",
+" # # # # # ###### ## ",
+" # # # # # # # # ",
+" # # # # # # #### ",
+" # # # # # # # ",
+" # # # # # # ### ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/mime-xx.xbm b/pixmaps/mime-xx.xbm
deleted file mode 100644
index dc3ef00..0000000
--- a/pixmaps/mime-xx.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define ee_width 64
-#define ee_height 42
-static char ee_bits[] = {
- 0xc6,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x70,0x25,0x80,0x47,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0x12,0x40,0x12,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfd,0xff,0xff,0xff,0x4f,0x99,0xb3,0xc9,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x2f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xbb,0x08,0x00,0x80,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xdf,0xff,0xff,0xff,0xff,0x3f,0x03,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x94,0xff,0xff,0xff,0xff,0xff,0xaf,
- 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xf5,0xff,
- 0x7f,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0xff,0xff,0x97,0xff,
- 0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x7f,0xf1,0xc3,
- 0xfd,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x0f,0xf0,
- 0xdf,0x7f,0xf8,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x00,
- 0xe0,0xff,0x3f,0xf8,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x0e,0x00,0x38,0x0c,0x0c,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x0e,0x00,0xcf,0x01,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x07,0x00,0x80,0xc1,0x36,0xd8,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x30,0x1c,0x80,0xe3,0x76,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x59,0x90,0xd5,0xb6,0xda,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc9,0x36,0xd9,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/mime-xx.xpm b/pixmaps/mime-xx.xpm
new file mode 100644
index 0000000..1f6df76
--- /dev/null
+++ b/pixmaps/mime-xx.xpm
@@ -0,0 +1,41 @@
+/* XPM */
+static char * mime_up_xpm[] = {
+"32 32 5 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #330099",
+"x c #AAAAAA",
+"+ c #CCCCCC",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" # # # ",
+" # # # ",
+" ### ## # # ### # ",
+" # # # # # # # ",
+" # ### # # # ",
+" # # # # # # ",
+" # ### # # # # ",
+" ",
+" ",
+" # ",
+" # ",
+" ### # ## # ### ",
+" # # # # # # ",
+" # # # ### # # # ",
+" # # # # # # # # ",
+" ### # ### # # # ",
+" # ",
+" # ",
+" ",
+" ",
+" + + ",
+" xx xx ",
+" + + + + + +x+x+x x+ ",
+" x x x x + + + x ",
+" + + + + x x x+x+ ",
+" x x x x + + + ",
+" + + + + x x x+x ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/mime/application.xpm b/pixmaps/mime/application.xpm
new file mode 100644
index 0000000..d6bedfb
--- /dev/null
+++ b/pixmaps/mime/application.xpm
@@ -0,0 +1,31 @@
+/* XPM */
+static char * clip_xpm[] = {
+"22 22 5 1",
+" c None",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+" ",
+" ",
+" BBB ",
+" BB BB ",
+" BB BB ",
+" BB BB ",
+" B_ B_ BB ",
+" B_ B_ BB ",
+" B_ B_ B_ BB ",
+" B_ B_ B_ BB ",
+" B_ B_ B_ BB ",
+" B_ B_ B_ BB ",
+" B_ B_ B_ BB ",
+" B_ B_ B_ BB ",
+" B_ B_ B_ B_ ",
+" B_ B_ B_ B_ ",
+" B_ BBBB_ B_ ",
+" B_ ____ B_ ",
+" B_ B_ ",
+" BBBBBBB_ ",
+" _______ ",
+" ",
+" "};
diff --git a/pixmaps/mime/audio.xpm b/pixmaps/mime/audio.xpm
new file mode 100644
index 0000000..136c122
--- /dev/null
+++ b/pixmaps/mime/audio.xpm
@@ -0,0 +1,30 @@
+/* XPM */
+static char * clip_xpm[] = {
+"22 22 5 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+" BB ",
+" BBBB ",
+" B BBB ",
+" B B ",
+" B B ",
+" B B ",
+" BBBB B ",
+"_BBBBB____B___________",
+" BBB BBBB ",
+" BBBBB ",
+" BBB ",
+"______________________",
+" BBB ",
+" BBBBB ",
+" BBBB ",
+"_______________B______",
+" B ",
+" B ",
+" B ",
+"_______________B______",
+" B ",
+" B "};
diff --git a/pixmaps/mime/image.xpm b/pixmaps/mime/image.xpm
new file mode 100644
index 0000000..8a088ab
--- /dev/null
+++ b/pixmaps/mime/image.xpm
@@ -0,0 +1,30 @@
+/* XPM */
+static char * image_xpm[] = {
+"22 22 5 1",
+" c None",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+" ",
+" ",
+" ",
+" ",
+" xxx ",
+" ___ ",
+" BBBBBBBBBBBBBBBB ",
+" B B_ ",
+" B x x__x BBB B_ ",
+" B x x_.._x B.B B_ ",
+" B x _.BB._x BBB B_ ",
+" B x _.BB._x B_ ",
+" B x x_.._x B_ ",
+" B x x__x B_ ",
+" B B_ ",
+" BBBBBBBBBBBBBBBB__ ",
+" _________________ ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/mime/message.xpm b/pixmaps/mime/message.xpm
new file mode 100644
index 0000000..f5f425b
--- /dev/null
+++ b/pixmaps/mime/message.xpm
@@ -0,0 +1,33 @@
+/* XPM */
+static char * message_xpm[] = {
+"22 22 8 1",
+" c None",
+"B c #330099",
+"+ c #CCCCCC",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"# c #000000",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BBBBBBBBBBBBBBBBBB ",
+" B................B_ ",
+" B.............BB.B_x ",
+" B.............BB.B_x ",
+" B....BBBBBB......B_x ",
+" B................B_x ",
+" B....BBBBB.......B_x ",
+" B................B_x ",
+" BBBBBBBBBBBBBBBBBB_x ",
+" __________________x ",
+" xxxxxxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/mime/multipart.xpm b/pixmaps/mime/multipart.xpm
new file mode 100644
index 0000000..279454c
--- /dev/null
+++ b/pixmaps/mime/multipart.xpm
@@ -0,0 +1,40 @@
+/* XPM */
+static char * documents_xpm[] = {
+"32 32 5 1",
+" c None",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+" ",
+" BBBBBBBBBBBBBBBBBB ",
+" B................B_ ",
+" B..........B.B.B.B_ ",
+" B................B_BBBB ",
+" B..BB.BB.........B_...B_ ",
+" B................B_.B.B_ ",
+" B..B.BBB.........B_...B_BBBB ",
+" B................B_...B_...B_ ",
+" B................B_...B_.B.B_x",
+" B..BB.BB.B.B.BB..B_...B_...B_x",
+" B................B_...B_...B_x",
+" B..B.B.BBB.BB.B..B_...B_...B_x",
+" B................B_B..B_...B_x",
+" B..BB.BB.BB.B.B..B_...B_...B_x",
+" B................B_B..B_...B_x",
+" B..B.BB.B..BBBB..B_...B_B..B_x",
+" B................B_B..B_...B_x",
+" B................B_...B_B..B_x",
+" B.........B.BBB..B_B..B_...B_x",
+" B....BBBBB.......B_...B_B..B_x",
+" B................B_...B_...B_x",
+" BBBBBBBBBBBBBBBBBB_B..B_B..B_x",
+" __________________...B_...B_x",
+" B................B_...B_x",
+" BBBBBBBBBBBBBBBBBB_B..B_x",
+" __________________...B_x",
+" B................B_x",
+" BBBBBBBBBBBBBBBBBB_x",
+" __________________x",
+" xxxxxxxxxxxxxxxxxx",
+" "};
diff --git a/pixmaps/mime/text.xpm b/pixmaps/mime/text.xpm
new file mode 100644
index 0000000..b8f1561
--- /dev/null
+++ b/pixmaps/mime/text.xpm
@@ -0,0 +1,40 @@
+/* XPM */
+static char * document_xpm[] = {
+"32 32 5 1",
+" c None",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+" ",
+" ",
+" ",
+" ",
+" BBBBBBBBBBBBBBBBBB ",
+" B................B_ ",
+" B..........B.B.B.B_x ",
+" B................B_x ",
+" B..BB.BB.........B_x ",
+" B................B_x ",
+" B..B.BBB.........B_x ",
+" B................B_x ",
+" B................B_x ",
+" B..BB.BB.B.B.BB..B_x ",
+" B................B_x ",
+" B..B.B.BBB.BB.B..B_x ",
+" B................B_x ",
+" B..BB.BB.BB.B.B..B_x ",
+" B................B_x ",
+" B..B.BB.B..BBBB..B_x ",
+" B................B_x ",
+" B................B_x ",
+" B.........B.BBB..B_x ",
+" B....BBBBB.......B_x ",
+" B................B_x ",
+" BBBBBBBBBBBBBBBBBB_x ",
+" __________________x ",
+" xxxxxxxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/mime/video.xpm b/pixmaps/mime/video.xpm
new file mode 100644
index 0000000..974fe5f
--- /dev/null
+++ b/pixmaps/mime/video.xpm
@@ -0,0 +1,30 @@
+/* XPM */
+static char * video_xpm[] = {
+"22 22 5 1",
+" c None",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+"BBBBBBBBBBBBBBBBBBBBBB",
+"B B B B B B B B B B B ",
+"BBBBBBBBBBBBBBBBBBBBBB",
+" B B B ",
+"_ B _ B ___ B _",
+" _ B __ B _ B ",
+"_ B _ B ___ B _",
+" B B B ",
+"BBBBBBBBBBBBBBBBBBBBBB",
+"B B B B B B B B B B B ",
+"BBBBBBBBBBBBBBBBBBBBBB",
+" _____________________",
+" ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/mona_stamp-colorful.xpm b/pixmaps/mona_stamp-colorful.xpm
deleted file mode 100644
index fc3f220..0000000
--- a/pixmaps/mona_stamp-colorful.xpm
+++ /dev/null
@@ -1,123 +0,0 @@
-/* XPM */
-static char *noname[] = {
-/* width height ncolors chars_per_pixel */
-"24 30 86 2",
-/* colors */
-"`` c #B88D37",
-"`a c #200505",
-"`b c #F49B12",
-"`c c #704B25",
-"`d c #B65D0A",
-"`e c #4D2713",
-"`f c #FFAC19",
-"`g c #64300F",
-"`h c #321B0C",
-"`i c #582E03",
-"`j c #C07920",
-"`k c #874F09",
-"`l c #593514",
-"`m c #A07C21",
-"`n c #DE7F1C",
-"`o c #481103",
-"`p c #542D15",
-"`q c #58220F",
-"`r c #D1AC4A",
-"`s c #DFA644",
-"`t c #EC9708",
-"`u c #501A07",
-"`v c #3D1608",
-"`w c #90602B",
-"`x c #350000",
-"`y c #A77B13",
-"`z c #A04E13",
-"a` c #AC7E39",
-"aa c #997319",
-"ab c #DA9C1A",
-"ac c #8B6F1F",
-"ad c #280C0A",
-"ae c #98460B",
-"af c #AF5707",
-"ag c #631C0F",
-"ah c #764F35",
-"ai c #E6B339",
-"aj c #804500",
-"ak c #DEAB31",
-"al c #802B00",
-"am c #C06B21",
-"an c #91732E",
-"ao c #643C19",
-"ap c #A54F03",
-"aq c #A78A40",
-"ar c #7E5C25",
-"as c #793313",
-"at c #804F1D",
-"au c #AD913F",
-"av c #85681B",
-"aw c #CB6E00",
-"ax c #30120D",
-"ay c #B89846",
-"az c #8C3904",
-"b` c #B96219",
-"ba c #FABB1D",
-"bb c #A68527",
-"bc c #85652B",
-"bd c #F2B315",
-"be c #FFC125",
-"bf c #7D430C",
-"bg c #C86B0D",
-"bh c #EAAB0D",
-"bi c #420907",
-"bj c #9D5828",
-"bk c #D68000",
-"bl c #813A1D",
-"bm c #F7A413",
-"bn c #9C6E2A",
-"bo c #A1833C",
-"bp c #75551E",
-"bq c #BF6307",
-"br c #997B34",
-"bs c #D27213",
-"bt c #431F0E",
-"bu c #712A0D",
-"bv c #74411D",
-"bw c #CAA239",
-"bx c #C0982F",
-"by c #A7551A",
-"bz c #E98912",
-"c` c #E1810A",
-"ca c #501321",
-"cb c #DB7B04",
-"cc c #EF911E",
-"cd c #390C00",
-/* pixels */
-"acananacbcanbrananacbracbpararacanacananananbrbr",
-"avananacacacacanbnbp`pbtaxad`hbtaobcananbrbrbobr",
-"anbranaaanananar`vad`x`a`a`a`a`a`aad`eavbrbobobr",
-"br`mbbbbbbbrbpadadbibi`aad`a`a`a`a`a`aaxbcbobobo",
-"bbbbbbbbaqbnad`a`x`ucd`x`a`a`a`a`aadad`a`hanauaq",
-"bbbbaq``aq`v`uae`jc``nbsae`qad`a`a`aad`a`a`eaqaq",
-"bb``bxayat`vafab`fbabd`bbzapagbi`a`a`aad`a`aarau",
-"````ay``btbubzbdbebababa`bbsajcdad`a`a`a`a`a`hau",
-"ayayay`wadaeab`fbdbdbdbd`tawaeagbi`aad`a`a`a`aac",
-"bwbx```qbiae`tbmbh`fbh`fc`bs`dae`gbi`a`a`a`a`a`p",
-"`s`rbjbi`hbqc`bmbmbh`fbm`bc``nbqaecdadadad`a`a`h",
-"aiakbvadbibsbzc``tbm`tbqaf`dbqaebuadad`xadad`aax",
-"bw```qbibiasazasafc`azbiblal`obicd`x`aad`xadad`a",
-"a`br`uadbibtbl`uasbzagalafca`uas`z`uadadad`aadad",
-"bcbo`vbi`hbsbsbyawccalbybs`d`dbkbg`u`xadadadadad",
-"`ebv`vad`uc`bhbmc`bzafbsbhbabmcbap`uad`xadadadad",
-"`v`e`vbibibgbmbmbzbm`dbs`tbm`tbqbl`xad`xad`x`xbi",
-"`v`vbiadadaf`t`tc`bzaf`dcc`tbsae`q`xbiadbiadadad",
-"bi`h`x`vbibubsc`bq`z`vbu`tcbafbu`uadadbiadbiadbi",
-"`vbibiad`h`uapbqbzas`qaeafafaebu`ubiadadadbiadad",
-"`h`hbibibi`haeapbyae`q`uazbqapbu`vadadcdaxadbiax",
-"btbtad`hbiadagbqc`afbfbfapbybf`ucdad`xaxbiadadbi",
-"`ibtbibiadbiad`qbsbm`n`daeas`u`vcd`xadbiad`hbiad",
-"ao`e`hbiaxadadadasc`bk`z`q`u`vbibiaxadadbiadadbi",
-"ar`c`v`hbiadbi`aad`u`u`vcdbiadadbibiadbiadadbiad",
-"bparbt`x`hbiad`aadadbibiad`xbiadbi`h`xadadadadad",
-"bp`c`eaxbiadbi`aadadas`g`v`hbibt`v`q`v`xadadbiad",
-"ar`c`lbiaxbiadadad`abu`daj`q`u`ubuaj`qbiadadadad",
-"ahaobtax`hbiaxadadad`u`dae`kbfbfaeaebf`vbiad`vcd",
-"ax`h`hbiadadbiadbi`q`d`yb``d`d`ybgam`d`gbi`hcd`v"
-};
diff --git a/pixmaps/mona_stamp-simple.xpm b/pixmaps/mona_stamp-simple.xpm
deleted file mode 100644
index f091c2f..0000000
--- a/pixmaps/mona_stamp-simple.xpm
+++ /dev/null
@@ -1,45 +0,0 @@
-/* XPM */
-static char *noname[] = {
-/* width height ncolors chars_per_pixel */
-"24 30 8 1",
-/* colors */
-"` c #F49B12",
-"a c #64300F",
-"b c #280C0A",
-"c c #B89846",
-"d c #8C3904",
-"e c #FFC125",
-"f c #9D5828",
-"g c #D68000",
-/* pixels */
-"ffffffffffffffffffffffff",
-"ffffffffffabbbbbafffffcf",
-"ffffffffbbbbbbbbbbaffccf",
-"ffcccffbbbbbbbbbbbbbfccc",
-"cccccfbbbabbbbbbbbbbbfcc",
-"cccccbadggggdabbbbbbbacc",
-"ccccfbf``e```dabbbbbbbfc",
-"ccccba``eeee`gdbbbbbbbbc",
-"cccfbd```````gdabbbbbbbf",
-"cccabd``````ggfdabbbbbba",
-"ccfbbgg``````gggdbbbbbbb",
-"e`abbg`g```gffgdabbbbbbb",
-"ccabbadafgdbddbbbbbbbbbb",
-"cfabbbdaa`adfaaafabbbbbb",
-"fcbbbggfg`dfgffggabbbbbb",
-"aabbag``g`fg`e`gdabbbbbb",
-"babbbg````fg```gdbbbbbbb",
-"bbbbbf``g`ff``gdabbbbbbb",
-"bbbbbagggfba`gfaabbbbbbb",
-"bbbbbadg`aadffdaabbbbbbb",
-"bbbbbbddfdaadgdabbbbbbbb",
-"bbbbbbaggfdddfdabbbbbbbb",
-"abbbbbbag`gfdaabbbbbbbbb",
-"aabbbbbbaggfaabbbbbbbbbb",
-"fabbbbbbbaabbbbbbbbbbbbb",
-"ffbbbbbbbbbbbbbbbbbbbbbb",
-"faabbbbbbbaabbbbbabbbbbb",
-"faabbbbbbbafdaaaadabbbbb",
-"fabbbbbbbbafdddddddbbbbb",
-"bbbbbbbbbaffffffgffabbbb"
-};
diff --git a/pixmaps/next-dn.xbm b/pixmaps/next-dn.xbm
deleted file mode 100644
index 7c9e3de..0000000
--- a/pixmaps/next-dn.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xcf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0xff,0xff,0xff,0xff,0xff,
- 0x1f,0x00,0x60,0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0xbf,0xfe,0xff,0xff,0xff,
- 0xff,0x5f,0x00,0x00,0xfd,0xff,0xff,0xff,0xff,0x5f,0x00,0x00,0xf8,0xff,0xff,
- 0xff,0xff,0x5f,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0xfe,0xff,
- 0xff,0xff,0xff,0x1f,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x8f,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x73,0xfe,0xff,0xf9,0xff,0xff,0xff,0xff,
- 0x63,0xfe,0xff,0xf9,0xff,0xff,0xff,0xff,0x63,0x86,0x99,0xf0,0xff,0xff,0xff,
- 0xff,0x53,0x32,0x99,0xf9,0xff,0xff,0xff,0xff,0x53,0x32,0xc3,0xf9,0xff,0xff,
- 0xff,0xff,0x33,0x02,0xe7,0xf9,0xff,0xff,0xff,0xff,0x33,0xf2,0xc3,0xf9,0xff,
- 0xff,0xff,0xff,0x73,0x32,0x99,0xe9,0xff,0xff,0xff,0xff,0x73,0x86,0x99,0xf3,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff};
diff --git a/pixmaps/next-dn.xpm b/pixmaps/next-dn.xpm
index 066298e..a89e147 100644
--- a/pixmaps/next-dn.xpm
+++ b/pixmaps/next-dn.xpm
@@ -1,48 +1,42 @@
/* XPM */
-static char * next_xpm[] = {
-"64 42 3 1",
-"X c Gray75 s backgroundToolBarColor",
-"W c white",
-"o c Gray60",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoWoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXooooooooooooooooWWoXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXoWWWWWWWWWWWWWWWWoWoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXoWoooooooooooooooooWoXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXoWooooooooooooooooooooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXoWoooooooooooooooooooXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXooooooooooooooooooooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXoooooooooooooooooooXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXooXXXooXXXXXXXXXXXXXXXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXoooXXooXXXXXXXXXXXXXXXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXoooXXooXXooooXXooXXooXooooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXooXoXooXooXXooXooXXooXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXooXoXooXooXXooXXooooXXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXooXXoooXooooooXXXooXXXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXooXXoooXooXXXXXXooooXXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXooXXXooXooXXooXooXXooXXooXoXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXooXXXooXXooooXXooXXooXXXooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * next_up_xpm[] = {
+"32 32 7 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #666666",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"_ c #888888",
+"x c #AAAAAA",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B B ",
+" BB BB ",
+" B%B B%B ",
+" BBBBBB%%B BBBBBB%%B ",
+" B%%%%%+%%B B%%%%%+%%B ",
+" B%++++++%%B B%++++++%%B ",
+" B%++++++%B_xB%++++++%B_x ",
+" BBBBBB+%B_x BBBBBB+%B_x ",
+" ____B%B_x ____B%B_x ",
+" BB_x BB_x ",
+" B_x B_x ",
+" x x ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" # # # ",
+" ## # # ",
+" # # # ## # # ### ",
+" # ## # # # # # ",
+" # # #### # # ",
+" # # # # # # ",
+" # # ### # # # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/next-up.xbm b/pixmaps/next-up.xbm
deleted file mode 100644
index dad015c..0000000
--- a/pixmaps/next-up.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x00,
- 0xe0,0xff,0x9f,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x40,0x01,0x00,0x00,0x00,
- 0x00,0xa0,0xff,0xff,0x02,0x00,0x00,0x00,0x00,0xa0,0xff,0xff,0x07,0x00,0x00,
- 0x00,0x00,0xa0,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x01,0x00,
- 0x00,0x00,0x00,0xe0,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8c,0x01,0x00,0x06,0x00,0x00,0x00,0x00,
- 0x9c,0x01,0x00,0x06,0x00,0x00,0x00,0x00,0x9c,0x79,0x66,0x0f,0x00,0x00,0x00,
- 0x00,0xac,0xcd,0x66,0x06,0x00,0x00,0x00,0x00,0xac,0xcd,0x3c,0x06,0x00,0x00,
- 0x00,0x00,0xcc,0xfd,0x18,0x06,0x00,0x00,0x00,0x00,0xcc,0x0d,0x3c,0x06,0x00,
- 0x00,0x00,0x00,0x8c,0xcd,0x66,0x16,0x00,0x00,0x00,0x00,0x8c,0x79,0x66,0x0c,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/next-up.xpm b/pixmaps/next-up.xpm
index 0828b0a..6df9557 100644
--- a/pixmaps/next-up.xpm
+++ b/pixmaps/next-up.xpm
@@ -1,49 +1,42 @@
/* XPM */
-static char * next_xpm[] = {
-"64 42 4 1",
-"X c Gray75 s backgroundToolBarColor",
-", c black s foregroundToolBarColor",
-"W c white",
-"o c black",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,XXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,,XXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,W,XXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXX,,,,,,,,,,,,,,,,WW,XXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXX,WWWWWWWWWWWWWWWWoW,XXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXX,WoooooooooooooooooW,XXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXX,Wooooooooooooooooooo,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXX,Woooooooooooooooooo,XXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXX,oooooooooooooooooo,XXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXX,,,,,,,,,,,,,,,,oo,XXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,o,XXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,,XXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,XXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXX,,XXX,,XXXXXXXXXXXXXXXX,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXX,,,XX,,XXXXXXXXXXXXXXXX,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXX,,,XX,,XX,,,,XX,,XX,,X,,,,XXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXX,,X,X,,X,,XX,,X,,XX,,XX,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXX,,X,X,,X,,XX,,XX,,,,XXX,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXX,,XX,,,X,,,,,,XXX,,XXXX,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXX,,XX,,,X,,XXXXXX,,,,XXX,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXX,,XXX,,X,,XX,,X,,XX,,XX,,X,XXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXX,,XXX,,XX,,,,XX,,XX,,XXX,,XXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * next_up_xpm[] = {
+"32 32 7 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #330099",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"_ c #888888",
+"x c #AAAAAA",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B B ",
+" BB BB ",
+" B%B B%B ",
+" BBBBBB%%B BBBBBB%%B ",
+" B%%%%%+%%B B%%%%%+%%B ",
+" B%++++++%%B B%++++++%%B ",
+" B%++++++%B_xB%++++++%B_x ",
+" BBBBBB+%B_x BBBBBB+%B_x ",
+" ____B%B_x ____B%B_x ",
+" BB_x BB_x ",
+" B_x B_x ",
+" x x ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" # # # ",
+" ## # # ",
+" # # # ## # # ### ",
+" # ## # # # # # ",
+" # # #### # # ",
+" # # # # # # ",
+" # # ### # # # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/next-xx.xbm b/pixmaps/next-xx.xbm
deleted file mode 100644
index 2526761..0000000
--- a/pixmaps/next-xx.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x40,0x01,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xff,0xff,0x07,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x01,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x9c,0x01,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xac,0xcd,0x66,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xcc,0xfd,0x18,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x8c,0xcd,0x66,0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/previous-dn.xbm b/pixmaps/previous-dn.xbm
deleted file mode 100644
index e015211..0000000
--- a/pixmaps/previous-dn.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xf3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x06,0x00,0xf8,0xff,0xff,0xff,0xff,0x7f,0xfd,0xff,0xfb,0xff,0xff,0xff,
- 0xff,0xbf,0x00,0x00,0xfa,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0xfa,0xff,0xff,
- 0xff,0xff,0x3f,0x00,0x00,0xfa,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0xf8,0xff,
- 0xff,0xff,0xff,0xff,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xf1,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xf3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x3f,0xf0,0xff,0xff,0xf9,0xff,0xff,0xff,0x3f,0xe7,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x87,0x84,0x39,0x19,0x66,0x86,0xff,0x3f,
- 0x07,0x30,0x39,0xc9,0x64,0x32,0xff,0x3f,0x10,0x33,0x93,0xc9,0x64,0xe2,0xff,
- 0x3f,0x9f,0x03,0x93,0xc9,0x64,0x8e,0xff,0x3f,0x9f,0xf3,0xc7,0xc9,0x64,0x1e,
- 0xff,0x3f,0x9f,0x33,0xc7,0xc9,0x24,0x32,0xff,0x3f,0x9f,0x87,0xef,0x19,0x4e,
- 0x86,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff};
diff --git a/pixmaps/previous-dn.xpm b/pixmaps/previous-dn.xpm
index 4906260..16c9e56 100644
--- a/pixmaps/previous-dn.xpm
+++ b/pixmaps/previous-dn.xpm
@@ -1,48 +1,43 @@
/* XPM */
-static char * previous_xpm[] = {
-"64 42 3 1",
-"X c Gray75 s backgroundToolBarColor",
-"W c white",
-"o c Gray60",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXoXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoWoXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoWWooooooooooooooooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoWoWWWWWWWWWWWWWWWWoXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXoWoooooooooooooooooWoXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXooooooooooooooooooooWoXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXoooooooooooooooooooWoXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXooooooooooooooooooooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoooooooooooooooooooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXoXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXooooooXXXXXXXXXXXXXXXXXXXXXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXooXXXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXooXXXooooXooXooooXXooXXXooXooXXooooXXooXXooXXooooXXXXXXXXX",
-"XXXXXXooXXXoooooooooXXooXooXXXooXooXooXXooXooXXooXooXXooXXXXXXXX",
-"XXXXXXooooooXoooXXooXXooXXooXooXXooXooXXooXooXXooXoooXXXXXXXXXXX",
-"XXXXXXooXXXXXooXXXooooooXXooXooXXooXooXXooXooXXooXXXoooXXXXXXXXX",
-"XXXXXXooXXXXXooXXXooXXXXXXXoooXXXooXooXXooXooXXooXXXXoooXXXXXXXX",
-"XXXXXXooXXXXXooXXXooXXooXXXoooXXXooXooXXooXooXoooXooXXooXXXXXXXX",
-"XXXXXXooXXXXXooXXXXooooXXXXXoXXXXooXXooooXXXooXooXXooooXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * previous_up_xpm[] = {
+"32 32 8 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #666666",
+". c #FFFFFF",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"x c #AAAAAA",
+"_ c #888888",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B B ",
+" BB BB ",
+" B.B B.B ",
+" B.%BBBBBB B.%BBBBBB ",
+" B.%+%%%%%Bx B.%+%%%%%Bx ",
+" B.%+++++++BxB.%+++++++Bx ",
+" xB%+++++++B_xB%+++++++B_ ",
+" x_B%+BBBBBB_x_B%+BBBBBB_ ",
+" x_B%B______ x_B%B______ ",
+" x_BB_ x_BB_ ",
+" x_B_ x_B_ ",
+" x__ x__ ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" #### ",
+" # # ",
+" # # ### ## # # ",
+" #### # # # # # # ",
+" # # #### # # ",
+" # # # # # ",
+" # # ### # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/previous-up.xbm b/pixmaps/previous-up.xbm
deleted file mode 100644
index 3dd4611..0000000
--- a/pixmaps/previous-up.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xf9,0xff,0x07,0x00,0x00,0x00,0x00,0x80,0x02,0x00,0x04,0x00,0x00,0x00,
- 0x00,0x40,0xff,0xff,0x05,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x05,0x00,0x00,
- 0x00,0x00,0xc0,0xff,0xff,0x05,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0x07,0x00,
- 0x00,0x00,0x00,0x00,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xc0,0x0f,0x00,0x00,0x06,0x00,0x00,0x00,0xc0,0x18,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x78,0x7b,0xc6,0xe6,0x99,0x79,0x00,0xc0,
- 0xf8,0xcf,0xc6,0x36,0x9b,0xcd,0x00,0xc0,0xef,0xcc,0x6c,0x36,0x9b,0x1d,0x00,
- 0xc0,0x60,0xfc,0x6c,0x36,0x9b,0x71,0x00,0xc0,0x60,0x0c,0x38,0x36,0x9b,0xe1,
- 0x00,0xc0,0x60,0xcc,0x38,0x36,0xdb,0xcd,0x00,0xc0,0x60,0x78,0x10,0xe6,0xb1,
- 0x79,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/previous-up.xpm b/pixmaps/previous-up.xpm
index ef26042..5cff544 100644
--- a/pixmaps/previous-up.xpm
+++ b/pixmaps/previous-up.xpm
@@ -1,49 +1,43 @@
/* XPM */
-static char * previous_xpm[] = {
-"64 42 4 1",
-"X c Gray75 s backgroundToolBarColor",
-", c black s foregroundToolBarColor",
-"W c white",
-"o c black",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXX,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXX,,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXX,W,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXX,WW,,,,,,,,,,,,,,,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXX,WoWWWWWWWWWWWWWWWW,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXX,WoooooooooooooooooW,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXX,oooooooooooooooooooW,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXX,ooooooooooooooooooW,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXX,oooooooooooooooooo,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXX,oo,,,,,,,,,,,,,,,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXX,o,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXX,,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXX,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXX,,,,,,XXXXXXXXXXXXXXXXXXXXX,,XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXX,,XXX,,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXX,,XXX,,,,X,,X,,,,XX,,XXX,,X,,XX,,,,XX,,XX,,XX,,,,XXXXXXXXX",
-"XXXXXX,,XXX,,,,,,,,,XX,,X,,XXX,,X,,X,,XX,,X,,XX,,X,,XX,,XXXXXXXX",
-"XXXXXX,,,,,,X,,,XX,,XX,,XX,,X,,XX,,X,,XX,,X,,XX,,X,,,XXXXXXXXXXX",
-"XXXXXX,,XXXXX,,XXX,,,,,,XX,,X,,XX,,X,,XX,,X,,XX,,XXX,,,XXXXXXXXX",
-"XXXXXX,,XXXXX,,XXX,,XXXXXXX,,,XXX,,X,,XX,,X,,XX,,XXXX,,,XXXXXXXX",
-"XXXXXX,,XXXXX,,XXX,,XX,,XXX,,,XXX,,X,,XX,,X,,X,,,X,,XX,,XXXXXXXX",
-"XXXXXX,,XXXXX,,XXXX,,,,XXXXX,XXXX,,XX,,,,XXX,,X,,XX,,,,XXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * previous_up_xpm[] = {
+"32 32 8 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #330099",
+". c #FFFFFF",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"x c #AAAAAA",
+"_ c #888888",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B B ",
+" BB BB ",
+" B.B B.B ",
+" B.%BBBBBB B.%BBBBBB ",
+" B.%+%%%%%Bx B.%+%%%%%Bx ",
+" B.%+++++++BxB.%+++++++Bx ",
+" xB%+++++++B_xB%+++++++B_ ",
+" x_B%+BBBBBB_x_B%+BBBBBB_ ",
+" x_B%B______ x_B%B______ ",
+" x_BB_ x_BB_ ",
+" x_B_ x_B_ ",
+" x__ x__ ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" #### ",
+" # # ",
+" # # ### ## # # ",
+" #### # # # # # # ",
+" # # #### # # ",
+" # # # # # ",
+" # # ### # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/previous-xx.xbm b/pixmaps/previous-xx.xbm
deleted file mode 100644
index 7e0f425..0000000
--- a/pixmaps/previous-xx.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x02,0x00,0x04,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x05,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0x07,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x18,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
- 0xf8,0xcf,0xc6,0x36,0x9b,0xcd,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xc0,0x60,0xfc,0x6c,0x36,0x9b,0x71,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xc0,0x60,0xcc,0x38,0x36,0xdb,0xcd,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/print-dn.xbm b/pixmaps/print-dn.xbm
deleted file mode 100644
index 2aeb9b8..0000000
--- a/pixmaps/print-dn.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfc,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xc2,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,
- 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xe2,0x57,0xfe,0xff,0xff,0xff,0xff,0xff,
- 0xfe,0xe7,0xfd,0xff,0xff,0xff,0xff,0xff,0x00,0xf0,0xfc,0xff,0xff,0xff,0xff,
- 0x7f,0xff,0x77,0xfd,0xff,0xff,0xff,0xff,0xbf,0xff,0xaf,0xfd,0xff,0xff,0xff,
- 0xff,0x1f,0x00,0xc0,0xfd,0xff,0xff,0xff,0xff,0xdf,0xff,0xdf,0xfd,0xff,0xff,
- 0xff,0xff,0xdf,0xff,0xdf,0xfc,0xff,0xff,0xff,0xff,0xdf,0xff,0x5f,0xfe,0xff,
- 0xff,0xff,0xff,0xdf,0xff,0x9f,0xfe,0xff,0xff,0xff,0xff,0x1f,0x00,0x40,0xff,
- 0xff,0xff,0xff,0xff,0xbf,0xff,0xaf,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xd7,
- 0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xe7,0xff,0xff,0xff,0xff,0xff,0xff,0x00,
- 0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x3f,0xff,0xf9,0xff,0xff,0xff,0xff,
- 0x73,0xfe,0xff,0xf9,0xff,0xff,0xff,0xff,0x73,0x08,0xc9,0xf0,0xff,0xff,0xff,
- 0xff,0x73,0x00,0x91,0xf9,0xff,0xff,0xff,0xff,0x03,0x31,0x99,0xf9,0xff,0xff,
- 0xff,0xff,0xf3,0x39,0x99,0xf9,0xff,0xff,0xff,0xff,0xf3,0x39,0x99,0xf9,0xff,
- 0xff,0xff,0xff,0xf3,0x39,0x99,0xe9,0xff,0xff,0xff,0xff,0xf3,0x39,0x99,0xf3,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff};
diff --git a/pixmaps/print-dn.xpm b/pixmaps/print-dn.xpm
index d75c147..680c408 100644
--- a/pixmaps/print-dn.xpm
+++ b/pixmaps/print-dn.xpm
@@ -1,51 +1,43 @@
/* XPM */
-static char * print_xpm,[] = {
-"64 42 6 1",
-"X c Gray75 s backgroundToolBarColor",
-"o c Gray60",
-"O c white",
-"+ c Gray60",
-"@ c Gray90",
-"# c Gray40",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOooooOOoXoXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOoooooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOoooOOOOOOoXo+ooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOoo++++oXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoooooooooooo++++ooXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@o+++o+oXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@o+o++oXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXooooooooooooooooo+++oXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@o+++oXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@o++ooXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@o+ooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@oo#oXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXooooooooooooooooo#oXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXo+++++++++++++o#oXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXo+++++++++++o#oXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXo+++++++++++ooXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXooooooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXooooooXXXXXXooXXXXXXXXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXooXXXooXXXXXXXXXXXXXXXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXooXXXooooXooooXooXooXXooooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXooXXXoooooooooXoooXooXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXooooooXoooXXooXooXXooXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXooXXXXXooXXXooXooXXooXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXooXXXXXooXXXooXooXXooXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXooXXXXXooXXXooXooXXooXXooXoXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXooXXXXXooXXXooXooXXooXXXooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * print_up_xpm[] = {
+"32 32 8 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #666666",
+". c #FFFFFF",
+"% c #EEEEEE",
+"x c #AAAAAA",
+"+ c #CCCCCC",
+"_ c #888888",
+"# c #808080",
+" ",
+" ",
+" ",
+" BBBBBBBBB ",
+" B.%%%%%%B ",
+" B.BBBBB%B ",
+" B.%%%%%%B ",
+" B.BBBBB%B ",
+" B.%%%%%%B ",
+" BBBBBBBBBBBBBBB ",
+" B.............Bx ",
+" B. ++++++++++B_x ",
+" B.++++++++++++B_x ",
+" B.++++++++++++B_x ",
+" BBBBBBBBBBBBBBB_x ",
+" B+_+_+_+_+_+B__x ",
+" BBBBBBBBBBBBB_xx ",
+" x____________x ",
+" xxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" #### # ",
+" # # # # ",
+" # # # # # # ### ",
+" #### ## # # ## # # ",
+" # # # # # # ",
+" # # # # # # ",
+" # # # # # # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/print-up.xbm b/pixmaps/print-up.xbm
deleted file mode 100644
index 28650ea..0000000
--- a/pixmaps/print-up.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x3d,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
- 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x1d,0xa8,0x01,0x00,0x00,0x00,0x00,0x00,
- 0x01,0x18,0x02,0x00,0x00,0x00,0x00,0x00,0xff,0x0f,0x03,0x00,0x00,0x00,0x00,
- 0x80,0x00,0x88,0x02,0x00,0x00,0x00,0x00,0x40,0x00,0x50,0x02,0x00,0x00,0x00,
- 0x00,0xe0,0xff,0x3f,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x20,0x02,0x00,0x00,
- 0x00,0x00,0x20,0x00,0x20,0x03,0x00,0x00,0x00,0x00,0x20,0x00,0xa0,0x01,0x00,
- 0x00,0x00,0x00,0x20,0x00,0x60,0x01,0x00,0x00,0x00,0x00,0xe0,0xff,0xbf,0x00,
- 0x00,0x00,0x00,0x00,0x40,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x28,
- 0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0xff,
- 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xc0,0x00,0x06,0x00,0x00,0x00,0x00,
- 0x8c,0x01,0x00,0x06,0x00,0x00,0x00,0x00,0x8c,0xf7,0x36,0x0f,0x00,0x00,0x00,
- 0x00,0x8c,0xff,0x6e,0x06,0x00,0x00,0x00,0x00,0xfc,0xce,0x66,0x06,0x00,0x00,
- 0x00,0x00,0x0c,0xc6,0x66,0x06,0x00,0x00,0x00,0x00,0x0c,0xc6,0x66,0x06,0x00,
- 0x00,0x00,0x00,0x0c,0xc6,0x66,0x16,0x00,0x00,0x00,0x00,0x0c,0xc6,0x66,0x0c,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/print-up.xpm b/pixmaps/print-up.xpm
index 72b0c00..c9623d6 100644
--- a/pixmaps/print-up.xpm
+++ b/pixmaps/print-up.xpm
@@ -1,52 +1,43 @@
/* XPM */
-static char * print_xpm,[] = {
-"64 42 7 1",
-"X c Gray75 s backgroundToolBarColor",
-", c black s foregroundToolBarColor",
-"o c black",
-"O c white",
-"+ c Gray60",
-"@ c Gray90",
-"# c Gray40",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOooooOOoXoXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOoooooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOoooOOOOOOoXo+ooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOoo++++oXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoooooooooooo++++ooXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@o+++o+oXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@o+o++oXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXooooooooooooooooo+++oXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@o+++oXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@o++ooXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@o+ooXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@oo#oXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXooooooooooooooooo#oXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXo+++++++++++++o#oXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXo+++++++++++o#oXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXo+++++++++++ooXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXooooooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXX,,,,,,XXXXXX,,XXXXXXXXX,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXX,,XXX,,XXXXXXXXXXXXXXXX,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXX,,XXX,,,,X,,,,X,,X,,XX,,,,XXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXX,,XXX,,,,,,,,,X,,,X,,XX,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXX,,,,,,X,,,XX,,X,,XX,,XX,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXX,,XXXXX,,XXX,,X,,XX,,XX,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXX,,XXXXX,,XXX,,X,,XX,,XX,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXX,,XXXXX,,XXX,,X,,XX,,XX,,X,XXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXX,,XXXXX,,XXX,,X,,XX,,XXX,,XXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * print_up_xpm[] = {
+"32 32 8 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #330099",
+". c #FFFFFF",
+"% c #EEEEEE",
+"x c #AAAAAA",
+"+ c #CCCCCC",
+"_ c #888888",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" BBBBBBBBB ",
+" B.%%%%%%B ",
+" B.BBBBB%B ",
+" B.%%%%%%B ",
+" B.BBBBB%B ",
+" B.%%%%%%B ",
+" BBBBBBBBBBBBBBB ",
+" B.............Bx ",
+" B. ++++++++++B_x ",
+" B.++++++++++++B_x ",
+" B.++++++++++++B_x ",
+" BBBBBBBBBBBBBBB_x ",
+" B+_+_+_+_+_+B__x ",
+" BBBBBBBBBBBBB_xx ",
+" x____________x ",
+" xxxxxxxxxxxxx ",
+" ",
+" ",
+" ",
+" #### # ",
+" # # # # ",
+" # # # # # # ### ",
+" #### ## # # ## # # ",
+" # # # # # # ",
+" # # # # # # ",
+" # # # # # # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/print-xx.xbm b/pixmaps/print-xx.xbm
deleted file mode 100644
index ec00b3e..0000000
--- a/pixmaps/print-xx.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
- 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x01,0x18,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x80,0x00,0x88,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xe0,0xff,0x3f,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x20,0x00,0x20,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x20,0x00,0x60,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x40,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xc0,0x00,0x06,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8c,0xf7,0x36,0x0f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xce,0x66,0x06,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0xc6,0x66,0x06,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0xc6,0x66,0x0c,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/quit-dn.xbm b/pixmaps/quit-dn.xbm
deleted file mode 100644
index fb96e1d..0000000
--- a/pixmaps/quit-dn.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,
- 0xc0,0xff,0xff,0xf0,0xff,0xff,0xff,0x0f,0x27,0xff,0xff,0xf8,0xfc,0xff,0xff,
- 0x87,0x7f,0xff,0xff,0x7c,0xfc,0xff,0xff,0xe7,0xff,0xff,0xff,0x7f,0xfe,0xff,
- 0xff,0xe3,0x9f,0xfe,0xff,0x3f,0xfe,0xff,0xff,0xe3,0xbf,0x83,0x61,0x10,0xf5,
- 0xff,0xff,0x73,0xbf,0xc7,0xa3,0x38,0xff,0xff,0xff,0xfb,0x3f,0xf7,0xfb,0xbe,
- 0xef,0xff,0xff,0xf3,0x3f,0xe7,0xf3,0x3c,0xff,0xff,0xff,0x53,0x10,0xe7,0xf3,
- 0x3c,0xff,0xff,0xff,0x77,0x19,0xe7,0xf3,0x34,0xfd,0xff,0xff,0xf7,0x9f,0xe7,
- 0xf3,0x3c,0xe7,0xff,0xff,0xa7,0xb2,0xa7,0xf1,0x3c,0xe7,0xff,0xff,0x7f,0xf2,
- 0xf7,0x58,0xbc,0xf7,0xff,0xff,0xdf,0xf7,0xff,0xf7,0xfe,0xfd,0xff,0xff,0xff,
- 0x2f,0xde,0xff,0xd7,0xf7,0xff,0xff,0xff,0x67,0xfe,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xdf,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff};
diff --git a/pixmaps/quit-dn.xpm b/pixmaps/quit-dn.xpm
index 38ccd1f..7229bf7 100644
--- a/pixmaps/quit-dn.xpm
+++ b/pixmaps/quit-dn.xpm
@@ -1,54 +1,40 @@
/* XPM */
-static char * quit-up_xpm[] = {
-"64 42 9 1",
-"X c Gray75 s backgroundToolBarColor",
-". c Gray60",
-"G c Gray60",
-"o c Gray60",
-"O c Gray60",
-"+ c Gray60",
-"@ c Gray60",
-"# c Gray60",
-"$ c Gray60",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXX.GGGGGGoXXXXXXXXXXXXXXXXXX.GGoXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXX.GOOoXX.G..oXXXXXXXXXXXXXXXXGOGX+XXX.oXXXXXXXXXXXXXX",
-"XXXXXXXXXXX.OOGX@@#$XXo.XXXXXXXXXXXXXXXXGGX##XX.Oo+XXXXXXXXXXXXX",
-"XXXXXXXXXXXGO.$@@$XXXXXX$+XXXXXXXXXXXXXXoX#@#XXGO+#XXXXXXXXXXXXX",
-"XXXXXXXXXX.OGX#@$XXXX.oX+$XXXXXXXXXXXXXXX+##$X.OG##XXXXXXXXXXXXX",
-"XXXXXXXXXXGO.$@#XXXXXo.XX$oGGGoXX.GGGoX.GGGoX.OO.+XoXXXXXXXXXXXX",
-"XXXXXXXXXXGGX#@$XXXXXX.oX#$GGGX+XoGGGX+oGGGX+oG.X$$++XXXXXXXXXXX",
-"XXXXXXXXXXGGX##XXXXXXXGGX##.oX##XX.oX##X.oX##X.oX#@#$XXXXXXXXXXX",
-"XXXXXXXXXXGGX##XXXXXXXGGX##GGX##XXGGX##XGGX##XGGX##XXXXXXXXXXXXX",
-"XXXXXXXXXXGGX+$.GGGoX.OGX##GGX##XXGGX##XGGX##XGGX##XXXXXXXXXXXXX",
-"XXXXXXXXXXo.XXXoo.G.XGO.$@#GGX##XXGGX##XGGX##XGGX##XXXXXXXXXXXXX",
-"XXXXXXXXXXX.oX$#$$XXXGGX#@$GGX##XXGGX##XGGX##XGGX##.oXXXXXXXXXXX",
-"XXXXXXXXXXXo.X+++X.oXo.$@#XGGX+$X.OGX##XGGX##XGGX##Go+XXXXXXXXXX",
-"XXXXXXXXXXXXX$+o..OGX$#@@$Xo.XXX..G.X+$.OGX+$Xo.X+X.+#XXXXXXXXXX",
-"XXXXXXXXXXXXX+$$#$XoX#@#$XXXX$##$++$###Xo+###+XX$#$+$$XXXXXXXXXX",
-"XXXXXXXXXXXXXXX+###Xo+$.oXXXX+####$+###$+####$XX+###$XXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXGGXXGo+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXo.XX+$#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXX$#@@$XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXX+##$XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * quit_up_xpm[] = {
+"32 32 5 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #666666",
+"_ c #888888",
+"x c #AAAAAA",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BBBBBB ",
+" Bx B_ ",
+" Bx Bx ",
+" Bx BB Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx xx Bx ",
+" BBBBBBx ",
+" xxxxx ",
+" ",
+" ",
+" ",
+" ",
+" ### # ",
+" # # # # ",
+" # # # # ### ",
+" # # # # # # ",
+" # # # # # # # ",
+" # # # ## # # ",
+" ## # # # # # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/quit-up.xbm b/pixmaps/quit-up.xbm
deleted file mode 100644
index 5110849..0000000
--- a/pixmaps/quit-up.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x00,0x00,0x10,0x00,0x00,0x00,
- 0x00,0x4f,0x00,0x00,0x18,0x04,0x00,0x00,0xe0,0x03,0x03,0x00,0x1d,0x06,0x00,
- 0x00,0xc0,0x01,0x02,0x00,0x1e,0x06,0x00,0x00,0xe0,0x20,0x02,0x20,0x00,0x02,
- 0x00,0x00,0x60,0x80,0x86,0x82,0xb0,0x1c,0x00,0x00,0x68,0x00,0xd6,0x68,0x1a,
- 0x0e,0x00,0x00,0x60,0x00,0xc6,0x60,0x18,0x06,0x00,0x00,0x40,0x00,0xc6,0x60,
- 0x18,0x06,0x00,0x00,0x04,0x09,0xc7,0x60,0x18,0x06,0x00,0x00,0xd0,0x03,0xc7,
- 0x60,0x18,0x06,0x00,0x00,0x80,0xa0,0x83,0x60,0x18,0x26,0x00,0x00,0x60,0xe2,
- 0x13,0x48,0x90,0x30,0x00,0x00,0xc0,0xe3,0xe1,0x77,0x3e,0x3f,0x00,0x00,0x80,
- 0x27,0xc0,0xff,0x1f,0x0e,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x90,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/quit-up.xpm b/pixmaps/quit-up.xpm
index 8598415..adcdb4c 100644
--- a/pixmaps/quit-up.xpm
+++ b/pixmaps/quit-up.xpm
@@ -1,55 +1,40 @@
/* XPM */
-static char * quit-up_xpm[] = {
-"64 42 10 1",
-"X c Gray75 s backgroundToolBarColor",
-"x c Gray75",
-". c #BEBEBEBEBEBE",
-"G c #DEDEDEDEDEDE",
-"o c #9E9E9E9E9E9E",
-"O c #FEFEFEFEFEFE",
-"+ c #606060606060",
-"@ c #000000000000",
-"# c #202020202020",
-"$ c #404040404040",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXX.GGGGGGoXXXXXXXXXXXXXXXXXX.GGoXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXX.GOOoxx.G..oXXXXXXXXXXXXXXXXGOGx+XXX.oXXXXXXXXXXXXXX",
-"XXXXXXXXXXX.OOGx@@#$xxo.XXXXXXXXXXXXXXXXGGx##XX.Oo+XXXXXXXXXXXXX",
-"XXXXXXXXXXXGO.$@@$XXXxxx$+XXXXXXXXXXXXXXox#@#XXGO+#XXXXXXXXXXXXX",
-"XXXXXXXXXX.OGx#@$XXXX.ox+$XXXXXXXXXXXXXXX+##$X.OG##XXXXXXXXXXXXX",
-"XXXXXXXXXXGO.$@#XXXXXo.xx$oGGGoXX.GGGoX.GGGoX.OO.+xoXXXXXXXXXXXX",
-"XXXXXXXXXXGGx#@$XXXXXX.ox#$GGGx+XoGGGX+oGGGX+oG.x$$++XXXXXXXXXXX",
-"XXXXXXXXXXGGx##XXXXXXXGGx##.ox##XX.ox##X.ox##X.ox#@#$XXXXXXXXXXX",
-"XXXXXXXXXXGGx##XXXXXXXGGx##GGx##XXGGx##XGGx##XGGx##XXXXXXXXXXXXX",
-"XXXXXXXXXXGGx+$.GGGox.OGx##GGx##XXGGx##XGGx##XGGx##XXXXXXXXXXXXX",
-"XXXXXXXXXXo.xxxoo.G.xGO.$@#GGx##XXGGx##XGGx##XGGx##XXXXXXXXXXXXX",
-"XXXXXXXXXXX.ox$#$$xxxGGx#@$GGx##XXGGx##XGGx##XGGx##.oXXXXXXXXXXX",
-"XXXXXXXXXXXo.x+++X.oxo.$@#XGGx+$X.OGx##XGGx##XGGx##Go+XXXXXXXXXX",
-"XXXXXXXXXXXXX$+o..OGx$#@@$Xo.xxx..G.x+$.OGx+$Xo.x+x.+#XXXXXXXXXX",
-"XXXXXXXXXXXXX+$$#$xox#@#$XXXX$##$++$###Xo+###+XX$#$+$$XXXXXXXXXX",
-"XXXXXXXXXXXXXXX+###xo+$.oXXXX+####$+###$+####$XX+###$XXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXGGxxGo+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXo.xx+$#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXX$#@@$XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXX+##$XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * quit_up_xpm[] = {
+"32 32 5 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #330099",
+"_ c #888888",
+"x c #AAAAAA",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BBBBBB ",
+" Bx B_ ",
+" Bx Bx ",
+" Bx BB Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx BBx Bx ",
+" Bx xx Bx ",
+" BBBBBBx ",
+" xxxxx ",
+" ",
+" ",
+" ",
+" ",
+" ### # ",
+" # # # # ",
+" # # # # ### ",
+" # # # # # # ",
+" # # # # # # # ",
+" # # # ## # # ",
+" ## # # # # # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/quit-xx.xbm b/pixmaps/quit-xx.xbm
deleted file mode 100644
index dea25b5..0000000
--- a/pixmaps/quit-xx.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x10,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x03,0x01,0x00,0x1c,0x06,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x20,0x02,0x20,0x00,0x02,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0xd6,0x68,0x9a,
- 0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0xc6,0x60,
- 0x18,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x03,0xc7,
- 0x60,0x18,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0xe0,
- 0x03,0x60,0x18,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
- 0x57,0xe1,0xff,0x3e,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/recover-dn.xbm b/pixmaps/recover-dn.xbm
deleted file mode 100644
index 50a3dd2..0000000
--- a/pixmaps/recover-dn.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0xfa,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0x6f,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xef,0xfe,0xff,0xff,0xff,0xff,0xff,0x7f,0xdf,0x75,0xff,0xff,0xff,0xff,0xff,
- 0xdf,0xb5,0xae,0xfb,0xff,0xff,0xff,0xff,0x5f,0xef,0x7d,0xfd,0xff,0xff,0xff,
- 0xff,0xef,0x5a,0xab,0xff,0xff,0xff,0xff,0xff,0xbf,0xf7,0xde,0xfa,0xff,0xff,
- 0xff,0xff,0xdf,0x5a,0x6b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xaf,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xfb,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xef,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xfd,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,
- 0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x7f,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xce,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xce,0x70,0x38,0xcc,0x19,0x26,0xff,0x7f,
- 0x4e,0x26,0x93,0xc9,0xc9,0x04,0xff,0x7f,0x60,0x26,0x9f,0x99,0xcc,0xc4,0xff,
- 0x7f,0x66,0x20,0x9f,0x99,0x0c,0xe4,0xff,0x7f,0x4e,0x3e,0x9f,0x39,0xce,0xe7,
- 0xff,0x7f,0x4e,0x26,0x93,0x39,0xce,0xe4,0xff,0x7f,0xce,0x70,0x38,0x7c,0x1f,
- 0xe6,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff};
diff --git a/pixmaps/recover-dn.xpm b/pixmaps/recover-dn.xpm
index eef6cbd..d74e483 100644
--- a/pixmaps/recover-dn.xpm
+++ b/pixmaps/recover-dn.xpm
@@ -1,48 +1,38 @@
/* XPM */
-static char * recover-up_xpm[] = {
-"64 42 3 1",
-"X c Gray75 s backgroundToolBarColor",
-"# c Gray60",
-"o c Gray60",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXX#######################XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXX#######################XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXX#######################XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXX#######################XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXX#######################XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXX#######################XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXooXXXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXooXXXooXXooooXXXooooXXXooooXXooXXXooXXooooXXooXooXXXXXXXX",
-"XXXXXXXooXXXooXooXXooXooXXooXooXXooXooXXXooXooXXooXoooooXXXXXXXX",
-"XXXXXXXooooooXXooXXooXooXXXXXooXXooXXooXooXXooXXooXoooXXXXXXXXXX",
-"XXXXXXXooXXooXXooooooXooXXXXXooXXooXXooXooXXooooooXooXXXXXXXXXXX",
-"XXXXXXXooXXXooXooXXXXXooXXXXXooXXooXXXoooXXXooXXXXXooXXXXXXXXXXX",
-"XXXXXXXooXXXooXooXXooXooXXooXooXXooXXXoooXXXooXXooXooXXXXXXXXXXX",
-"XXXXXXXooXXXooXXooooXXXooooXXXooooXXXXXoXXXXXooooXXooXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * recover_up_xpm[] = {
+"32 32 3 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"R c #666666",
+"# c #808080",
+" ",
+" ",
+" ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" ",
+" ",
+" ",
+" ",
+" #### ",
+" # # ",
+" # # ## ## ## # # ",
+" #### # # # # # # # # ",
+" # # #### # # # # # ",
+" # # # # # # # # # ",
+" # # ### ## ## # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/recover-up.xbm b/pixmaps/recover-up.xbm
deleted file mode 100644
index 2446485..0000000
--- a/pixmaps/recover-up.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xb0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x06,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,
- 0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xf0,0x06,0x00,0x00,0x00,0x00,0x00,0x70,0xab,0x7d,0x07,0x00,0x00,0x00,0x00,
- 0xd0,0x7e,0xab,0x03,0x00,0x00,0x00,0x00,0xd0,0xd5,0xdd,0x06,0x00,0x00,0x00,
- 0x00,0x60,0x7b,0xb7,0x05,0x00,0x00,0x00,0x00,0xb0,0xad,0xdd,0x06,0x00,0x00,
- 0x00,0x00,0x60,0xef,0xb6,0x03,0x00,0x00,0x00,0x00,0x00,0xb0,0x03,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xd0,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x03,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xd0,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x03,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0xb0,
- 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x80,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x31,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x31,0x8f,0xc7,0x33,0xe6,0xd9,0x00,0x80,
- 0xb1,0xd9,0x6c,0x36,0x36,0xfb,0x00,0x80,0x9f,0xd9,0x60,0x66,0x33,0x3b,0x00,
- 0x80,0x99,0xdf,0x60,0x66,0xf3,0x1b,0x00,0x80,0xb1,0xc1,0x60,0xc6,0x31,0x18,
- 0x00,0x80,0xb1,0xd9,0x6c,0xc6,0x31,0x1b,0x00,0x80,0x31,0x8f,0xc7,0x83,0xe0,
- 0x19,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/recover-up.xpm b/pixmaps/recover-up.xpm
index cf62d6e..ca661c5 100644
--- a/pixmaps/recover-up.xpm
+++ b/pixmaps/recover-up.xpm
@@ -1,48 +1,38 @@
/* XPM */
-static char * recover-up_xpm[] = {
-"64 42 3 1",
-"X c Gray75 s backgroundToolBarColor",
-", c black s foregroundToolBarColor",
-"# c red",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXX#######################XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXX#######################XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXX#######################XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXX#######################XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXX#######################XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXX#######################XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXX#######XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXX,,,,,,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXX,,XXX,,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXX,,XXX,,XX,,,,XXX,,,,XXX,,,,XX,,XXX,,XX,,,,XX,,X,,XXXXXXXX",
-"XXXXXXX,,XXX,,X,,XX,,X,,XX,,X,,XX,,X,,XXX,,X,,XX,,X,,,,,XXXXXXXX",
-"XXXXXXX,,,,,,XX,,XX,,X,,XXXXX,,XX,,XX,,X,,XX,,XX,,X,,,XXXXXXXXXX",
-"XXXXXXX,,XX,,XX,,,,,,X,,XXXXX,,XX,,XX,,X,,XX,,,,,,X,,XXXXXXXXXXX",
-"XXXXXXX,,XXX,,X,,XXXXX,,XXXXX,,XX,,XXX,,,XXX,,XXXXX,,XXXXXXXXXXX",
-"XXXXXXX,,XXX,,X,,XX,,X,,XX,,X,,XX,,XXX,,,XXX,,XX,,X,,XXXXXXXXXXX",
-"XXXXXXX,,XXX,,XX,,,,XXX,,,,XXX,,,,XXXXX,XXXXX,,,,XX,,XXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * recover_up_xpm[] = {
+"32 32 3 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"R c #FF0000",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRRRRRRRRRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" RRRRR ",
+" ",
+" ",
+" ",
+" ",
+" #### ",
+" # # ",
+" # # ## ## ## # # ",
+" #### # # # # # # # # ",
+" # # #### # # # # # ",
+" # # # # # # # # # ",
+" # # ### ## ## # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/recover-xx.xbm b/pixmaps/recover-xx.xbm
deleted file mode 100644
index 0e56500..0000000
--- a/pixmaps/recover-xx.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xf0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0xd7,0xba,0x07,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0xbe,0xb7,0x02,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x6a,0xed,0x07,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x03,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x06,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x03,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,
- 0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x31,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
- 0xb1,0xd9,0x6c,0x36,0x36,0xfb,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x80,0x99,0xdf,0x60,0x66,0xf3,0x1b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x80,0xb1,0xd9,0x6c,0xc6,0x31,0x1b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/reply-dn.xbm b/pixmaps/reply-dn.xbm
deleted file mode 100644
index a90d787..0000000
--- a/pixmaps/reply-dn.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x01,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0xe7,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xfd,0xd7,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0x87,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0xbf,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,
- 0x00,0xf0,0xff,0xff,0xff,0xff,0xef,0xff,0xff,0xf7,0xff,0xff,0xff,0xff,0x2f,
- 0xff,0x7f,0xf4,0xff,0xff,0xff,0xff,0xef,0xff,0x7f,0xf5,0xff,0xff,0xff,0xff,
- 0xef,0xff,0x7f,0xf5,0xff,0xff,0xff,0xff,0xef,0x03,0x78,0xf4,0xff,0xff,0xff,
- 0xff,0xef,0xff,0xff,0xf7,0xff,0xff,0xff,0xff,0xef,0x03,0xfe,0xf7,0xff,0xff,
- 0xff,0xff,0xef,0xff,0xff,0xf7,0xff,0xff,0xff,0xff,0xef,0x83,0xff,0xf7,0xff,
- 0xff,0xff,0xff,0xef,0xff,0xff,0xf7,0xff,0xff,0xff,0xff,0xef,0xff,0xff,0xf7,
- 0xff,0xff,0xff,0xff,0xef,0xff,0xff,0xf7,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,
- 0xf0,0xff,0xff,0xff,0xff,0xff,0xfd,0xbf,0xff,0xff,0xff,0xff,0xff,0xff,0x01,
- 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0xff,0x3f,0xff,0xff,0xff,0xff,0xff,
- 0x9c,0xff,0x3f,0xff,0xff,0xff,0xff,0xff,0x9c,0x61,0x32,0x39,0xff,0xff,0xff,
- 0xff,0x9c,0x4c,0x24,0x39,0xff,0xff,0xff,0xff,0xc0,0x4c,0x26,0x93,0xff,0xff,
- 0xff,0xff,0xcc,0x40,0x26,0x93,0xff,0xff,0xff,0xff,0x9c,0x7c,0x26,0xc7,0xff,
- 0xff,0xff,0xff,0x9c,0x4c,0x24,0xc7,0xff,0xff,0xff,0xff,0x9c,0x61,0x32,0xcf,
- 0xff,0xff,0xff,0xff,0xff,0x7f,0xfe,0xef,0xff,0xff,0xff,0xff,0xff,0x7f,0xfe,
- 0xe7,0xff,0xff,0xff,0xff,0xff,0x7f,0xfe,0xf3,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff};
diff --git a/pixmaps/reply-dn.xpm b/pixmaps/reply-dn.xpm
index a5a83ba..17c7451 100644
--- a/pixmaps/reply-dn.xpm
+++ b/pixmaps/reply-dn.xpm
@@ -1,50 +1,43 @@
/* XPM */
-static char * reply_xpm[] = {
-"64 42 5 1",
-"X c Gray75 s backgroundToolBarColor",
-"o c Gray60",
-"O c Gray90",
-"+ c Gray60",
-"@ c white",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoooooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOooXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOo+oXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXooooooooooooooooooooooooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@oo@@@@@@@@@@@@@@@ooo@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@o+o@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@o+o@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@ooooooooo@@@@ooo@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@ooooooo@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@ooooo@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXooooooooooooooooooooooooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXooooooXXXXXXXXXXXXXXXXooXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXooXXXooXXXXXXXXXXXXXXXooXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXooXXXooXXooooXXooXooXXooXooXXXooXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXooXXXooXooXXooXoooXooXooXooXXXooXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXooooooXXooXXooXooXXooXooXXooXooXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXooXXooXXooooooXooXXooXooXXooXooXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXooXXXooXooXXXXXooXXooXooXXXoooXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXooXXXooXooXXooXoooXooXooXXXoooXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXooXXXooXXooooXXooXooXXooXXXXooXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooXXXXXXXXXXXoXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooXXXXXXXXXXooXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooXXXXXXXXXooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * reply_up_xpm[] = {
+"32 32 8 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #666666",
+". c #FFFFFF",
+"_ c #888888",
+"% c #EEEEEE",
+"x c #AAAAAA",
+"+ c #CCCCCC",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B ",
+" BB BBBBBBBBBBBBBBBBBB ",
+" B.B B................B_ ",
+" B.%BBBBBB..........BB.B_x ",
+" B.%+%%%%%B..........BB.B_x ",
+" B.%+++++++BxBBBBBB......B_x ",
+" B%+++++++B_............B_x ",
+" x_B%+BBBBBB_BBBBB.......B_x ",
+" x_B%B______............B_x ",
+" x_BB_BBBBBBBBBBBBBBBBBB_x ",
+" x_B_ __________________x ",
+" x__ xxxxxxxxxxxxxxxxxx ",
+" x_ ",
+" x ",
+" ",
+" ",
+" ",
+" #### # ",
+" # # # ",
+" # # ## # # # # # ",
+" #### # # ## # # # # ",
+" # # #### # # # # # ",
+" # # # ## # # # # ",
+" # # ### # # # ### ",
+" # # ",
+" # ### ",
+" "};
diff --git a/pixmaps/reply-up.xbm b/pixmaps/reply-up.xbm
deleted file mode 100644
index fed92e2..0000000
--- a/pixmaps/reply-up.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfe,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x18,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x02,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x78,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x40,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,
- 0xff,0x0f,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0xd0,
- 0x00,0x80,0x0b,0x00,0x00,0x00,0x00,0x10,0x00,0x80,0x0a,0x00,0x00,0x00,0x00,
- 0x10,0x00,0x80,0x0a,0x00,0x00,0x00,0x00,0x10,0xfc,0x87,0x0b,0x00,0x00,0x00,
- 0x00,0x10,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x10,0xfc,0x01,0x08,0x00,0x00,
- 0x00,0x00,0x10,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x10,0x7c,0x00,0x08,0x00,
- 0x00,0x00,0x00,0x10,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x08,
- 0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,
- 0x0f,0x00,0x00,0x00,0x00,0x00,0x02,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,
- 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,
- 0x63,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x63,0x9e,0xcd,0xc6,0x00,0x00,0x00,
- 0x00,0x63,0xb3,0xdb,0xc6,0x00,0x00,0x00,0x00,0x3f,0xb3,0xd9,0x6c,0x00,0x00,
- 0x00,0x00,0x33,0xbf,0xd9,0x6c,0x00,0x00,0x00,0x00,0x63,0x83,0xd9,0x38,0x00,
- 0x00,0x00,0x00,0x63,0xb3,0xdb,0x38,0x00,0x00,0x00,0x00,0x63,0x9e,0xcd,0x30,
- 0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x10,0x00,0x00,0x00,0x00,0x00,0x80,0x01,
- 0x18,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/reply-up.xpm b/pixmaps/reply-up.xpm
index 0733289..814b2f7 100644
--- a/pixmaps/reply-up.xpm
+++ b/pixmaps/reply-up.xpm
@@ -1,51 +1,43 @@
/* XPM */
-static char * reply_xpm[] = {
-"64 42 6 1",
-"X c Gray75 s backgroundToolBarColor",
-", c black s foregroundToolBarColor",
-"o c black",
-"O c Gray90",
-"+ c Gray60",
-"@ c white",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoooooooooooXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOooXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOo+oXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXooooooooooooooooooooooooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@oo@@@@@@@@@@@@@@@ooo@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@o+o@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@o+o@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@ooooooooo@@@@ooo@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@ooooooo@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@ooooo@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXooooooooooooooooooooooooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXX,,,,,,XXXXXXXXXXXXXXXX,,XXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXX,,XXX,,XXXXXXXXXXXXXXX,,XXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXX,,XXX,,XX,,,,XX,,X,,XX,,X,,XXX,,XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXX,,XXX,,X,,XX,,X,,,X,,X,,X,,XXX,,XXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXX,,,,,,XX,,XX,,X,,XX,,X,,XX,,X,,XXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXX,,XX,,XX,,,,,,X,,XX,,X,,XX,,X,,XXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXX,,XXX,,X,,XXXXX,,XX,,X,,XXX,,,XXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXX,,XXX,,X,,XX,,X,,,X,,X,,XXX,,,XXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXX,,XXX,,XX,,,,XX,,X,,XX,,XXXX,,XXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,,XXXXXXXXXXX,XXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,,XXXXXXXXXX,,XXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,,XXXXXXXXX,,XXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * reply_up_xpm[] = {
+"32 32 8 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"% c #EEEEEE",
+"x c #AAAAAA",
+"+ c #CCCCCC",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" B ",
+" BB BBBBBBBBBBBBBBBBBB ",
+" B.B B................B_ ",
+" B.%BBBBBB..........BB.B_x ",
+" B.%+%%%%%B..........BB.B_x ",
+" B.%+++++++BxBBBBBB......B_x ",
+" B%+++++++B_............B_x ",
+" x_B%+BBBBBB_BBBBB.......B_x ",
+" x_B%B______............B_x ",
+" x_BB_BBBBBBBBBBBBBBBBBB_x ",
+" x_B_ __________________x ",
+" x__ xxxxxxxxxxxxxxxxxx ",
+" x_ ",
+" x ",
+" ",
+" ",
+" ",
+" #### # ",
+" # # # ",
+" # # ## # # # # # ",
+" #### # # ## # # # # ",
+" # # #### # # # # # ",
+" # # # ## # # # # ",
+" # # ### # # # ### ",
+" # # ",
+" # ### ",
+" "};
diff --git a/pixmaps/reply-xx.xbm b/pixmaps/reply-xx.xbm
deleted file mode 100644
index cf85429..0000000
--- a/pixmaps/reply-xx.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfe,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x02,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x80,0x0a,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0xfc,0x87,0x0b,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0xfc,0x01,0x08,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x7c,0x00,0x08,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x08,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,
- 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,
- 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x63,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x63,0xb3,0xdb,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x33,0xbf,0xd9,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x63,0xb3,0xdb,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/stuffed_box-colorful.xpm b/pixmaps/stuffed_box-colorful.xpm
deleted file mode 100644
index 58af0cc..0000000
--- a/pixmaps/stuffed_box-colorful.xpm
+++ /dev/null
@@ -1,291 +0,0 @@
-/* XPM */
-static char *stuffed_box[] = {
-/* width height num_colors chars_per_pixel */
-" 24 30 254 2",
-/* colors */
-".. c #000000",
-".# c #b1b1b1",
-".a c #242120",
-".b c #505955",
-".c c #491909",
-".d c #3e1608",
-".e c #a9a9a9 s background",
-".f c #eeeef0",
-".g c #a7a7a7",
-".h c #a3411c",
-".i c #663622",
-".j c #5c210b",
-".k c #a83e17",
-".l c #2f2824",
-".m c #9f7b71",
-".n c #d38141",
-".o c #a3a3a3",
-".p c #d27f40",
-".q c #a1a1a1",
-".r c #511c0a",
-".s c #ccc1be",
-".t c #9d9d9d",
-".u c #cd773b",
-".v c #903a13",
-".w c #592a15",
-".x c #1e1d1d",
-".y c #cdcccc",
-".z c #959595",
-".A c #939393",
-".B c #e8ac69",
-".C c #919191",
-".D c #8f8f8f",
-".E c #8d8d8d",
-".F c #240e05",
-".G c #652810",
-".H c #a55f3b",
-".I c #878787",
-".J c #f2f1f0",
-".K c #a0491f",
-".L c #8a4a27",
-".M c #0c0401",
-".N c #efbf80",
-".O c #7d7d7d",
-".P c #3d3531",
-".Q c #2a0b04",
-".R c #7b7b7b",
-".S c #81401e",
-".T c #797979",
-".U c #adacac",
-".V c #904d26",
-".W c #eab071",
-".X c #11132a",
-".Y c #737373",
-".Z c #999695",
-".0 c #ab4119",
-".1 c #d16d31",
-".2 c #b3b8b5",
-".3 c #030305",
-".4 c #212129",
-".5 c #b74c1e",
-".6 c #ca7b41",
-".7 c #696969",
-".8 c #404644",
-".9 c #2d1e17",
-"#. c #656565",
-"## c #8b3417",
-"#a c #dfae7d",
-"#b c #f5eeef",
-"#c c #5e260f",
-"#d c #d58445",
-"#e c #5f5f5f",
-"#f c #763416",
-"#g c #5a200b",
-"#h c #301006",
-"#i c #7a2f10",
-"#j c #edb87a",
-"#k c #4e1b09",
-"#l c #da8e4d",
-"#m c #8b8a8a",
-"#n c #d97435",
-"#o c #d58648",
-"#p c #32160b",
-"#q c #fefefe",
-"#r c #e8ad6b",
-"#s c #020000",
-"#t c #474747",
-"#u c #bfbfc0",
-"#v c #4f505c",
-"#w c #6b280e",
-"#x c #fcdf9c",
-"#y c #e39e5c",
-"#z c #160803",
-"#A c #3f3f3f",
-"#B c #61230e",
-"#C c #140601",
-"#D c #3c0e04",
-"#E c #7e3010",
-"#F c #eaeaea",
-"#G c #a4a3a2",
-"#H c #bb5121",
-"#I c #cd642c",
-"#J c #b94f1f",
-"#K c #cb622a",
-"#L c #333333",
-"#M c #d88747",
-"#N c #110601",
-"#O c #d58344",
-"#P c #070301",
-"#Q c #511e0b",
-"#R c #bf9f84",
-"#S c #d2d2d2",
-"#T c #6f290e",
-"#U c #eed6b2",
-"#V c #c55c27",
-"#W c #441708",
-"#X c #bab8b7",
-"#Y c #e9ae6b",
-"#Z c #823110",
-"#0 c #171717",
-"#1 c #eccba6",
-"#2 c #51200e",
-"#3 c #a33c16",
-"#4 c #983915",
-"#5 c #7f6352",
-"#6 c #eab26f",
-"#7 c #361207",
-"#8 c #bd5222",
-"#9 c #d0672e",
-"a. c #a35326",
-"a# c #da8f52",
-"aa c #aaaaaa",
-"ab c #a8a8a8",
-"ac c #a6a6a6",
-"ad c #a4a4a4",
-"ae c #d38041",
-"af c #303246",
-"ag c #a2a2a2",
-"ah c #b85020",
-"ai c #d17e3f",
-"aj c #521d0b",
-"ak c #a0a0a0",
-"al c #e6a764",
-"am c #d07c3e",
-"an c #cf7a3d",
-"ao c #9e9e9e",
-"ap c #9c9c9c",
-"aq c #c75d28",
-"ar c #1b0a03",
-"as c #d88a49",
-"at c #433f3e",
-"au c #989898",
-"av c #65250d",
-"aw c #969696",
-"ax c #0a0806",
-"ay c #949494",
-"az c #581e0a",
-"aA c #c6c5c5",
-"aB c #909090",
-"aC c #d67d3d",
-"aD c #9ea0a1",
-"aE c #121211",
-"aF c #db7838",
-"aG c #414249",
-"aH c #8a8a8a",
-"aI c #d88c4c",
-"aJ c #b0461b",
-"aK c #28322d",
-"aL c #4f5150",
-"aM c #833613",
-"aN c #848484",
-"aO c #361306",
-"aP c #808080",
-"aQ c #551e0a",
-"aR c #762d10",
-"aS c #837b79",
-"aT c #17110f",
-"aU c #cfcfd4",
-"aV c #943413",
-"aW c #767676",
-"aX c #98534f",
-"aY c #ad461b",
-"aZ c #727272",
-"a0 c #1c1917",
-"a1 c #c06a34",
-"a2 c #6c6c6c",
-"a3 c #722b0f",
-"a4 c #c96029",
-"a5 c #9a9999",
-"a6 c #60616a",
-"a7 c #67240e",
-"a8 c #764a37",
-"a9 c #3b1407",
-"b. c #504e4d",
-"b# c #100601",
-"ba c #e7aa67",
-"bb c #f4e0b9",
-"bc c #d4d6d5",
-"bd c #423028",
-"be c #545454",
-"bf c #d66f32",
-"bg c #c05623",
-"bh c #d36b2f",
-"bi c #d2692e",
-"bj c #4a4a4a",
-"bk c #762e0f",
-"bl c #461d0e",
-"bm c #56150a",
-"bn c #6c290f",
-"bo c #ecb472",
-"bp c #c58859",
-"bq c #404040",
-"br c #5f220c",
-"bs c #3a3a3a",
-"bt c #cd652c",
-"bu c #363636",
-"bv c #e7e7e7",
-"bw c #732c0f",
-"bx c #fee4a1",
-"by c #68270e",
-"bz c #dfdfdf",
-"bA c #7a3819",
-"bB c #2c2c2c",
-"bC c #dbdbdb",
-"bD c #f0ece9",
-"bE c #d48243",
-"bF c #282828",
-"bG c #4e4b4a",
-"bH c #5c5b5b",
-"bI c #988f8c",
-"bJ c #de7c39",
-"bK c #b54c1e",
-"bL c #b44a1d",
-"bM c #b3481c",
-"bN c #342f2d",
-"bO c #220701",
-"bP c #c45b26",
-"bQ c #190802",
-"bR c #c35925",
-"bS c #d56c30",
-"bT c #3f3d3b",
-"bU c #e0803e",
-"bV c #fbfafa",
-"bW c #dd9252",
-"bX c #afb0b6",
-"bY c #772b0f",
-"bZ c #f7f6f6",
-"b0 c #220b04",
-"b1 c #0e0e0e",
-"b2 c #cb763d",
-"b3 c #dd9b5f",
-"b4 c #ad4219",
-"b5 c #fadb99",
-"b6 c #67756f",
-"b7 c #e9e8e8",
-/* pixels */
-".e.e.e.e.e.e.e.e.e.e.e.e.o.e.e.e.e.e.e.e.e.e.e.e",
-".e.e.e.e.e.e.e.e.e.e.e.o.2.Z.m.o.e.e.e.e.o.o.e.e",
-".e.e.e.e.e.e.e.e.e.e.obcbZ.6bp.H.m.o.e.e.e.s.o.o",
-".e.e.e.e.e.e.e.e.e.e.fbZbZbbbc.Nbp.H.map.2.mbZbz",
-".e.e.e.e.e.e.e.e.e.e#RbIbc#b.qbp.W.Bbpa.a8.YaA.7",
-".e.e.e.e.e.e.e.ebIa8.y.sbD#S.Ibe.L.B#rbob3.Lbl.o",
-".e.e.e.e.e.e.o#5a1#abe.y.o.qb.#e.q#U.Nbobob5.w.e",
-".e.e.e.e.ebI.H.n#RbI.q#eaPbdb..o.I#X.N.W.N#lbl.e",
-".e.e.e.oaXa1.nai.Vblb.#..9.x.Rbc#S.i#a.N#daF.d.e",
-".e.e.e.ia1bU.uai.n.6bdbs.3#z.dbI#jal.N#n#n.SaLaA",
-".e.e.e#W#c.Hai.u.6a#.m.3a8aI.H.Hal.N#n.1.Sat#XbI",
-".e.e.e#W.v.j.V.uai.n#l.6bpas#lal#1#n#I.S.vbnaTaN",
-".e.e.e.Q.v.v#w.Ga1.u#d#das#lbW.N#I#I.S#Z.1#Ibl.e",
-".e.e.e.9bO#T.v#Z.j.H.u.n.na#.N.u#V.v.F#Ra#.1.9.U",
-".e.e.e.P#haE.G.v.v.jbA.ua#.N.ubg.haTb.#b#obfbl.e",
-".e.e.A.o#SbHbF#p#T.v#E.Gbpa4#HbnaTaLbIbp#Va.bT.U",
-".e.e.e.IbcaubH#7#7.j.v#i.v.5#E##bY.v.h#V#Hbdak.e",
-".e.e.eb.a8#S.9.G#ibl.d#T##.vaY#H.5.5bgbgblaN.q.e",
-".e.e.eb..Ga8.i#ZbYbY.j.Q.jaY.5.5#H#H.m.w.7.o.e.e",
-".e.e.ebGbYbn#w#i#T#T#T.j#ZaJ.5.5.5.S.y#u.A.o.e.e",
-".e.e.oaL.d#Tbn#T#T#T#w.G#ZaY.5.h.i.Dbz.fbV.y#u.o",
-".e.eapbHaxbObTa2#T#w.G.j#iaYaYb..2aua6.Obzbz#q.2",
-".e.e.o.RaL.a.q.Ube#w.j.jaR.k#4#h#A.o.Dbzau#qbcap",
-".e.eapaN#Aa2.ybv#Xa8#g#g#T.k#Z.PbG#L.o.2.2bZ.A.o",
-".o.I.Aak.fbZbXaZbz#.#gbl#T##bd.IaNbH#L.Obz.2.z.e",
-".Aa2.Rbz.eaAaDaNaU.lax.d.j.9aP.q.e.AbHbsa2aN.o.e",
-"ap.Y#AaA#S.o.DbZ.obebBb1aTaS.o.e.e.o.Ia2.Yap.e.e",
-".o.AbHbeaAaU.faA.I.I.7be.Rak.e.e.e.e.eap.o.e.e.e",
-".e.o.Ibe#A#u.e.R.o.oap.A.o.e.e.e.e.e.e.e.e.e.e.e",
-".e.e.oaNbHbe.R.o.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e"
-};
diff --git a/pixmaps/stuffed_box-simple.xpm b/pixmaps/stuffed_box-simple.xpm
deleted file mode 100644
index fb0d4d3..0000000
--- a/pixmaps/stuffed_box-simple.xpm
+++ /dev/null
@@ -1,46 +0,0 @@
-/* XPM */
-static char *noname[] = {
-/* width height ncolors chars_per_pixel */
-"24 30 9 1",
-/* colors */
-"` c #A9A9A9 s background",
-"- c #A9A9A9",
-"a c #A83E17",
-"b c #030305",
-"c c #DA8E4D",
-"d c #FEFEFE",
-"e c #60616A",
-"f c #423028",
-"g c #FADB99",
-/* pixels */
-"````````````````````````",
-"``````````````e`````````",
-"```````````ddccae```````",
-"``````````dddgdgcae``edd",
-"`````````---dd-ccccafe`e",
-"`````````f--dg-eaccccaf`",
-"```````ecce---ee-ggccgf`",
-"``````ac---eefe---gcgcf`",
-"````acccafeeffedgfcgccf`",
-"```fccccccffbbf-gcgccae`",
-"```ffaccccebfcaacgccaf-`",
-"```fafacccccccccgccaafbe",
-"```baaffcccccccgccaaccf`",
-"```fbfaafaccccgcaab-ccf`",
-"```fbbfaafaccgcaabedccf`",
-"```-gefffaafcaafbe-caaf`",
-"```-d-efffaaaaaaaaaaaf``",
-"```efgffafffaaaaaaaafe``",
-"```efffaaafbfaaaaaefe```",
-"```eaffaffffaaaaaa--````",
-"```effffffffaaaaf-ddd```",
-"```ebbfeffffaaae--eeddd`",
-"```eef--efffaaabf--d-dd`",
-"```efe-d-ffffaafef---d``",
-"```-dd-edefffaf`eefed```",
-"`eed---e-fbfffe```efee``",
-"`ef-g--d-efbbe`````ee```",
-"``ee--d---eee```````````",
-"```ef--e````````````````",
-"```eeee`````````````````"
-};
diff --git a/pixmaps/undelete-dn.xbm b/pixmaps/undelete-dn.xbm
deleted file mode 100644
index e6d6f30..0000000
--- a/pixmaps/undelete-dn.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0xf8,
- 0xf5,0xff,0xff,0xff,0xff,0xff,0xfd,0xbb,0xfa,0xff,0xff,0xff,0xff,0x5f,0xf5,
- 0x5b,0xfd,0xff,0xff,0xff,0xff,0xaf,0xaa,0x8b,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x55,0x97,0xff,0xff,0xff,0xff,0xff,0xff,0xbd,0xba,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x7d,0xbd,0xff,0xff,0xff,0xff,0xff,0xff,0xbd,0xaa,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x5d,0x97,0xff,0xff,0xff,0xff,0xff,0xff,0xad,0xaf,0xfe,0xff,0xff,
- 0xff,0xff,0xff,0xd5,0x3f,0xfd,0xff,0xff,0xff,0xff,0xff,0xe9,0xbf,0xfa,0xff,
- 0xff,0xff,0xff,0xff,0xf5,0xbf,0xf5,0xff,0xff,0xff,0xff,0xbf,0xfc,0xbf,0xeb,
- 0xff,0xff,0xff,0xff,0x5f,0xfd,0xbf,0xd7,0xff,0xff,0xff,0xff,0xff,0xfd,0xbf,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0xbf,0xff,0xff,0xff,0xff,0xff,0xff,0x01,
- 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x9f,0xf3,0xff,0xfc,0xf3,0x9f,0xff,0xff,0x9f,0xf3,
- 0xff,0xfc,0xf3,0x9f,0xff,0xff,0x9f,0x93,0x9c,0x0c,0x33,0x0c,0xc3,0xff,0x9f,
- 0x13,0x49,0x64,0x92,0x99,0x99,0xff,0x9f,0x93,0xc9,0x64,0x92,0x99,0x99,0xff,
- 0x9f,0x93,0xc9,0x04,0x12,0x98,0x81,0xff,0x9f,0x93,0xc9,0xe4,0x93,0x9f,0xf9,
- 0xff,0x3f,0x99,0x49,0x64,0x92,0x99,0x98,0xff,0x3f,0x98,0x99,0x0c,0x33,0x3c,
- 0xc3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff};
diff --git a/pixmaps/undelete-dn.xpm b/pixmaps/undelete-dn.xpm
index e5780e9..55596ad 100644
--- a/pixmaps/undelete-dn.xpm
+++ b/pixmaps/undelete-dn.xpm
@@ -1,49 +1,43 @@
/* XPM */
-static char * undelete_xpm[] = {
-"64 42 4 1",
-"X c Gray75 s backgroundToolBarColor",
-"o c Gray60",
-"O c white",
-"+ c Gray60",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooooooooooXXXXXXoXoXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOoOXXoXoXoXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXoXoXoOoOOOOOOo+OoXoXoXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXoXoXoXoOoOoOOOo+oooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOoOoOoOOOoOooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOoOoOoOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOoOoOOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOoOoOoOoOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOoOoOOOoOooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOoOoOOOOOoOoXoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOoOoOOOOOOOOooXoXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooOoOOOOOOOOOoXoXoXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOoOOOOOOOOOOoXXoXoXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXoXooOOOOOOOOOOOOoXXXoXoXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXoXoXoOOOOOOOOOOOOoXXXXoXoXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXooXXXooXXXXXXXXXXXXooXXXXXXXXooXXXXXXXXXooXXXXXXXXXXXXXXXXX",
-"XXXXXooXXXooXXXXXXXXXXXXooXXXXXXXXooXXXXXXXXXooXXXXXXXXXXXXXXXXX",
-"XXXXXooXXXooXooXooXXXooXooXXooooXXooXXooooXXooooXXooooXXXXXXXXXX",
-"XXXXXooXXXooXoooXooXooXoooXooXXooXooXooXXooXXooXXooXXooXXXXXXXXX",
-"XXXXXooXXXooXooXXooXooXXooXooXXooXooXooXXooXXooXXooXXooXXXXXXXXX",
-"XXXXXooXXXooXooXXooXooXXooXooooooXooXooooooXXooXXooooooXXXXXXXXX",
-"XXXXXooXXXooXooXXooXooXXooXooXXXXXooXooXXXXXXooXXooXXXXXXXXXXXXX",
-"XXXXXXooXooXXooXXooXooXoooXooXXooXooXooXXooXXooXoooXXooXXXXXXXXX",
-"XXXXXXoooooXXooXXooXXooXooXXooooXXooXXooooXXXXooXXooooXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * undelete_up_xpm[] = {
+"32 32 8 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #666666",
+". c #FFFFFF",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"_ c #888888",
+"+ c #CCCCCC",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BBBBB ",
+" B B...BB B x ",
+" B B%%%B.B B x ",
+" BB%..BBBB xx ",
+" BB...B.B_x ",
+" B..B...B_x ",
+" BB...B.B_x ",
+" BB.%%%%%B_x ",
+" B B%+++++B_B ",
+" B B%+++++B_ B x ",
+" BBBBBBBB_x x ",
+" ________x xx ",
+" xxxxxxx ",
+" ",
+" ",
+" ",
+" ",
+" # # # # ",
+" # # # # ",
+" # # # # # ## # ",
+" # # ## # ### # # # ",
+" # # # # # # #### # ",
+" # # # # # # # # ",
+" ### # # ### ### # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/undelete-up.xbm b/pixmaps/undelete-up.xbm
deleted file mode 100644
index 790435b..0000000
--- a/pixmaps/undelete-up.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x07,
- 0x0a,0x00,0x00,0x00,0x00,0x00,0x02,0x44,0x05,0x00,0x00,0x00,0x00,0xa0,0x0a,
- 0xa4,0x02,0x00,0x00,0x00,0x00,0x50,0x55,0x74,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xaa,0x68,0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x45,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x82,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x55,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xa2,0x68,0x00,0x00,0x00,0x00,0x00,0x00,0x52,0x50,0x01,0x00,0x00,
- 0x00,0x00,0x00,0x2a,0xc0,0x02,0x00,0x00,0x00,0x00,0x00,0x16,0x40,0x05,0x00,
- 0x00,0x00,0x00,0x00,0x0a,0x40,0x0a,0x00,0x00,0x00,0x00,0x40,0x03,0x40,0x14,
- 0x00,0x00,0x00,0x00,0xa0,0x02,0x40,0x28,0x00,0x00,0x00,0x00,0x00,0x02,0x40,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,
- 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x60,0x0c,0x00,0x03,0x0c,0x60,0x00,0x00,0x60,0x0c,
- 0x00,0x03,0x0c,0x60,0x00,0x00,0x60,0x6c,0x63,0xf3,0xcc,0xf3,0x3c,0x00,0x60,
- 0xec,0xb6,0x9b,0x6d,0x66,0x66,0x00,0x60,0x6c,0x36,0x9b,0x6d,0x66,0x66,0x00,
- 0x60,0x6c,0x36,0xfb,0xed,0x67,0x7e,0x00,0x60,0x6c,0x36,0x1b,0x6c,0x60,0x06,
- 0x00,0xc0,0x66,0xb6,0x9b,0x6d,0x66,0x67,0x00,0xc0,0x67,0x66,0xf3,0xcc,0xc3,
- 0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/undelete-up.xpm b/pixmaps/undelete-up.xpm
index 03e78eb..d9b480c 100644
--- a/pixmaps/undelete-up.xpm
+++ b/pixmaps/undelete-up.xpm
@@ -1,50 +1,43 @@
/* XPM */
-static char * undelete_xpm[] = {
-"64 42 5 1",
-"X c Gray75 s backgroundToolBarColor",
-", c black s foregroundToolBarColor",
-"o c black",
-"O c white",
-"+ c Gray60",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooooooooooXXXXXXoXoXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOoOXXoXoXoXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXoXoXoOoOOOOOOo+OoXoXoXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXoXoXoXoOoOoOOOo+oooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOoOoOoOOOoOooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOoOoOoOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOoOoOOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOoOoOoOoOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOoOoOOOoOooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOoOoOOOOOoOoXoXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOoOoOOOOOOOOooXoXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooOoOOOOOOOOOoXoXoXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOoOOOOOOOOOOoXXoXoXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXoXooOOOOOOOOOOOOoXXXoXoXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXoXoXoOOOOOOOOOOOOoXXXXoXoXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXX,,XXX,,XXXXXXXXXXXX,,XXXXXXXX,,XXXXXXXXX,,XXXXXXXXXXXXXXXXX",
-"XXXXX,,XXX,,XXXXXXXXXXXX,,XXXXXXXX,,XXXXXXXXX,,XXXXXXXXXXXXXXXXX",
-"XXXXX,,XXX,,X,,X,,XXX,,X,,XX,,,,XX,,XX,,,,XX,,,,XX,,,,XXXXXXXXXX",
-"XXXXX,,XXX,,X,,,X,,X,,X,,,X,,XX,,X,,X,,XX,,XX,,XX,,XX,,XXXXXXXXX",
-"XXXXX,,XXX,,X,,XX,,X,,XX,,X,,XX,,X,,X,,XX,,XX,,XX,,XX,,XXXXXXXXX",
-"XXXXX,,XXX,,X,,XX,,X,,XX,,X,,,,,,X,,X,,,,,,XX,,XX,,,,,,XXXXXXXXX",
-"XXXXX,,XXX,,X,,XX,,X,,XX,,X,,XXXXX,,X,,XXXXXX,,XX,,XXXXXXXXXXXXX",
-"XXXXXX,,X,,XX,,XX,,X,,X,,,X,,XX,,X,,X,,XX,,XX,,X,,,XX,,XXXXXXXXX",
-"XXXXXX,,,,,XX,,XX,,XX,,X,,XX,,,,XX,,XX,,,,XXXX,,XX,,,,XXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * undelete_up_xpm[] = {
+"32 32 8 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #330099",
+". c #FFFFFF",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"_ c #888888",
+"+ c #CCCCCC",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" ",
+" BBBBB ",
+" B B...BB B x ",
+" B B%%%B.B B x ",
+" BB%..BBBB xx ",
+" BB...B.B_x ",
+" B..B...B_x ",
+" BB...B.B_x ",
+" BB.%%%%%B_x ",
+" B B%+++++B_B ",
+" B B%+++++B_ B x ",
+" BBBBBBBB_x x ",
+" ________x xx ",
+" xxxxxxx ",
+" ",
+" ",
+" ",
+" ",
+" # # # # ",
+" # # # # ",
+" # # # # # ## # ",
+" # # ## # ### # # # ",
+" # # # # # # #### # ",
+" # # # # # # # # ",
+" ### # # ### ### # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/undelete-xx.xbm b/pixmaps/undelete-xx.xbm
deleted file mode 100644
index cb8976a..0000000
--- a/pixmaps/undelete-xx.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x07,
- 0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x0a,
- 0xa4,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xaa,0x68,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x82,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xa2,0x68,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x2a,0xc0,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x0a,0x40,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xa0,0x02,0x40,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x60,0x0c,0x00,0x03,0x0c,0x60,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x6c,0x63,0xf3,0xcc,0xf3,0x3c,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x6c,0x36,0x9b,0x6d,0x66,0x66,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x6c,0x36,0x1b,0x6c,0x60,0x06,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x67,0x66,0xf3,0xcc,0xc3,
- 0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/visit-dn.xbm b/pixmaps/visit-dn.xbm
deleted file mode 100644
index 9819151..0000000
--- a/pixmaps/visit-dn.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfb,
- 0xf3,0xf9,0xff,0xff,0xff,0xff,0x7f,0x74,0x34,0xfa,0xff,0xff,0xff,0xff,0x9f,
- 0x87,0xc3,0xfb,0xff,0xff,0xff,0xff,0xdf,0x7f,0xfc,0xfd,0xff,0xff,0xff,0xff,
- 0xbf,0x9f,0xff,0xfd,0xff,0xff,0xff,0xff,0xbf,0xdf,0xe3,0xfe,0xff,0xff,0xff,
- 0xff,0xbf,0x5f,0xfc,0xfe,0xff,0xff,0xff,0xff,0x7f,0xef,0xff,0xfe,0xff,0xff,
- 0xff,0xff,0x7f,0xef,0x7c,0xff,0xff,0xff,0xff,0xff,0xff,0x36,0x1f,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xf6,0xe3,0xff,0xff,0xff,0xff,0xff,0xff,0x76,0xfc,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x89,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf1,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe7,0xe1,0x9f,0xf9,0xff,0xff,0xff,0xff,
- 0xe7,0xf9,0xff,0xf9,0xff,0xff,0xff,0xff,0xcf,0x64,0x98,0xf0,0xff,0xff,0xff,
- 0xff,0xcf,0x24,0x93,0xf9,0xff,0xff,0xff,0xff,0xcf,0x24,0x9e,0xf9,0xff,0xff,
- 0xff,0xff,0xdf,0xe6,0x98,0xf9,0xff,0xff,0xff,0xff,0x1f,0xe6,0x91,0xf9,0xff,
- 0xff,0xff,0xff,0x3f,0x27,0x93,0xe9,0xff,0xff,0xff,0xff,0x3f,0x67,0x98,0xf3,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff};
diff --git a/pixmaps/visit-dn.xpm b/pixmaps/visit-dn.xpm
index d005c68..fcdd674 100644
--- a/pixmaps/visit-dn.xpm
+++ b/pixmaps/visit-dn.xpm
@@ -1,49 +1,43 @@
/* XPM */
-static char * visit_xpm[] = {
-"64 42 4 1",
-"X c Gray75 s backgroundToolBarColor",
-"o c Gray60",
-"O c white",
-"+ c Gray60",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXoXXXXXXXooXXXXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoooOoXXXoooOoXXooo+oXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXooOOOOooooOOOoooo++++oXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOooo+++++++oXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXoOOOOOOoo++++++++++oXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXoOOOOOOo++++ooo+++oXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXoOOOOOOo+ooo++++++oXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOOOo+++++++++++oXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOOOo+++oo+++++oXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOOo++oo+++++oooXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOOo++++++oooXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOOo+++oooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoo+oooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXooXXXXooooXXXXXXXXooXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXooXXXXooXXXXXXXXXXXXXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXooXXooXooXXooooXXooXooooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXooXXooXooXooXXooXooXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXooXXooXooXoooXXXXooXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXoXXoXXooXXXoooXXooXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXooooXXooXXXXoooXooXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXooXXXooXooXXooXooXXooXoXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXooXXXooXXooooXXooXXXooXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * visit_up_xpm[] = {
+"32 32 8 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #666666",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"# c #808080",
+" ",
+" ",
+" ",
+" ",
+" BBB ",
+" BB BBB..B_ BBB ",
+" B..BBB.....BBB__B_ ",
+" B........BBB_____B_x ",
+" B...%%BBB_______B__x ",
+" B..%%+B_____BB__B_xx ",
+" B.%++B__BBB____B_x ",
+" B%++B_________B__x ",
+" B%++B__BBB____B_xx ",
+" B++B_______BBB_x ",
+" B+B_____BBB____x ",
+" B+B__BBB____xxxx ",
+" BBBB____xxxx ",
+" ____ xxx ",
+" xxxx ",
+" ",
+" ",
+" ",
+" # # # ",
+" # # # # # ",
+" # # ### ### ",
+" # # # # # # ",
+" # # # ## # # ",
+" # # # # # # ",
+" # # ### # # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/visit-up.xbm b/pixmaps/visit-up.xbm
deleted file mode 100644
index 234c59c..0000000
--- a/pixmaps/visit-up.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
- 0x0c,0x06,0x00,0x00,0x00,0x00,0x80,0x8b,0xcb,0x05,0x00,0x00,0x00,0x00,0x60,
- 0x78,0x3c,0x04,0x00,0x00,0x00,0x00,0x20,0x80,0x03,0x02,0x00,0x00,0x00,0x00,
- 0x40,0x60,0x00,0x02,0x00,0x00,0x00,0x00,0x40,0x20,0x1c,0x01,0x00,0x00,0x00,
- 0x00,0x40,0xa0,0x03,0x01,0x00,0x00,0x00,0x00,0x80,0x10,0x00,0x01,0x00,0x00,
- 0x00,0x00,0x80,0x10,0x83,0x00,0x00,0x00,0x00,0x00,0x00,0xc9,0xe0,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x09,0x1c,0x00,0x00,0x00,0x00,0x00,0x00,0x89,0x03,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x1e,0x60,0x06,0x00,0x00,0x00,0x00,
- 0x18,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x30,0x9b,0x67,0x0f,0x00,0x00,0x00,
- 0x00,0x30,0xdb,0x6c,0x06,0x00,0x00,0x00,0x00,0x30,0xdb,0x61,0x06,0x00,0x00,
- 0x00,0x00,0x20,0x19,0x67,0x06,0x00,0x00,0x00,0x00,0xe0,0x19,0x6e,0x06,0x00,
- 0x00,0x00,0x00,0xc0,0xd8,0x6c,0x16,0x00,0x00,0x00,0x00,0xc0,0x98,0x67,0x0c,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/pixmaps/visit-up.xpm b/pixmaps/visit-up.xpm
index a4d14ed..6909104 100644
--- a/pixmaps/visit-up.xpm
+++ b/pixmaps/visit-up.xpm
@@ -1,50 +1,43 @@
/* XPM */
-static char * visit_xpm[] = {
-"64 42 5 1",
-"X c Gray75 s backgroundToolBarColor",
-", c black s foregroundToolBarColor",
-"o c black",
-"O c white",
-"+ c Gray60",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXoXXXXXXXooXXXXXooXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoooOoXXXoooOoXXooo+oXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXooOOOOooooOOOoooo++++oXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXoOOOOOOOOOooo+++++++oXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXoOOOOOOoo++++++++++oXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXoOOOOOOo++++ooo+++oXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXoOOOOOOo+ooo++++++oXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOOOo+++++++++++oXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXoOOOOo+++oo+++++oXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOOo++oo+++++oooXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOOo++++++oooXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXoOOo+++oooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoo+oooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXoooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXX,,XXXX,,,,XXXXXXXX,,XX,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXX,,XXXX,,XXXXXXXXXXXXXX,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXX,,XX,,X,,XX,,,,XX,,X,,,,XXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXX,,XX,,X,,X,,XX,,X,,XX,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXX,,XX,,X,,X,,,XXXX,,XX,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXX,XX,XX,,XXX,,,XX,,XX,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXX,,,,XX,,XXXX,,,X,,XX,,XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXX,,XXX,,X,,XX,,X,,XX,,X,XXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXX,,XXX,,XX,,,,XX,,XXX,,XXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
+static char * visit_up_xpm[] = {
+"32 32 8 1",
+" c #B2B2B2 s backgroundToolBarColor",
+"B c #330099",
+". c #FFFFFF",
+"_ c #888888",
+"x c #AAAAAA",
+"% c #EEEEEE",
+"+ c #CCCCCC",
+"# c #000000 s foregroundToolBarColor",
+" ",
+" ",
+" ",
+" ",
+" BBB ",
+" BB BBB..B_ BBB ",
+" B..BBB.....BBB__B_ ",
+" B........BBB_____B_x ",
+" B...%%BBB_______B__x ",
+" B..%%+B_____BB__B_xx ",
+" B.%++B__BBB____B_x ",
+" B%++B_________B__x ",
+" B%++B__BBB____B_xx ",
+" B++B_______BBB_x ",
+" B+B_____BBB____x ",
+" B+B__BBB____xxxx ",
+" BBBB____xxxx ",
+" ____ xxx ",
+" xxxx ",
+" ",
+" ",
+" ",
+" # # # ",
+" # # # # # ",
+" # # ### ### ",
+" # # # # # # ",
+" # # # ## # # ",
+" # # # # # # ",
+" # # ### # # ",
+" ",
+" ",
+" "};
diff --git a/pixmaps/visit-xx.xbm b/pixmaps/visit-xx.xbm
deleted file mode 100644
index 6f36b80..0000000
--- a/pixmaps/visit-xx.xbm
+++ /dev/null
@@ -1,26 +0,0 @@
-#define noname_width 64
-#define noname_height 42
-static char noname_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
- 0x0c,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,
- 0x78,0x3c,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x40,0x60,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x40,0xa0,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x80,0x10,0x83,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x09,0x1c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x1e,0x60,0x06,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x9b,0x67,0x0f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0xdb,0x61,0x06,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x19,0x6e,0x06,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x98,0x67,0x0c,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/release.sh b/release.sh
new file mode 100755
index 0000000..3b02ce9
--- /dev/null
+++ b/release.sh
@@ -0,0 +1,54 @@
+#!/bin/sh -x
+
+if [ "$1" != "test" ]; then
+ bzr diff || exit 1
+ make || exit 1
+fi
+
+bzr="bzr --no-plugins --no-aliases"
+nick=`$bzr nick`
+devo=`echo $nick | fgrep -q devo && echo devo`
+revno=`$bzr revno`
+echo $devo
+if [ "$devo" = "devo" ] ; then
+ tag=$nick
+ rdir=$tag-$revno
+ version=$rdir
+else
+ tag=(`$bzr tags | tail -1`)
+ if [ "${tag[1]}" != "$revno" ]; then
+ echo "ERROR: No tag present at the head revision."
+ echo "ERROR: First you must create a release tag!"
+ exit -1
+ fi
+ tag=${tag[0]}
+ rdir=$tag-$revno
+ version=$tag
+fi
+
+dir="release/$rdir"
+rm -rf $dir
+mkdir -p release
+$bzr export $dir
+cp configure $dir
+cat > lisp/vm-revno.el <<EOFREVNO
+;;; This is a generated file, do not edit it!
+(setq vm-version "$version")
+(setq vm-version-info '(
+`bzr version-info --custom --template=' (revdate "{date}")\n (revno {revno})\n (revid "{revision_id}")\n (branch_nick "{branch_nick}")'`
+ (author "`$bzr whoami`")
+))
+EOFREVNO
+cp lisp/vm-revno.el $dir/lisp
+echo 'Version: $Id: '$rdir'$' > $dir/id
+cd release
+tar cvfz $rdir.tgz $rdir
+cd ..
+
+if [ -n "$1" -a -e "$1" ]; then
+ ./$1 $dir.tgz $nick $revno;
+fi
+
+if [ "$1" != "test" ]; then
+ $bzr push
+fi
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..437626f
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,45 @@
+@SET_MAKE@
+
+##############################################################################
+# no csh please
+SHELL = /bin/sh
+
+SOURCES = $(wildcard *.c)
+
+OBJECTS = $(SOURCES:.c=.o)
+
+##############################################################################
+# location of required programms
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+MKDIR = @MKDIR@
+RM = @RM@
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+
+prefix = @prefix@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+bindir= @bindir@
+
+##############################################################################
+all: $(SOURCES:.c=)
+
+install:
+ @mkdir -p -m 0755 "$(DESTDIR)$(bindir)"; \
+ for i in $(SOURCES:.c=) ; do \
+ echo "Installing $$i in $(DESTDIR)$(bindir)" ; \
+ $(INSTALL_PROGRAM) $$i "$(DESTDIR)$(bindir)" ; \
+ done ;
+ @echo VM helper binaries successfully installed\!
+
+##############################################################################
+Makefile: @srcdir@/Makefile.in
+ cd ..; ./config.status
+
+##############################################################################
+clean:
+ -$(RM) -f $(SOURCES:.c=)
+
+distclean: clean
+ -$(RM) -f Makefile
diff --git a/src/base64-decode.c b/src/base64-decode.c
new file mode 100644
index 0000000..d0d3b9a
--- /dev/null
+++ b/src/base64-decode.c
@@ -0,0 +1,77 @@
+/* public domain */
+
+/* BASE64 on stdin -> converted data on stdout */
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#ifdef _WIN32
+#ifndef WIN32
+#define WIN32
+#endif
+#endif
+
+#ifdef WIN32
+#include <io.h>
+#include <fcntl.h>
+#endif
+
+unsigned char alphabet[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+int
+main()
+{
+ static char inalphabet[256], decoder[256];
+ int i, bits, c, char_count, errors = 0;
+
+#ifdef WIN32
+ _setmode( _fileno(stdout), _O_BINARY);
+#endif
+
+ for (i = (sizeof alphabet) - 1; i >= 0 ; i--) {
+ inalphabet[alphabet[i]] = 1;
+ decoder[alphabet[i]] = i;
+ }
+
+ char_count = 0;
+ bits = 0;
+ while ((c = getchar()) != EOF) {
+ if (c == '=')
+ break;
+ if (c > 255 || ! inalphabet[c])
+ continue;
+ bits += decoder[c];
+ char_count++;
+ if (char_count == 4) {
+ putchar((bits >> 16));
+ putchar(((bits >> 8) & 0xff));
+ putchar((bits & 0xff));
+ bits = 0;
+ char_count = 0;
+ } else {
+ bits <<= 6;
+ }
+ }
+ if (c == EOF) {
+ if (char_count) {
+ fprintf(stderr, "base64 encoding incomplete: at least %d bits truncated",
+ ((4 - char_count) * 6));
+ errors++;
+ }
+ } else { /* c == '=' */
+ switch (char_count) {
+ case 1:
+ fprintf(stderr, "base64 encoding incomplete: at least 2 bits missing");
+ errors++;
+ break;
+ case 2:
+ putchar((bits >> 10));
+ break;
+ case 3:
+ putchar((bits >> 16));
+ putchar(((bits >> 8) & 0xff));
+ break;
+ }
+ }
+ exit(errors ? 1 : 0);
+}
diff --git a/base64-encode.c b/src/base64-encode.c
index fac61ad..fd146fa 100644
--- a/base64-encode.c
+++ b/src/base64-encode.c
@@ -6,6 +6,7 @@
* UNIX's newline convention is used, i.e. one ASCII control-j (10 decimal).
*/
+#include <stdlib.h>
#include <stdio.h>
#ifdef _WIN32
@@ -24,52 +25,52 @@ unsigned char alphabet[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwx
int
main()
{
- int cols, bits, c, char_count;
+ int cols, bits, c, char_count;
#ifdef WIN32
- _setmode( _fileno(stdin), _O_BINARY);
+ _setmode( _fileno(stdin), _O_BINARY);
#endif
- char_count = 0;
- bits = 0;
- cols = 0;
- while ((c = getchar()) != EOF) {
+ char_count = 0;
+ bits = 0;
+ cols = 0;
+ while ((c = getchar()) != EOF) {
if (c > 255) {
- fprintf(stderr, "encountered char > 255 (decimal %d)", c);
- exit(1);
+ fprintf(stderr, "encountered char > 255 (decimal %d)", c);
+ exit(1);
}
bits += c;
char_count++;
if (char_count == 3) {
- putchar(alphabet[bits >> 18]);
- putchar(alphabet[(bits >> 12) & 0x3f]);
- putchar(alphabet[(bits >> 6) & 0x3f]);
- putchar(alphabet[bits & 0x3f]);
- cols += 4;
- if (cols == 72) {
+ putchar(alphabet[bits >> 18]);
+ putchar(alphabet[(bits >> 12) & 0x3f]);
+ putchar(alphabet[(bits >> 6) & 0x3f]);
+ putchar(alphabet[bits & 0x3f]);
+ cols += 4;
+ if (cols == 72) {
putchar('\n');
cols = 0;
- }
- bits = 0;
- char_count = 0;
+ }
+ bits = 0;
+ char_count = 0;
} else {
- bits <<= 8;
+ bits <<= 8;
}
- }
- if (char_count != 0) {
+ }
+ if (char_count != 0) {
bits <<= 16 - (8 * char_count);
putchar(alphabet[bits >> 18]);
putchar(alphabet[(bits >> 12) & 0x3f]);
if (char_count == 1) {
- putchar('=');
- putchar('=');
+ putchar('=');
+ putchar('=');
} else {
- putchar(alphabet[(bits >> 6) & 0x3f]);
- putchar('=');
+ putchar(alphabet[(bits >> 6) & 0x3f]);
+ putchar('=');
}
if (cols > 0)
putchar('\n');
- }
+ }
- exit(0);
+ exit(0);
}
diff --git a/qp-decode.c b/src/qp-decode.c
index a81f7e3..835dc1a 100644
--- a/qp-decode.c
+++ b/src/qp-decode.c
@@ -2,6 +2,7 @@
/* Quoted Printable on stdin -> converted data on stdout */
+#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -35,9 +36,9 @@ main()
while (fgets(line, sizeof line - 1, stdin)) {
lineno++;
start = line;
- keep_processing:
+ keep_processing:
for (stop = start; *stop && *stop != '=' && *stop != '\n'; stop++)
- ;
+ ;
if (stop != line && *stop == '\n') {
copy = stop;
do {
@@ -77,18 +78,21 @@ main()
stop++;
} else if (*stop == '\r') {
/*
- * Assume the user's lousy delivery software
- * didn't convert from Internet's CRLF newline
- * convention to the local LF convention.
- */
+ * Assume the user's lousy delivery software
+ * didn't convert from Internet's CRLF newline
+ * convention to the local LF convention.
+ */
stop++;
} else if (*stop == ' ' || *stop == '\t') {
- /* garbage added in transit */
- for (stop++; *stop && (*stop == ' ' || *stop == '\t'); stop++)
- ;
+ /* garbage added in transit */
+ for (stop++; *stop && (*stop == ' ' || *stop == '\t'); stop++)
+ ;
} else {
- fprintf(stderr, "line %d: something other than line break or hex digits after = in quoted-printable encoding\n", lineno);
- exit(1);
+ fprintf(stderr, "Error: line %d: '%c' is something other than line break or hex digit after = in quoted-printable encoding\n", lineno, *stop);
+ putchar('=');
+ putchar(*stop);
+ stop++;
+ /* exit(1); */
}
start = stop;
goto keep_processing;
diff --git a/qp-encode.c b/src/qp-encode.c
index 1dbe858..e5796d0 100644
--- a/qp-encode.c
+++ b/src/qp-encode.c
@@ -6,6 +6,7 @@
* UNIX's newline convention is used, i.e. one ASCII control-j (10 decimal).
*/
+#include <stdlib.h>
#include <stdio.h>
#ifdef _WIN32
@@ -24,61 +25,59 @@ char *hexdigits = "0123456789ABCDEF";
int
main()
{
- int c;
- int cols = 0;
+ int c;
+ int cols = 0;
#ifdef WIN32
- _setmode( _fileno(stdout), _O_BINARY);
+ _setmode( _fileno(stdout), _O_BINARY);
#endif
- while ((c = getchar()) != EOF) {
+ while ((c = getchar()) != EOF) {
if (c == '\n') {
- putchar(c);
- cols = 0;
+ putchar(c);
+ cols = 0;
} else if (c == ' ') {
- int nextc;
- nextc = getchar();
- if (nextc != '\n' && nextc != EOF) {
+ int nextc = getchar();
+ if (nextc != '\n' && nextc != EOF) {
putchar(c);
cols++;
- } else {
+ } else {
putchar('=');
putchar(hexdigits[c >> 4]);
putchar(hexdigits[c & 0xf]);
cols += 3;
- }
- if (nextc != EOF)
- ungetc(nextc, stdin);
+ }
+ if (nextc != EOF)
+ ungetc(nextc, stdin);
} else if (c < 33 || c > 126 || c == '=' ||
/* these are for RFC 2047 Q encoding */
c == '?' || c == '_') {
- putchar('=');
- putchar(hexdigits[c >> 4]);
- putchar(hexdigits[c & 0xf]);
- cols += 3;
+ putchar('=');
+ putchar(hexdigits[c >> 4]);
+ putchar(hexdigits[c & 0xf]);
+ cols += 3;
} else if (c == '.' && cols == 0) {
- int nextc;
- nextc = getchar();
- if (nextc == EOF || nextc == '\n') {
+ int nextc = getchar();
+ if (nextc == EOF || nextc == '\n') {
putchar('=');
putchar(hexdigits[c >> 4]);
putchar(hexdigits[c & 0xf]);
cols += 3;
- } else {
+ } else {
putchar(c);
cols++;
- }
- if (nextc != EOF)
- ungetc(nextc, stdin);
+ }
+ if (nextc != EOF)
+ ungetc(nextc, stdin);
} else {
- putchar(c);
- cols++;
+ putchar(c);
+ cols++;
}
if (cols > 70) {
- putchar('=');
- putchar('\n');
- cols = 0;
+ putchar('=');
+ putchar('\n');
+ cols = 0;
+ }
}
- }
- exit(0);
+ exit(0);
}
diff --git a/src/vm-mail b/src/vm-mail
new file mode 100755
index 0000000..a6fc6ef
--- /dev/null
+++ b/src/vm-mail
@@ -0,0 +1,38 @@
+#!/bin/sh
+# -*- shell-script -*-
+
+# Copyright (C) 2006 Robert Widhopf-Fenk
+#
+# Author: Robert Widhopf-Fenk
+# Status: Tested with XEmacs 21.4.19 & VM 7.19
+# Keywords: VM helpers
+# X-URL: http://www.robf.de/Hacking/elisp
+# Version: $Id$
+
+# This is a wrapper shell script which can be used to pass mailto: links with
+# the mozex Firefox plugin to VM.
+#
+# Grab version 1.9.3 or higher from http://mozex.mozdev.org/installation.html
+#
+# In mozex you should give the path to this script with the %a and %s args, e.g.
+#
+# /home/yourlogin/bin/vm-mail %a %s
+#
+# Set "cmd" below to your Emacs binary. You have three choices.
+
+# 1) XEmacs uncomment the next line
+#cmd=xemacs
+
+# 2) GNU Emacs uncomment the next line
+#cmd=emacs
+
+# 3) If you always have a VM-Emacs running you might consider to start gnuserv,
+# by adding the following to the end of your ~/.vm
+#
+# (if (not (gnuserv-running-p)) (gnuserv-start))
+#
+# This will allow you to connect to your running XEmacs with gnuclient and brings up a
+# composition buffer really instantly.
+cmd=gnuclient
+
+$cmd -eval "(let (vm-frame-per-composition) (vm-mail \"$1\" \"$2\"))"
diff --git a/vm-byteopts.el b/vm-byteopts.el
deleted file mode 100644
index 51db188..0000000
--- a/vm-byteopts.el
+++ /dev/null
@@ -1,23 +0,0 @@
-;;(provide 'vm-byteopts)
-
-;; get the compiler loaded so we can undo some of the things that
-;; happen when it's loaded.
-(load "bytecomp" t t nil)
-;; Emacs 19 byte compiler complains about too much stuff by default.
-;; Turn off most of the warnings here.
-(setq byte-compile-warnings '(free-vars))
-;; need to use these variables for v18 support.
-;; stifle the compiler.
-(put 'inhibit-local-variables 'byte-obsolete-variable nil)
-;; Turn off dynamic docstrings and lazy function loading. This
-;; is a new feature of FSF Emacs 19.29, and is incompatible
-;; with pre-19.29 versions of FSF Emacs and all version of Lucid
-;; Emacs / XEmacs. I like being able to share .elc files between
-;; different v19 Emacses.
-(setq byte-compile-dynamic nil)
-(setq byte-compile-dynamic-docstrings nil)
-;; avoid v20 features because users are going
-;; to try to share elc files no matter what we tell them.
-(setq byte-compile-emacs19-compatibility t)
-
-(provide 'vm-byteopts)
diff --git a/vm-easymenu.el b/vm-easymenu.el
deleted file mode 100644
index 52fb566..0000000
--- a/vm-easymenu.el
+++ /dev/null
@@ -1,225 +0,0 @@
-;;; easymenu.el --- support the easymenu interface for defining a menu.
-
-;; Copyright (C) 1994 Free Software Foundation, Inc.
-
-;; Keywords: emulations
-;; Author: rms
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;; This is compatible with easymenu.el by Per Abrahamsen
-;;; but it is much simpler as it doesn't try to support other Emacs versions.
-;;; The code was mostly derived from lmenu.el.
-
-;;; Changed 17-May-1995, Kyle Jones
-;;; Made easy-menu-create-keymaps handle the
-;;; [ NAME CALLBACK ENABLE ]
-;;; case properly. Previously the enabler function was not
-;;; being put on the property list of the command.
-;;; Changed 20-May-1995, Kyle Jones
-;;; Made easy-menu-create-keymaps handle the
-;;; [ NAME CALLBACK ENABLE SUFFIX ]
-;;; case properly.
-;;; Changed 25-May-1995, Kyle Jones
-;;; Renamed easy-menu- functions to vm-easy-menu- to avoid
-;;; non-vm compatible versions.
-;;; Changed 2-July-1995, Kyle Jones
-;;; If callback is a symbol use it in the menu keymap instead
-;;; of the uninterned menu-function-XXX symbols. This allows
-;;; Emacs' menu code to set this-command properly when
-;;; launching a command from the menubar.
-;;;
-;;; Code:
-
-;;(provide 'vm-easymenu)
-
-(defmacro vm-easy-menu-define (symbol maps doc menu)
- "Define a menu bar submenu in maps MAPS, according to MENU.
-The menu keymap is stored in symbol SYMBOL, both as its value
-and as its function definition. DOC is used as the doc string for SYMBOL.
-
-The first element of MENU must be a string. It is the menu bar item name.
-The rest of the elements are menu items.
-
-A menu item is usually a vector of three elements: [NAME CALLBACK ENABLE]
-
-NAME is a string--the menu item name.
-
-CALLBACK is a command to run when the item is chosen,
-or a list to evaluate when the item is chosen.
-
-ENABLE is an expression; the item is enabled for selection
-whenever this expression's value is non-nil.
-
-Alternatively, a menu item may have the form:
-
- [ NAME CALLBACK [ KEYWORD ARG ] ... ]
-
-Where KEYWORD is one of the symbol defined below.
-
- :keys KEYS
-
-KEYS is a string; a complex keyboard equivalent to this menu item.
-This is normally not needed because keyboard equivalents are usually
-computed automatically.
-
- :active ENABLE
-
-ENABLE is an expression; the item is enabled for selection
-whenever this expression's value is non-nil.
-
- :suffix NAME
-
-NAME is a string; the name of an argument to CALLBACK.
-
- :style
-
-STYLE is a symbol describing the type of menu item. The following are
-defined:
-
-toggle: A checkbox.
- Currently just prepend the name with the string \"Toggle \".
-radio: A radio button.
-nil: An ordinary menu item.
-
- :selected SELECTED
-
-SELECTED is an expression; the checkbox or radio button is selected
-whenever this expression's value is non-nil.
-Currently just disable radio buttons, no effect on checkboxes.
-
-A menu item can be a string. Then that string appears in the menu as
-unselectable text. A string consisting solely of hyphens is displayed
-as a solid horizontal line.
-
-A menu item can be a list. It is treated as a submenu.
-The first element should be the submenu name. That's used as the
-menu item in the top-level menu. The cdr of the submenu list
-is a list of menu items, as above."
- (` (progn
- (defvar (, symbol) nil (, doc))
- (vm-easy-menu-do-define (quote (, symbol)) (, maps) (, doc) (, menu)))))
-
-(defun vm-easy-menu-do-define (symbol maps doc menu)
- ;; We can't do anything that might differ between Emacs dialects in
- ;; `vm-easy-menu-define' in order to make byte compiled files
- ;; compatible. Therefore everything interesting is done in this
- ;; function.
- (set symbol (vm-easy-menu-create-keymaps (car menu) (cdr menu)))
- (fset symbol (` (lambda (event) (, doc) (interactive "@e")
- (easy-popup-menu event (, symbol)))))
- (mapcar (function (lambda (map)
- (define-key map (vector 'menu-bar (intern (car menu)))
- (cons (car menu) (symbol-value symbol)))))
- (if (keymapp maps) (list maps) maps)))
-
-(defvar vm-easy-menu-item-count 0)
-
-;; Return a menu keymap corresponding to a Lucid-style menu list
-;; MENU-ITEMS, and with name MENU-NAME.
-(defun vm-easy-menu-create-keymaps (menu-name menu-items)
- (let ((menu (make-sparse-keymap menu-name)))
- ;; Process items in reverse order,
- ;; since the define-key loop reverses them again.
- (setq menu-items (reverse menu-items))
- (while menu-items
- (let* ((item (car menu-items))
- (callback (if (vectorp item) (aref item 1)))
- command enabler name)
- (cond ((stringp item)
- (setq command nil)
- (setq name (if (string-match "^-+$" item) "" item)))
- ((consp item)
- (setq command (vm-easy-menu-create-keymaps (car item) (cdr item)))
- (setq name (car item)))
- ((vectorp item)
- (if (symbolp callback)
- (setq command callback)
- (setq command (make-symbol (format "menu-function-%d"
- vm-easy-menu-item-count)))
- (setq vm-easy-menu-item-count (1+ vm-easy-menu-item-count)))
- (setq name (aref item 0))
- (let ((keyword (aref item 2)))
- (if (and (symbolp keyword)
- (= ?: (aref (symbol-name keyword) 0)))
- (let ((count 2)
- style selected active keys
- arg)
- (while (> (length item) count)
- (setq keyword (aref item count))
- (setq arg (aref item (1+ count)))
- (setq count (+ 2 count))
- (cond ((eq keyword ':keys)
- (setq keys arg))
- ((eq keyword ':active)
- (setq active arg))
- ((eq keyword ':suffix)
- (setq name (concat name " " arg)))
- ((eq keyword ':style)
- (setq style arg))
- ((eq keyword ':selected)
- (setq selected arg))))
- (if keys
- (setq name (concat name " (" keys ")")))
- (if (eq style 'toggle)
- ;; Simulate checkboxes.
- (setq name (concat "Toggle " name)))
- (if active
- (put command 'menu-enable active)
- (and (eq style 'radio)
- selected
- ;; Simulate radio buttons with menu-enable.
- (put command 'menu-enable
- (list 'not selected)))))
- (if (= (length item) 4)
- (setq name (concat name " " (aref item 3))))
- (put command 'menu-enable keyword)))
- (if (keymapp callback)
- (setq name (concat name " ...")))
- (if (symbolp callback)
- nil ;;(fset command callback)
- (fset command (list 'lambda () '(interactive) callback)))))
- (if (null command)
- ;; Handle inactive strings specially--allow any number
- ;; of identical ones.
- (setcdr menu (cons (list nil name) (cdr menu)))
- (if name
- (define-key menu (vector (intern name)) (cons name command)))))
- (setq menu-items (cdr menu-items)))
- menu))
-
-(defun vm-easy-menu-change (path name items)
- "Change menu found at PATH as item NAME to contain ITEMS.
-PATH is a list of strings for locating the menu containing NAME in the
-menu bar. ITEMS is a list of menu items, as in `vm-easy-menu-define'.
-These items entirely replace the previous items in that map.
-
-Call this from `activate-menubar-hook' to implement dynamic menus."
- (let ((map (key-binding (apply 'vector
- 'menu-bar
- (mapcar 'intern (append path (list name)))))))
- (if (keymapp map)
- (setcdr map (cdr (vm-easy-menu-create-keymaps name items)))
- (error "Malformed menu in `vm-easy-menu-change'"))))
-
-(defun vm-easy-menu-remove (menu))
-
-(defun vm-easy-menu-add (menu &optional map))
-
-(provide 'vm-easymenu)
-
-;;; vm-easymenu.el ends here
diff --git a/vm-license.el b/vm-license.el
deleted file mode 100644
index 7060c8a..0000000
--- a/vm-license.el
+++ /dev/null
@@ -1,47 +0,0 @@
-;;; Code to show VM's warranty and copying restrictions
-;;; Copyright (C) 1989, 1994 Kyle E. Jones
-;;;
-;;; This program is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 1, or (at your option)
-;;; any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;(provide 'vm-license)
-
-(defun vm-show-copying-restrictions (&optional warranty)
- (interactive)
- (require 'info)
- (let ((pop-up-windows (eq vm-mutable-windows t))
- (pop-up-frames (and vm-mutable-frames vm-frame-per-help)))
- (or
- (condition-case ()
- (progn (Info-goto-node "(vm)License") t)
- (error nil))
- (condition-case ()
- (progn (Info-goto-node "(vm.info)License") t)
- (error nil))
- (error "VM Info documentation appears not to be installed"))
- (vm-display (current-buffer) t nil nil)
- (vm-display nil nil '(vm-show-copying-restrictions vm-show-no-warranty)
- (list this-command))
- (if warranty
- (let ((case-fold-search nil))
- (search-forward "NO WARRANTY\n" nil t)
- (forward-line -1)
- (set-window-start (selected-window) (point))))))
-
-(defun vm-show-no-warranty ()
- "Display \"NO WARRANTY\" section of the GNU General Public License."
- (interactive)
- (vm-show-copying-restrictions t))
-
-(provide 'vm-license)
diff --git a/vm-version.el b/vm-version.el
deleted file mode 100644
index 64ae6f6..0000000
--- a/vm-version.el
+++ /dev/null
@@ -1,110 +0,0 @@
-;;(provide 'vm)
-;;(provide 'vm-version)
-
-(defconst vm-version "7.19"
- "Version number of VM.")
-
-(defun vm-version ()
- "Returns the value of the variable vm-version."
- vm-version)
-
-(defconst vm-xemacs-p nil)
-(defconst vm-xemacs-mule-p nil)
-(defconst vm-xemacs-file-coding-p nil)
-(defconst vm-fsfemacs-p nil)
-(defconst vm-fsfemacs-mule-p nil)
-(defun vm-xemacs-p () vm-xemacs-p)
-(defun vm-xemacs-mule-p () vm-xemacs-mule-p)
-(defun vm-xemacs-file-coding-p () vm-xemacs-file-coding-p)
-(defun vm-fsfemacs-p () vm-fsfemacs-p)
-(defun vm-fsfemacs-mule-p () vm-fsfemacs-mule-p)
-(defun vm-note-emacs-version ()
- (setq vm-xemacs-p (string-match "XEmacs" emacs-version)
- vm-xemacs-mule-p (and vm-xemacs-p (featurep 'mule)
- ;; paranoia
- (fboundp 'set-buffer-file-coding-system))
- vm-xemacs-file-coding-p (and vm-xemacs-p (featurep 'file-coding)
- ;; paranoia
- (fboundp 'set-buffer-file-coding-system))
- vm-fsfemacs-p (not vm-xemacs-p)
- vm-fsfemacs-mule-p (and (not vm-xemacs-mule-p) (featurep 'mule)
- (fboundp 'set-buffer-file-coding-system))))
-(vm-note-emacs-version)
-
-(defun vm-mouse-fsfemacs-mouse-p ()
- (and vm-fsfemacs-p
- (fboundp 'set-mouse-position)))
-
-(defun vm-mouse-xemacs-mouse-p ()
- (and vm-xemacs-p
- (fboundp 'set-mouse-position)))
-
-(defun vm-menu-fsfemacs-menus-p ()
- (and vm-fsfemacs-p
- (fboundp 'menu-bar-mode)))
-
-(defun vm-menu-fsfemacs19-menus-p ()
- (and vm-fsfemacs-p
- (fboundp 'menu-bar-mode)
- (= emacs-major-version 19)))
-
-(defun vm-menu-xemacs-menus-p ()
- (and vm-xemacs-p
- (fboundp 'set-buffer-menubar)))
-
-(defun vm-menu-can-eval-item-name ()
- (and vm-xemacs-p
- (fboundp 'check-menu-syntax)
- (condition-case nil
- (check-menu-syntax '("bar" ((identity "foo") 'ding t)))
- (error nil))))
-
-(defun vm-multiple-frames-possible-p ()
- (cond (vm-xemacs-p
- (or (memq 'win (device-matching-specifier-tag-list))
- (featurep 'tty-frames)))
- (vm-fsfemacs-p
- (fboundp 'make-frame))))
-
-(defun vm-mouse-support-possible-p ()
- (cond (vm-xemacs-p
- (featurep 'window-system))
- (vm-fsfemacs-p
- (fboundp 'track-mouse))))
-
-(defun vm-mouse-support-possible-here-p ()
- (cond (vm-xemacs-p
- (memq 'win (device-matching-specifier-tag-list)))
- (vm-fsfemacs-p
- (memq window-system '(x mac w32 win32)))))
-
-(defun vm-menu-support-possible-p ()
- (cond (vm-xemacs-p
- (featurep 'menubar))
- (vm-fsfemacs-p
- (fboundp 'menu-bar-mode))))
-
-(defun vm-toolbar-support-possible-p ()
- (or (and vm-xemacs-p (featurep 'toolbar))
- (and vm-fsfemacs-p (fboundp 'tool-bar-mode) (boundp 'tool-bar-map))))
-
-(defun vm-multiple-fonts-possible-p ()
- (cond (vm-xemacs-p
- (memq (device-type) '(x gtk mswindows)))
- (vm-fsfemacs-p
- (memq window-system '(x mac w32 win32)))))
-
-(defun vm-images-possible-here-p ()
- (or (and vm-xemacs-p (memq (device-type) '(x gtk mswindows)))
- (and vm-fsfemacs-p window-system
- (or (fboundp 'image-type-available-p)
- (and (stringp vm-imagemagick-convert-program)
- (stringp vm-imagemagick-identify-program))))))
-
-(defun vm-image-type-available-p (type)
- (if (fboundp 'image-type-available-p)
- (image-type-available-p type)
- (or (featurep type) (eq type 'xbm))))
-
-(provide 'vm)
-(provide 'vm-version)