mh-e.el 141 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727
  1. ;;; mh-e.el --- GNU Emacs interface to the MH mail system
  2. ;; Copyright (C) 1985-1988, 1990, 1992-1995, 1997, 1999-2012
  3. ;; Free Software Foundation, Inc.
  4. ;; Author: Bill Wohler <wohler@newt.com>
  5. ;; Maintainer: Bill Wohler <wohler@newt.com>
  6. ;; Version: 8.3.1
  7. ;; Keywords: mail
  8. ;; This file is part of GNU Emacs.
  9. ;; GNU Emacs is free software: you can redistribute it and/or modify
  10. ;; it under the terms of the GNU General Public License as published by
  11. ;; the Free Software Foundation, either version 3 of the License, or
  12. ;; (at your option) any later version.
  13. ;; GNU Emacs is distributed in the hope that it will be useful,
  14. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;; GNU General Public License for more details.
  17. ;; You should have received a copy of the GNU General Public License
  18. ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
  19. ;;; Commentary:
  20. ;; MH-E is an Emacs interface to the MH mail system.
  21. ;; MH-E is supported in GNU Emacs 21 and higher, as well as XEmacs 21
  22. ;; (except for versions 21.5.9-21.5.16). It is compatible with MH
  23. ;; versions 6.8.4 and higher, all versions of nmh, and GNU mailutils
  24. ;; 1.0 and higher. Gnus is also required; version 5.10 or higher is
  25. ;; recommended.
  26. ;; MH (Message Handler) is a powerful mail reader. See
  27. ;; http://rand-mh.sourceforge.net/.
  28. ;; N.B. MH must have been compiled with the MHE compiler flag or several
  29. ;; features necessary for MH-E will be missing from MH commands, specifically
  30. ;; the -build switch to repl and forw.
  31. ;; How to use:
  32. ;; M-x mh-rmail to read mail. Type C-h m there for a list of commands.
  33. ;; C-u M-x mh-rmail to visit any folder.
  34. ;; M-x mh-smail to send mail. From within the mail reader, "s" works, too.
  35. ;; Your .emacs might benefit from these bindings:
  36. ;; (global-set-key "\C-cr" 'mh-rmail)
  37. ;; (global-set-key "\C-xm" 'mh-smail)
  38. ;; (global-set-key "\C-x4m" 'mh-smail-other-window)
  39. ;; If Emacs can't find mh-rmail or mh-smail, add the following to ~/.emacs:
  40. ;; (require 'mh-autoloads)
  41. ;; If you want to customize MH-E before explicitly loading it, add this:
  42. ;; (require 'mh-cus-load)
  43. ;; Mailing Lists:
  44. ;; mh-e-users@lists.sourceforge.net
  45. ;; mh-e-announce@lists.sourceforge.net
  46. ;; mh-e-devel@lists.sourceforge.net
  47. ;; Subscribe by sending a "subscribe" message to
  48. ;; <list>-request@lists.sourceforge.net, or by using the web interface at
  49. ;; https://sourceforge.net/mail/?group_id=13357
  50. ;; Bug Reports:
  51. ;; https://sourceforge.net/tracker/?group_id=13357&atid=113357
  52. ;; Include the output of M-x mh-version in the bug report unless
  53. ;; you're 110% sure we won't ask for it.
  54. ;; Feature Requests:
  55. ;; https://sourceforge.net/tracker/?group_id=13357&atid=363357
  56. ;; Support:
  57. ;; https://sourceforge.net/tracker/?group_id=13357&atid=213357
  58. ;;; Change Log:
  59. ;; Original version for Gosling emacs by Brian Reid, Stanford, 1982.
  60. ;; Modified by James Larus, BBN, July 1984 and UCB, 1984 & 1985.
  61. ;; Rewritten for GNU Emacs, James Larus, 1985.
  62. ;; Modified by Stephen Gildea, 1988.
  63. ;; Maintenance picked up by Bill Wohler and the
  64. ;; SourceForge Crew <http://mh-e.sourceforge.net/>, 2001.
  65. ;;; Code:
  66. ;; Provide functions to the rest of MH-E. However, mh-e.el must not
  67. ;; use any definitions in files that require mh-e from mh-loaddefs,
  68. ;; for if it does it will introduce a require loop.
  69. (require 'mh-loaddefs)
  70. (mh-require-cl)
  71. (require 'mh-buffers)
  72. (require 'mh-compat)
  73. (mh-do-in-xemacs
  74. (require 'mh-xemacs))
  75. (mh-font-lock-add-keywords
  76. 'emacs-lisp-mode
  77. (eval-when-compile
  78. `((,(concat "(\\("
  79. ;; Function declarations (use font-lock-function-name-face).
  80. "\\(def\\(un\\|macro\\)-mh\\)\\|"
  81. ;; Variable declarations (use font-lock-variable-name-face).
  82. "\\(def\\(custom\\|face\\)-mh\\)\\|"
  83. ;; Group declarations (use font-lock-type-face).
  84. "\\(defgroup-mh\\)"
  85. "\\)\\>"
  86. ;; Any whitespace and defined object.
  87. "[ \t'\(]*"
  88. "\\(setf[ \t]+\\sw+)\\|\\sw+\\)?")
  89. (1 font-lock-keyword-face)
  90. (7 (cond ((match-beginning 2) font-lock-function-name-face)
  91. ((match-beginning 4) font-lock-variable-name-face)
  92. (t font-lock-type-face))
  93. nil t)))))
  94. ;;; Global Variables
  95. ;; Try to keep variables local to a single file. Provide accessors if
  96. ;; variables are shared. Use this section as a last resort.
  97. (defconst mh-version "8.3.1" "Version number of MH-E.")
  98. ;; Variants
  99. (defvar mh-sys-path
  100. '("/usr/local/nmh/bin" ; nmh default
  101. "/usr/local/bin/mh/"
  102. "/usr/local/mh/"
  103. "/usr/bin/mh/" ; Ultrix 4.2, Linux
  104. "/usr/new/mh/" ; Ultrix < 4.2
  105. "/usr/contrib/mh/bin/" ; BSDI
  106. "/usr/pkg/bin/" ; NetBSD
  107. "/usr/local/bin/"
  108. "/usr/local/bin/mu-mh/" ; GNU mailutils MH - default
  109. "/usr/bin/mu-mh/") ; GNU mailutils MH - packaged
  110. "List of directories to search for variants of the MH variant.
  111. The list `exec-path' is searched in addition to this list.
  112. There's no need for users to modify this list. Instead add extra
  113. directories to the customizable variable `mh-path'.")
  114. (defvar mh-variants nil
  115. "List describing known MH variants.
  116. Do not access this variable directly as it may not have yet been initialized.
  117. Use the function `mh-variants' instead.")
  118. (defvar mh-variant-in-use nil
  119. "The MH variant currently in use; a string with variant and version number.
  120. This differs from `mh-variant' when the latter is set to
  121. \"autodetect\".")
  122. (defvar mh-progs nil
  123. "Directory containing MH commands, such as inc, repl, and rmm.")
  124. ;;;###autoload
  125. (put 'mh-progs 'risky-local-variable t)
  126. (defvar mh-lib nil
  127. "Directory containing the MH library.
  128. This directory contains, among other things, the components file.")
  129. ;;;###autoload
  130. (put 'mh-lib 'risky-local-variable t)
  131. (defvar mh-lib-progs nil
  132. "Directory containing MH helper programs.
  133. This directory contains, among other things, the mhl program.")
  134. ;;;###autoload
  135. (put 'mh-lib-progs 'risky-local-variable t)
  136. ;; Profile Components
  137. (defvar mh-draft-folder nil
  138. "Cached value of the \"Draft-Folder:\" MH profile component.
  139. Name of folder containing draft messages.
  140. Do not use a draft folder if nil.")
  141. (defvar mh-inbox nil
  142. "Cached value of the \"Inbox:\" MH profile component.
  143. Set to \"+inbox\" if no such component.
  144. Name of the Inbox folder.")
  145. (defvar mh-user-path nil
  146. "Cached value of the \"Path:\" MH profile component.
  147. User's mail folder directory.")
  148. ;; Maps declared here so that they can be used in docstrings.
  149. (defvar mh-folder-mode-map (make-keymap)
  150. "Keymap for MH-Folder mode.")
  151. (defvar mh-folder-seq-tool-bar-map nil
  152. "Keymap for MH-Folder tool bar.")
  153. (defvar mh-folder-tool-bar-map nil
  154. "Keymap for MH-Folder tool bar.")
  155. (defvar mh-inc-spool-map (make-sparse-keymap)
  156. "Keymap for MH-E's mh-inc-spool commands.")
  157. (defvar mh-letter-mode-map (copy-keymap text-mode-map)
  158. "Keymap for MH-Letter mode.")
  159. (defvar mh-letter-tool-bar-map nil
  160. "Keymap for MH-Letter tool bar.")
  161. (defvar mh-search-mode-map (make-sparse-keymap)
  162. "Keymap for MH-Search mode.")
  163. (defvar mh-show-mode-map (make-sparse-keymap)
  164. "Keymap MH-Show mode.")
  165. (defvar mh-show-seq-tool-bar-map nil
  166. "Keymap for MH-Show tool bar.")
  167. (defvar mh-show-tool-bar-map nil
  168. "Keymap for MH-Show tool bar.")
  169. ;; MH-Folder Locals (alphabetical)
  170. (defvar mh-arrow-marker nil
  171. "Marker for arrow display in fringe.")
  172. (defvar mh-colors-available-flag nil
  173. "Non-nil means colors are available.")
  174. (defvar mh-current-folder nil
  175. "Name of current folder, a string.")
  176. (defvar mh-delete-list nil
  177. "List of message numbers to delete.
  178. This variable can be used by
  179. `mh-before-commands-processed-hook'.")
  180. (defvar mh-folder-view-stack nil
  181. "Stack of previous folder views.")
  182. (defvar mh-index-data nil
  183. "Info about index search results.")
  184. (defvar mh-index-previous-search nil)
  185. (defvar mh-index-msg-checksum-map nil)
  186. (defvar mh-index-checksum-origin-map nil)
  187. (defvar mh-index-sequence-search-flag nil)
  188. (defvar mh-mode-line-annotation nil
  189. "Message range displayed in buffer.")
  190. (defvar mh-next-direction 'forward
  191. "Direction to move to next message.")
  192. (defvar mh-previous-window-config nil
  193. "Window configuration before MH-E command.")
  194. (defvar mh-refile-list nil
  195. "List of folder names in `mh-seq-list'.
  196. This variable can be used by
  197. `mh-before-commands-processed-hook'.")
  198. (defvar mh-seen-list nil
  199. "List of displayed messages to be removed from the \"Unseen\" sequence.")
  200. (defvar mh-seq-list nil
  201. "Alist of this folder's sequences.
  202. Elements have the form (SEQUENCE . MESSAGES).")
  203. (defvar mh-sequence-notation-history nil
  204. "Remember original notation that is overwritten by `mh-note-seq'.")
  205. (defvar mh-show-buffer nil
  206. "Buffer that displays message for this folder.")
  207. (define-minor-mode mh-showing-mode
  208. "Minor mode to show the message in a separate window."
  209. ;; FIXME: maybe this should be moved to mh-show.el.
  210. :lighter " Show")
  211. (defvar mh-view-ops nil
  212. "Stack of operations that change the folder view.
  213. These operations include narrowing or threading.")
  214. ;; MH-Show Locals (alphabetical)
  215. (defvar mh-globals-hash (make-hash-table)
  216. "Keeps track of MIME data on a per buffer basis.")
  217. (defvar mh-show-folder-buffer nil
  218. "Keeps track of folder whose message is being displayed.")
  219. ;; MH-Letter Locals
  220. (defvar mh-folders-changed nil
  221. "Lists which folders were affected by deletes and refiles.
  222. This list will always include the current folder
  223. `mh-current-folder'. This variable can be used by
  224. `mh-after-commands-processed-hook'.")
  225. (defvar mh-mail-header-separator "--------"
  226. "*Line used by MH to separate headers from text in messages being composed.
  227. This variable should not be used directly in programs. Programs
  228. should use `mail-header-separator' instead.
  229. `mail-header-separator' is initialized to
  230. `mh-mail-header-separator' in `mh-letter-mode'; in other
  231. contexts, you may have to perform this initialization yourself.
  232. Do not make this a regular expression as it may be the argument
  233. to `insert' and it is passed through `regexp-quote' before being
  234. used by functions like `re-search-forward'.")
  235. (defvar mh-sent-from-folder nil
  236. "Folder of msg assoc with this letter.")
  237. (defvar mh-sent-from-msg nil
  238. "Number of msg assoc with this letter.")
  239. ;; Sequences
  240. (defvar mh-unseen-seq nil
  241. "Cached value of the \"Unseen-Sequence:\" MH profile component.
  242. Name of the Unseen sequence.")
  243. (defvar mh-previous-seq nil
  244. "Cached value of the \"Previous-Sequence:\" MH profile component.
  245. Name of the Previous sequence.")
  246. ;; Etc. (alphabetical)
  247. (defvar mh-flists-present-flag nil
  248. "Non-nil means that we have \"flists\".")
  249. (defvar mh-index-data-file ".mhe_index"
  250. "MH-E specific file where index search info is stored.")
  251. (defvar mh-letter-header-field-regexp "^\\([A-Za-z][A-Za-z0-9-]*\\):")
  252. (defvar mh-page-to-next-msg-flag nil
  253. "Non-nil means next SPC or whatever goes to next undeleted message.")
  254. (defvar mh-pgp-support-flag (not (not (locate-library "mml2015")))
  255. "Non-nil means PGP support is available.")
  256. (defvar mh-signature-separator "-- \n"
  257. "Text of a signature separator.
  258. A signature separator is used to separate the body of a message
  259. from the signature. This can be used by user agents such as MH-E
  260. to render the signature differently or to suppress the inclusion
  261. of the signature in a reply. Use `mh-signature-separator-regexp'
  262. when searching for a separator.")
  263. (defvar mh-signature-separator-regexp "^-- $"
  264. "This regular expression matches the signature separator.
  265. See `mh-signature-separator'.")
  266. (defvar mh-thread-scan-line-map nil
  267. "Map of message index to various parts of the scan line.")
  268. (make-variable-buffer-local 'mh-thread-scan-line-map)
  269. (defvar mh-thread-scan-line-map-stack nil
  270. "Old map of message index to various parts of the scan line.
  271. This is the original map that is stored when the folder is
  272. narrowed.")
  273. (make-variable-buffer-local 'mh-thread-scan-line-map-stack)
  274. (defvar mh-x-mailer-string nil
  275. "*String containing the contents of the X-Mailer header field.
  276. If nil, this variable is initialized to show the version of MH-E,
  277. Emacs, and MH the first time a message is composed.")
  278. ;;; MH-E Entry Points
  279. (eval-when-compile (require 'gnus))
  280. (defmacro mh-macro-expansion-time-gnus-version ()
  281. "Return Gnus version available at macro expansion time.
  282. The macro evaluates the Gnus version at macro expansion time. If
  283. MH-E was compiled then macro expansion happens at compile time."
  284. gnus-version)
  285. (defun mh-run-time-gnus-version ()
  286. "Return Gnus version available at run time."
  287. (require 'gnus)
  288. gnus-version)
  289. ;;;###autoload
  290. (defun mh-version ()
  291. "Display version information about MH-E and the MH mail handling system."
  292. (interactive)
  293. (set-buffer (get-buffer-create mh-info-buffer))
  294. (erase-buffer)
  295. ;; MH-E version.
  296. (insert "MH-E " mh-version "\n\n")
  297. ;; MH-E compilation details.
  298. (insert "MH-E compilation details:\n")
  299. (let* ((compiled-mhe (byte-code-function-p (symbol-function 'mh-version)))
  300. (gnus-compiled-version (if compiled-mhe
  301. (mh-macro-expansion-time-gnus-version)
  302. "N/A")))
  303. (insert " Byte compiled:\t\t" (if compiled-mhe "yes" "no") "\n"
  304. " Gnus (compile-time):\t" gnus-compiled-version "\n"
  305. " Gnus (run-time):\t" (mh-run-time-gnus-version) "\n\n"))
  306. ;; Emacs version.
  307. (insert (emacs-version) "\n\n")
  308. ;; MH version.
  309. (if mh-variant-in-use
  310. (insert mh-variant-in-use "\n"
  311. " mh-progs:\t" mh-progs "\n"
  312. " mh-lib:\t" mh-lib "\n"
  313. " mh-lib-progs:\t" mh-lib-progs "\n\n")
  314. (insert "No MH variant detected\n"))
  315. ;; Linux version.
  316. (condition-case ()
  317. (call-process "uname" nil t nil "-a")
  318. (file-error))
  319. (goto-char (point-min))
  320. (display-buffer mh-info-buffer))
  321. ;;; Support Routines
  322. (defun mh-list-to-string (l)
  323. "Flatten the list L and make every element of the new list into a string."
  324. (nreverse (mh-list-to-string-1 l)))
  325. (defun mh-list-to-string-1 (l)
  326. "Flatten the list L and make every element of the new list into a string."
  327. (let (new-list)
  328. (dolist (element l)
  329. (cond ((null element))
  330. ((symbolp element)
  331. (push (symbol-name element) new-list))
  332. ((numberp element)
  333. (push (int-to-string element) new-list))
  334. ((equal element ""))
  335. ((stringp element)
  336. (push element new-list))
  337. ((listp element)
  338. (setq new-list (nconc (mh-list-to-string-1 element) new-list)))
  339. (t
  340. (error "Bad element: %s" element))))
  341. new-list))
  342. ;;; MH-E Process Support
  343. (defvar mh-index-max-cmdline-args 500
  344. "Maximum number of command line args.")
  345. (defun mh-xargs (cmd &rest args)
  346. "Partial imitation of xargs.
  347. The current buffer contains a list of strings, one on each line.
  348. The function will execute CMD with ARGS and pass the first
  349. `mh-index-max-cmdline-args' strings to it. This is repeated till
  350. all the strings have been used."
  351. (goto-char (point-min))
  352. (let ((current-buffer (current-buffer)))
  353. (with-temp-buffer
  354. (let ((out (current-buffer)))
  355. (set-buffer current-buffer)
  356. (while (not (eobp))
  357. (let ((arg-list (reverse args))
  358. (count 0))
  359. (while (and (not (eobp)) (< count mh-index-max-cmdline-args))
  360. (push (buffer-substring-no-properties (point)
  361. (mh-line-end-position))
  362. arg-list)
  363. (incf count)
  364. (forward-line))
  365. (apply #'call-process cmd nil (list out nil) nil
  366. (nreverse arg-list))))
  367. (erase-buffer)
  368. (insert-buffer-substring out)))))
  369. ;; XXX This should be applied anywhere MH-E calls out to /bin/sh.
  370. (defun mh-quote-for-shell (string)
  371. "Quote STRING for /bin/sh.
  372. Adds double-quotes around entire string and quotes the characters
  373. \\, `, and $ with a backslash."
  374. (concat "\""
  375. (loop for x across string
  376. concat (format (if (memq x '(?\\ ?` ?$)) "\\%c" "%c") x))
  377. "\""))
  378. (defun mh-exec-cmd (command &rest args)
  379. "Execute mh-command COMMAND with ARGS.
  380. The side effects are what is desired. Any output is assumed to be
  381. an error and is shown to the user. The output is not read or
  382. parsed by MH-E."
  383. (with-current-buffer (get-buffer-create mh-log-buffer)
  384. (let* ((initial-size (mh-truncate-log-buffer))
  385. (start (point))
  386. (args (mh-list-to-string args)))
  387. (apply 'call-process (expand-file-name command mh-progs) nil t nil args)
  388. (when (> (buffer-size) initial-size)
  389. (save-excursion
  390. (goto-char start)
  391. (insert "Errors when executing: " command)
  392. (loop for arg in args do (insert " " arg))
  393. (insert "\n"))
  394. (save-window-excursion
  395. (switch-to-buffer-other-window mh-log-buffer)
  396. (sit-for 5))))))
  397. (defun mh-exec-cmd-error (env command &rest args)
  398. "In environment ENV, execute mh-command COMMAND with ARGS.
  399. ENV is nil or a string of space-separated \"var=value\" elements.
  400. Signals an error if process does not complete successfully."
  401. (with-current-buffer (get-buffer-create mh-temp-buffer)
  402. (erase-buffer)
  403. (let ((process-environment process-environment))
  404. ;; XXX: We should purge the list that split-string returns of empty
  405. ;; strings. This can happen in XEmacs if leading or trailing spaces
  406. ;; are present.
  407. (dolist (elem (if (stringp env) (split-string env " ") ()))
  408. (push elem process-environment))
  409. (mh-handle-process-error
  410. command (apply #'call-process (expand-file-name command mh-progs)
  411. nil t nil (mh-list-to-string args))))))
  412. (defun mh-exec-cmd-daemon (command filter &rest args)
  413. "Execute MH command COMMAND in the background.
  414. If FILTER is non-nil then it is used to process the output
  415. otherwise the default filter `mh-process-daemon' is used. See
  416. `set-process-filter' for more details of FILTER.
  417. ARGS are passed to COMMAND as command line arguments."
  418. (with-current-buffer (get-buffer-create mh-log-buffer)
  419. (mh-truncate-log-buffer))
  420. (let* ((process-connection-type nil)
  421. (process (apply 'start-process
  422. command nil
  423. (expand-file-name command mh-progs)
  424. (mh-list-to-string args))))
  425. (set-process-filter process (or filter 'mh-process-daemon))
  426. process))
  427. (defun mh-exec-cmd-env-daemon (env command filter &rest args)
  428. "In environment ENV, execute mh-command COMMAND in the background.
  429. ENV is nil or a string of space-separated \"var=value\" elements.
  430. Signals an error if process does not complete successfully.
  431. If FILTER is non-nil then it is used to process the output
  432. otherwise the default filter `mh-process-daemon' is used. See
  433. `set-process-filter' for more details of FILTER.
  434. ARGS are passed to COMMAND as command line arguments."
  435. (let ((process-environment process-environment))
  436. (dolist (elem (if (stringp env) (split-string env " ") ()))
  437. (push elem process-environment))
  438. (apply #'mh-exec-cmd-daemon command filter args)))
  439. (defun mh-process-daemon (process output)
  440. "PROCESS daemon that puts OUTPUT into a temporary buffer.
  441. Any output from the process is displayed in an asynchronous
  442. pop-up window."
  443. (with-current-buffer (get-buffer-create mh-log-buffer)
  444. (insert-before-markers output)
  445. (display-buffer mh-log-buffer)))
  446. (defun mh-exec-cmd-quiet (raise-error command &rest args)
  447. "Signal RAISE-ERROR if COMMAND with ARGS fails.
  448. Execute MH command COMMAND with ARGS. ARGS is a list of strings.
  449. Return at start of mh-temp buffer, where output can be parsed and
  450. used.
  451. Returns value of `call-process', which is 0 for success, unless
  452. RAISE-ERROR is non-nil, in which case an error is signaled if
  453. `call-process' returns non-0."
  454. (set-buffer (get-buffer-create mh-temp-buffer))
  455. (erase-buffer)
  456. (let ((value
  457. (apply 'call-process
  458. (expand-file-name command mh-progs) nil t nil
  459. args)))
  460. (goto-char (point-min))
  461. (if raise-error
  462. (mh-handle-process-error command value)
  463. value)))
  464. (defun mh-exec-cmd-output (command display &rest args)
  465. "Execute MH command COMMAND with DISPLAY flag and ARGS.
  466. Put the output into buffer after point.
  467. Set mark after inserted text.
  468. Output is expected to be shown to user, not parsed by MH-E."
  469. (push-mark (point) t)
  470. (apply 'call-process
  471. (expand-file-name command mh-progs) nil t display
  472. (mh-list-to-string args))
  473. ;; The following is used instead of 'exchange-point-and-mark because the
  474. ;; latter activates the current region (between point and mark), which
  475. ;; turns on highlighting. So prior to this bug fix, doing "inc" would
  476. ;; highlight a region containing the new messages, which is undesirable.
  477. ;; The bug wasn't seen in emacs21 but still occurred in XEmacs21.4.
  478. (mh-exchange-point-and-mark-preserving-active-mark))
  479. ;; Shush compiler.
  480. (mh-do-in-xemacs
  481. (defvar mark-active))
  482. (defun mh-exchange-point-and-mark-preserving-active-mark ()
  483. "Put the mark where point is now, and point where the mark is now.
  484. This command works even when the mark is not active, and
  485. preserves whether the mark is active or not."
  486. (interactive nil)
  487. (let ((is-active (and (boundp 'mark-active) mark-active)))
  488. (let ((omark (mark t)))
  489. (if (null omark)
  490. (error "No mark set in this buffer"))
  491. (set-mark (point))
  492. (goto-char omark)
  493. (if (boundp 'mark-active)
  494. (setq mark-active is-active))
  495. nil)))
  496. (defun mh-exec-lib-cmd-output (command &rest args)
  497. "Execute MH library command COMMAND with ARGS.
  498. Put the output into buffer after point.
  499. Set mark after inserted text."
  500. (apply 'mh-exec-cmd-output (expand-file-name command mh-lib-progs) nil args))
  501. (defun mh-handle-process-error (command status)
  502. "Raise error if COMMAND returned non-zero STATUS, otherwise return STATUS."
  503. (if (equal status 0)
  504. status
  505. (goto-char (point-min))
  506. (insert (if (integerp status)
  507. (format "%s: exit code %d\n" command status)
  508. (format "%s: %s\n" command status)))
  509. (let ((error-message (buffer-substring (point-min) (point-max))))
  510. (with-current-buffer (get-buffer-create mh-log-buffer)
  511. (mh-truncate-log-buffer)
  512. (insert error-message)))
  513. (error "%s failed, check buffer %s for error message"
  514. command mh-log-buffer)))
  515. ;;; MH-E Customization Support Routines
  516. ;; Shush compiler (Emacs 21 and XEmacs).
  517. (defvar customize-package-emacs-version-alist)
  518. ;; Temporary function and data structure used customization.
  519. ;; These will be unbound after the options are defined.
  520. (defmacro mh-strip-package-version (args)
  521. "Strip :package-version keyword and its value from ARGS.
  522. In Emacs versions that support the :package-version keyword,
  523. ARGS is returned unchanged."
  524. `(if (boundp 'customize-package-emacs-version-alist)
  525. ,args
  526. (let (seen)
  527. (loop for keyword in ,args
  528. if (cond ((eq keyword ':package-version) (setq seen t) nil)
  529. (seen (setq seen nil) nil)
  530. (t t))
  531. collect keyword))))
  532. (defmacro defgroup-mh (symbol members doc &rest args)
  533. "Declare SYMBOL as a customization group containing MEMBERS.
  534. See documentation for `defgroup' for a description of the arguments
  535. SYMBOL, MEMBERS, DOC and ARGS.
  536. This macro is used by Emacs versions that lack the :package-version
  537. keyword, introduced in Emacs 22."
  538. (declare (doc-string 3))
  539. `(defgroup ,symbol ,members ,doc ,@(mh-strip-package-version args)))
  540. (put 'defgroup-mh 'lisp-indent-function 'defun)
  541. (defmacro defcustom-mh (symbol value doc &rest args)
  542. "Declare SYMBOL as a customizable variable that defaults to VALUE.
  543. See documentation for `defcustom' for a description of the arguments
  544. SYMBOL, VALUE, DOC and ARGS.
  545. This macro is used by Emacs versions that lack the :package-version
  546. keyword, introduced in Emacs 22."
  547. (declare (doc-string 3))
  548. `(defcustom ,symbol ,value ,doc ,@(mh-strip-package-version args)))
  549. (put 'defcustom-mh 'lisp-indent-function 'defun)
  550. (defmacro defface-mh (face spec doc &rest args)
  551. "Declare FACE as a customizable face that defaults to SPEC.
  552. See documentation for `defface' for a description of the arguments
  553. FACE, SPEC, DOC and ARGS.
  554. This macro is used by Emacs versions that lack the :package-version
  555. keyword, introduced in Emacs 22."
  556. (declare (doc-string 3))
  557. `(defface ,face ,spec ,doc ,@(mh-strip-package-version args)))
  558. (put 'defface-mh 'lisp-indent-function 'defun)
  559. ;;; Variant Support
  560. (defcustom-mh mh-path nil
  561. "*Additional list of directories to search for MH.
  562. See `mh-variant'."
  563. :group 'mh-e
  564. :type '(repeat (directory))
  565. :package-version '(MH-E . "8.0"))
  566. (defun mh-variants ()
  567. "Return a list of installed variants of MH on the system.
  568. This function looks for MH in `mh-sys-path', `mh-path' and
  569. `exec-path'. The format of the list of variants that is returned
  570. is described by the variable `mh-variants'."
  571. (if mh-variants
  572. mh-variants
  573. (let ((list-unique))
  574. ;; Make a unique list of directories, keeping the given order.
  575. ;; We don't want the same MH variant to be listed multiple times.
  576. (loop for dir in (append mh-path mh-sys-path exec-path) do
  577. (setq dir (file-chase-links (directory-file-name dir)))
  578. (add-to-list 'list-unique dir))
  579. (loop for dir in (nreverse list-unique) do
  580. (when (and dir (file-directory-p dir) (file-readable-p dir))
  581. (let ((variant (mh-variant-info dir)))
  582. (if variant
  583. (add-to-list 'mh-variants variant)))))
  584. mh-variants)))
  585. (defun mh-variant-info (dir)
  586. "Return MH variant found in DIR, or nil if none present."
  587. (let ((tmp-buffer (get-buffer-create mh-temp-buffer)))
  588. (with-current-buffer tmp-buffer
  589. (cond
  590. ((mh-variant-mh-info dir))
  591. ((mh-variant-nmh-info dir))
  592. ((mh-variant-gnu-mh-info dir))))))
  593. (defun mh-variant-mh-info (dir)
  594. "Return info for MH variant in DIR assuming a temporary buffer is set up."
  595. ;; MH does not have the -version option.
  596. ;; Its version number is included in the output of "-help" as:
  597. ;;
  598. ;; version: MH 6.8.4 #2[UCI] (burrito) of Fri Jan 15 20:01:39 EST 1999
  599. ;; options: [ATHENA] [BIND] [DUMB] [LIBLOCKFILE] [LOCALE] [MAILGROUP] [MHE]
  600. ;; [MHRC] [MIME] [MORE='"/usr/bin/sensible-pager"'] [NLINK_HACK]
  601. ;; [NORUSERPASS] [OVERHEAD] [POP] [POPSERVICE='"pop-3"'] [RENAME]
  602. ;; [RFC1342] [RPATHS] [RPOP] [SENDMTS] [SMTP] [SOCKETS]
  603. ;; [SPRINTFTYPE=int] [SVR4] [SYS5] [SYS5DIR] [TERMINFO]
  604. ;; [TYPESIG=void] [UNISTD] [UTK] [VSPRINTF]
  605. (let ((mhparam (expand-file-name "mhparam" dir)))
  606. (when (mh-file-command-p mhparam)
  607. (erase-buffer)
  608. (call-process mhparam nil '(t nil) nil "-help")
  609. (goto-char (point-min))
  610. (when (search-forward-regexp "version: MH \\(\\S +\\)" nil t)
  611. (let ((version (format "MH %s" (match-string 1))))
  612. (erase-buffer)
  613. (call-process mhparam nil '(t nil) nil "libdir")
  614. (goto-char (point-min))
  615. (when (search-forward-regexp "^.*$" nil t)
  616. (let ((libdir (match-string 0)))
  617. `(,version
  618. (variant mh)
  619. (mh-lib-progs ,libdir)
  620. (mh-lib ,libdir)
  621. (mh-progs ,dir)
  622. (flists nil)))))))))
  623. (defun mh-variant-gnu-mh-info (dir)
  624. "Return info for GNU mailutils MH variant in DIR.
  625. This assumes that a temporary buffer is set up."
  626. ;; 'mhparam -version' output:
  627. ;; mhparam (GNU mailutils 0.3.2)
  628. (let ((mhparam (expand-file-name "mhparam" dir)))
  629. (when (mh-file-command-p mhparam)
  630. (erase-buffer)
  631. (call-process mhparam nil '(t nil) nil "-version")
  632. (goto-char (point-min))
  633. (when (search-forward-regexp "mhparam (\\(GNU [Mm]ailutils \\S +\\))"
  634. nil t)
  635. (let ((version (match-string 1))
  636. (mh-progs dir))
  637. `(,version
  638. (variant gnu-mh)
  639. (mh-lib-progs ,(mh-profile-component "libdir"))
  640. (mh-lib ,(mh-profile-component "etcdir"))
  641. (mh-progs ,dir)
  642. (flists ,(file-exists-p
  643. (expand-file-name "flists" dir)))))))))
  644. (defun mh-variant-nmh-info (dir)
  645. "Return info for nmh variant in DIR assuming a temporary buffer is set up."
  646. ;; `mhparam -version' outputs:
  647. ;; mhparam -- nmh-1.1-RC1 [compiled on chaak at Fri Jun 20 11:03:28 PDT 2003]
  648. (let ((mhparam (expand-file-name "mhparam" dir)))
  649. (when (mh-file-command-p mhparam)
  650. (erase-buffer)
  651. (call-process mhparam nil '(t nil) nil "-version")
  652. (goto-char (point-min))
  653. (when (search-forward-regexp "mhparam -- nmh-\\(\\S +\\)" nil t)
  654. (let ((version (format "nmh %s" (match-string 1)))
  655. (mh-progs dir))
  656. `(,version
  657. (variant nmh)
  658. (mh-lib-progs ,(mh-profile-component "libdir"))
  659. (mh-lib ,(mh-profile-component "etcdir"))
  660. (mh-progs ,dir)
  661. (flists ,(file-exists-p
  662. (expand-file-name "flists" dir)))))))))
  663. (defun mh-file-command-p (file)
  664. "Return t if file FILE is the name of a executable regular file."
  665. (and (file-regular-p file) (file-executable-p file)))
  666. (defun mh-variant-set-variant (variant)
  667. "Set up the system variables for the MH variant named VARIANT.
  668. If VARIANT is a string, use that key in the alist returned by the
  669. function `mh-variants'.
  670. If VARIANT is a symbol, select the first entry that matches that
  671. variant."
  672. (cond
  673. ((stringp variant) ;e.g. "nmh 1.1-RC1"
  674. (when (assoc variant (mh-variants))
  675. (let* ((alist (cdr (assoc variant (mh-variants))))
  676. (lib-progs (cadr (assoc 'mh-lib-progs alist)))
  677. (lib (cadr (assoc 'mh-lib alist)))
  678. (progs (cadr (assoc 'mh-progs alist)))
  679. (flists (cadr (assoc 'flists alist))))
  680. ;;(set-default mh-variant variant)
  681. (setq mh-x-mailer-string nil
  682. mh-flists-present-flag flists
  683. mh-lib-progs lib-progs
  684. mh-lib lib
  685. mh-progs progs
  686. mh-variant-in-use variant))))
  687. ((symbolp variant) ;e.g. 'nmh (pick the first match)
  688. (loop for variant-list in (mh-variants)
  689. when (eq variant (cadr (assoc 'variant (cdr variant-list))))
  690. return (let* ((version (car variant-list))
  691. (alist (cdr variant-list))
  692. (lib-progs (cadr (assoc 'mh-lib-progs alist)))
  693. (lib (cadr (assoc 'mh-lib alist)))
  694. (progs (cadr (assoc 'mh-progs alist)))
  695. (flists (cadr (assoc 'flists alist))))
  696. ;;(set-default mh-variant flavor)
  697. (setq mh-x-mailer-string nil
  698. mh-flists-present-flag flists
  699. mh-lib-progs lib-progs
  700. mh-lib lib
  701. mh-progs progs
  702. mh-variant-in-use version)
  703. t)))))
  704. (defun mh-variant-p (&rest variants)
  705. "Return t if variant is any of VARIANTS.
  706. Currently known variants are 'MH, 'nmh, and 'gnu-mh."
  707. (let ((variant-in-use
  708. (cadr (assoc 'variant (assoc mh-variant-in-use (mh-variants))))))
  709. (not (null (member variant-in-use variants)))))
  710. (defun mh-profile-component (component)
  711. "Return COMPONENT value from mhparam, or nil if unset."
  712. (save-excursion
  713. ;; MH and nmh use -components, GNU mailutils MH uses -component.
  714. ;; Since MH and nmh work with an unambiguous prefix, the `s' is
  715. ;; dropped here.
  716. (mh-exec-cmd-quiet nil "mhparam" "-component" component)
  717. (mh-profile-component-value component)))
  718. (defun mh-profile-component-value (component)
  719. "Find and return the value of COMPONENT in the current buffer.
  720. Returns nil if the component is not in the buffer."
  721. (let ((case-fold-search t))
  722. (goto-char (point-min))
  723. (cond ((not (re-search-forward (format "^%s:" component) nil t)) nil)
  724. ((looking-at "[\t ]*$") nil)
  725. (t
  726. (re-search-forward "[\t ]*\\([^\t \n].*\\)$" nil t)
  727. (let ((start (match-beginning 1)))
  728. (end-of-line)
  729. (buffer-substring start (point)))))))
  730. (defun mh-variant-set (variant)
  731. "Set the MH variant to VARIANT.
  732. Sets `mh-progs', `mh-lib', `mh-lib-progs' and
  733. `mh-flists-present-flag'.
  734. If the VARIANT is \"autodetect\", then first try nmh, then MH and
  735. finally GNU mailutils MH."
  736. (interactive
  737. (list (completing-read
  738. "MH variant: "
  739. (mapcar (lambda (x) (list (car x))) (mh-variants))
  740. nil t)))
  741. ;; TODO Remove mu-mh backwards compatibility in 9.0.
  742. (when (and (stringp variant)
  743. (string-match "^mu-mh" variant))
  744. (message
  745. (format "%s\n%s; %s" "The variant name mu-mh has been renamed to gnu-mh"
  746. "and will be removed in MH-E 9.0"
  747. "try M-x customize-option mh-variant"))
  748. (sit-for 5)
  749. (setq variant (concat "gnu-mh" (substring variant (match-end 0)))))
  750. (let ((valid-list (mapcar (lambda (x) (car x)) (mh-variants))))
  751. (cond
  752. ((eq variant 'none))
  753. ((eq variant 'autodetect)
  754. (cond
  755. ((mh-variant-set-variant 'nmh)
  756. (message "%s installed as MH variant" mh-variant-in-use))
  757. ((mh-variant-set-variant 'mh)
  758. (message "%s installed as MH variant" mh-variant-in-use))
  759. ((mh-variant-set-variant 'gnu-mh)
  760. (message "%s installed as MH variant" mh-variant-in-use))
  761. (t
  762. (message "No MH variant found on the system"))))
  763. ((member variant valid-list)
  764. (when (not (mh-variant-set-variant variant))
  765. (message "Warning: %s variant not found. Autodetecting..." variant)
  766. (mh-variant-set 'autodetect)))
  767. (t
  768. (message "Unknown variant %s; use %s"
  769. variant
  770. (mapconcat (lambda (x) (format "%s" (car x)))
  771. (mh-variants) " or "))))))
  772. (defcustom-mh mh-variant 'autodetect
  773. "*Specifies the variant used by MH-E.
  774. The default setting of this option is \"Auto-detect\" which means
  775. that MH-E will automatically choose the first of nmh, MH, or GNU
  776. mailutils MH that it finds in the directories listed in
  777. `mh-path' (which you can customize), `mh-sys-path', and
  778. `exec-path'. If MH-E can't find MH at all, you may have to
  779. customize `mh-path' and add the directory in which the command
  780. \"mhparam\" is located. If, on the other hand, you have both nmh
  781. and GNU mailutils MH installed (for example) and
  782. `mh-variant-in-use' was initialized to nmh but you want to use
  783. GNU mailutils MH, then you can set this option to \"gnu-mh\".
  784. When this variable is changed, MH-E resets `mh-progs', `mh-lib',
  785. `mh-lib-progs', `mh-flists-present-flag', and `mh-variant-in-use'
  786. accordingly. Prior to version 8, it was often necessary to set
  787. some of these variables in \"~/.emacs\"; now it is no longer
  788. necessary and can actually cause problems."
  789. :type `(radio
  790. (const :tag "Auto-detect" autodetect)
  791. ,@(mapcar (lambda (x) `(const ,(car x))) (mh-variants)))
  792. :set (lambda (symbol value)
  793. (set-default symbol value) ;Done in mh-variant-set-variant!
  794. (mh-variant-set value))
  795. :group 'mh-e
  796. :package-version '(MH-E . "8.0"))
  797. ;;; MH-E Customization
  798. ;; All of the defgroups, defcustoms, and deffaces in MH-E are found
  799. ;; here. This makes it possible to customize modules that aren't
  800. ;; loaded yet. It also makes it easier to organize the customization
  801. ;; groups.
  802. ;; This section contains the following sub-sections:
  803. ;; 1. MH-E Customization Groups
  804. ;; These are the customization group definitions. Every group has a
  805. ;; associated manual node. The ordering is alphabetical, except for
  806. ;; the groups mh-faces and mh-hooks which are last .
  807. ;; 2. MH-E Customization
  808. ;; These are the actual customization variables. There is a
  809. ;; sub-section for each group in the MH-E Customization Groups
  810. ;; section, in the same order, separated by page breaks. Within
  811. ;; each section, variables are sorted alphabetically.
  812. ;; 3. Hooks
  813. ;; All hooks must be placed in the mh-hook group; in addition, add
  814. ;; the group associated with the manual node in which the hook is
  815. ;; described. Since the mh-hook group appears near the end of this
  816. ;; section, the hooks will appear at the end of these other groups.
  817. ;; 4. Faces
  818. ;; All faces must be placed in the mh-faces group; in addition, add
  819. ;; the group associated with the manual node in which the face is
  820. ;; described. Since the mh-faces group appears near the end of this
  821. ;; section, the faces will appear at the end of these other groups.
  822. (defun mh-customize (&optional delete-other-windows-flag)
  823. "Customize MH-E variables.
  824. If optional argument DELETE-OTHER-WINDOWS-FLAG is non-nil, other
  825. windows in the frame are removed."
  826. (interactive "P")
  827. (customize-group 'mh-e)
  828. (when delete-other-windows-flag
  829. (delete-other-windows)))
  830. (if (boundp 'customize-package-emacs-version-alist)
  831. (add-to-list 'customize-package-emacs-version-alist
  832. '(MH-E ("6.0" . "22.1") ("6.1" . "22.1") ("7.0" . "22.1")
  833. ("7.1" . "22.1") ("7.2" . "22.1") ("7.3" . "22.1")
  834. ("7.4" . "22.1") ("8.0" . "22.1"))))
  835. ;;; MH-E Customization Groups
  836. (defgroup-mh mh-e nil
  837. "Emacs interface to the MH mail system.
  838. MH is the Rand Mail Handler. Other implementations include nmh
  839. and GNU mailutils."
  840. :link '(custom-manual "(mh-e)Top")
  841. :group 'mail
  842. :package-version '(MH-E . "8.0"))
  843. (defgroup-mh mh-alias nil
  844. "Aliases."
  845. :link '(custom-manual "(mh-e)Aliases")
  846. :prefix "mh-alias-"
  847. :group 'mh-e
  848. :package-version '(MH-E . "7.1"))
  849. (defgroup-mh mh-folder nil
  850. "Organizing your mail with folders."
  851. :prefix "mh-"
  852. :link '(custom-manual "(mh-e)Folders")
  853. :group 'mh-e
  854. :package-version '(MH-E . "7.1"))
  855. (defgroup-mh mh-folder-selection nil
  856. "Folder selection."
  857. :prefix "mh-"
  858. :link '(custom-manual "(mh-e)Folder Selection")
  859. :group 'mh-e
  860. :package-version '(MH-E . "8.0"))
  861. (defgroup-mh mh-identity nil
  862. "Identities."
  863. :link '(custom-manual "(mh-e)Identities")
  864. :prefix "mh-identity-"
  865. :group 'mh-e
  866. :package-version '(MH-E . "7.1"))
  867. (defgroup-mh mh-inc nil
  868. "Incorporating your mail."
  869. :prefix "mh-inc-"
  870. :link '(custom-manual "(mh-e)Incorporating Mail")
  871. :group 'mh-e
  872. :package-version '(MH-E . "8.0"))
  873. (defgroup-mh mh-junk nil
  874. "Dealing with junk mail."
  875. :link '(custom-manual "(mh-e)Junk")
  876. :prefix "mh-junk-"
  877. :group 'mh-e
  878. :package-version '(MH-E . "7.3"))
  879. (defgroup-mh mh-letter nil
  880. "Editing a draft."
  881. :prefix "mh-"
  882. :link '(custom-manual "(mh-e)Editing Drafts")
  883. :group 'mh-e
  884. :package-version '(MH-E . "7.1"))
  885. (defgroup-mh mh-ranges nil
  886. "Ranges."
  887. :prefix "mh-"
  888. :link '(custom-manual "(mh-e)Ranges")
  889. :group 'mh-e
  890. :package-version '(MH-E . "8.0"))
  891. (defgroup-mh mh-scan-line-formats nil
  892. "Scan line formats."
  893. :link '(custom-manual "(mh-e)Scan Line Formats")
  894. :prefix "mh-"
  895. :group 'mh-e
  896. :package-version '(MH-E . "8.0"))
  897. (defgroup-mh mh-search nil
  898. "Searching."
  899. :link '(custom-manual "(mh-e)Searching")
  900. :prefix "mh-search-"
  901. :group 'mh-e
  902. :package-version '(MH-E . "8.0"))
  903. (defgroup-mh mh-sending-mail nil
  904. "Sending mail."
  905. :prefix "mh-"
  906. :link '(custom-manual "(mh-e)Sending Mail")
  907. :group 'mh-e
  908. :package-version '(MH-E . "8.0"))
  909. (defgroup-mh mh-sequences nil
  910. "Sequences."
  911. :prefix "mh-"
  912. :link '(custom-manual "(mh-e)Sequences")
  913. :group 'mh-e
  914. :package-version '(MH-E . "8.0"))
  915. (defgroup-mh mh-show nil
  916. "Reading your mail."
  917. :prefix "mh-"
  918. :link '(custom-manual "(mh-e)Reading Mail")
  919. :group 'mh-e
  920. :package-version '(MH-E . "7.1"))
  921. (defgroup-mh mh-speedbar nil
  922. "The speedbar."
  923. :prefix "mh-speed-"
  924. :link '(custom-manual "(mh-e)Speedbar")
  925. :group 'mh-e
  926. :package-version '(MH-E . "8.0"))
  927. (defgroup-mh mh-thread nil
  928. "Threading."
  929. :prefix "mh-thread-"
  930. :link '(custom-manual "(mh-e)Threading")
  931. :group 'mh-e
  932. :package-version '(MH-E . "8.0"))
  933. (defgroup-mh mh-tool-bar nil
  934. "The tool bar"
  935. :link '(custom-manual "(mh-e)Tool Bar")
  936. :prefix "mh-"
  937. :group 'mh-e
  938. :package-version '(MH-E . "8.0"))
  939. (defgroup-mh mh-hooks nil
  940. "MH-E hooks."
  941. :link '(custom-manual "(mh-e)Top")
  942. :prefix "mh-"
  943. :group 'mh-e
  944. :package-version '(MH-E . "7.1"))
  945. (defgroup-mh mh-faces nil
  946. "Faces used in MH-E."
  947. :link '(custom-manual "(mh-e)Top")
  948. :prefix "mh-"
  949. :group 'faces
  950. :group 'mh-e
  951. :package-version '(MH-E . "7.1"))
  952. ;;; MH-E Customization
  953. ;; See Variant Support, above, for mh-e group.
  954. ;;; Aliases (:group 'mh-alias)
  955. (defcustom-mh mh-alias-completion-ignore-case-flag t
  956. "*Non-nil means don't consider case significant in MH alias completion.
  957. As MH ignores case in the aliases, so too does MH-E. However, you
  958. may turn off this option to make case significant which can be
  959. used to segregate completion of your aliases. You might use
  960. lowercase for mailing lists and uppercase for people."
  961. :type 'boolean
  962. :group 'mh-alias
  963. :package-version '(MH-E . "7.1"))
  964. (defcustom-mh mh-alias-expand-aliases-flag nil
  965. "*Non-nil means to expand aliases entered in the minibuffer.
  966. In other words, aliases entered in the minibuffer will be
  967. expanded to the full address in the message draft. By default,
  968. this expansion is not performed."
  969. :type 'boolean
  970. :group 'mh-alias
  971. :package-version '(MH-E . "7.1"))
  972. (defcustom-mh mh-alias-flash-on-comma t
  973. "*Specify whether to flash address or warn on translation.
  974. This option controls the behavior when a [comma] is pressed while
  975. entering aliases or addresses. The default setting flashes the
  976. address associated with an address in the minibuffer briefly, but
  977. does not display a warning if the alias is not found."
  978. :type '(choice (const :tag "Flash but Don't Warn If No Alias" t)
  979. (const :tag "Flash and Warn If No Alias" 1)
  980. (const :tag "Don't Flash Nor Warn If No Alias" nil))
  981. :group 'mh-alias
  982. :package-version '(MH-E . "7.1"))
  983. (defcustom-mh mh-alias-insert-file nil
  984. "*Filename used to store a new MH-E alias.
  985. The default setting of this option is \"Use Aliasfile Profile
  986. Component\". This option can also hold the name of a file or a
  987. list a file names. If this option is set to a list of file names,
  988. or the \"Aliasfile:\" profile component contains more than one file
  989. name, MH-E will prompt for one of them when MH-E adds an alias."
  990. :type '(choice (const :tag "Use Aliasfile Profile Component" nil)
  991. (file :tag "Alias File")
  992. (repeat :tag "List of Alias Files" file))
  993. :group 'mh-alias
  994. :package-version '(MH-E . "7.1"))
  995. (defcustom-mh mh-alias-insertion-location 'sorted
  996. "Specifies where new aliases are entered in alias files.
  997. This option is set to \"Alphabetical\" by default. If you organize
  998. your alias file in other ways, then adding aliases to the \"Top\"
  999. or \"Bottom\" of your alias file might be more appropriate."
  1000. :type '(choice (const :tag "Alphabetical" sorted)
  1001. (const :tag "Top" top)
  1002. (const :tag "Bottom" bottom))
  1003. :group 'mh-alias
  1004. :package-version '(MH-E . "7.1"))
  1005. (defcustom-mh mh-alias-local-users t
  1006. "*Non-nil means local users are added to alias completion.
  1007. Aliases are created from \"/etc/passwd\" entries with a user ID
  1008. larger than a magical number, typically 200. This can be a handy
  1009. tool on a machine where you and co-workers exchange messages.
  1010. These aliases have the form \"local.first.last\" if a real name is
  1011. present in the password file. Otherwise, the alias will have the
  1012. form \"local.login\".
  1013. If you're on a system with thousands of users you don't know, and
  1014. the loading of local aliases slows MH-E down noticeably, then
  1015. turn this option off.
  1016. This option also takes a string which is executed to generate the
  1017. password file. For example, use \"ypcat passwd\" to obtain the
  1018. NIS password file."
  1019. :type '(choice (boolean) (string))
  1020. :group 'mh-alias
  1021. :package-version '(MH-E . "7.1"))
  1022. (defcustom-mh mh-alias-local-users-prefix "local."
  1023. "*String prefixed to the real names of users from the password file.
  1024. This option can also be set to \"Use Login\".
  1025. For example, consider the following password file entry:
  1026. psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh
  1027. The following settings of this option will produce the associated
  1028. aliases:
  1029. \"local.\" local.peter.galbraith
  1030. \"\" peter.galbraith
  1031. Use Login psg
  1032. This option has no effect if variable `mh-alias-local-users' is
  1033. turned off."
  1034. :type '(choice (const :tag "Use Login" nil)
  1035. (string))
  1036. :group 'mh-alias
  1037. :package-version '(MH-E . "7.4"))
  1038. (defcustom-mh mh-alias-passwd-gecos-comma-separator-flag t
  1039. "*Non-nil means the gecos field in the password file uses a comma separator.
  1040. In the example in `mh-alias-local-users-prefix', commas are used
  1041. to separate different values within the so-called gecos field.
  1042. This is a fairly common usage. However, in the rare case that the
  1043. gecos field in your password file is not separated by commas and
  1044. whose contents may contain commas, you can turn this option off."
  1045. :type 'boolean
  1046. :group 'mh-alias
  1047. :package-version '(MH-E . "7.4"))
  1048. ;;; Organizing Your Mail with Folders (:group 'mh-folder)
  1049. (defcustom-mh mh-new-messages-folders t
  1050. "Folders searched for the \"unseen\" sequence.
  1051. Set this option to \"Inbox\" to search the \"+inbox\" folder or
  1052. \"All\" to search all of the top level folders. Otherwise, list
  1053. the folders that should be searched with the \"Choose Folders\"
  1054. menu item.
  1055. See also `mh-recursive-folders-flag'."
  1056. :type '(choice (const :tag "Inbox" t)
  1057. (const :tag "All" nil)
  1058. (repeat :tag "Choose Folders" (string :tag "Folder")))
  1059. :group 'mh-folder
  1060. :package-version '(MH-E . "8.0"))
  1061. (defcustom-mh mh-ticked-messages-folders t
  1062. "Folders searched for `mh-tick-seq'.
  1063. Set this option to \"Inbox\" to search the \"+inbox\" folder or
  1064. \"All\" to search all of the top level folders. Otherwise, list
  1065. the folders that should be searched with the \"Choose Folders\"
  1066. menu item.
  1067. See also `mh-recursive-folders-flag'."
  1068. :type '(choice (const :tag "Inbox" t)
  1069. (const :tag "All" nil)
  1070. (repeat :tag "Choose Folders" (string :tag "Folder")))
  1071. :group 'mh-folder
  1072. :package-version '(MH-E . "8.0"))
  1073. (defcustom-mh mh-large-folder 200
  1074. "The number of messages that indicates a large folder.
  1075. If a folder is deemed to be large, that is the number of messages
  1076. in it exceed this value, then confirmation is needed when it is
  1077. visited. Even when `mh-show-threads-flag' is non-nil, the folder
  1078. is not automatically threaded, if it is large. If set to nil all
  1079. folders are treated as if they are small."
  1080. :type '(choice (const :tag "No Limit") integer)
  1081. :group 'mh-folder
  1082. :package-version '(MH-E . "7.0"))
  1083. (defcustom-mh mh-recenter-summary-flag nil
  1084. "*Non-nil means to recenter the summary window.
  1085. If this option is turned on, recenter the summary window when the
  1086. show window is toggled off."
  1087. :type 'boolean
  1088. :group 'mh-folder
  1089. :package-version '(MH-E . "7.0"))
  1090. (defcustom-mh mh-recursive-folders-flag nil
  1091. "*Non-nil means that commands which operate on folders do so recursively."
  1092. :type 'boolean
  1093. :group 'mh-folder
  1094. :package-version '(MH-E . "7.0"))
  1095. (defcustom-mh mh-sortm-args nil
  1096. "*Additional arguments for \"sortm\"\\<mh-folder-mode-map>.
  1097. This option is consulted when a prefix argument is used with
  1098. \\[mh-sort-folder]. Normally default arguments to \"sortm\" are
  1099. specified in the MH profile. This option may be used to provide
  1100. an alternate view. For example, \"'(\"-nolimit\" \"-textfield\"
  1101. \"subject\")\" is a useful setting."
  1102. :type 'string
  1103. :group 'mh-folder
  1104. :package-version '(MH-E . "8.0"))
  1105. ;;; Folder Selection (:group 'mh-folder-selection)
  1106. (defcustom-mh mh-default-folder-for-message-function nil
  1107. "Function to select a default folder for refiling or \"Fcc:\".
  1108. When this function is called, the current buffer contains the message
  1109. being refiled and point is at the start of the message. This function
  1110. should return the default folder as a string with a leading \"+\"
  1111. sign. It can also return nil so that the last folder name is used as
  1112. the default, or an empty string to suppress the default entirely."
  1113. :type 'function
  1114. :group 'mh-folder-selection
  1115. :package-version '(MH-E . "8.0"))
  1116. (defcustom-mh mh-default-folder-list nil
  1117. "*List of addresses and folders.
  1118. The folder name associated with the first address found in this
  1119. list is used as the default for `mh-refile-msg' and similar
  1120. functions. Each element in this list contains a \"Check Recipient\"
  1121. item. If this item is turned on, then the address is checked
  1122. against the recipient instead of the sender. This is useful for
  1123. mailing lists.
  1124. See `mh-prompt-for-refile-folder' and `mh-folder-from-address'
  1125. for more information."
  1126. :type '(repeat (list (regexp :tag "Address")
  1127. (string :tag "Folder")
  1128. (boolean :tag "Check Recipient")))
  1129. :group 'mh-folder-selection
  1130. :package-version '(MH-E . "7.2"))
  1131. (defcustom-mh mh-default-folder-must-exist-flag t
  1132. "*Non-nil means guessed folder name must exist to be used.
  1133. If the derived folder does not exist, and this option is on, then
  1134. the last folder name used is suggested. This is useful if you get
  1135. mail from various people for whom you have an alias, but file
  1136. them all in the same project folder.
  1137. See `mh-prompt-for-refile-folder' and `mh-folder-from-address'
  1138. for more information."
  1139. :type 'boolean
  1140. :group 'mh-folder-selection
  1141. :package-version '(MH-E . "7.2"))
  1142. (defcustom-mh mh-default-folder-prefix ""
  1143. "*Prefix used for folder names generated from aliases.
  1144. The prefix is used to prevent clutter in your mail directory.
  1145. See `mh-prompt-for-refile-folder' and `mh-folder-from-address'
  1146. for more information."
  1147. :type 'string
  1148. :group 'mh-folder-selection
  1149. :package-version '(MH-E . "7.2"))
  1150. ;;; Identities (:group 'mh-identity)
  1151. (eval-and-compile
  1152. (unless (fboundp 'mh-identity-make-menu-no-autoload)
  1153. (defun mh-identity-make-menu-no-autoload ()
  1154. "Temporary definition.
  1155. Real definition will take effect when mh-identity is loaded."
  1156. nil)))
  1157. (defcustom-mh mh-identity-list nil
  1158. "*List of identities.
  1159. To customize this option, click on the \"INS\" button and enter a label
  1160. such as \"Home\" or \"Work\". Then click on the \"INS\" button with the
  1161. label \"Add at least one item below\". Then choose one of the items in
  1162. the \"Value Menu\".
  1163. You can specify an alternate \"From:\" header field using the \"From
  1164. Field\" menu item. You must include a valid email address. A standard
  1165. format is \"First Last <login@@host.domain>\". If you use an initial
  1166. with a period, then you must quote your name as in '\"First I. Last\"
  1167. <login@@host.domain>'. People usually list the name of the company
  1168. where they work using the \"Organization Field\" menu item. Set any
  1169. arbitrary header field and value in the \"Other Field\" menu item.
  1170. Unless the header field is a standard one, precede the name of your
  1171. field's label with \"X-\", as in \"X-Fruit-of-the-Day:\". The value of
  1172. \"Attribution Verb\" overrides the setting of
  1173. `mh-extract-from-attribution-verb'. Set your signature with the
  1174. \"Signature\" menu item. You can specify the contents of
  1175. `mh-signature-file-name', a file, or a function. Specify a different
  1176. key to sign or encrypt messages with the \"GPG Key ID\" menu item.
  1177. You can select the identities you have added via the menu called
  1178. \"Identity\" in the MH-Letter buffer. You can also use
  1179. \\[mh-insert-identity]. To clear the fields and signature added by the
  1180. identity, select the \"None\" identity.
  1181. The \"Identity\" menu contains two other items to save you from having
  1182. to set the identity on every message. The menu item \"Set Default for
  1183. Session\" can be used to set the default identity to the current
  1184. identity until you exit Emacs. The menu item \"Save as Default\" sets
  1185. the option `mh-identity-default' to the current identity setting. You
  1186. can also customize the `mh-identity-default' option in the usual
  1187. fashion."
  1188. :type '(repeat (list :tag ""
  1189. (string :tag "Label")
  1190. (repeat :tag "Add at least one item below"
  1191. (choice
  1192. (cons :tag "From Field"
  1193. (const "From")
  1194. (string :tag "Value"))
  1195. (cons :tag "Organization Field"
  1196. (const "Organization")
  1197. (string :tag "Value"))
  1198. (cons :tag "Other Field"
  1199. (string :tag "Field")
  1200. (string :tag "Value"))
  1201. (cons :tag "Attribution Verb"
  1202. (const ":attribution-verb")
  1203. (string :tag "Value"))
  1204. (cons :tag "Signature"
  1205. (const :tag "Signature"
  1206. ":signature")
  1207. (choice
  1208. (const :tag "mh-signature-file-name"
  1209. nil)
  1210. (file)
  1211. (function)))
  1212. (cons :tag "GPG Key ID"
  1213. (const :tag "GPG Key ID"
  1214. ":pgg-default-user-id")
  1215. (string :tag "Value"))))))
  1216. :set (lambda (symbol value)
  1217. (set-default symbol value)
  1218. (mh-identity-make-menu-no-autoload))
  1219. :group 'mh-identity
  1220. :package-version '(MH-E . "7.1"))
  1221. (defcustom-mh mh-auto-fields-list nil
  1222. "List of recipients for which header lines are automatically inserted.
  1223. This option can be used to set the identity depending on the
  1224. recipient. To customize this option, click on the \"INS\" button and
  1225. enter a regular expression for the recipient's address. Click on the
  1226. \"INS\" button with the \"Add at least one item below\" label. Then choose
  1227. one of the items in the \"Value Menu\".
  1228. The \"Identity\" menu item is used to select an identity from those
  1229. configured in `mh-identity-list'. All of the information for that
  1230. identity will be added if the recipient matches. The \"Fcc Field\" menu
  1231. item is used to select a folder that is used in the \"Fcc:\" header.
  1232. When you send the message, MH will put a copy of your message in this
  1233. folder. The \"Mail-Followup-To Field\" menu item is used to insert an
  1234. \"Mail-Followup-To:\" header field with the recipients you provide. If
  1235. the recipient's mail user agent supports this header field (as nmh
  1236. does), then their replies will go to the addresses listed. This is
  1237. useful if their replies go both to the list and to you and you don't
  1238. have a mechanism to suppress duplicates. If you reply to someone not
  1239. on the list, you must either remove the \"Mail-Followup-To:\" field, or
  1240. ensure the recipient is also listed there so that he receives replies
  1241. to your reply. Other header fields may be added using the \"Other
  1242. Field\" menu item.
  1243. These fields can only be added after the recipient is known. Once the
  1244. header contains one or more recipients, run the
  1245. \\[mh-insert-auto-fields] command or choose the \"Identity -> Insert
  1246. Auto Fields\" menu item to insert these fields manually. However, you
  1247. can just send the message and the fields will be added automatically.
  1248. You are given a chance to see these fields and to confirm them before
  1249. the message is actually sent. You can do away with this confirmation
  1250. by turning off the option `mh-auto-fields-prompt-flag'.
  1251. You should avoid using the same header field in `mh-auto-fields-list'
  1252. and `mh-identity-list' definitions that may apply to the same message
  1253. as the result is undefined."
  1254. :type `(repeat
  1255. (list :tag ""
  1256. (string :tag "Recipient")
  1257. (repeat :tag "Add at least one item below"
  1258. (choice
  1259. (cons :tag "Identity"
  1260. (const ":identity")
  1261. ,(append
  1262. '(radio)
  1263. (mapcar
  1264. (function (lambda (arg) `(const ,arg)))
  1265. (mapcar 'car mh-identity-list))))
  1266. (cons :tag "Fcc Field"
  1267. (const "fcc")
  1268. (string :tag "Value"))
  1269. (cons :tag "Mail-Followup-To Field"
  1270. (const "Mail-Followup-To")
  1271. (string :tag "Value"))
  1272. (cons :tag "Other Field"
  1273. (string :tag "Field")
  1274. (string :tag "Value"))))))
  1275. :group 'mh-identity
  1276. :package-version '(MH-E . "7.3"))
  1277. (defcustom-mh mh-auto-fields-prompt-flag t
  1278. "*Non-nil means to prompt before sending if fields inserted.
  1279. See `mh-auto-fields-list'."
  1280. :type 'boolean
  1281. :group 'mh-identity
  1282. :package-version '(MH-E . "8.0"))
  1283. (defcustom-mh mh-identity-default nil
  1284. "Default identity to use when `mh-letter-mode' is called.
  1285. See `mh-identity-list'."
  1286. :type (append
  1287. '(radio)
  1288. (cons '(const :tag "None" nil)
  1289. (mapcar (function (lambda (arg) `(const ,arg)))
  1290. (mapcar 'car mh-identity-list))))
  1291. :group 'mh-identity
  1292. :package-version '(MH-E . "7.1"))
  1293. (defcustom-mh mh-identity-handlers
  1294. '(("From" . mh-identity-handler-top)
  1295. (":default" . mh-identity-handler-bottom)
  1296. (":attribution-verb" . mh-identity-handler-attribution-verb)
  1297. (":signature" . mh-identity-handler-signature)
  1298. (":pgg-default-user-id" . mh-identity-handler-gpg-identity))
  1299. "Handler functions for fields in `mh-identity-list'.
  1300. This option is used to change the way that fields, signatures,
  1301. and attributions in `mh-identity-list' are added. To customize
  1302. `mh-identity-handlers', replace the name of an existing handler
  1303. function associated with the field you want to change with the
  1304. name of a function you have written. You can also click on an
  1305. \"INS\" button and insert a field of your choice and the name of
  1306. the function you have written to handle it.
  1307. The \"Field\" field can be any field that you've used in your
  1308. `mh-identity-list'. The special fields \":attribution-verb\",
  1309. \":signature\", or \":pgg-default-user-id\" are used for the
  1310. `mh-identity-list' choices \"Attribution Verb\", \"Signature\", and
  1311. \"GPG Key ID\" respectively.
  1312. The handler associated with the \":default\" field is used when no
  1313. other field matches.
  1314. The handler functions are passed two or three arguments: the
  1315. FIELD itself (for example, \"From\"), or one of the special
  1316. fields (for example, \":signature\"), and the ACTION 'remove or
  1317. 'add. If the action is 'add, an additional argument
  1318. containing the VALUE for the field is given."
  1319. :type '(repeat (cons (string :tag "Field") function))
  1320. :group 'mh-identity
  1321. :package-version '(MH-E . "8.0"))
  1322. ;;; Incorporating Your Mail (:group 'mh-inc)
  1323. (defcustom-mh mh-inc-prog "inc"
  1324. "*Program to incorporate new mail into a folder.
  1325. This program generates a one-line summary for each of the new
  1326. messages. Unless it is an absolute pathname, the file is assumed
  1327. to be in the `mh-progs' directory. You may also link a file to
  1328. \"inc\" that uses a different format. You'll then need to modify
  1329. several scan line format variables appropriately."
  1330. :type 'string
  1331. :group 'mh-inc
  1332. :package-version '(MH-E . "6.0"))
  1333. (eval-and-compile
  1334. (unless (fboundp 'mh-inc-spool-make-no-autoload)
  1335. (defun mh-inc-spool-make-no-autoload ()
  1336. "Temporary definition.
  1337. Real definition will take effect when mh-inc is loaded."
  1338. nil)))
  1339. (defcustom-mh mh-inc-spool-list nil
  1340. "*Alternate spool files.
  1341. You can use the `mh-inc-spool-list' variable to direct MH-E to
  1342. retrieve mail from arbitrary spool files other than your system
  1343. mailbox, file it in folders other than your \"+inbox\", and assign
  1344. key bindings to incorporate this mail.
  1345. Suppose you are subscribed to the \"mh-e-devel\" mailing list and
  1346. you use \"procmail\" to filter this mail into \"~/mail/mh-e\" with
  1347. the following recipe in \".procmailrc\":
  1348. MAILDIR=$HOME/mail
  1349. :0:
  1350. * ^From mh-e-devel-admin@stop.mail-abuse.org
  1351. mh-e
  1352. In order to incorporate \"~/mail/mh-e\" into \"+mh-e\" with an
  1353. \"I m\" (mh-inc-spool-mh-e) command, customize this option, and click
  1354. on the \"INS\" button. Enter a \"Spool File\" of \"~/mail/mh-e\", a
  1355. \"Folder\" of \"mh-e\", and a \"Key Binding\" of \"m\".
  1356. You can use \"xbuffy\" to automate the incorporation of this mail
  1357. using the Emacs 22 command \"emacsclient\" as follows:
  1358. box ~/mail/mh-e
  1359. title mh-e
  1360. origMode
  1361. polltime 10
  1362. headertime 0
  1363. command emacsclient --eval '(mh-inc-spool-mh-e)'
  1364. In XEmacs, the command \"gnuclient\" is used in a similar
  1365. fashion."
  1366. :type '(repeat (list (file :tag "Spool File")
  1367. (string :tag "Folder")
  1368. (character :tag "Key Binding")))
  1369. :set (lambda (symbol value)
  1370. (set-default symbol value)
  1371. (mh-inc-spool-make-no-autoload))
  1372. :group 'mh-inc
  1373. :package-version '(MH-E . "7.3"))
  1374. ;;; Dealing with Junk Mail (:group 'mh-junk)
  1375. (defvar mh-junk-choice nil
  1376. "Chosen spam fighting program.")
  1377. ;; Available spam filter interfaces
  1378. (defvar mh-junk-function-alist
  1379. '((spamassassin mh-spamassassin-blacklist mh-spamassassin-whitelist)
  1380. (bogofilter mh-bogofilter-blacklist mh-bogofilter-whitelist)
  1381. (spamprobe mh-spamprobe-blacklist mh-spamprobe-whitelist))
  1382. "Available choices of spam programs to use.
  1383. This is an alist. For each element there are functions that
  1384. blacklist a message as spam and whitelist a message incorrectly
  1385. classified as spam.")
  1386. (defun mh-junk-choose (symbol value)
  1387. "Choose spam program to use.
  1388. The function is always called with SYMBOL bound to
  1389. `mh-junk-program' and VALUE bound to the new value of
  1390. `mh-junk-program'. The function sets the variable
  1391. `mh-junk-choice' in addition to `mh-junk-program'."
  1392. (set symbol value) ;XXX shouldn't this be set-default?
  1393. (setq mh-junk-choice
  1394. (or value
  1395. (loop for element in mh-junk-function-alist
  1396. until (executable-find (symbol-name (car element)))
  1397. finally return (car element)))))
  1398. (defcustom-mh mh-junk-background nil
  1399. "If on, spam programs are run in background.
  1400. By default, the programs are run in the foreground, but this can
  1401. be slow when junking large numbers of messages. If you have
  1402. enough memory or don't junk that many messages at the same time,
  1403. you might try turning on this option.
  1404. Note that this option is used as the \"display\" argument in the
  1405. call to `call-process'. Therefore, turning on this option means
  1406. setting its value to \"0\". You can also set its value to t to
  1407. direct the programs' output to the \"*MH-E Log*\" buffer; this
  1408. may be useful for debugging."
  1409. :type '(choice (const :tag "Off" nil)
  1410. (const :tag "On" 0))
  1411. :group 'mh-junk
  1412. :package-version '(MH-E . "8.0"))
  1413. (defcustom-mh mh-junk-disposition nil
  1414. "Disposition of junk mail."
  1415. :type '(choice (const :tag "Delete Spam" nil)
  1416. (string :tag "Spam Folder"))
  1417. :group 'mh-junk
  1418. :package-version '(MH-E . "8.0"))
  1419. (defcustom-mh mh-junk-program nil
  1420. "Spam program that MH-E should use.
  1421. The default setting of this option is \"Auto-detect\" which means
  1422. that MH-E will automatically choose one of SpamAssassin,
  1423. bogofilter, or SpamProbe in that order. If, for example, you have
  1424. both SpamAssassin and bogofilter installed and you want to use
  1425. bogofilter, then you can set this option to \"Bogofilter\"."
  1426. :type '(choice (const :tag "Auto-detect" nil)
  1427. (const :tag "SpamAssassin" spamassassin)
  1428. (const :tag "Bogofilter" bogofilter)
  1429. (const :tag "SpamProbe" spamprobe))
  1430. :set 'mh-junk-choose
  1431. :group 'mh-junk
  1432. :package-version '(MH-E . "7.3"))
  1433. ;;; Editing a Draft (:group 'mh-letter)
  1434. (defcustom-mh mh-compose-insertion (if (locate-library "mml") 'mml 'mh)
  1435. "Type of tags used when composing MIME messages.
  1436. In addition to MH-style directives, MH-E also supports MML (MIME
  1437. Meta Language) tags. (see Info node `(emacs-mime)Composing').
  1438. This option can be used to choose between them. By default, this
  1439. option is set to \"MML\" if it is supported since it provides a
  1440. lot more functionality. This option can also be set to \"MH\" if
  1441. MH-style directives are preferred."
  1442. :type '(choice (const :tag "MML" mml)
  1443. (const :tag "MH" mh))
  1444. :group 'mh-letter
  1445. :package-version '(MH-E . "7.0"))
  1446. (defcustom-mh mh-compose-skipped-header-fields
  1447. '("From" "Organization" "References" "In-Reply-To"
  1448. "X-Face" "Face" "X-Image-URL" "X-Mailer")
  1449. "List of header fields to skip over when navigating in draft."
  1450. :type '(repeat (string :tag "Field"))
  1451. :group 'mh-letter
  1452. :package-version '(MH-E . "7.4"))
  1453. (defcustom-mh mh-compose-space-does-completion-flag nil
  1454. "*Non-nil means \\<mh-letter-mode-map>\\[mh-letter-complete-or-space] does completion in message header."
  1455. :type 'boolean
  1456. :group 'mh-letter
  1457. :package-version '(MH-E . "7.4"))
  1458. (defcustom-mh mh-delete-yanked-msg-window-flag nil
  1459. "*Non-nil means delete any window displaying the message.
  1460. This deletes the window containing the original message after
  1461. yanking it with \\<mh-letter-mode-map>\\[mh-yank-cur-msg] to make
  1462. more room on your screen for your reply."
  1463. :type 'boolean
  1464. :group 'mh-letter
  1465. :package-version '(MH-E . "7.0"))
  1466. (defcustom-mh mh-extract-from-attribution-verb "wrote:"
  1467. "*Verb to use for attribution when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
  1468. The attribution consists of the sender's name and email address
  1469. followed by the content of this option. This option can be set to
  1470. \"wrote:\", \"a écrit:\", and \"schrieb:\". You can also use the
  1471. \"Custom String\" menu item to enter your own verb."
  1472. :type '(choice (const "wrote:")
  1473. (const "a écrit:")
  1474. (const "schrieb:")
  1475. (string :tag "Custom String"))
  1476. :group 'mh-letter
  1477. :package-version '(MH-E . "7.0"))
  1478. (defcustom-mh mh-ins-buf-prefix "> "
  1479. "*String to put before each line of a yanked or inserted message.
  1480. The prefix \"> \" is the default setting of this option. I
  1481. suggest that you not modify this option since it is used by many
  1482. mailers and news readers: messages are far easier to read if
  1483. several included messages have all been indented by the same
  1484. string.
  1485. This prefix is not inserted if you use one of the supercite
  1486. flavors of `mh-yank-behavior' or you have added a
  1487. `mail-citation-hook'."
  1488. :type 'string
  1489. :group 'mh-letter
  1490. :package-version '(MH-E . "6.0"))
  1491. (defcustom-mh mh-letter-complete-function 'ispell-complete-word
  1492. "*Function to call when completing outside of address or folder fields.
  1493. In the body of the message,
  1494. \\<mh-letter-mode-map>\\[mh-letter-complete] runs this function,
  1495. which is set to \"ispell-complete-word\" by default."
  1496. :type '(choice function (const nil))
  1497. :group 'mh-letter
  1498. :package-version '(MH-E . "7.1"))
  1499. (defcustom-mh mh-letter-fill-column 72
  1500. "*Fill column to use in MH Letter mode.
  1501. By default, this option is 72 to allow others to quote your
  1502. message without line wrapping."
  1503. :type 'integer
  1504. :group 'mh-letter
  1505. :package-version '(MH-E . "6.0"))
  1506. (defcustom-mh mh-mml-method-default (if mh-pgp-support-flag "pgpmime" "none")
  1507. "Default method to use in security tags.
  1508. This option is used to select between a variety of mail security
  1509. mechanisms. The default is \"PGP (MIME)\" if it is supported\;
  1510. otherwise, the default is \"None\". Other mechanisms include
  1511. vanilla \"PGP\" and \"S/MIME\".
  1512. The `pgg' customization group may have some settings which may
  1513. interest you (see Info node `(pgg)').
  1514. In particular, I turn on the option `pgg-encrypt-for-me' so that
  1515. all messages I encrypt are encrypted with my public key as well.
  1516. If you keep a copy of all of your outgoing mail with a \"Fcc:\"
  1517. header field, this setting is vital so that you can read the mail
  1518. you write!"
  1519. :type '(choice (const :tag "PGP (MIME)" "pgpmime")
  1520. (const :tag "PGP" "pgp")
  1521. (const :tag "S/MIME" "smime")
  1522. (const :tag "None" "none"))
  1523. :group 'mh-letter
  1524. :package-version '(MH-E . "8.0"))
  1525. (defcustom-mh mh-signature-file-name "~/.signature"
  1526. "*Source of user's signature.
  1527. By default, the text of your signature is taken from the file
  1528. \"~/.signature\". You can read from other sources by changing this
  1529. option. This file may contain a vCard in which case an attachment is
  1530. added with the vCard.
  1531. This option may also be a symbol, in which case that function is
  1532. called. You may not want a signature separator to be added for you;
  1533. instead you may want to insert one yourself. Options that you may find
  1534. useful to do this include `mh-signature-separator' (when inserting a
  1535. signature separator) and `mh-signature-separator-regexp' (for finding
  1536. said separator). The function `mh-signature-separator-p', which
  1537. reports t if the buffer contains a separator, may be useful as well.
  1538. The signature is inserted into your message with the command
  1539. \\<mh-letter-mode-map>\\[mh-insert-signature] or with the option
  1540. `mh-identity-list'."
  1541. :type 'file
  1542. :group 'mh-letter
  1543. :package-version '(MH-E . "6.0"))
  1544. (defcustom-mh mh-signature-separator-flag t
  1545. "*Non-nil means a signature separator should be inserted.
  1546. It is not recommended that you change this option since various
  1547. mail user agents, including MH-E, use the separator to present
  1548. the signature differently, and to suppress the signature when
  1549. replying or yanking a letter into a draft."
  1550. :type 'boolean
  1551. :group 'mh-letter
  1552. :package-version '(MH-E . "8.0"))
  1553. (defcustom-mh mh-x-face-file "~/.face"
  1554. "*File containing face header field to insert in outgoing mail.
  1555. If the file starts with either of the strings \"X-Face:\", \"Face:\"
  1556. or \"X-Image-URL:\" then the contents are added to the message header
  1557. verbatim. Otherwise it is assumed that the file contains the value of
  1558. the \"X-Face:\" header field.
  1559. The \"X-Face:\" header field, which is a low-resolution, black and
  1560. white image, can be generated using the \"compface\" command (see URL
  1561. `ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z'). The
  1562. \"Online X-Face Converter\" is a useful resource for quick conversion
  1563. of images into \"X-Face:\" header fields (see URL
  1564. `http://www.dairiki.org/xface/').
  1565. Use the \"make-face\" script to convert a JPEG image to the higher
  1566. resolution, color, \"Face:\" header field (see URL
  1567. `http://quimby.gnus.org/circus/face/make-face').
  1568. The URL of any image can be used for the \"X-Image-URL:\" field and no
  1569. processing of the image is required.
  1570. To prevent the setting of any of these header fields, either set
  1571. `mh-x-face-file' to nil, or simply ensure that the file defined by
  1572. this option doesn't exist."
  1573. :type 'file
  1574. :group 'mh-letter
  1575. :package-version '(MH-E . "7.0"))
  1576. (defcustom-mh mh-yank-behavior 'attribution
  1577. "*Controls which part of a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
  1578. To include the entire message, including the entire header, use
  1579. \"Body and Header\". Use \"Body\" to yank just the body without
  1580. the header. To yank only the portion of the message following the
  1581. point, set this option to \"Below Point\".
  1582. Choose \"Invoke supercite\" to pass the entire message and header
  1583. through supercite.
  1584. If the \"Body With Attribution\" setting is used, then the
  1585. message minus the header is yanked and a simple attribution line
  1586. is added at the top using the value of the option
  1587. `mh-extract-from-attribution-verb'. This is the default.
  1588. If the \"Invoke supercite\" or \"Body With Attribution\" settings
  1589. are used, the \"-noformat\" argument is passed to the \"repl\"
  1590. program to override a \"-filter\" or \"-format\" argument. These
  1591. settings also have \"Automatically\" variants that perform the
  1592. action automatically when you reply so that you don't need to use
  1593. \\[mh-yank-cur-msg] at all. Note that this automatic action is
  1594. only performed if the show buffer matches the message being
  1595. replied to. People who use the automatic variants tend to turn on
  1596. the option `mh-delete-yanked-msg-window-flag' as well so that the
  1597. show window is never displayed.
  1598. If the show buffer has a region, the option `mh-yank-behavior' is
  1599. ignored unless its value is one of Attribution variants in which
  1600. case the attribution is added to the yanked region.
  1601. If this option is set to one of the supercite flavors, the hook
  1602. `mail-citation-hook' is ignored and `mh-ins-buf-prefix' is not
  1603. inserted."
  1604. :type '(choice (const :tag "Body and Header" t)
  1605. (const :tag "Body" body)
  1606. (const :tag "Below Point" nil)
  1607. (const :tag "Invoke supercite" supercite)
  1608. (const :tag "Invoke supercite, Automatically" autosupercite)
  1609. (const :tag "Body With Attribution" attribution)
  1610. (const :tag "Body With Attribution, Automatically"
  1611. autoattrib))
  1612. :group 'mh-letter
  1613. :package-version '(MH-E . "8.0"))
  1614. ;;; Ranges (:group 'mh-ranges)
  1615. (defcustom-mh mh-interpret-number-as-range-flag t
  1616. "*Non-nil means interpret a number as a range.
  1617. Since one of the most frequent ranges used is \"last:N\", MH-E
  1618. will interpret input such as \"200\" as \"last:200\" if this
  1619. option is on (which is the default). If you need to scan just the
  1620. message 200, then use the range \"200:200\"."
  1621. :type 'boolean
  1622. :group 'mh-ranges
  1623. :package-version '(MH-E . "7.4"))
  1624. ;;; Scan Line Formats (:group 'mh-scan-line-formats)
  1625. (eval-and-compile
  1626. (unless (fboundp 'mh-adaptive-cmd-note-flag-check)
  1627. (defun mh-adaptive-cmd-note-flag-check (symbol value)
  1628. "Temporary definition.
  1629. Real definition, below, uses variables that aren't defined yet."
  1630. (set-default symbol value))))
  1631. (defcustom-mh mh-adaptive-cmd-note-flag t
  1632. "*Non-nil means that the message number width is determined dynamically.
  1633. If you've created your own format to handle long message numbers,
  1634. you'll be pleased to know you no longer need it since MH-E adapts its
  1635. internal format based upon the largest message number if this option
  1636. is on (the default). This option may only be turned on when
  1637. `mh-scan-format-file' is set to \"Use MH-E scan Format\".
  1638. If you prefer fixed-width message numbers, turn off this option and
  1639. call `mh-set-cmd-note' with the width specified by your format file
  1640. \(see `mh-scan-format-file'). For example, the default width is 4, so
  1641. you would use \"(mh-set-cmd-note 4)\"."
  1642. :type 'boolean
  1643. :group 'mh-scan-line-formats
  1644. :set 'mh-adaptive-cmd-note-flag-check
  1645. :package-version '(MH-E . "7.0"))
  1646. (defun mh-scan-format-file-check (symbol value)
  1647. "Check if desired setting is valid.
  1648. Throw an error if user tries to set `mh-scan-format-file' to
  1649. anything but t when `mh-adaptive-cmd-note-flag' is on. Otherwise,
  1650. set SYMBOL to VALUE."
  1651. (if (and (not (eq value t))
  1652. mh-adaptive-cmd-note-flag)
  1653. (error "%s %s" "You must turn off `mh-adaptive-cmd-note-flag'"
  1654. "unless you use \"Use MH-E scan Format\"")
  1655. (set-default symbol value)))
  1656. (defcustom-mh mh-scan-format-file t
  1657. "Specifies the format file to pass to the scan program.
  1658. The default setting for this option is \"Use MH-E scan Format\". This
  1659. means that the format string will be taken from the either
  1660. `mh-scan-format-mh' or `mh-scan-format-nmh' depending on whether MH or
  1661. nmh (or GNU mailutils MH) is in use. This setting also enables you to
  1662. turn on the `mh-adaptive-cmd-note-flag' option.
  1663. You can also set this option to \"Use Default scan Format\" to get the
  1664. same output as you would get if you ran \"scan\" from the shell. If
  1665. you have a format file that you want MH-E to use but not MH, you can
  1666. set this option to \"Specify a scan Format File\" and enter the name
  1667. of your format file.
  1668. If you change the format of the scan lines you'll need to tell MH-E
  1669. how to parse the new format. As you will see, quite a lot of variables
  1670. are involved to do that. Use \"\\[apropos] RET mh-scan.*regexp\" to
  1671. obtain a list of these variables. You will also have to call
  1672. `mh-set-cmd-note' if your notations are not in column 4 (columns in
  1673. Emacs start with 0)."
  1674. :type '(choice (const :tag "Use MH-E scan Format" t)
  1675. (const :tag "Use Default scan Format" nil)
  1676. (file :tag "Specify a scan Format File"))
  1677. :group 'mh-scan-line-formats
  1678. :set 'mh-scan-format-file-check
  1679. :package-version '(MH-E . "6.0"))
  1680. (defun mh-adaptive-cmd-note-flag-check (symbol value)
  1681. "Check if desired setting is valid.
  1682. Throw an error if user tries to turn on
  1683. `mh-adaptive-cmd-note-flag' when `mh-scan-format-file' isn't t.
  1684. Otherwise, set SYMBOL to VALUE."
  1685. (if (and value
  1686. (not (eq mh-scan-format-file t)))
  1687. (error "%s %s" "Can't turn on unless `mh-scan-format-file'"
  1688. "is set to \"Use MH-E scan Format\"")
  1689. (set-default symbol value)))
  1690. (defcustom-mh mh-scan-prog "scan"
  1691. "*Program used to scan messages.
  1692. The name of the program that generates a listing of one line per
  1693. message is held in this option. Unless this variable contains an
  1694. absolute pathname, it is assumed to be in the `mh-progs'
  1695. directory. You may link another program to `scan' (see
  1696. \"mh-profile(5)\") to produce a different type of listing."
  1697. :type 'string
  1698. :group 'mh-scan-line-formats
  1699. :package-version '(MH-E . "6.0"))
  1700. (make-variable-buffer-local 'mh-scan-prog)
  1701. ;;; Searching (:group 'mh-search)
  1702. (defcustom-mh mh-search-program nil
  1703. "Search program that MH-E shall use.
  1704. The default setting of this option is \"Auto-detect\" which means
  1705. that MH-E will automatically choose one of swish++, swish-e,
  1706. mairix, namazu, pick and grep in that order. If, for example, you
  1707. have both swish++ and mairix installed and you want to use
  1708. mairix, then you can set this option to \"mairix\".
  1709. More information about setting up an indexing program to use with
  1710. MH-E can be found in the documentation of `mh-search'."
  1711. :type '(choice (const :tag "Auto-detect" nil)
  1712. (const :tag "swish++" swish++)
  1713. (const :tag "swish-e" swish)
  1714. (const :tag "mairix" mairix)
  1715. (const :tag "namazu" namazu)
  1716. (const :tag "pick" pick)
  1717. (const :tag "grep" grep))
  1718. :group 'mh-search
  1719. :package-version '(MH-E . "8.0"))
  1720. ;;; Sending Mail (:group 'mh-sending-mail)
  1721. (defcustom-mh mh-compose-forward-as-mime-flag t
  1722. "*Non-nil means that messages are forwarded as attachments.
  1723. By default, this option is on which means that the forwarded
  1724. messages are included as attachments. If you would prefer to
  1725. forward your messages verbatim (as text, inline), then turn off
  1726. this option. Forwarding messages verbatim works well for short,
  1727. textual messages, but your recipient won't be able to view any
  1728. non-textual attachments that were in the forwarded message. Be
  1729. aware that if you have \"forw: -mime\" in your MH profile, then
  1730. forwarded messages will always be included as attachments
  1731. regardless of the settings of this option."
  1732. :type 'boolean
  1733. :group 'mh-sending-mail
  1734. :package-version '(MH-E . "8.0"))
  1735. (defcustom-mh mh-compose-letter-function nil
  1736. "Invoked when starting a new draft.
  1737. However, it is the last function called before you edit your
  1738. message. The consequence of this is that you can write a function
  1739. to write and send the message for you. This function is passed
  1740. three arguments: the contents of the TO, SUBJECT, and CC header
  1741. fields."
  1742. :type '(choice (const nil) function)
  1743. :group 'mh-sending-mail
  1744. :package-version '(MH-E . "6.0"))
  1745. (defcustom-mh mh-compose-prompt-flag nil
  1746. "*Non-nil means prompt for header fields when composing a new draft."
  1747. :type 'boolean
  1748. :group 'mh-sending-mail
  1749. :package-version '(MH-E . "7.4"))
  1750. (defcustom-mh mh-forward-subject-format "%s: %s"
  1751. "*Format string for forwarded message subject.
  1752. This option is a string which includes two escapes (\"%s\"). The
  1753. first \"%s\" is replaced with the sender of the original message,
  1754. and the second one is replaced with the original \"Subject:\"."
  1755. :type 'string
  1756. :group 'mh-sending-mail
  1757. :package-version '(MH-E . "6.0"))
  1758. (defcustom-mh mh-insert-x-mailer-flag t
  1759. "*Non-nil means append an \"X-Mailer:\" header field to the header.
  1760. This header field includes the version of MH-E and Emacs that you
  1761. are using. If you don't want to participate in our marketing, you
  1762. can turn this option off."
  1763. :type 'boolean
  1764. :group 'mh-sending-mail
  1765. :package-version '(MH-E . "7.0"))
  1766. (defcustom-mh mh-redist-full-contents-flag nil
  1767. "*Non-nil means the \"dist\" command needs entire letter for redistribution.
  1768. This option must be turned on if \"dist\" requires the whole
  1769. letter for redistribution, which is the case if \"send\" is
  1770. compiled with the BERK option (which many people abhor). If you
  1771. find that MH will not allow you to redistribute a message that
  1772. has been redistributed before, turn off this option."
  1773. :type 'boolean
  1774. :group 'mh-sending-mail
  1775. :package-version '(MH-E . "8.0"))
  1776. (defcustom-mh mh-reply-default-reply-to nil
  1777. "*Sets the person or persons to whom a reply will be sent.
  1778. This option is set to \"Prompt\" by default so that you are
  1779. prompted for the recipient of a reply. If you find that most of
  1780. the time that you specify \"cc\" when you reply to a message, set
  1781. this option to \"cc\". Other choices include \"from\", \"to\", or
  1782. \"all\". You can always edit the recipients in the draft."
  1783. :type '(choice (const :tag "Prompt" nil)
  1784. (const "from")
  1785. (const "to")
  1786. (const "cc")
  1787. (const "all"))
  1788. :group 'mh-sending-mail
  1789. :package-version '(MH-E . "6.0"))
  1790. (defcustom-mh mh-reply-show-message-flag t
  1791. "*Non-nil means the MH-Show buffer is displayed when replying.
  1792. If you include the message automatically, you can hide the
  1793. MH-Show buffer by turning off this option.
  1794. See also `mh-reply'."
  1795. :type 'boolean
  1796. :group 'mh-sending-mail
  1797. :package-version '(MH-E . "7.0"))
  1798. ;;; Sequences (:group 'mh-sequences)
  1799. ;; If `mh-unpropagated-sequences' becomes a defcustom, add the following to
  1800. ;; the docstring: "Additional sequences that should not to be preserved can be
  1801. ;; specified by setting `mh-unpropagated-sequences' appropriately." XXX
  1802. (defcustom-mh mh-refile-preserves-sequences-flag t
  1803. "*Non-nil means that sequences are preserved when messages are refiled.
  1804. If a message is in any sequence (except \"Previous-Sequence:\"
  1805. and \"cur\") when it is refiled, then it will still be in those
  1806. sequences in the destination folder. If this behavior is not
  1807. desired, then turn off this option."
  1808. :type 'boolean
  1809. :group 'mh-sequences
  1810. :package-version '(MH-E . "7.4"))
  1811. (defcustom-mh mh-tick-seq 'tick
  1812. "The name of the MH sequence for ticked messages.
  1813. You can customize this option if you already use the \"tick\"
  1814. sequence for your own use. You can also disable all of the
  1815. ticking functions by choosing the \"Disable Ticking\" item but
  1816. there isn't much advantage to that."
  1817. :type '(choice (const :tag "Disable Ticking" nil)
  1818. symbol)
  1819. :group 'mh-sequences
  1820. :package-version '(MH-E . "7.3"))
  1821. (defcustom-mh mh-update-sequences-after-mh-show-flag t
  1822. "*Non-nil means flush MH sequences to disk after message is shown\\<mh-folder-mode-map>.
  1823. Three sequences are maintained internally by MH-E and pushed out
  1824. to MH when a message is shown. They include the sequence
  1825. specified by your \"Unseen-Sequence:\" profile entry, \"cur\",
  1826. and the sequence listed by the option `mh-tick-seq' which is
  1827. \"tick\" by default. If you do not like this behavior, turn off
  1828. this option. You can then update the state manually with the
  1829. \\[mh-execute-commands], \\[mh-quit], or \\[mh-update-sequences]
  1830. commands."
  1831. :type 'boolean
  1832. :group 'mh-sequences
  1833. :package-version '(MH-E . "7.0"))
  1834. ;;; Reading Your Mail (:group 'mh-show)
  1835. (defcustom-mh mh-bury-show-buffer-flag t
  1836. "*Non-nil means show buffer is buried.
  1837. One advantage of not burying the show buffer is that one can
  1838. delete the show buffer more easily in an electric buffer list
  1839. because of its proximity to its associated MH-Folder buffer. Try
  1840. running \\[electric-buffer-list] to see what I mean."
  1841. :type 'boolean
  1842. :group 'mh-show
  1843. :package-version '(MH-E . "7.0"))
  1844. (defcustom-mh mh-clean-message-header-flag t
  1845. "*Non-nil means remove extraneous header fields.
  1846. See also `mh-invisible-header-fields-default' and
  1847. `mh-invisible-header-fields'."
  1848. :type 'boolean
  1849. :group 'mh-show
  1850. :package-version '(MH-E . "7.0"))
  1851. (defcustom-mh mh-decode-mime-flag (not (not (locate-library "mm-decode")))
  1852. "*Non-nil means attachments are handled\\<mh-folder-mode-map>.
  1853. MH-E can handle attachments as well if the Gnus `mm-decode'
  1854. library is present. If so, this option will be on. Otherwise,
  1855. you'll see the MIME body parts rather than text or attachments.
  1856. There isn't much point in turning off this option; however, you
  1857. can inspect it if it appears that the body parts are not being
  1858. interpreted correctly or toggle it with the command
  1859. \\[mh-toggle-mh-decode-mime-flag] to view the raw message.
  1860. This option also controls the display of quoted-printable
  1861. messages and other graphical widgets. See the options
  1862. `mh-graphical-smileys-flag' and `mh-graphical-emphasis-flag'."
  1863. :type 'boolean
  1864. :group 'mh-show
  1865. :package-version '(MH-E . "7.0"))
  1866. (defcustom-mh mh-display-buttons-for-alternatives-flag nil
  1867. "*Non-nil means display buttons for all alternative attachments.
  1868. Sometimes, a mail program will produce multiple alternatives of
  1869. the attachment in increasing degree of faithfulness to the
  1870. original content. By default, only the preferred alternative is
  1871. displayed. If this option is on, then the preferred part is shown
  1872. inline and buttons are shown for each of the other alternatives."
  1873. :type 'boolean
  1874. :group 'mh-show
  1875. :package-version '(MH-E . "7.4"))
  1876. (defcustom-mh mh-display-buttons-for-inline-parts-flag nil
  1877. "*Non-nil means display buttons for all inline attachments\\<mh-folder-mode-map>.
  1878. The sender can request that attachments should be viewed inline so
  1879. that they do not really appear like an attachment at all to the
  1880. reader. Most of the time, this is desirable, so by default MH-E
  1881. suppresses the buttons for inline attachments. On the other hand, you
  1882. may receive code or HTML which the sender has added to his message as
  1883. inline attachments so that you can read them in MH-E. In this case, it
  1884. is useful to see the buttons so that you know you don't have to cut
  1885. and paste the code into a file; you can simply save the attachment.
  1886. If you want to make the buttons visible for inline attachments, you
  1887. can use the command \\[mh-toggle-mime-buttons] to toggle the
  1888. visibility of these buttons. You can turn on these buttons permanently
  1889. by turning on this option.
  1890. MH-E cannot display all attachments inline however. It can display
  1891. text (including HTML) and images."
  1892. :type 'boolean
  1893. :group 'mh-show
  1894. :package-version '(MH-E . "7.0"))
  1895. (defcustom-mh mh-do-not-confirm-flag nil
  1896. "*Non-nil means non-reversible commands do not prompt for confirmation.
  1897. Commands such as `mh-pack-folder' prompt to confirm whether to
  1898. process outstanding moves and deletes or not before continuing.
  1899. Turning on this option means that these actions will be
  1900. performed--which is usually desired but cannot be
  1901. retracted--without question."
  1902. :type 'boolean
  1903. :group 'mh-show
  1904. :package-version '(MH-E . "7.0"))
  1905. (defcustom-mh mh-fetch-x-image-url nil
  1906. "*Control fetching of \"X-Image-URL:\" header field image.
  1907. Ths option controls the fetching of the \"X-Image-URL:\" header
  1908. field image with the following values:
  1909. Ask Before Fetching
  1910. You are prompted before the image is fetched. MH-E will
  1911. remember your reply and will either use the already fetched
  1912. image the next time the same URL is encountered or silently
  1913. skip it if you didn't fetch it the first time. This is a
  1914. good setting.
  1915. Never Fetch
  1916. Images are never fetched and only displayed if they are
  1917. already present in the cache. This is the default.
  1918. There isn't a value of \"Always Fetch\" for privacy and DOS (denial of
  1919. service) reasons. For example, fetching a URL can tip off a spammer
  1920. that you've read his email (which is why you shouldn't blindly answer
  1921. yes if you've set this option to \"Ask Before Fetching\"). Someone may
  1922. also flood your network and fill your disk drive by sending a torrent
  1923. of messages, each specifying a unique URL to a very large file.
  1924. The cache of images is found in the directory \".mhe-x-image-cache\"
  1925. within your MH directory. You can add your own face to the \"From:\"
  1926. field too. See Info node `(mh-e)Picture'.
  1927. This setting only has effect if the option `mh-show-use-xface-flag' is
  1928. turned on."
  1929. :type '(choice (const :tag "Ask Before Fetching" ask)
  1930. (const :tag "Never Fetch" nil))
  1931. :group 'mh-show
  1932. :package-version '(MH-E . "7.3"))
  1933. (defcustom-mh mh-graphical-smileys-flag t
  1934. "*Non-nil means graphical smileys are displayed.
  1935. It is a long standing custom to inject body language using a
  1936. cornucopia of punctuation, also known as the \"smileys\". MH-E
  1937. can render these as graphical widgets if this option is turned
  1938. on, which it is by default. Smileys include patterns such as :-)
  1939. and ;-).
  1940. This option is disabled if the option `mh-decode-mime-flag' is
  1941. turned off."
  1942. :type 'boolean
  1943. :group 'mh-show
  1944. :package-version '(MH-E . "7.0"))
  1945. (defcustom-mh mh-graphical-emphasis-flag t
  1946. "*Non-nil means graphical emphasis is displayed.
  1947. A few typesetting features are indicated in ASCII text with
  1948. certain characters. If your terminal supports it, MH-E can render
  1949. these typesetting directives naturally if this option is turned
  1950. on, which it is by default. For example, _underline_ will be
  1951. underlined, *bold* will appear in bold, /italics/ will appear in
  1952. italics, and so on. See the option `gnus-emphasis-alist' for the
  1953. whole list.
  1954. This option is disabled if the option `mh-decode-mime-flag' is
  1955. turned off."
  1956. :type 'boolean
  1957. :group 'mh-show
  1958. :package-version '(MH-E . "7.0"))
  1959. (defcustom-mh mh-highlight-citation-style 'gnus
  1960. "Style for highlighting citations.
  1961. If the sender of the message has cited other messages in his
  1962. message, then MH-E will highlight these citations to emphasize
  1963. the sender's actual response. This option can be customized to
  1964. change the highlighting style. The \"Multicolor\" method uses a
  1965. different color for each indentation while the \"Monochrome\"
  1966. method highlights all citations in red. To disable highlighting
  1967. of citations entirely, choose \"None\"."
  1968. :type '(choice (const :tag "Multicolor" gnus)
  1969. (const :tag "Monochrome" font-lock)
  1970. (const :tag "None" nil))
  1971. :group 'mh-show
  1972. :package-version '(MH-E . "8.0"))
  1973. ;; These entries have been intentionally excluded by the developers.
  1974. ;; "Comments:" ; RFC 2822 - show this one
  1975. ;; "Fax:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  1976. ;; "Mail-System-Version:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  1977. ;; "Mailer:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  1978. ;; "Organization:" ;
  1979. ;; "Phone:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  1980. ;; "Reply-By:" ; RFC 2156
  1981. ;; "Reply-To:" ; RFC 2822
  1982. ;; "Sender:" ;
  1983. ;; "User-Agent:" ; Similar to X-Mailer, so display it.
  1984. ;; "X-Mailer:" ;
  1985. ;; "X-Operator:" ; Similar to X-Mailer, so display it
  1986. ;; Keep fields alphabetized (set sort-fold-case to t first).
  1987. ;; Mention source, if known.
  1988. (defvar mh-invisible-header-fields-internal
  1989. '(
  1990. "Abuse-Reports-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  1991. "Accept-Language:"
  1992. "AcceptLanguage:"
  1993. "Accreditor:" ; Habeas
  1994. "Also-Control:" ; H. Spencer: News Article Format and Transmission, June 1994
  1995. "Alternate-recipient:" ; RFC 2156
  1996. "Approved-By:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  1997. "Approved:" ; RFC 1036
  1998. "Article-Names:" ; H. Spencer: News Article Format and Transmission, June 1994
  1999. "Article-Updates:" ; H. Spencer: News Article Format and Transmission, June 1994
  2000. "Authentication-Results:"
  2001. "Auto-forwarded:" ; RFC 2156
  2002. "Autoforwarded:" ; RFC 2156
  2003. "Bestservhost:"
  2004. "Bytes:"
  2005. "Cancel-Key:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2006. "Cancel-Lock:" ; NNTP posts
  2007. "Comment:" ; Shows up with DomainKeys
  2008. "Content-" ; RFC 2045, 1123, 1766, 1864, 2045, 2110, 2156, 2183, 2912
  2009. "Control:" ; RFC 1036
  2010. "Conversion-With-Loss:" ; RFC 2156
  2011. "Conversion:" ; RFC 2156
  2012. "Delivered-To:" ; Egroups/yahoogroups mailing list manager
  2013. "Delivery-Date:" ; RFC 2156
  2014. "Delivery:"
  2015. "Discarded-X400-" ; RFC 2156
  2016. "Disclose-Recipients:" ; RFC 2156
  2017. "Disposition-Notification-Options:" ; RFC 2298
  2018. "Disposition-Notification-To:" ; RFC 2298
  2019. "Distribution:" ; RFC 1036
  2020. "DKIM-" ; http://antispam.yahoo.com/domainkeys
  2021. "DL-Expansion-History:" ; RFC 2156
  2022. "DomainKey-" ; http://antispam.yahoo.com/domainkeys
  2023. "DomainKey-Signature:"
  2024. "Encoding:" ; RFC 1505
  2025. "Envelope-to:"
  2026. "Errors-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2027. "Expires:" ; RFC 1036
  2028. "Expiry-Date:" ; RFC 2156
  2029. "Face:" ; Gnus Face header
  2030. "Followup-To:" ; RFC 1036
  2031. "For-Approval:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2032. "For-Comment:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2033. "For-Handling:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2034. "Forwarded:" ; MH
  2035. "From " ; sendmail
  2036. "Generate-Delivery-Report:" ; RFC 2156
  2037. "Importance:" ; RFC 2156, 2421
  2038. "In-Reply-To:" ; RFC 2822
  2039. "Incomplete-Copy:" ; RFC 2156
  2040. "Keywords:" ; RFC 2822
  2041. "Language:" ; RFC 2156
  2042. "Lines:" ; RFC 1036
  2043. "List-" ; RFC 2369, 2919
  2044. "Mail-Copies-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2045. "Mail-Followup-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2046. "Mail-from:" ; MH
  2047. "Mail-Reply-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2048. "Mailing-List:" ; Egroups/yahoogroups mailing list manager
  2049. "Message-Content:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2050. "Message-Id:" ; RFC 822
  2051. "Message-Type:" ; RFC 2156
  2052. "Mime-Version" ; RFC 2045
  2053. "Msgid:"
  2054. "NNTP-" ; News
  2055. "Obsoletes:" ; RFC 2156
  2056. "Old-Return-Path:"
  2057. "OpenPGP:"
  2058. "Original-Encoded-Information-Types:" ; RFC 2156
  2059. "Original-Lines:" ; mail to news
  2060. "Original-Newsgroups:" ; mail to news
  2061. "Original-NNTP-" ; mail to news
  2062. "Original-Path:" ; mail to news
  2063. "Original-Received:" ; mail to news
  2064. "Original-Recipient:" ; RFC 2298
  2065. "Original-To:" ; mail to news
  2066. "Original-X-" ; mail to news
  2067. "Origination-Client:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2068. "Originator:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2069. "P1-Content-Type:" ; X400
  2070. "P1-Message-Id:" ; X400
  2071. "P1-Recipient:" ; X400
  2072. "Path:" ; RFC 1036
  2073. "Pics-Label:" ; W3C
  2074. "Posted-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2075. "Precedence:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2076. "Prev-Resent" ; MH
  2077. "Prevent-NonDelivery-Report:" ; RFC 2156
  2078. "Priority:" ; RFC 2156
  2079. "Read-Receipt-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2080. "Received-SPF:" ; Gmail
  2081. "Received:" ; RFC 822
  2082. "References:" ; RFC 2822
  2083. "Registered-Mail-Reply-Requested-By:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2084. "Remailed-" ; MH
  2085. "Replaces:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2086. "Replied:" ; MH
  2087. "Resent-" ; RFC 2822
  2088. "Return-Path:" ; RFC 822
  2089. "Return-Receipt-Requested:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2090. "Return-Receipt-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2091. "Seal-Send-Time:"
  2092. "See-Also:" ; H. Spencer: News Article Format and Transmission, June 1994
  2093. "Sensitivity:" ; RFC 2156, 2421
  2094. "Speech-Act:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2095. "Status:" ; sendmail
  2096. "Supersedes:" ; H. Spencer: News Article Format and Transmission, June 1994
  2097. "Telefax:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2098. "Thread-"
  2099. "Thread-Index:"
  2100. "Thread-Topic:"
  2101. "Translated-By:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2102. "Translation-Of:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2103. "Ua-Content-Id:" ; X400
  2104. "Via:" ; MH
  2105. "X-Abuse-and-DMCA-"
  2106. "X-Abuse-Info:"
  2107. "X-Accept-Language:" ; Netscape/Mozilla
  2108. "X-Ack:"
  2109. "X-Admin:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2110. "X-Administrivia-To:"
  2111. "X-AMAZON" ; Amazon.com
  2112. "X-AntiAbuse:" ; cPanel
  2113. "X-Antivirus-Scanner:"
  2114. "X-AOL-IP:" ; AOL WebMail
  2115. "X-Apparently-From:" ; MS Outlook
  2116. "X-Apparently-To:" ; Egroups/yahoogroups mailing list manager
  2117. "X-Attribution:"
  2118. "X-AuditID:"
  2119. "X-Authenticated-Info:" ; Verizon.net?
  2120. "X-Authenticated-Sender:" ; AT&T Message Center (webmail)
  2121. "X-Authentication-Warning:" ; sendmail
  2122. "X-Authority-Analysis:"
  2123. "X-Barracuda-" ; Barracuda spam scores
  2124. "X-Beenthere:" ; Mailman mailing list manager
  2125. "X-Bigfish:"
  2126. "X-Bogosity:" ; bogofilter
  2127. "X-Brightmail-Tracker:" ; Brightmail
  2128. "X-BrightmailFiltered:" ; Brightmail
  2129. "X-Bugzilla-" ; Bugzilla
  2130. "X-Campaignid:"
  2131. "X-Comment:" ; AT&T Mailennium
  2132. "X-Complaints-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2133. "X-Confirm-Reading-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2134. "X-Content-Filtered-By:"
  2135. "X-ContentStamp:" ; NetZero
  2136. "X-Country-Chain:" ; http://www.declude.com/x-note.htm
  2137. "X-Cr-Hashedpuzzle:"
  2138. "X-Cr-Puzzleid:"
  2139. "X-Cron-Env:"
  2140. "X-DCC-Usenix-Metrics:"
  2141. "X-Declude-" ; http://www.declude.com/x-note.htm
  2142. "X-Dedicated:"
  2143. "X-Delivered"
  2144. "X-DH-Virus-"
  2145. "X-DMCA"
  2146. "X-Domain:"
  2147. "X-Echelon-Distraction"
  2148. "X-EFL-Spamscore:" ; MIT alumni spam filtering
  2149. "X-eGroups-" ; Egroups/yahoogroups mailing list manager
  2150. "X-EID:"
  2151. "X-ELNK-Trace:" ; Earthlink mailer
  2152. "X-Enigmail-Version:"
  2153. "X-Envelope-Date:" ; GNU mailutils
  2154. "X-Envelope-From:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2155. "X-Envelope-Sender:"
  2156. "X-Envelope-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2157. "X-EviteMessageId:" ; evite.com
  2158. "X-Evolution:" ; Evolution mail client
  2159. "X-ExtLoop"
  2160. "X-Face:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2161. "X-fmx-"
  2162. "X-Folder:" ; Spam
  2163. "X-From-Line"
  2164. "X-Gmail-" ; Gmail
  2165. "X-Gnus-Mail-Source:" ; gnus
  2166. "X-Google-" ; Google mail
  2167. "X-Google-Sender-Auth:"
  2168. "X-Greylist:" ; milter-greylist-1.2.1
  2169. "X-Habeas-SWE-" ; Spam
  2170. "X-Hashcash:" ; hashcash
  2171. "X-HPL-"
  2172. "X-HR-"
  2173. "X-HTTP-UserAgent:"
  2174. "X-Hz" ; Hertz
  2175. "X-Identity:" ; http://www.declude.com/x-note.htm
  2176. "X-Image-URL:"
  2177. "X-IMAP:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2178. "X-Info:" ; NTMail
  2179. "X-IronPort-" ; IronPort AV
  2180. "X-ISI-4-30-3-MailScanner:"
  2181. "X-J2-"
  2182. "X-Juno-" ; Juno
  2183. "X-Key:"
  2184. "X-List-Host:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2185. "X-List-Subscribe:" ; Unknown mailing list managers
  2186. "X-List-Unsubscribe:" ; Unknown mailing list managers
  2187. "X-Listprocessor-" ; ListProc(tm) by CREN
  2188. "X-Listserver:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2189. "X-Loop:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2190. "X-Lrde-Mailscanner:"
  2191. "X-Lumos-SenderID:" ; Roving ConstantContact
  2192. "X-Mail-from:" ; fastmail.fm
  2193. "X-MAIL-INFO:" ; NetZero
  2194. "X-Mailer_"
  2195. "X-Mailing-List:" ; Unknown mailing list managers
  2196. "X-Mailman-Approved-At:" ; Mailman mailing list manager
  2197. "X-Mailman-Version:" ; Mailman mailing list manager
  2198. "X-MailScanner" ; ListProc(tm) by CREN
  2199. "X-Mailutils-Message-Id" ; GNU Mailutils
  2200. "X-Majordomo:" ; Majordomo mailing list manager
  2201. "X-MB-Message-" ; AOL WebMail
  2202. "X-MDaemon-Deliver-To:"
  2203. "X-MDRemoteIP:"
  2204. "X-Message-Id"
  2205. "X-Message-Type:"
  2206. "X-MessageWall-Score:" ; Unknown mailing list manager, AUC TeX
  2207. "X-MHE-Checksum:" ; Checksum added during index search
  2208. "X-MIME-Autoconverted:" ; sendmail
  2209. "X-MIMEOLE:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/sendmail
  2210. "X-MIMETrack:"
  2211. "X-Mms-" ; T-Mobile pictures
  2212. "X-Mozilla-Status:" ; Netscape/Mozilla
  2213. "X-MS-" ; MS Outlook
  2214. "X-Msmail-" ; MS Outlook
  2215. "X-MSMail-Priority" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2216. "X-NAI-Spam-" ; Network Associates Inc. SpamKiller
  2217. "X-News:" ; News
  2218. "X-Newsreader:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2219. "X-No-Archive:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2220. "X-Notes-Item:" ; Lotus Notes Domino structured header
  2221. "X-OperatingSystem:"
  2222. "X-ORBL:"
  2223. "X-Orcl-Content-Type:"
  2224. "X-Organization:"
  2225. "X-Original-Arrival-Type:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2226. "X-Original-Complaints-To:"
  2227. "X-Original-Date:" ; SourceForge mailing list manager
  2228. "X-Original-To:"
  2229. "X-Original-Trace:"
  2230. "X-OriginalArrivalTime:" ; Hotmail
  2231. "X-Originating-Email:" ; Hotmail
  2232. "X-Originating-IP:" ; Hotmail
  2233. "X-pair-"
  2234. "X-PGP:"
  2235. "X-PID:"
  2236. "X-PMG-"
  2237. "X-PMX-Version:"
  2238. "X-Postfilter:"
  2239. "X-Priority:" ; MS Outlook
  2240. "X-Proofpoint-" ; Proofpoint mail filter
  2241. "X-Provags-ID:"
  2242. "X-PSTN-"
  2243. "X-Qotd-" ; User added
  2244. "X-RCPT-TO:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2245. "X-Received-Date:"
  2246. "X-Received:"
  2247. "X-Report-Abuse-To:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2248. "X-Request-"
  2249. "X-Resolved-to:" ; fastmail.fm
  2250. "X-Return-Path-Hint:" ; Roving ConstantContact
  2251. "X-RIM-" ; Research In Motion (i.e. BlackBerry)
  2252. "X-RM"
  2253. "X-RocketYMMF:" ; Yahoo
  2254. "X-Roving-" ; Roving ConstantContact
  2255. "X-SA-Exim-" ; Exim SpamAssassin
  2256. "X-Sasl-enc:" ; Apple Mail
  2257. "X-SBClass:" ; Spam
  2258. "X-SBNote:" ; Spam
  2259. "X-SBPass:" ; Spam
  2260. "X-SBRS:"
  2261. "X-SBRule:" ; Spam
  2262. "X-Scanned-By:"
  2263. "X-Sender:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2264. "X-Server-Date:"
  2265. "X-Server-Uuid:"
  2266. "X-Service-Code:"
  2267. "X-Sieve:" ; Sieve filtering
  2268. "X-SMTP-"
  2269. "X-Source"
  2270. "X-Spam-" ; Spamassassin
  2271. "X-SpamBouncer:" ; Spam
  2272. "X-SPF-"
  2273. "X-Status"
  2274. "X-Submission-Address:"
  2275. "X-Submissions-To:"
  2276. "X-Sun-Charset:"
  2277. "X-Telecom-Digest"
  2278. "X-Trace:"
  2279. "X-UID"
  2280. "X-UIDL:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2281. "X-Unity"
  2282. "X-UNTD-" ; NetZero
  2283. "X-URI:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2284. "X-URL:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2285. "X-USANET-" ; usa.net
  2286. "X-Usenet-Provider"
  2287. "X-UserInfo1:"
  2288. "X-Virus-" ;
  2289. "X-Vms-To:"
  2290. "X-VSMLoop:" ; NTMail
  2291. "X-WebTV-Signature:"
  2292. "X-Wss-Id:" ; Worldtalk gateways
  2293. "X-X-Sender:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
  2294. "X-Yahoo"
  2295. "X-Yahoo-Newman-"
  2296. "X-YMail-"
  2297. "X400-" ; X400
  2298. "Xref:" ; RFC 1036
  2299. )
  2300. "List of default header fields that are not to be shown.
  2301. Do not alter this variable directly. Instead, add entries from
  2302. here that you would like to be displayed in
  2303. `mh-invisible-header-fields-default' and add entries to hide in
  2304. `mh-invisible-header-fields'.")
  2305. (eval-and-compile
  2306. (unless (fboundp 'mh-invisible-headers)
  2307. (defun mh-invisible-headers ()
  2308. "Temporary definition.
  2309. Real definition, below, uses variables that aren't defined yet."
  2310. nil)))
  2311. (defvar mh-delay-invisible-header-generation-flag t
  2312. "Non-nil means to delay the generation of invisible header fields.
  2313. Because the function `mh-invisible-headers' uses both
  2314. `mh-invisible-header-fields' and `mh-invisible-header-fields', it
  2315. cannot be run until both variables have been initialized.")
  2316. (defcustom-mh mh-invisible-header-fields nil
  2317. "*Additional header fields to hide.
  2318. Header fields that you would like to hide that aren't listed in
  2319. `mh-invisible-header-fields-default' can be added to this option
  2320. with a couple of caveats. Regular expressions are not allowed.
  2321. Unique fields should have a \":\" suffix; otherwise, the element
  2322. can be used to render invisible an entire class of fields that
  2323. start with the same prefix.
  2324. If you think a header field should be generally ignored, please
  2325. update SF #1916032 (see URL
  2326. `https://sourceforge.net/tracker/index.php?func=detail&aid=1916032&group_id=13357&atid=113357').
  2327. See also `mh-clean-message-header-flag'."
  2328. :type '(repeat (string :tag "Header field"))
  2329. :set (lambda (symbol value)
  2330. (set-default symbol value)
  2331. (mh-invisible-headers))
  2332. :group 'mh-show
  2333. :package-version '(MH-E . "7.1"))
  2334. (defcustom-mh mh-invisible-header-fields-default nil
  2335. "*List of hidden header fields.
  2336. The header fields listed in this option are hidden, although you
  2337. can check off any field that you would like to see.
  2338. Header fields that you would like to hide that aren't listed can
  2339. be added to the option `mh-invisible-header-fields'.
  2340. See also `mh-clean-message-header-flag'.
  2341. If you think a header field should be added to this list, please
  2342. update SF #1916032 (see URL
  2343. `https://sourceforge.net/tracker/index.php?func=detail&aid=1916032&group_id=13357&atid=113357')."
  2344. :type `(set ,@(mapcar (lambda (x) `(const ,x))
  2345. mh-invisible-header-fields-internal))
  2346. :set (lambda (symbol value)
  2347. (set-default symbol value)
  2348. (mh-invisible-headers))
  2349. :group 'mh-show
  2350. :package-version '(MH-E . "8.0"))
  2351. (defvar mh-invisible-header-fields-compiled nil
  2352. "*Regexp matching lines in a message header that are not to be shown.
  2353. Do not alter this variable directly. Instead, customize
  2354. `mh-invisible-header-fields-default' checking for fields normally
  2355. hidden that you wish to display, and add extra entries to hide in
  2356. `mh-invisible-header-fields'.")
  2357. (defun mh-invisible-headers ()
  2358. "Make or remake the variable `mh-invisible-header-fields-compiled'.
  2359. Done using `mh-invisible-header-fields-internal' as input, from
  2360. which entries from `mh-invisible-header-fields-default' are
  2361. removed and entries from `mh-invisible-header-fields' are added."
  2362. (let ((fields mh-invisible-header-fields-internal))
  2363. (when mh-invisible-header-fields-default
  2364. ;; Remove entries from `mh-invisible-header-fields-default'
  2365. (setq fields
  2366. (loop for x in fields
  2367. unless (member x mh-invisible-header-fields-default)
  2368. collect x)))
  2369. (when (and (boundp 'mh-invisible-header-fields)
  2370. mh-invisible-header-fields)
  2371. (dolist (x mh-invisible-header-fields)
  2372. (unless (member x fields) (setq fields (cons x fields)))))
  2373. (if fields
  2374. (setq mh-invisible-header-fields-compiled
  2375. (concat
  2376. "^"
  2377. ;; workaround for insufficient default
  2378. (let ((max-specpdl-size 1000))
  2379. (regexp-opt fields t))))
  2380. (setq mh-invisible-header-fields-compiled nil))))
  2381. ;; Compile invisible header fields.
  2382. (mh-invisible-headers)
  2383. (defcustom-mh mh-lpr-command-format "lpr -J '%s'"
  2384. "*Command used to print\\<mh-folder-mode-map>.
  2385. This option contains the Unix command line which performs the
  2386. actual printing for the \\[mh-print-msg] command. The string can
  2387. contain one escape, \"%s\", which is replaced by the name of the
  2388. folder and the message number and is useful for print job names.
  2389. I use \"mpage -h'%s' -b Letter -H1of -mlrtb -P\" which produces a
  2390. nice header and adds a bit of margin so the text fits within my
  2391. printer's margins.
  2392. This options is not used by the commands \\[mh-ps-print-msg] or
  2393. \\[mh-ps-print-msg-file]."
  2394. :type 'string
  2395. :group 'mh-show
  2396. :package-version '(MH-E . "6.0"))
  2397. (defcustom-mh mh-max-inline-image-height nil
  2398. "*Maximum inline image height if \"Content-Disposition:\" is not present.
  2399. Some older mail programs do not insert this needed plumbing to
  2400. tell MH-E whether to display the attachments inline or not. If
  2401. this is the case, MH-E will display these images inline if they
  2402. are smaller than the window. However, you might want to allow
  2403. larger images to be displayed inline. To do this, you can change
  2404. the options `mh-max-inline-image-width' and
  2405. `mh-max-inline-image-height' from their default value of zero to
  2406. a large number. The size of your screen is a good choice for
  2407. these numbers."
  2408. :type '(choice (const nil) integer)
  2409. :group 'mh-show
  2410. :package-version '(MH-E . "7.0"))
  2411. (defcustom-mh mh-max-inline-image-width nil
  2412. "*Maximum inline image width if \"Content-Disposition:\" is not present.
  2413. Some older mail programs do not insert this needed plumbing to
  2414. tell MH-E whether to display the attachments inline or not. If
  2415. this is the case, MH-E will display these images inline if they
  2416. are smaller than the window. However, you might want to allow
  2417. larger images to be displayed inline. To do this, you can change
  2418. the options `mh-max-inline-image-width' and
  2419. `mh-max-inline-image-height' from their default value of zero to
  2420. a large number. The size of your screen is a good choice for
  2421. these numbers."
  2422. :type '(choice (const nil) integer)
  2423. :group 'mh-show
  2424. :package-version '(MH-E . "7.0"))
  2425. (defcustom-mh mh-mhl-format-file nil
  2426. "*Specifies the format file to pass to the \"mhl\" program.
  2427. Normally MH-E takes care of displaying messages itself (rather than
  2428. calling an MH program to do the work). If you'd rather have \"mhl\"
  2429. display the message (within MH-E), change this option from its default
  2430. value of \"Use Default mhl Format (Printing Only)\".
  2431. You can set this option to \"Use Default mhl Format\" to get the same
  2432. output as you would get if you ran \"mhl\" from the shell.
  2433. If you have a format file that you want MH-E to use, you can set this
  2434. option to \"Specify an mhl Format File\" and enter the name of your
  2435. format file. Your format file should specify a non-zero value for
  2436. \"overflowoffset\" to allow MH-E to parse the header. Note that
  2437. \"mhl\" is always used for printing and forwarding; in this case, the
  2438. value of this option is consulted if you have specified a format
  2439. file."
  2440. :type '(choice (const :tag "Use Default mhl Format (Printing Only)" nil)
  2441. (const :tag "Use Default mhl Format" t)
  2442. (file :tag "Specify an mhl Format File"))
  2443. :group 'mh-show
  2444. :package-version '(MH-E . "8.0"))
  2445. (defcustom-mh mh-mime-save-parts-default-directory t
  2446. "Default directory to use for \\<mh-folder-mode-map>\\[mh-mime-save-parts].
  2447. The default value for this option is \"Prompt Always\" so that
  2448. you are always prompted for the directory in which to save the
  2449. attachments. However, if you usually use the same directory
  2450. within a session, then you can set this option to \"Prompt the
  2451. First Time\" to avoid the prompt each time. you can make this
  2452. directory permanent by choosing \"Directory\" and entering the
  2453. directory's name."
  2454. :type '(choice (const :tag "Prompt the First Time" nil)
  2455. (const :tag "Prompt Always" t)
  2456. directory)
  2457. :group 'mh-show
  2458. :package-version '(MH-E . "7.0"))
  2459. (defcustom-mh mh-print-background-flag nil
  2460. "*Non-nil means messages should be printed in the background\\<mh-folder-mode-map>.
  2461. Normally messages are printed in the foreground. If this is slow on
  2462. your system, you may elect to turn off this option to print in the
  2463. background.
  2464. WARNING: If you do this, do not delete the message until it is printed
  2465. or else the output may be truncated.
  2466. This option is not used by the commands \\[mh-ps-print-msg] or
  2467. \\[mh-ps-print-msg-file]."
  2468. :type 'boolean
  2469. :group 'mh-show
  2470. :package-version '(MH-E . "7.0"))
  2471. (defcustom-mh mh-show-maximum-size 0
  2472. "*Maximum size of message (in bytes) to display automatically.
  2473. This option provides an opportunity to skip over large messages
  2474. which may be slow to load. The default value of 0 means that all
  2475. message are shown regardless of size."
  2476. :type 'integer
  2477. :group 'mh-show
  2478. :package-version '(MH-E . "8.0"))
  2479. (defcustom-mh mh-show-use-xface-flag (>= emacs-major-version 21)
  2480. "*Non-nil means display face images in MH-show buffers.
  2481. MH-E can display the content of \"Face:\", \"X-Face:\", and
  2482. \"X-Image-URL:\" header fields. If any of these fields occur in the
  2483. header of your message, the sender's face will appear in the \"From:\"
  2484. header field. If more than one of these fields appear, then the first
  2485. field found in the order \"Face:\", \"X-Face:\", and \"X-Image-URL:\"
  2486. will be used.
  2487. The option `mh-show-use-xface-flag' is used to turn this feature on
  2488. and off. This feature will be turned on by default if your system
  2489. supports it.
  2490. The first header field used, if present, is the Gnus-specific
  2491. \"Face:\" field. The \"Face:\" field appeared in GNU Emacs 21 and
  2492. XEmacs. For more information, see URL
  2493. `http://quimby.gnus.org/circus/face/'. Next is the traditional
  2494. \"X-Face:\" header field. The display of this field requires the
  2495. \"uncompface\" program (see URL
  2496. `ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.z'). Recent
  2497. versions of XEmacs have internal support for \"X-Face:\" images. If
  2498. your version of XEmacs does not, then you'll need both \"uncompface\"
  2499. and the x-face package (see URL `ftp://ftp.jpl.org/pub/elisp/').
  2500. Finally, MH-E will display images referenced by the \"X-Image-URL:\"
  2501. header field if neither the \"Face:\" nor the \"X-Face:\" fields are
  2502. present. The display of the images requires \"wget\" (see URL
  2503. `http://www.gnu.org/software/wget/wget.html'), \"fetch\", or \"curl\"
  2504. to fetch the image and the \"convert\" program from the ImageMagick
  2505. suite (see URL `http://www.imagemagick.org/'). Of the three header
  2506. fields this is the most efficient in terms of network usage since the
  2507. image doesn't need to be transmitted with every single mail.
  2508. The option `mh-fetch-x-image-url' controls the fetching of the
  2509. \"X-Image-URL:\" header field image."
  2510. :type 'boolean
  2511. :group 'mh-show
  2512. :package-version '(MH-E . "7.0"))
  2513. (defcustom-mh mh-store-default-directory nil
  2514. "*Default directory for \\<mh-folder-mode-map>\\[mh-store-msg].
  2515. If you would like to change the initial default directory,
  2516. customize this option, change the value from \"Current\" to
  2517. \"Directory\", and then enter the name of the directory for storing
  2518. the content of these messages."
  2519. :type '(choice (const :tag "Current" nil)
  2520. directory)
  2521. :group 'mh-show
  2522. :package-version '(MH-E . "6.0"))
  2523. (defcustom-mh mh-summary-height nil
  2524. "*Number of lines in MH-Folder buffer (including the mode line).
  2525. The default value of this option is \"Automatic\" which means
  2526. that the MH-Folder buffer will maintain the same proportional
  2527. size if the frame is resized. If you'd prefer a fixed height,
  2528. then choose the \"Fixed Size\" option and enter the number of
  2529. lines you'd like to see."
  2530. :type '(choice (const :tag "Automatic" nil)
  2531. (integer :tag "Fixed Size"))
  2532. :group 'mh-show
  2533. :package-version '(MH-E . "7.4"))
  2534. ;;; The Speedbar (:group 'mh-speedbar)
  2535. (defcustom-mh mh-speed-update-interval 60
  2536. "Time between speedbar updates in seconds.
  2537. Set to 0 to disable automatic update."
  2538. :type 'integer
  2539. :group 'mh-speedbar
  2540. :package-version '(MH-E . "8.0"))
  2541. ;;; Threading (:group 'mh-thread)
  2542. (defcustom-mh mh-show-threads-flag nil
  2543. "*Non-nil means new folders start in threaded mode.
  2544. Threading large number of messages can be time consuming so this
  2545. option is turned off by default. If you turn this option on, then
  2546. threading will be done only if the number of messages being
  2547. threaded is less than `mh-large-folder'."
  2548. :type 'boolean
  2549. :group 'mh-thread
  2550. :package-version '(MH-E . "7.1"))
  2551. ;;; The Tool Bar (:group 'mh-tool-bar)
  2552. ;; mh-tool-bar-folder-buttons and mh-tool-bar-letter-buttons defined
  2553. ;; dynamically in mh-tool-bar.el.
  2554. (defcustom-mh mh-tool-bar-search-function 'mh-search
  2555. "*Function called by the tool bar search button.
  2556. By default, this is set to `mh-search'. You can also choose
  2557. \"Other Function\" from the \"Value Menu\" and enter a function
  2558. of your own choosing."
  2559. :type '(choice (const mh-search)
  2560. (function :tag "Other Function"))
  2561. :group 'mh-tool-bar
  2562. :package-version '(MH-E . "7.0"))
  2563. ;; XEmacs has a couple of extra customizations...
  2564. (mh-do-in-xemacs
  2565. (defcustom-mh mh-xemacs-use-tool-bar-flag mh-xemacs-has-tool-bar-flag
  2566. "*If non-nil, use tool bar.
  2567. This option controls whether to show the MH-E icons at all. By
  2568. default, this option is turned on if the window system supports
  2569. tool bars. If your system doesn't support tool bars, then you
  2570. won't be able to turn on this option."
  2571. :type 'boolean
  2572. :group 'mh-tool-bar
  2573. :set (lambda (symbol value)
  2574. (if (and (eq value t)
  2575. (not mh-xemacs-has-tool-bar-flag))
  2576. (error "Tool bar not supported"))
  2577. (set-default symbol value))
  2578. :package-version '(MH-E . "7.3"))
  2579. (defcustom-mh mh-xemacs-tool-bar-position nil
  2580. "*Tool bar location.
  2581. This option controls the placement of the tool bar along the four
  2582. edges of the frame. You can choose from one of \"Same As Default
  2583. Tool Bar\", \"Top\", \"Bottom\", \"Left\", or \"Right\". If this
  2584. variable is set to anything other than \"Same As Default Tool
  2585. Bar\" and the default tool bar is in a different location, then
  2586. two tool bars will be displayed: the MH-E tool bar and the
  2587. default tool bar."
  2588. :type '(radio (const :tag "Same As Default Tool Bar" :value nil)
  2589. (const :tag "Top" :value top)
  2590. (const :tag "Bottom" :value bottom)
  2591. (const :tag "Left" :value left)
  2592. (const :tag "Right" :value right))
  2593. :group 'mh-tool-bar
  2594. :package-version '(MH-E . "7.3")))
  2595. ;;; Hooks (:group 'mh-hooks + group where hook described)
  2596. (defcustom-mh mh-after-commands-processed-hook nil
  2597. "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] after performing outstanding refile and delete requests.
  2598. Variables that are useful in this hook include
  2599. `mh-folders-changed', which lists which folders were affected by
  2600. deletes and refiles. This list will always include the current
  2601. folder, which is also available in `mh-current-folder'."
  2602. :type 'hook
  2603. :group 'mh-hooks
  2604. :group 'mh-folder
  2605. :package-version '(MH-E . "8.0"))
  2606. (defcustom-mh mh-alias-reloaded-hook nil
  2607. "Hook run by `mh-alias-reload' after loading aliases."
  2608. :type 'hook
  2609. :group 'mh-hooks
  2610. :group 'mh-alias
  2611. :package-version '(MH-E . "8.0"))
  2612. (defcustom-mh mh-annotate-msg-hook nil
  2613. "Hook run whenever a message is sent and after the scan lines and message are annotated.
  2614. Hook functions can access the current folder name with
  2615. `mh-current-folder' and obtain the message numbers of the
  2616. annotated messages with `mh-annotate-list'."
  2617. :type 'hook
  2618. :group 'mh-hooks
  2619. :group 'mh-sending-mail
  2620. :package-version '(MH-E . "8.1"))
  2621. (defcustom-mh mh-before-commands-processed-hook nil
  2622. "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] before performing outstanding refile and delete requests.
  2623. Variables that are useful in this hook include `mh-delete-list'
  2624. and `mh-refile-list' which can be used to see which changes will
  2625. be made to the current folder, `mh-current-folder'."
  2626. :type 'hook
  2627. :group 'mh-hooks
  2628. :group 'mh-folder
  2629. :package-version '(MH-E . "8.0"))
  2630. (defcustom-mh mh-before-quit-hook nil
  2631. "Hook run by \\<mh-folder-mode-map>\\[mh-quit] before quitting MH-E.
  2632. This hook is called before the quit occurs, so you might use it
  2633. to perform any MH-E operations; you could perform some query and
  2634. abort the quit or call `mh-execute-commands', for example.
  2635. See also `mh-quit-hook'."
  2636. :type 'hook
  2637. :group 'mh-hooks
  2638. :group 'mh-folder
  2639. :package-version '(MH-E . "6.0"))
  2640. (defcustom-mh mh-before-send-letter-hook nil
  2641. "Hook run at the beginning of the \\<mh-letter-mode-map>\\[mh-send-letter] command.
  2642. For example, if you want to check your spelling in your message
  2643. before sending, add the `ispell-message' function."
  2644. :type 'hook
  2645. :options '(ispell-message)
  2646. :group 'mh-hooks
  2647. :group 'mh-letter
  2648. :package-version '(MH-E . "6.0"))
  2649. (defcustom-mh mh-delete-msg-hook nil
  2650. "Hook run by \\<mh-letter-mode-map>\\[mh-delete-msg] after marking each message for deletion.
  2651. For example, a past maintainer of MH-E used this once when he
  2652. kept statistics on his mail usage."
  2653. :type 'hook
  2654. :group 'mh-hooks
  2655. :group 'mh-show
  2656. :package-version '(MH-E . "6.0"))
  2657. (defcustom-mh mh-find-path-hook nil
  2658. "Hook run by `mh-find-path' after reading the user's MH profile.
  2659. This hook can be used the change the value of the variables that
  2660. `mh-find-path' sets if you need to run with different values
  2661. between MH and MH-E."
  2662. :type 'hook
  2663. :group 'mh-hooks
  2664. :group 'mh-e
  2665. :package-version '(MH-E . "7.0"))
  2666. (defcustom-mh mh-folder-mode-hook nil
  2667. "Hook run by `mh-folder-mode' when visiting a new folder."
  2668. :type 'hook
  2669. :group 'mh-hooks
  2670. :group 'mh-folder
  2671. :package-version '(MH-E . "6.0"))
  2672. (defcustom-mh mh-forward-hook nil
  2673. "Hook run by `mh-forward' on a forwarded letter."
  2674. :type 'hook
  2675. :group 'mh-hooks
  2676. :group 'mh-sending-mail
  2677. :package-version '(MH-E . "8.0"))
  2678. (defcustom-mh mh-inc-folder-hook nil
  2679. "Hook run by \\<mh-folder-mode-map>\\[mh-inc-folder] after incorporating mail into a folder."
  2680. :type 'hook
  2681. :group 'mh-hooks
  2682. :group 'mh-inc
  2683. :package-version '(MH-E . "6.0"))
  2684. (defcustom-mh mh-insert-signature-hook nil
  2685. "Hook run by \\<mh-letter-mode-map>\\[mh-insert-signature] after signature has been inserted.
  2686. Hook functions may access the actual name of the file or the
  2687. function used to insert the signature with
  2688. `mh-signature-file-name'."
  2689. :type 'hook
  2690. :group 'mh-hooks
  2691. :group 'mh-letter
  2692. :package-version '(MH-E . "8.0"))
  2693. (defcustom-mh mh-kill-folder-suppress-prompt-hooks '(mh-search-p)
  2694. "Abnormal hook run at the beginning of \\<mh-folder-mode-map>\\[mh-kill-folder].
  2695. The hook functions are called with no arguments and should return
  2696. a non-nil value to suppress the normal prompt when you remove a
  2697. folder. This is useful for folders that are easily regenerated.
  2698. The default value of `mh-search-p' suppresses the prompt on
  2699. folders generated by searching.
  2700. WARNING: Use this hook with care. If there is a bug in your hook
  2701. which returns t on \"+inbox\" and you hit \\[mh-kill-folder] by
  2702. accident in the \"+inbox\" folder, you will not be happy."
  2703. :type 'hook
  2704. :group 'mh-hooks
  2705. :group 'mh-folder
  2706. :package-version '(MH-E . "7.4"))
  2707. (defcustom-mh mh-letter-mode-hook nil
  2708. "Hook run by `mh-letter-mode' on a new letter.
  2709. This hook allows you to do some processing before editing a
  2710. letter. For example, you may wish to modify the header after
  2711. \"repl\" has done its work, or you may have a complicated
  2712. \"components\" file and need to tell MH-E where the cursor should
  2713. go."
  2714. :type 'hook
  2715. :group 'mh-hooks
  2716. :group 'mh-sending-mail
  2717. :package-version '(MH-E . "6.0"))
  2718. (defcustom-mh mh-mh-to-mime-hook nil
  2719. "Hook run on the formatted letter by \\<mh-letter-mode-map>\\[mh-mh-to-mime]."
  2720. :type 'hook
  2721. :group 'mh-hooks
  2722. :group 'mh-letter
  2723. :package-version '(MH-E . "8.0"))
  2724. (defcustom-mh mh-search-mode-hook nil
  2725. "Hook run upon entry to `mh-search-mode'\\<mh-folder-mode-map>.
  2726. If you find that you do the same thing over and over when editing
  2727. the search template, you may wish to bind some shortcuts to keys.
  2728. This can be done with this hook which is called when
  2729. \\[mh-search] is run on a new pattern."
  2730. :type 'hook
  2731. :group 'mh-hooks
  2732. :group 'mh-search
  2733. :package-version '(MH-E . "8.0"))
  2734. (defcustom-mh mh-pack-folder-hook nil
  2735. "Hook run by \\<mh-folder-mode-map>\\[mh-pack-folder] after renumbering the messages.
  2736. Hook functions can access the current folder name with `mh-current-folder'."
  2737. :type 'hook
  2738. :group 'mh-hooks
  2739. :group 'mh-folder
  2740. :package-version '(MH-E . "8.2"))
  2741. (defcustom-mh mh-quit-hook nil
  2742. "Hook run by \\<mh-folder-mode-map>\\[mh-quit] after quitting MH-E.
  2743. This hook is not run in an MH-E context, so you might use it to
  2744. modify the window setup.
  2745. See also `mh-before-quit-hook'."
  2746. :type 'hook
  2747. :group 'mh-hooks
  2748. :group 'mh-folder
  2749. :package-version '(MH-E . "6.0"))
  2750. (defcustom-mh mh-refile-msg-hook nil
  2751. "Hook run by \\<mh-folder-mode-map>\\[mh-refile-msg] after marking each message for refiling."
  2752. :type 'hook
  2753. :group 'mh-hooks
  2754. :group 'mh-folder
  2755. :package-version '(MH-E . "6.0"))
  2756. (defcustom-mh mh-show-hook nil
  2757. "Hook run after \\<mh-folder-mode-map>\\[mh-show] shows a message.
  2758. It is the last thing called after messages are displayed. It's
  2759. used to affect the behavior of MH-E in general or when
  2760. `mh-show-mode-hook' is too early. See `mh-show-mode-hook'."
  2761. :type 'hook
  2762. :group 'mh-hooks
  2763. :group 'mh-show
  2764. :package-version '(MH-E . "6.0"))
  2765. (defcustom-mh mh-show-mode-hook nil
  2766. "Hook run upon entry to `mh-show-mode'.
  2767. This hook is called early on in the process of the message
  2768. display. It is usually used to perform some action on the
  2769. message's content. See `mh-show-hook'."
  2770. :type 'hook
  2771. :group 'mh-hooks
  2772. :group 'mh-show
  2773. :package-version '(MH-E . "6.0"))
  2774. (defcustom-mh mh-unseen-updated-hook nil
  2775. "Hook run after the unseen sequence has been updated.
  2776. The variable `mh-seen-list' can be used by this hook to obtain
  2777. the list of messages which were removed from the unseen
  2778. sequence."
  2779. :type 'hook
  2780. :group 'mh-hooks
  2781. :group 'mh-sequences
  2782. :package-version '(MH-E . "6.0"))
  2783. ;;; Faces (:group 'mh-faces + group where faces described)
  2784. (if (boundp 'facemenu-unlisted-faces)
  2785. (add-to-list 'facemenu-unlisted-faces "^mh-"))
  2786. ;; To add a new face:
  2787. ;; 1. Add entry to variable mh-face-data.
  2788. ;; 2. Create face using defface-mh (which removes min-color spec and
  2789. ;; :package-version keyword where these are not supported),
  2790. ;; accessing face data with function mh-face-data.
  2791. ;; 3. Add inherit argument to function mh-face-data if applicable.
  2792. (defvar mh-face-data
  2793. '((mh-folder-followup
  2794. ((((class color) (background light))
  2795. (:foreground "blue3"))
  2796. (((class color) (background dark))
  2797. (:foreground "LightGoldenRod"))
  2798. (t
  2799. (:bold t))))
  2800. (mh-folder-msg-number
  2801. ((((class color) (min-colors 64) (background light))
  2802. (:foreground "snow4"))
  2803. (((class color) (min-colors 64) (background dark))
  2804. (:foreground "snow3"))
  2805. (((class color) (background light))
  2806. (:foreground "purple"))
  2807. (((class color) (background dark))
  2808. (:foreground "cyan"))))
  2809. (mh-folder-refiled
  2810. ((((class color) (min-colors 64) (background light))
  2811. (:foreground "DarkGoldenrod"))
  2812. (((class color) (min-colors 64) (background dark))
  2813. (:foreground "LightGoldenrod"))
  2814. (((class color))
  2815. (:foreground "yellow" :weight light))
  2816. (((class grayscale) (background light))
  2817. (:foreground "Gray90" :bold t :italic t))
  2818. (((class grayscale) (background dark))
  2819. (:foreground "DimGray" :bold t :italic t))
  2820. (t
  2821. (:bold t :italic t))))
  2822. (mh-folder-subject
  2823. ((((class color) (background light))
  2824. (:foreground "blue4"))
  2825. (((class color) (background dark))
  2826. (:foreground "yellow"))
  2827. (t
  2828. (:bold t))))
  2829. (mh-folder-tick
  2830. ((((class color) (background light))
  2831. (:background "#dddf7e"))
  2832. (((class color) (background dark))
  2833. (:background "#dddf7e"))
  2834. (t
  2835. (:underline t))))
  2836. (mh-folder-to
  2837. ((((class color) (min-colors 64) (background light))
  2838. (:foreground "RosyBrown"))
  2839. (((class color) (min-colors 64) (background dark))
  2840. (:foreground "LightSalmon"))
  2841. (((class color))
  2842. (:foreground "green"))
  2843. (((class grayscale) (background light))
  2844. (:foreground "DimGray" :italic t))
  2845. (((class grayscale) (background dark))
  2846. (:foreground "LightGray" :italic t))
  2847. (t
  2848. (:italic t))))
  2849. (mh-letter-header-field
  2850. ((((class color) (background light))
  2851. (:background "gray90"))
  2852. (((class color) (background dark))
  2853. (:background "gray10"))
  2854. (t
  2855. (:bold t))))
  2856. (mh-search-folder
  2857. ((((class color) (background light))
  2858. (:foreground "dark green" :bold t))
  2859. (((class color) (background dark))
  2860. (:foreground "indian red" :bold t))
  2861. (t
  2862. (:bold t))))
  2863. (mh-show-cc
  2864. ((((class color) (min-colors 64) (background light))
  2865. (:foreground "DarkGoldenrod"))
  2866. (((class color) (min-colors 64) (background dark))
  2867. (:foreground "LightGoldenrod"))
  2868. (((class color))
  2869. (:foreground "yellow" :weight light))
  2870. (((class grayscale) (background light))
  2871. (:foreground "Gray90" :bold t :italic t))
  2872. (((class grayscale) (background dark))
  2873. (:foreground "DimGray" :bold t :italic t))
  2874. (t
  2875. (:bold t :italic t))))
  2876. (mh-show-date
  2877. ((((class color) (min-colors 64) (background light))
  2878. (:foreground "ForestGreen"))
  2879. (((class color) (min-colors 64) (background dark))
  2880. (:foreground "PaleGreen"))
  2881. (((class color))
  2882. (:foreground "green"))
  2883. (((class grayscale) (background light))
  2884. (:foreground "Gray90" :bold t))
  2885. (((class grayscale) (background dark))
  2886. (:foreground "DimGray" :bold t))
  2887. (t
  2888. (:bold t :underline t))))
  2889. (mh-show-from
  2890. ((((class color) (background light))
  2891. (:foreground "red3"))
  2892. (((class color) (background dark))
  2893. (:foreground "cyan"))
  2894. (t
  2895. (:bold t))))
  2896. (mh-show-header
  2897. ((((class color) (min-colors 64) (background light))
  2898. (:foreground "RosyBrown"))
  2899. (((class color) (min-colors 64) (background dark))
  2900. (:foreground "LightSalmon"))
  2901. (((class color))
  2902. (:foreground "green"))
  2903. (((class grayscale) (background light))
  2904. (:foreground "DimGray" :italic t))
  2905. (((class grayscale) (background dark))
  2906. (:foreground "LightGray" :italic t))
  2907. (t
  2908. (:italic t))))
  2909. (mh-show-pgg-bad ((t (:bold t :foreground "DeepPink1"))))
  2910. (mh-show-pgg-good ((t (:bold t :foreground "LimeGreen"))))
  2911. (mh-show-pgg-unknown ((t (:bold t :foreground "DarkGoldenrod2"))))
  2912. (mh-show-signature ((t (:italic t))))
  2913. (mh-show-to
  2914. ((((class color) (background light))
  2915. (:foreground "SaddleBrown"))
  2916. (((class color) (background dark))
  2917. (:foreground "burlywood"))
  2918. (((class grayscale) (background light))
  2919. (:foreground "DimGray" :underline t))
  2920. (((class grayscale) (background dark))
  2921. (:foreground "LightGray" :underline t))
  2922. (t (:underline t))))
  2923. (mh-speedbar-folder
  2924. ((((class color) (background light))
  2925. (:foreground "blue4"))
  2926. (((class color) (background dark))
  2927. (:foreground "light blue"))))
  2928. (mh-speedbar-selected-folder
  2929. ((((class color) (background light))
  2930. (:foreground "red1" :underline t))
  2931. (((class color) (background dark))
  2932. (:foreground "red1" :underline t))
  2933. (t
  2934. (:underline t)))))
  2935. "MH-E face data.
  2936. Used by function `mh-face-data' which returns spec that is
  2937. consumed by `defface-mh'.")
  2938. (require 'cus-face)
  2939. (defvar mh-inherit-face-flag (assq :inherit custom-face-attributes)
  2940. "Non-nil means that the `defface' :inherit keyword is available.
  2941. The :inherit keyword is available on all supported versions of
  2942. GNU Emacs and XEmacs from at least 21.5.23 on.")
  2943. (defvar mh-min-colors-defined-flag (and (not (featurep 'xemacs))
  2944. (>= emacs-major-version 22))
  2945. "Non-nil means `defface' supports min-colors display requirement.")
  2946. (defun mh-face-data (face &optional inherit)
  2947. "Return spec for FACE.
  2948. See `defface' for the spec definition.
  2949. If INHERIT is non-nil and `defface' supports the :inherit
  2950. keyword, return INHERIT literally; otherwise, return spec for
  2951. FACE from the variable `mh-face-data'. This isn't a perfect
  2952. implementation. In the case that the :inherit keyword is not
  2953. supported, any additional attributes in the inherit parameter are
  2954. not added to the returned spec.
  2955. Furthermore, when `mh-min-colors-defined-flag' is nil, this
  2956. function finds display entries with \"min-colors\" requirements
  2957. and either removes the \"min-colors\" requirement or strips the
  2958. display entirely if the display does not support the number of
  2959. specified colors."
  2960. (let ((spec
  2961. (if (and inherit mh-inherit-face-flag)
  2962. inherit
  2963. (or (cadr (assq face mh-face-data))
  2964. (error "Could not find %s in mh-face-data" face)))))
  2965. (if mh-min-colors-defined-flag
  2966. spec
  2967. (let ((cells (mh-display-color-cells))
  2968. new-spec)
  2969. ;; Remove entries with min-colors, or delete them if we have
  2970. ;; fewer colors than they specify.
  2971. (loop for entry in (reverse spec) do
  2972. (let ((requirement (if (eq (car entry) t)
  2973. nil
  2974. (assq 'min-colors (car entry)))))
  2975. (if requirement
  2976. (when (>= cells (nth 1 requirement))
  2977. (setq new-spec (cons (cons (delq requirement (car entry))
  2978. (cdr entry))
  2979. new-spec)))
  2980. (setq new-spec (cons entry new-spec)))))
  2981. new-spec))))
  2982. (defface-mh mh-folder-address
  2983. (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject))))
  2984. "Recipient face."
  2985. :group 'mh-faces
  2986. :group 'mh-folder
  2987. :package-version '(MH-E . "8.0"))
  2988. (defface-mh mh-folder-body
  2989. (mh-face-data 'mh-folder-msg-number
  2990. '((((class color))
  2991. (:inherit mh-folder-msg-number))
  2992. (t
  2993. (:inherit mh-folder-msg-number :italic t))))
  2994. "Body text face."
  2995. :group 'mh-faces
  2996. :group 'mh-folder
  2997. :package-version '(MH-E . "8.0"))
  2998. (defface-mh mh-folder-cur-msg-number
  2999. (mh-face-data 'mh-folder-msg-number
  3000. '((t (:inherit mh-folder-msg-number :bold t))))
  3001. "Current message number face."
  3002. :group 'mh-faces
  3003. :group 'mh-folder
  3004. :package-version '(MH-E . "8.0"))
  3005. (defface-mh mh-folder-date
  3006. (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number))))
  3007. "Date face."
  3008. :group 'mh-faces
  3009. :group 'mh-folder
  3010. :package-version '(MH-E . "8.0"))
  3011. (defface-mh mh-folder-deleted
  3012. (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number))))
  3013. "Deleted message face."
  3014. :group 'mh-faces
  3015. :group 'mh-folder
  3016. :package-version '(MH-E . "8.0"))
  3017. (defface-mh mh-folder-followup (mh-face-data 'mh-folder-followup)
  3018. "\"Re:\" face."
  3019. :group 'mh-faces
  3020. :group 'mh-folder
  3021. :package-version '(MH-E . "8.0"))
  3022. (defface-mh mh-folder-msg-number (mh-face-data 'mh-folder-msg-number)
  3023. "Message number face."
  3024. :group 'mh-faces
  3025. :group 'mh-folder
  3026. :package-version '(MH-E . "8.0"))
  3027. (defface-mh mh-folder-refiled (mh-face-data 'mh-folder-refiled)
  3028. "Refiled message face."
  3029. :group 'mh-faces
  3030. :group 'mh-folder
  3031. :package-version '(MH-E . "8.0"))
  3032. (defface-mh mh-folder-sent-to-me-hint
  3033. (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-date))))
  3034. "Fontification hint face in messages sent directly to us.
  3035. The detection of messages sent to us is governed by the scan
  3036. format `mh-scan-format-nmh' and the regular expression
  3037. `mh-scan-sent-to-me-sender-regexp'."
  3038. :group 'mh-faces
  3039. :group 'mh-folder
  3040. :package-version '(MH-E . "8.0"))
  3041. (defface-mh mh-folder-sent-to-me-sender
  3042. (mh-face-data 'mh-folder-followup '((t (:inherit mh-folder-followup))))
  3043. "Sender face in messages sent directly to us.
  3044. The detection of messages sent to us is governed by the scan
  3045. format `mh-scan-format-nmh' and the regular expression
  3046. `mh-scan-sent-to-me-sender-regexp'."
  3047. :group 'mh-faces
  3048. :group 'mh-folder
  3049. :package-version '(MH-E . "8.0"))
  3050. (defface-mh mh-folder-subject (mh-face-data 'mh-folder-subject)
  3051. "Subject face."
  3052. :group 'mh-faces
  3053. :group 'mh-folder
  3054. :package-version '(MH-E . "8.0"))
  3055. (defface-mh mh-folder-tick (mh-face-data 'mh-folder-tick)
  3056. "Ticked message face."
  3057. :group 'mh-faces
  3058. :group 'mh-folder
  3059. :package-version '(MH-E . "8.0"))
  3060. (defface-mh mh-folder-to (mh-face-data 'mh-folder-to)
  3061. "\"To:\" face."
  3062. :group 'mh-faces
  3063. :group 'mh-folder
  3064. :package-version '(MH-E . "8.0"))
  3065. (defface-mh mh-letter-header-field (mh-face-data 'mh-letter-header-field)
  3066. "Editable header field value face in draft buffers."
  3067. :group 'mh-faces
  3068. :group 'mh-letter
  3069. :package-version '(MH-E . "8.0"))
  3070. (defface-mh mh-search-folder (mh-face-data 'mh-search-folder)
  3071. "Folder heading face in MH-Folder buffers created by searches."
  3072. :group 'mh-faces
  3073. :group 'mh-search
  3074. :package-version '(MH-E . "8.0"))
  3075. (defface-mh mh-show-cc (mh-face-data 'mh-show-cc)
  3076. "Face used to highlight \"cc:\" header fields."
  3077. :group 'mh-faces
  3078. :group 'mh-show
  3079. :package-version '(MH-E . "8.0"))
  3080. (defface-mh mh-show-date (mh-face-data 'mh-show-date)
  3081. "Face used to highlight \"Date:\" header fields."
  3082. :group 'mh-faces
  3083. :group 'mh-show
  3084. :package-version '(MH-E . "8.0"))
  3085. (defface-mh mh-show-from (mh-face-data 'mh-show-from)
  3086. "Face used to highlight \"From:\" header fields."
  3087. :group 'mh-faces
  3088. :group 'mh-show
  3089. :package-version '(MH-E . "8.0"))
  3090. (defface-mh mh-show-header (mh-face-data 'mh-show-header)
  3091. "Face used to deemphasize less interesting header fields."
  3092. :group 'mh-faces
  3093. :group 'mh-show
  3094. :package-version '(MH-E . "8.0"))
  3095. (defface-mh mh-show-pgg-bad (mh-face-data 'mh-show-pgg-bad)
  3096. "Bad PGG signature face."
  3097. :group 'mh-faces
  3098. :group 'mh-show
  3099. :package-version '(MH-E . "8.0"))
  3100. (defface-mh mh-show-pgg-good (mh-face-data 'mh-show-pgg-good)
  3101. "Good PGG signature face."
  3102. :group 'mh-faces
  3103. :group 'mh-show
  3104. :package-version '(MH-E . "8.0"))
  3105. (defface-mh mh-show-pgg-unknown (mh-face-data 'mh-show-pgg-unknown)
  3106. "Unknown or untrusted PGG signature face."
  3107. :group 'mh-faces
  3108. :group 'mh-show
  3109. :package-version '(MH-E . "8.0"))
  3110. (defface-mh mh-show-signature (mh-face-data 'mh-show-signature)
  3111. "Signature face."
  3112. :group 'mh-faces
  3113. :group 'mh-show
  3114. :package-version '(MH-E . "8.0"))
  3115. (defface-mh mh-show-subject
  3116. (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject))))
  3117. "Face used to highlight \"Subject:\" header fields."
  3118. :group 'mh-faces
  3119. :group 'mh-show
  3120. :package-version '(MH-E . "8.0"))
  3121. (defface-mh mh-show-to (mh-face-data 'mh-show-to)
  3122. "Face used to highlight \"To:\" header fields."
  3123. :group 'mh-faces
  3124. :group 'mh-show
  3125. :package-version '(MH-E . "8.0"))
  3126. (defface-mh mh-show-xface
  3127. (mh-face-data 'mh-show-from '((t (:inherit (mh-show-from highlight)))))
  3128. "X-Face image face.
  3129. The background and foreground are used in the image."
  3130. :group 'mh-faces
  3131. :group 'mh-show
  3132. :package-version '(MH-E . "8.0"))
  3133. (defface-mh mh-speedbar-folder (mh-face-data 'mh-speedbar-folder)
  3134. "Basic folder face."
  3135. :group 'mh-faces
  3136. :group 'mh-speedbar
  3137. :package-version '(MH-E . "8.0"))
  3138. (defface-mh mh-speedbar-folder-with-unseen-messages
  3139. (mh-face-data 'mh-speedbar-folder
  3140. '((t (:inherit mh-speedbar-folder :bold t))))
  3141. "Folder face when folder contains unread messages."
  3142. :group 'mh-faces
  3143. :group 'mh-speedbar
  3144. :package-version '(MH-E . "8.0"))
  3145. (defface-mh mh-speedbar-selected-folder
  3146. (mh-face-data 'mh-speedbar-selected-folder)
  3147. "Selected folder face."
  3148. :group 'mh-faces
  3149. :group 'mh-speedbar
  3150. :package-version '(MH-E . "8.0"))
  3151. (defface-mh mh-speedbar-selected-folder-with-unseen-messages
  3152. (mh-face-data 'mh-speedbar-selected-folder
  3153. '((t (:inherit mh-speedbar-selected-folder :bold t))))
  3154. "Selected folder face when folder contains unread messages."
  3155. :group 'mh-faces
  3156. :group 'mh-speedbar
  3157. :package-version '(MH-E . "8.0"))
  3158. (provide 'mh-e)
  3159. ;; Local Variables:
  3160. ;; indent-tabs-mode: nil
  3161. ;; sentence-end-double-space: nil
  3162. ;; End:
  3163. ;;; mh-e.el ends here