gnus.el 148 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415
  1. ;;; gnus.el --- a newsreader for GNU Emacs
  2. ;; Copyright (C) 1987-1990, 1993-1998, 2000-2012
  3. ;; Free Software Foundation, Inc.
  4. ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
  5. ;; Lars Magne Ingebrigtsen <larsi@gnus.org>
  6. ;; Keywords: news, mail
  7. ;; Version: 5.13
  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. ;;; Code:
  21. (eval '(run-hooks 'gnus-load-hook))
  22. ;; For Emacs <22.2 and XEmacs.
  23. (eval-and-compile
  24. (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
  25. (eval-when-compile (require 'cl))
  26. (require 'wid-edit)
  27. (require 'mm-util)
  28. (require 'nnheader)
  29. ;; These are defined afterwards with gnus-define-group-parameter
  30. (defvar gnus-ham-process-destinations)
  31. (defvar gnus-parameter-ham-marks-alist)
  32. (defvar gnus-parameter-spam-marks-alist)
  33. (defvar gnus-spam-autodetect)
  34. (defvar gnus-spam-autodetect-methods)
  35. (defvar gnus-spam-newsgroup-contents)
  36. (defvar gnus-spam-process-destinations)
  37. (defvar gnus-spam-resend-to)
  38. (defvar gnus-ham-resend-to)
  39. (defvar gnus-spam-process-newsgroups)
  40. (defgroup gnus nil
  41. "The coffee-brewing, all singing, all dancing, kitchen sink newsreader."
  42. :group 'news
  43. :group 'mail)
  44. (defgroup gnus-start nil
  45. "Starting your favorite newsreader."
  46. :group 'gnus)
  47. (defgroup gnus-format nil
  48. "Dealing with formatting issues."
  49. :group 'gnus)
  50. (defgroup gnus-charset nil
  51. "Group character set issues."
  52. :link '(custom-manual "(gnus)Charsets")
  53. :version "21.1"
  54. :group 'gnus)
  55. (defgroup gnus-cache nil
  56. "Cache interface."
  57. :link '(custom-manual "(gnus)Article Caching")
  58. :group 'gnus)
  59. (defgroup gnus-registry nil
  60. "Article Registry."
  61. :group 'gnus)
  62. (defgroup gnus-start-server nil
  63. "Server options at startup."
  64. :group 'gnus-start)
  65. ;; These belong to gnus-group.el.
  66. (defgroup gnus-group nil
  67. "Group buffers."
  68. :link '(custom-manual "(gnus)Group Buffer")
  69. :group 'gnus)
  70. (defgroup gnus-group-foreign nil
  71. "Foreign groups."
  72. :link '(custom-manual "(gnus)Foreign Groups")
  73. :group 'gnus-group)
  74. (defgroup gnus-group-new nil
  75. "Automatic subscription of new groups."
  76. :group 'gnus-group)
  77. (defgroup gnus-group-levels nil
  78. "Group levels."
  79. :link '(custom-manual "(gnus)Group Levels")
  80. :group 'gnus-group)
  81. (defgroup gnus-group-select nil
  82. "Selecting a Group."
  83. :link '(custom-manual "(gnus)Selecting a Group")
  84. :group 'gnus-group)
  85. (defgroup gnus-group-listing nil
  86. "Showing slices of the group list."
  87. :link '(custom-manual "(gnus)Listing Groups")
  88. :group 'gnus-group)
  89. (defgroup gnus-group-visual nil
  90. "Sorting the group buffer."
  91. :link '(custom-manual "(gnus)Group Buffer Format")
  92. :group 'gnus-group
  93. :group 'gnus-visual)
  94. (defgroup gnus-group-various nil
  95. "Various group options."
  96. :link '(custom-manual "(gnus)Scanning New Messages")
  97. :group 'gnus-group)
  98. ;; These belong to gnus-sum.el.
  99. (defgroup gnus-summary nil
  100. "Summary buffers."
  101. :link '(custom-manual "(gnus)Summary Buffer")
  102. :group 'gnus)
  103. (defgroup gnus-summary-exit nil
  104. "Leaving summary buffers."
  105. :link '(custom-manual "(gnus)Exiting the Summary Buffer")
  106. :group 'gnus-summary)
  107. (defgroup gnus-summary-marks nil
  108. "Marks used in summary buffers."
  109. :link '(custom-manual "(gnus)Marking Articles")
  110. :group 'gnus-summary)
  111. (defgroup gnus-thread nil
  112. "Ordering articles according to replies."
  113. :link '(custom-manual "(gnus)Threading")
  114. :group 'gnus-summary)
  115. (defgroup gnus-summary-format nil
  116. "Formatting of the summary buffer."
  117. :link '(custom-manual "(gnus)Summary Buffer Format")
  118. :group 'gnus-summary)
  119. (defgroup gnus-summary-choose nil
  120. "Choosing Articles."
  121. :link '(custom-manual "(gnus)Choosing Articles")
  122. :group 'gnus-summary)
  123. (defgroup gnus-summary-maneuvering nil
  124. "Summary movement commands."
  125. :link '(custom-manual "(gnus)Summary Maneuvering")
  126. :group 'gnus-summary)
  127. (defgroup gnus-picon nil
  128. "Show pictures of people, domains, and newsgroups."
  129. :group 'gnus-visual)
  130. (defgroup gnus-summary-mail nil
  131. "Mail group commands."
  132. :link '(custom-manual "(gnus)Mail Group Commands")
  133. :group 'gnus-summary)
  134. (defgroup gnus-summary-sort nil
  135. "Sorting the summary buffer."
  136. :link '(custom-manual "(gnus)Sorting the Summary Buffer")
  137. :group 'gnus-summary)
  138. (defgroup gnus-summary-visual nil
  139. "Highlighting and menus in the summary buffer."
  140. :link '(custom-manual "(gnus)Summary Highlighting")
  141. :group 'gnus-visual
  142. :group 'gnus-summary)
  143. (defgroup gnus-summary-various nil
  144. "Various summary buffer options."
  145. :link '(custom-manual "(gnus)Various Summary Stuff")
  146. :group 'gnus-summary)
  147. (defgroup gnus-summary-pick nil
  148. "Pick mode in the summary buffer."
  149. :link '(custom-manual "(gnus)Pick and Read")
  150. :prefix "gnus-pick-"
  151. :group 'gnus-summary)
  152. (defgroup gnus-summary-tree nil
  153. "Tree display of threads in the summary buffer."
  154. :link '(custom-manual "(gnus)Tree Display")
  155. :prefix "gnus-tree-"
  156. :group 'gnus-summary)
  157. ;; Belongs to gnus-uu.el
  158. (defgroup gnus-extract-view nil
  159. "Viewing extracted files."
  160. :link '(custom-manual "(gnus)Viewing Files")
  161. :group 'gnus-extract)
  162. ;; Belongs to gnus-score.el
  163. (defgroup gnus-score nil
  164. "Score and kill file handling."
  165. :group 'gnus)
  166. (defgroup gnus-score-kill nil
  167. "Kill files."
  168. :group 'gnus-score)
  169. (defgroup gnus-score-adapt nil
  170. "Adaptive score files."
  171. :group 'gnus-score)
  172. (defgroup gnus-score-default nil
  173. "Default values for score files."
  174. :group 'gnus-score)
  175. (defgroup gnus-score-expire nil
  176. "Expiring score rules."
  177. :group 'gnus-score)
  178. (defgroup gnus-score-decay nil
  179. "Decaying score rules."
  180. :group 'gnus-score)
  181. (defgroup gnus-score-files nil
  182. "Score and kill file names."
  183. :group 'gnus-score
  184. :group 'gnus-files)
  185. (defgroup gnus-score-various nil
  186. "Various scoring and killing options."
  187. :group 'gnus-score)
  188. ;; Other
  189. (defgroup gnus-visual nil
  190. "Options controlling the visual fluff."
  191. :group 'gnus
  192. :group 'faces)
  193. (defgroup gnus-agent nil
  194. "Offline support for Gnus."
  195. :group 'gnus)
  196. (defgroup gnus-files nil
  197. "Files used by Gnus."
  198. :group 'gnus)
  199. (defgroup gnus-dribble-file nil
  200. "Auto save file."
  201. :link '(custom-manual "(gnus)Auto Save")
  202. :group 'gnus-files)
  203. (defgroup gnus-newsrc nil
  204. "Storing Gnus state."
  205. :group 'gnus-files)
  206. (defgroup gnus-server nil
  207. "Options related to newsservers and other servers used by Gnus."
  208. :group 'gnus)
  209. (defgroup gnus-server-visual nil
  210. "Highlighting and menus in the server buffer."
  211. :group 'gnus-visual
  212. :group 'gnus-server)
  213. (defgroup gnus-message '((message custom-group))
  214. "Composing replies and followups in Gnus."
  215. :group 'gnus)
  216. (defgroup gnus-meta nil
  217. "Meta variables controlling major portions of Gnus.
  218. In general, modifying these variables does not take effect until Gnus
  219. is restarted, and sometimes reloaded."
  220. :group 'gnus)
  221. (defgroup gnus-various nil
  222. "Other Gnus options."
  223. :link '(custom-manual "(gnus)Various Various")
  224. :group 'gnus)
  225. (defgroup gnus-exit nil
  226. "Exiting Gnus."
  227. :link '(custom-manual "(gnus)Exiting Gnus")
  228. :group 'gnus)
  229. (defgroup gnus-fun nil
  230. "Frivolous Gnus extensions."
  231. :link '(custom-manual "(gnus)Exiting Gnus")
  232. :group 'gnus)
  233. (defconst gnus-version-number "5.13"
  234. "Version number for this version of Gnus.")
  235. (defconst gnus-version (format "Gnus v%s" gnus-version-number)
  236. "Version string for this version of Gnus.")
  237. (defcustom gnus-inhibit-startup-message nil
  238. "If non-nil, the startup message will not be displayed.
  239. This variable is used before `.gnus.el' is loaded, so it should
  240. be set in `.emacs' instead."
  241. :group 'gnus-start
  242. :type 'boolean)
  243. (unless (featurep 'gnus-xmas)
  244. (defalias 'gnus-make-overlay 'make-overlay)
  245. (defalias 'gnus-delete-overlay 'delete-overlay)
  246. (defalias 'gnus-overlay-get 'overlay-get)
  247. (defalias 'gnus-overlay-put 'overlay-put)
  248. (defalias 'gnus-move-overlay 'move-overlay)
  249. (defalias 'gnus-overlay-buffer 'overlay-buffer)
  250. (defalias 'gnus-overlay-start 'overlay-start)
  251. (defalias 'gnus-overlay-end 'overlay-end)
  252. (defalias 'gnus-overlays-in 'overlays-in)
  253. (defalias 'gnus-extent-detached-p 'ignore)
  254. (defalias 'gnus-extent-start-open 'ignore)
  255. (defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names)
  256. (defalias 'gnus-character-to-event 'identity)
  257. (defalias 'gnus-assq-delete-all 'assq-delete-all)
  258. (defalias 'gnus-add-text-properties 'add-text-properties)
  259. (defalias 'gnus-put-text-property 'put-text-property)
  260. (defvar gnus-mode-line-image-cache t)
  261. (if (fboundp 'find-image)
  262. (defun gnus-mode-line-buffer-identification (line)
  263. (let ((str (car-safe line))
  264. (load-path (mm-image-load-path)))
  265. (if (and (stringp str)
  266. (string-match "^Gnus:" str))
  267. (progn (add-text-properties
  268. 0 5
  269. (list 'display
  270. (if (eq t gnus-mode-line-image-cache)
  271. (setq gnus-mode-line-image-cache
  272. (find-image
  273. '((:type xpm :file "gnus-pointer.xpm"
  274. :ascent center)
  275. (:type xbm :file "gnus-pointer.xbm"
  276. :ascent center))))
  277. gnus-mode-line-image-cache)
  278. 'help-echo (format
  279. "This is %s, %s."
  280. gnus-version (gnus-emacs-version)))
  281. str)
  282. (list str))
  283. line)))
  284. (defalias 'gnus-mode-line-buffer-identification 'identity))
  285. (defalias 'gnus-deactivate-mark 'deactivate-mark)
  286. (defalias 'gnus-window-edges 'window-edges)
  287. (defalias 'gnus-key-press-event-p 'numberp)
  288. ;;(defalias 'gnus-decode-rfc1522 'ignore)
  289. )
  290. ;; We define these group faces here to avoid the display
  291. ;; update forced when creating new faces.
  292. (defface gnus-group-news-1
  293. '((((class color)
  294. (background dark))
  295. (:foreground "PaleTurquoise" :bold t))
  296. (((class color)
  297. (background light))
  298. (:foreground "ForestGreen" :bold t))
  299. (t
  300. ()))
  301. "Level 1 newsgroup face."
  302. :group 'gnus-group)
  303. ;; backward-compatibility alias
  304. (put 'gnus-group-news-1-face 'face-alias 'gnus-group-news-1)
  305. (put 'gnus-group-news-1-face 'obsolete-face "22.1")
  306. (defface gnus-group-news-1-empty
  307. '((((class color)
  308. (background dark))
  309. (:foreground "PaleTurquoise"))
  310. (((class color)
  311. (background light))
  312. (:foreground "ForestGreen"))
  313. (t
  314. ()))
  315. "Level 1 empty newsgroup face."
  316. :group 'gnus-group)
  317. ;; backward-compatibility alias
  318. (put 'gnus-group-news-1-empty-face 'face-alias 'gnus-group-news-1-empty)
  319. (put 'gnus-group-news-1-empty-face 'obsolete-face "22.1")
  320. (defface gnus-group-news-2
  321. '((((class color)
  322. (background dark))
  323. (:foreground "turquoise" :bold t))
  324. (((class color)
  325. (background light))
  326. (:foreground "CadetBlue4" :bold t))
  327. (t
  328. ()))
  329. "Level 2 newsgroup face."
  330. :group 'gnus-group)
  331. ;; backward-compatibility alias
  332. (put 'gnus-group-news-2-face 'face-alias 'gnus-group-news-2)
  333. (put 'gnus-group-news-2-face 'obsolete-face "22.1")
  334. (defface gnus-group-news-2-empty
  335. '((((class color)
  336. (background dark))
  337. (:foreground "turquoise"))
  338. (((class color)
  339. (background light))
  340. (:foreground "CadetBlue4"))
  341. (t
  342. ()))
  343. "Level 2 empty newsgroup face."
  344. :group 'gnus-group)
  345. ;; backward-compatibility alias
  346. (put 'gnus-group-news-2-empty-face 'face-alias 'gnus-group-news-2-empty)
  347. (put 'gnus-group-news-2-empty-face 'obsolete-face "22.1")
  348. (defface gnus-group-news-3
  349. '((((class color)
  350. (background dark))
  351. (:bold t))
  352. (((class color)
  353. (background light))
  354. (:bold t))
  355. (t
  356. ()))
  357. "Level 3 newsgroup face."
  358. :group 'gnus-group)
  359. ;; backward-compatibility alias
  360. (put 'gnus-group-news-3-face 'face-alias 'gnus-group-news-3)
  361. (put 'gnus-group-news-3-face 'obsolete-face "22.1")
  362. (defface gnus-group-news-3-empty
  363. '((((class color)
  364. (background dark))
  365. ())
  366. (((class color)
  367. (background light))
  368. ())
  369. (t
  370. ()))
  371. "Level 3 empty newsgroup face."
  372. :group 'gnus-group)
  373. ;; backward-compatibility alias
  374. (put 'gnus-group-news-3-empty-face 'face-alias 'gnus-group-news-3-empty)
  375. (put 'gnus-group-news-3-empty-face 'obsolete-face "22.1")
  376. (defface gnus-group-news-4
  377. '((((class color)
  378. (background dark))
  379. (:bold t))
  380. (((class color)
  381. (background light))
  382. (:bold t))
  383. (t
  384. ()))
  385. "Level 4 newsgroup face."
  386. :group 'gnus-group)
  387. ;; backward-compatibility alias
  388. (put 'gnus-group-news-4-face 'face-alias 'gnus-group-news-4)
  389. (put 'gnus-group-news-4-face 'obsolete-face "22.1")
  390. (defface gnus-group-news-4-empty
  391. '((((class color)
  392. (background dark))
  393. ())
  394. (((class color)
  395. (background light))
  396. ())
  397. (t
  398. ()))
  399. "Level 4 empty newsgroup face."
  400. :group 'gnus-group)
  401. ;; backward-compatibility alias
  402. (put 'gnus-group-news-4-empty-face 'face-alias 'gnus-group-news-4-empty)
  403. (put 'gnus-group-news-4-empty-face 'obsolete-face "22.1")
  404. (defface gnus-group-news-5
  405. '((((class color)
  406. (background dark))
  407. (:bold t))
  408. (((class color)
  409. (background light))
  410. (:bold t))
  411. (t
  412. ()))
  413. "Level 5 newsgroup face."
  414. :group 'gnus-group)
  415. ;; backward-compatibility alias
  416. (put 'gnus-group-news-5-face 'face-alias 'gnus-group-news-5)
  417. (put 'gnus-group-news-5-face 'obsolete-face "22.1")
  418. (defface gnus-group-news-5-empty
  419. '((((class color)
  420. (background dark))
  421. ())
  422. (((class color)
  423. (background light))
  424. ())
  425. (t
  426. ()))
  427. "Level 5 empty newsgroup face."
  428. :group 'gnus-group)
  429. ;; backward-compatibility alias
  430. (put 'gnus-group-news-5-empty-face 'face-alias 'gnus-group-news-5-empty)
  431. (put 'gnus-group-news-5-empty-face 'obsolete-face "22.1")
  432. (defface gnus-group-news-6
  433. '((((class color)
  434. (background dark))
  435. (:bold t))
  436. (((class color)
  437. (background light))
  438. (:bold t))
  439. (t
  440. ()))
  441. "Level 6 newsgroup face."
  442. :group 'gnus-group)
  443. ;; backward-compatibility alias
  444. (put 'gnus-group-news-6-face 'face-alias 'gnus-group-news-6)
  445. (put 'gnus-group-news-6-face 'obsolete-face "22.1")
  446. (defface gnus-group-news-6-empty
  447. '((((class color)
  448. (background dark))
  449. ())
  450. (((class color)
  451. (background light))
  452. ())
  453. (t
  454. ()))
  455. "Level 6 empty newsgroup face."
  456. :group 'gnus-group)
  457. ;; backward-compatibility alias
  458. (put 'gnus-group-news-6-empty-face 'face-alias 'gnus-group-news-6-empty)
  459. (put 'gnus-group-news-6-empty-face 'obsolete-face "22.1")
  460. (defface gnus-group-news-low
  461. '((((class color)
  462. (background dark))
  463. (:foreground "DarkTurquoise" :bold t))
  464. (((class color)
  465. (background light))
  466. (:foreground "DarkGreen" :bold t))
  467. (t
  468. ()))
  469. "Low level newsgroup face."
  470. :group 'gnus-group)
  471. ;; backward-compatibility alias
  472. (put 'gnus-group-news-low-face 'face-alias 'gnus-group-news-low)
  473. (put 'gnus-group-news-low-face 'obsolete-face "22.1")
  474. (defface gnus-group-news-low-empty
  475. '((((class color)
  476. (background dark))
  477. (:foreground "DarkTurquoise"))
  478. (((class color)
  479. (background light))
  480. (:foreground "DarkGreen"))
  481. (t
  482. ()))
  483. "Low level empty newsgroup face."
  484. :group 'gnus-group)
  485. ;; backward-compatibility alias
  486. (put 'gnus-group-news-low-empty-face 'face-alias 'gnus-group-news-low-empty)
  487. (put 'gnus-group-news-low-empty-face 'obsolete-face "22.1")
  488. (defface gnus-group-mail-1
  489. '((((class color)
  490. (background dark))
  491. (:foreground "#e1ffe1" :bold t))
  492. (((class color)
  493. (background light))
  494. (:foreground "DeepPink3" :bold t))
  495. (t
  496. (:bold t)))
  497. "Level 1 mailgroup face."
  498. :group 'gnus-group)
  499. ;; backward-compatibility alias
  500. (put 'gnus-group-mail-1-face 'face-alias 'gnus-group-mail-1)
  501. (put 'gnus-group-mail-1-face 'obsolete-face "22.1")
  502. (defface gnus-group-mail-1-empty
  503. '((((class color)
  504. (background dark))
  505. (:foreground "#e1ffe1"))
  506. (((class color)
  507. (background light))
  508. (:foreground "DeepPink3"))
  509. (t
  510. (:italic t :bold t)))
  511. "Level 1 empty mailgroup face."
  512. :group 'gnus-group)
  513. ;; backward-compatibility alias
  514. (put 'gnus-group-mail-1-empty-face 'face-alias 'gnus-group-mail-1-empty)
  515. (put 'gnus-group-mail-1-empty-face 'obsolete-face "22.1")
  516. (defface gnus-group-mail-2
  517. '((((class color)
  518. (background dark))
  519. (:foreground "DarkSeaGreen1" :bold t))
  520. (((class color)
  521. (background light))
  522. (:foreground "HotPink3" :bold t))
  523. (t
  524. (:bold t)))
  525. "Level 2 mailgroup face."
  526. :group 'gnus-group)
  527. ;; backward-compatibility alias
  528. (put 'gnus-group-mail-2-face 'face-alias 'gnus-group-mail-2)
  529. (put 'gnus-group-mail-2-face 'obsolete-face "22.1")
  530. (defface gnus-group-mail-2-empty
  531. '((((class color)
  532. (background dark))
  533. (:foreground "DarkSeaGreen1"))
  534. (((class color)
  535. (background light))
  536. (:foreground "HotPink3"))
  537. (t
  538. (:bold t)))
  539. "Level 2 empty mailgroup face."
  540. :group 'gnus-group)
  541. ;; backward-compatibility alias
  542. (put 'gnus-group-mail-2-empty-face 'face-alias 'gnus-group-mail-2-empty)
  543. (put 'gnus-group-mail-2-empty-face 'obsolete-face "22.1")
  544. (defface gnus-group-mail-3
  545. '((((class color)
  546. (background dark))
  547. (:foreground "aquamarine1" :bold t))
  548. (((class color)
  549. (background light))
  550. (:foreground "magenta4" :bold t))
  551. (t
  552. (:bold t)))
  553. "Level 3 mailgroup face."
  554. :group 'gnus-group)
  555. ;; backward-compatibility alias
  556. (put 'gnus-group-mail-3-face 'face-alias 'gnus-group-mail-3)
  557. (put 'gnus-group-mail-3-face 'obsolete-face "22.1")
  558. (defface gnus-group-mail-3-empty
  559. '((((class color)
  560. (background dark))
  561. (:foreground "aquamarine1"))
  562. (((class color)
  563. (background light))
  564. (:foreground "magenta4"))
  565. (t
  566. ()))
  567. "Level 3 empty mailgroup face."
  568. :group 'gnus-group)
  569. ;; backward-compatibility alias
  570. (put 'gnus-group-mail-3-empty-face 'face-alias 'gnus-group-mail-3-empty)
  571. (put 'gnus-group-mail-3-empty-face 'obsolete-face "22.1")
  572. (defface gnus-group-mail-low
  573. '((((class color)
  574. (background dark))
  575. (:foreground "aquamarine2" :bold t))
  576. (((class color)
  577. (background light))
  578. (:foreground "DeepPink4" :bold t))
  579. (t
  580. (:bold t)))
  581. "Low level mailgroup face."
  582. :group 'gnus-group)
  583. ;; backward-compatibility alias
  584. (put 'gnus-group-mail-low-face 'face-alias 'gnus-group-mail-low)
  585. (put 'gnus-group-mail-low-face 'obsolete-face "22.1")
  586. (defface gnus-group-mail-low-empty
  587. '((((class color)
  588. (background dark))
  589. (:foreground "aquamarine2"))
  590. (((class color)
  591. (background light))
  592. (:foreground "DeepPink4"))
  593. (t
  594. (:bold t)))
  595. "Low level empty mailgroup face."
  596. :group 'gnus-group)
  597. ;; backward-compatibility alias
  598. (put 'gnus-group-mail-low-empty-face 'face-alias 'gnus-group-mail-low-empty)
  599. (put 'gnus-group-mail-low-empty-face 'obsolete-face "22.1")
  600. ;; Summary mode faces.
  601. (defface gnus-summary-selected '((t (:underline t)))
  602. "Face used for selected articles."
  603. :group 'gnus-summary)
  604. ;; backward-compatibility alias
  605. (put 'gnus-summary-selected-face 'face-alias 'gnus-summary-selected)
  606. (put 'gnus-summary-selected-face 'obsolete-face "22.1")
  607. (defface gnus-summary-cancelled
  608. '((((class color))
  609. (:foreground "yellow" :background "black")))
  610. "Face used for canceled articles."
  611. :group 'gnus-summary)
  612. ;; backward-compatibility alias
  613. (put 'gnus-summary-cancelled-face 'face-alias 'gnus-summary-cancelled)
  614. (put 'gnus-summary-cancelled-face 'obsolete-face "22.1")
  615. (defface gnus-summary-high-ticked
  616. '((((class color)
  617. (background dark))
  618. (:foreground "pink" :bold t))
  619. (((class color)
  620. (background light))
  621. (:foreground "firebrick" :bold t))
  622. (t
  623. (:bold t)))
  624. "Face used for high interest ticked articles."
  625. :group 'gnus-summary)
  626. ;; backward-compatibility alias
  627. (put 'gnus-summary-high-ticked-face 'face-alias 'gnus-summary-high-ticked)
  628. (put 'gnus-summary-high-ticked-face 'obsolete-face "22.1")
  629. (defface gnus-summary-low-ticked
  630. '((((class color)
  631. (background dark))
  632. (:foreground "pink" :italic t))
  633. (((class color)
  634. (background light))
  635. (:foreground "firebrick" :italic t))
  636. (t
  637. (:italic t)))
  638. "Face used for low interest ticked articles."
  639. :group 'gnus-summary)
  640. ;; backward-compatibility alias
  641. (put 'gnus-summary-low-ticked-face 'face-alias 'gnus-summary-low-ticked)
  642. (put 'gnus-summary-low-ticked-face 'obsolete-face "22.1")
  643. (defface gnus-summary-normal-ticked
  644. '((((class color)
  645. (background dark))
  646. (:foreground "pink"))
  647. (((class color)
  648. (background light))
  649. (:foreground "firebrick"))
  650. (t
  651. ()))
  652. "Face used for normal interest ticked articles."
  653. :group 'gnus-summary)
  654. ;; backward-compatibility alias
  655. (put 'gnus-summary-normal-ticked-face 'face-alias 'gnus-summary-normal-ticked)
  656. (put 'gnus-summary-normal-ticked-face 'obsolete-face "22.1")
  657. (defface gnus-summary-high-ancient
  658. '((((class color)
  659. (background dark))
  660. (:foreground "SkyBlue" :bold t))
  661. (((class color)
  662. (background light))
  663. (:foreground "RoyalBlue" :bold t))
  664. (t
  665. (:bold t)))
  666. "Face used for high interest ancient articles."
  667. :group 'gnus-summary)
  668. ;; backward-compatibility alias
  669. (put 'gnus-summary-high-ancient-face 'face-alias 'gnus-summary-high-ancient)
  670. (put 'gnus-summary-high-ancient-face 'obsolete-face "22.1")
  671. (defface gnus-summary-low-ancient
  672. '((((class color)
  673. (background dark))
  674. (:foreground "SkyBlue" :italic t))
  675. (((class color)
  676. (background light))
  677. (:foreground "RoyalBlue" :italic t))
  678. (t
  679. (:italic t)))
  680. "Face used for low interest ancient articles."
  681. :group 'gnus-summary)
  682. ;; backward-compatibility alias
  683. (put 'gnus-summary-low-ancient-face 'face-alias 'gnus-summary-low-ancient)
  684. (put 'gnus-summary-low-ancient-face 'obsolete-face "22.1")
  685. (defface gnus-summary-normal-ancient
  686. '((((class color)
  687. (background dark))
  688. (:foreground "SkyBlue"))
  689. (((class color)
  690. (background light))
  691. (:foreground "RoyalBlue"))
  692. (t
  693. ()))
  694. "Face used for normal interest ancient articles."
  695. :group 'gnus-summary)
  696. ;; backward-compatibility alias
  697. (put 'gnus-summary-normal-ancient-face 'face-alias 'gnus-summary-normal-ancient)
  698. (put 'gnus-summary-normal-ancient-face 'obsolete-face "22.1")
  699. (defface gnus-summary-high-undownloaded
  700. '((((class color)
  701. (background light))
  702. (:bold t :foreground "cyan4"))
  703. (((class color) (background dark))
  704. (:bold t :foreground "LightGray"))
  705. (t (:inverse-video t :bold t)))
  706. "Face used for high interest uncached articles."
  707. :group 'gnus-summary)
  708. ;; backward-compatibility alias
  709. (put 'gnus-summary-high-undownloaded-face 'face-alias 'gnus-summary-high-undownloaded)
  710. (put 'gnus-summary-high-undownloaded-face 'obsolete-face "22.1")
  711. (defface gnus-summary-low-undownloaded
  712. '((((class color)
  713. (background light))
  714. (:italic t :foreground "cyan4" :bold nil))
  715. (((class color) (background dark))
  716. (:italic t :foreground "LightGray" :bold nil))
  717. (t (:inverse-video t :italic t)))
  718. "Face used for low interest uncached articles."
  719. :group 'gnus-summary)
  720. ;; backward-compatibility alias
  721. (put 'gnus-summary-low-undownloaded-face 'face-alias 'gnus-summary-low-undownloaded)
  722. (put 'gnus-summary-low-undownloaded-face 'obsolete-face "22.1")
  723. (defface gnus-summary-normal-undownloaded
  724. '((((class color)
  725. (background light))
  726. (:foreground "cyan4" :bold nil))
  727. (((class color) (background dark))
  728. (:foreground "LightGray" :bold nil))
  729. (t (:inverse-video t)))
  730. "Face used for normal interest uncached articles."
  731. :group 'gnus-summary)
  732. ;; backward-compatibility alias
  733. (put 'gnus-summary-normal-undownloaded-face 'face-alias 'gnus-summary-normal-undownloaded)
  734. (put 'gnus-summary-normal-undownloaded-face 'obsolete-face "22.1")
  735. (defface gnus-summary-high-unread
  736. '((t
  737. (:bold t)))
  738. "Face used for high interest unread articles."
  739. :group 'gnus-summary)
  740. ;; backward-compatibility alias
  741. (put 'gnus-summary-high-unread-face 'face-alias 'gnus-summary-high-unread)
  742. (put 'gnus-summary-high-unread-face 'obsolete-face "22.1")
  743. (defface gnus-summary-low-unread
  744. '((t
  745. (:italic t)))
  746. "Face used for low interest unread articles."
  747. :group 'gnus-summary)
  748. ;; backward-compatibility alias
  749. (put 'gnus-summary-low-unread-face 'face-alias 'gnus-summary-low-unread)
  750. (put 'gnus-summary-low-unread-face 'obsolete-face "22.1")
  751. (defface gnus-summary-normal-unread
  752. '((t
  753. ()))
  754. "Face used for normal interest unread articles."
  755. :group 'gnus-summary)
  756. ;; backward-compatibility alias
  757. (put 'gnus-summary-normal-unread-face 'face-alias 'gnus-summary-normal-unread)
  758. (put 'gnus-summary-normal-unread-face 'obsolete-face "22.1")
  759. (defface gnus-summary-high-read
  760. '((((class color)
  761. (background dark))
  762. (:foreground "PaleGreen"
  763. :bold t))
  764. (((class color)
  765. (background light))
  766. (:foreground "DarkGreen"
  767. :bold t))
  768. (t
  769. (:bold t)))
  770. "Face used for high interest read articles."
  771. :group 'gnus-summary)
  772. ;; backward-compatibility alias
  773. (put 'gnus-summary-high-read-face 'face-alias 'gnus-summary-high-read)
  774. (put 'gnus-summary-high-read-face 'obsolete-face "22.1")
  775. (defface gnus-summary-low-read
  776. '((((class color)
  777. (background dark))
  778. (:foreground "PaleGreen"
  779. :italic t))
  780. (((class color)
  781. (background light))
  782. (:foreground "DarkGreen"
  783. :italic t))
  784. (t
  785. (:italic t)))
  786. "Face used for low interest read articles."
  787. :group 'gnus-summary)
  788. ;; backward-compatibility alias
  789. (put 'gnus-summary-low-read-face 'face-alias 'gnus-summary-low-read)
  790. (put 'gnus-summary-low-read-face 'obsolete-face "22.1")
  791. (defface gnus-summary-normal-read
  792. '((((class color)
  793. (background dark))
  794. (:foreground "PaleGreen"))
  795. (((class color)
  796. (background light))
  797. (:foreground "DarkGreen"))
  798. (t
  799. ()))
  800. "Face used for normal interest read articles."
  801. :group 'gnus-summary)
  802. ;; backward-compatibility alias
  803. (put 'gnus-summary-normal-read-face 'face-alias 'gnus-summary-normal-read)
  804. (put 'gnus-summary-normal-read-face 'obsolete-face "22.1")
  805. ;;;
  806. ;;; Gnus buffers
  807. ;;;
  808. (defvar gnus-buffers nil
  809. "List of buffers handled by Gnus.")
  810. (defun gnus-get-buffer-create (name)
  811. "Do the same as `get-buffer-create', but store the created buffer."
  812. (or (get-buffer name)
  813. (car (push (get-buffer-create name) gnus-buffers))))
  814. (defun gnus-add-buffer ()
  815. "Add the current buffer to the list of Gnus buffers."
  816. (push (current-buffer) gnus-buffers))
  817. (defmacro gnus-kill-buffer (buffer)
  818. "Kill BUFFER and remove from the list of Gnus buffers."
  819. `(let ((buf ,buffer))
  820. (when (gnus-buffer-exists-p buf)
  821. (setq gnus-buffers (delete (get-buffer buf) gnus-buffers))
  822. (kill-buffer buf))))
  823. (defun gnus-buffers ()
  824. "Return a list of live Gnus buffers."
  825. (while (and gnus-buffers
  826. (not (buffer-name (car gnus-buffers))))
  827. (pop gnus-buffers))
  828. (let ((buffers gnus-buffers))
  829. (while (cdr buffers)
  830. (if (buffer-name (cadr buffers))
  831. (pop buffers)
  832. (setcdr buffers (cddr buffers)))))
  833. gnus-buffers)
  834. ;;; Splash screen.
  835. (defvar gnus-group-buffer "*Group*"
  836. "Name of the Gnus group buffer.")
  837. (defface gnus-splash
  838. '((((class color)
  839. (background dark))
  840. (:foreground "#cccccc"))
  841. (((class color)
  842. (background light))
  843. (:foreground "#888888"))
  844. (t
  845. ()))
  846. "Face for the splash screen."
  847. :group 'gnus-start)
  848. ;; backward-compatibility alias
  849. (put 'gnus-splash-face 'face-alias 'gnus-splash)
  850. (put 'gnus-splash-face 'obsolete-face "22.1")
  851. (defun gnus-splash ()
  852. (save-excursion
  853. (switch-to-buffer (gnus-get-buffer-create gnus-group-buffer))
  854. (let ((buffer-read-only nil))
  855. (erase-buffer)
  856. (unless gnus-inhibit-startup-message
  857. (gnus-group-startup-message)
  858. (sit-for 0)))))
  859. (defun gnus-indent-rigidly (start end arg)
  860. "Indent rigidly using only spaces and no tabs."
  861. (save-excursion
  862. (save-restriction
  863. (narrow-to-region start end)
  864. (let ((tab-width 8))
  865. (indent-rigidly start end arg)
  866. ;; We translate tabs into spaces -- not everybody uses
  867. ;; an 8-character tab.
  868. (goto-char (point-min))
  869. (while (search-forward "\t" nil t)
  870. (replace-match " " t t))))))
  871. ;;(format "%02x%02x%02x" 114 66 20) "724214"
  872. (defvar gnus-logo-color-alist
  873. '((flame "#cc3300" "#ff2200")
  874. (pine "#c0cc93" "#f8ffb8")
  875. (moss "#a1cc93" "#d2ffb8")
  876. (irish "#04cc90" "#05ff97")
  877. (sky "#049acc" "#05deff")
  878. (tin "#6886cc" "#82b6ff")
  879. (velvet "#7c68cc" "#8c82ff")
  880. (grape "#b264cc" "#cf7df")
  881. (labia "#cc64c2" "#fd7dff")
  882. (berry "#cc6485" "#ff7db5")
  883. (dino "#724214" "#1e3f03")
  884. (oort "#cccccc" "#888888")
  885. (storm "#666699" "#99ccff")
  886. (pdino "#9999cc" "#99ccff")
  887. (purp "#9999cc" "#666699")
  888. (no "#ff0000" "#ffff00")
  889. (neutral "#b4b4b4" "#878787")
  890. (september "#bf9900" "#ffcc00"))
  891. "Color alist used for the Gnus logo.")
  892. (defcustom gnus-logo-color-style 'no
  893. "*Color styles used for the Gnus logo."
  894. :type `(choice ,@(mapcar (lambda (elem) (list 'const (car elem)))
  895. gnus-logo-color-alist))
  896. :group 'gnus-xmas)
  897. (defvar gnus-logo-colors
  898. (cdr (assq gnus-logo-color-style gnus-logo-color-alist))
  899. "Colors used for the Gnus logo.")
  900. (declare-function image-size "image.c" (spec &optional pixels frame))
  901. (defun gnus-group-startup-message (&optional x y)
  902. "Insert startup message in current buffer."
  903. ;; Insert the message.
  904. (erase-buffer)
  905. (unless (and
  906. (fboundp 'find-image)
  907. (display-graphic-p)
  908. ;; Make sure the library defining `image-load-path' is
  909. ;; loaded (`find-image' is autoloaded) (and discard the
  910. ;; result). Else, we may get "defvar ignored because
  911. ;; image-load-path is let-bound" when calling `find-image'
  912. ;; below.
  913. (or (find-image '(nil (:type xpm :file "gnus.xpm"))) t)
  914. (let* ((data-directory (nnheader-find-etc-directory "images/gnus"))
  915. (image-load-path (cond (data-directory
  916. (list data-directory))
  917. ((boundp 'image-load-path)
  918. (symbol-value 'image-load-path))
  919. (t load-path)))
  920. (image (gnus-splash-svg-color-symbols (find-image
  921. `((:type svg :file "gnus.svg"
  922. :color-symbols
  923. (("#bf9900" . ,(car gnus-logo-colors))
  924. ("#ffcc00" . ,(cadr gnus-logo-colors))))
  925. (:type xpm :file "gnus.xpm"
  926. :color-symbols
  927. (("thing" . ,(car gnus-logo-colors))
  928. ("shadow" . ,(cadr gnus-logo-colors))))
  929. (:type png :file "gnus.png")
  930. (:type pbm :file "gnus.pbm"
  931. ;; Account for the pbm's background.
  932. :background ,(face-foreground 'gnus-splash)
  933. :foreground ,(face-background 'default))
  934. (:type xbm :file "gnus.xbm"
  935. ;; Account for the xbm's background.
  936. :background ,(face-foreground 'gnus-splash)
  937. :foreground ,(face-background 'default)))))))
  938. (when image
  939. (let ((size (image-size image)))
  940. (insert-char ?\n (max 0 (round (- (window-height)
  941. (or y (cdr size)) 1) 2)))
  942. (insert-char ?\ (max 0 (round (- (window-width)
  943. (or x (car size))) 2)))
  944. (insert-image image))
  945. (goto-char (point-min))
  946. t)))
  947. (insert
  948. (format "
  949. _ ___ _ _
  950. _ ___ __ ___ __ _ ___
  951. __ _ ___ __ ___
  952. _ ___ _
  953. _ _ __ _
  954. ___ __ _
  955. __ _
  956. _ _ _
  957. _ _ _
  958. _ _ _
  959. __ ___
  960. _ _ _ _
  961. _ _
  962. _ _
  963. _ _
  964. _
  965. __
  966. "))
  967. ;; And then hack it.
  968. (gnus-indent-rigidly (point-min) (point-max)
  969. (/ (max (- (window-width) (or x 46)) 0) 2))
  970. (goto-char (point-min))
  971. (forward-line 1)
  972. (let* ((pheight (count-lines (point-min) (point-max)))
  973. (wheight (window-height))
  974. (rest (- wheight pheight)))
  975. (insert (make-string (max 0 (* 2 (/ rest 3))) ?\n)))
  976. ;; Fontify some.
  977. (put-text-property (point-min) (point-max) 'face 'gnus-splash)
  978. (goto-char (point-min))
  979. (setq mode-line-buffer-identification (concat " " gnus-version))
  980. (set-buffer-modified-p t)))
  981. (defun gnus-splash-svg-color-symbols (list)
  982. "Do color-symbol search-and-replace in svg file."
  983. (let ((type (plist-get (cdr list) :type))
  984. (file (plist-get (cdr list) :file))
  985. (color-symbols (plist-get (cdr list) :color-symbols)))
  986. (if (string= type "svg")
  987. (let ((data (with-temp-buffer (insert-file-contents file)
  988. (buffer-string))))
  989. (mapc (lambda (rule)
  990. (setq data (replace-regexp-in-string
  991. (concat "fill:" (car rule))
  992. (concat "fill:" (cdr rule)) data)))
  993. color-symbols)
  994. (cons (car list) (list :type type :data data)))
  995. list)))
  996. (eval-when (load)
  997. (let ((command (format "%s" this-command)))
  998. (when (string-match "gnus" command)
  999. (if (string-match "gnus-other-frame" command)
  1000. (gnus-get-buffer-create gnus-group-buffer)
  1001. (gnus-splash)))))
  1002. ;;; Do the rest.
  1003. (require 'gnus-util)
  1004. (require 'nnheader)
  1005. (defcustom gnus-parameters nil
  1006. "Alist of group parameters.
  1007. For example:
  1008. ((\"mail\\\\..*\" (gnus-show-threads nil)
  1009. (gnus-use-scoring nil)
  1010. (gnus-summary-line-format
  1011. \"%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\\n\")
  1012. (gcc-self . t)
  1013. (display . all))
  1014. (\"mail\\\\.me\" (gnus-use-scoring t))
  1015. (\"list\\\\..*\" (total-expire . t)
  1016. (broken-reply-to . t)))"
  1017. :version "22.1"
  1018. :group 'gnus-group-various
  1019. :type '(repeat (cons regexp
  1020. (repeat sexp))))
  1021. (defcustom gnus-parameters-case-fold-search 'default
  1022. "If it is t, ignore case of group names specified in `gnus-parameters'.
  1023. If it is nil, don't ignore case. If it is `default', which is for the
  1024. backward compatibility, use the value of `case-fold-search'."
  1025. :version "22.1"
  1026. :group 'gnus-group-various
  1027. :type '(choice :format "%{%t%}:\n %[Value Menu%] %v"
  1028. (const :tag "Use `case-fold-search'" default)
  1029. (const nil)
  1030. (const t)))
  1031. (defvar gnus-group-parameters-more nil)
  1032. (defmacro gnus-define-group-parameter (param &rest rest)
  1033. "Define a group parameter PARAM.
  1034. REST is a plist of following:
  1035. :type One of `bool', `list' or nil.
  1036. :function The name of the function.
  1037. :function-document The documentation of the function.
  1038. :parameter-type The type for customizing the parameter.
  1039. :parameter-document The documentation for the parameter.
  1040. :variable The name of the variable.
  1041. :variable-document The documentation for the variable.
  1042. :variable-group The group for customizing the variable.
  1043. :variable-type The type for customizing the variable.
  1044. :variable-default The default value of the variable."
  1045. (let* ((type (plist-get rest :type))
  1046. (parameter-type (plist-get rest :parameter-type))
  1047. (parameter-document (plist-get rest :parameter-document))
  1048. (function (or (plist-get rest :function)
  1049. (intern (format "gnus-parameter-%s" param))))
  1050. (function-document (or (plist-get rest :function-document) ""))
  1051. (variable (or (plist-get rest :variable)
  1052. (intern (format "gnus-parameter-%s-alist" param))))
  1053. (variable-document (or (plist-get rest :variable-document) ""))
  1054. (variable-group (plist-get rest :variable-group))
  1055. (variable-type (or (plist-get rest :variable-type)
  1056. `(quote (repeat
  1057. (list (regexp :tag "Group")
  1058. ,(car (cdr parameter-type)))))))
  1059. (variable-default (plist-get rest :variable-default)))
  1060. (list
  1061. 'progn
  1062. `(defcustom ,variable ,variable-default
  1063. ,variable-document
  1064. :group 'gnus-group-parameter
  1065. :group ',variable-group
  1066. :type ,variable-type)
  1067. `(setq gnus-group-parameters-more
  1068. (delq (assq ',param gnus-group-parameters-more)
  1069. gnus-group-parameters-more))
  1070. `(add-to-list 'gnus-group-parameters-more
  1071. (list ',param
  1072. ,parameter-type
  1073. ,parameter-document))
  1074. (if (eq type 'bool)
  1075. `(defun ,function (name)
  1076. ,function-document
  1077. (let ((params (gnus-group-find-parameter name))
  1078. val)
  1079. (cond
  1080. ((memq ',param params)
  1081. t)
  1082. ((setq val (assq ',param params))
  1083. (cdr val))
  1084. ((stringp ,variable)
  1085. (string-match ,variable name))
  1086. (,variable
  1087. (let ((alist ,variable)
  1088. elem value)
  1089. (while (setq elem (pop alist))
  1090. (when (and name
  1091. (string-match (car elem) name))
  1092. (setq alist nil
  1093. value (cdr elem))))
  1094. (if (consp value) (car value) value))))))
  1095. `(defun ,function (name)
  1096. ,function-document
  1097. (and name
  1098. (or (gnus-group-find-parameter name ',param ,(and type t))
  1099. (let ((alist ,variable)
  1100. elem value)
  1101. (while (setq elem (pop alist))
  1102. (when (and name
  1103. (string-match (car elem) name))
  1104. (setq alist nil
  1105. value (cdr elem))))
  1106. ,(if type
  1107. 'value
  1108. '(if (consp value) (car value) value))))))))))
  1109. (defcustom gnus-home-directory "~/"
  1110. "Directory variable that specifies the \"home\" directory.
  1111. All other Gnus file and directory variables are initialized from this variable.
  1112. Note that Gnus is mostly loaded when the `.gnus.el' file is read.
  1113. This means that other directory variables that are initialized
  1114. from this variable won't be set properly if you set this variable
  1115. in `.gnus.el'. Set this variable in `.emacs' instead."
  1116. :group 'gnus-files
  1117. :type 'directory)
  1118. (defcustom gnus-directory (or (getenv "SAVEDIR")
  1119. (nnheader-concat gnus-home-directory "News/"))
  1120. "*Directory variable from which all other Gnus file variables are derived.
  1121. Note that Gnus is mostly loaded when the `.gnus.el' file is read.
  1122. This means that other directory variables that are initialized from
  1123. this variable won't be set properly if you set this variable in `.gnus.el'.
  1124. Set this variable in `.emacs' instead."
  1125. :group 'gnus-files
  1126. :type 'directory)
  1127. (defcustom gnus-default-directory nil
  1128. "*Default directory for all Gnus buffers."
  1129. :group 'gnus-files
  1130. :type '(choice (const :tag "current" nil)
  1131. directory))
  1132. ;; Site dependent variables. These variables should be defined in
  1133. ;; paths.el.
  1134. (defvar gnus-default-nntp-server nil
  1135. "Specify a default NNTP server.
  1136. This variable should be defined in paths.el, and should never be set
  1137. by the user.
  1138. If you want to change servers, you should use `gnus-select-method'.
  1139. See the documentation to that variable.")
  1140. (defcustom gnus-nntpserver-file "/etc/nntpserver"
  1141. "A file with only the name of the nntp server in it."
  1142. :group 'gnus-files
  1143. :group 'gnus-server
  1144. :type 'file)
  1145. (defun gnus-getenv-nntpserver ()
  1146. "Find default nntp server.
  1147. Check the NNTPSERVER environment variable and the
  1148. `gnus-nntpserver-file' file."
  1149. (or (getenv "NNTPSERVER")
  1150. (and (file-readable-p gnus-nntpserver-file)
  1151. (with-temp-buffer
  1152. (insert-file-contents gnus-nntpserver-file)
  1153. (when (re-search-forward "[^ \t\n\r]+" nil t)
  1154. (match-string 0))))))
  1155. ;; `M-x customize-variable RET gnus-select-method RET' should work without
  1156. ;; starting or even loading Gnus.
  1157. ;;;###autoload(when (fboundp 'custom-autoload)
  1158. ;;;###autoload (custom-autoload 'gnus-select-method "gnus"))
  1159. (defcustom gnus-select-method
  1160. (list 'nntp (or (gnus-getenv-nntpserver)
  1161. (when (and gnus-default-nntp-server
  1162. (not (string= gnus-default-nntp-server "")))
  1163. gnus-default-nntp-server)
  1164. "news"))
  1165. "Default method for selecting a newsgroup.
  1166. This variable should be a list, where the first element is how the
  1167. news is to be fetched, the second is the address.
  1168. For instance, if you want to get your news via \"flab.flab.edu\" using
  1169. NNTP, you could say:
  1170. \(setq gnus-select-method '(nntp \"flab.flab.edu\"))
  1171. If you want to use your local spool, say:
  1172. \(setq gnus-select-method (list 'nnspool (system-name)))
  1173. If you use this variable, you must set `gnus-nntp-server' to nil.
  1174. There is a lot more to know about select methods and virtual servers -
  1175. see the manual for details."
  1176. :group 'gnus-server
  1177. :group 'gnus-start
  1178. :initialize 'custom-initialize-default
  1179. :type 'gnus-select-method)
  1180. (defcustom gnus-message-archive-method "archive"
  1181. "*Method used for archiving messages you've sent.
  1182. This should be a mail method.
  1183. See also `gnus-update-message-archive-method'."
  1184. :group 'gnus-server
  1185. :group 'gnus-message
  1186. :type '(choice (const :tag "Default archive method" "archive")
  1187. gnus-select-method))
  1188. (defcustom gnus-update-message-archive-method nil
  1189. "Non-nil means always update the saved \"archive\" method.
  1190. The archive method is initially set according to the value of
  1191. `gnus-message-archive-method' and is saved in the \"~/.newsrc.eld\" file
  1192. so that it may be used as a real method of the server which is named
  1193. \"archive\" ever since. If it once has been saved, it will never be
  1194. updated if the value of this variable is nil, even if you change the
  1195. value of `gnus-message-archive-method' afterward. If you want the
  1196. saved \"archive\" method to be updated whenever you change the value of
  1197. `gnus-message-archive-method', set this variable to a non-nil value."
  1198. :version "23.1"
  1199. :group 'gnus-server
  1200. :group 'gnus-message
  1201. :type 'boolean)
  1202. (defcustom gnus-message-archive-group '((format-time-string "sent.%Y-%m"))
  1203. "*Name of the group in which to save the messages you've written.
  1204. This can either be a string; a list of strings; or an alist
  1205. of regexps/functions/forms to be evaluated to return a string (or a list
  1206. of strings). The functions are called with the name of the current
  1207. group (or nil) as a parameter.
  1208. If you want to save your mail in one group and the news articles you
  1209. write in another group, you could say something like:
  1210. \(setq gnus-message-archive-group
  1211. '((if (message-news-p)
  1212. \"misc-news\"
  1213. \"misc-mail\")))
  1214. Normally the group names returned by this variable should be
  1215. unprefixed -- which implicitly means \"store on the archive server\".
  1216. However, you may wish to store the message on some other server. In
  1217. that case, just return a fully prefixed name of the group --
  1218. \"nnml+private:mail.misc\", for instance."
  1219. :version "24.1"
  1220. :group 'gnus-message
  1221. :type '(choice (const :tag "none" nil)
  1222. (const :tag "Weekly" ((format-time-string "sent.%Yw%U")))
  1223. (const :tag "Monthly" ((format-time-string "sent.%Y-%m")))
  1224. (const :tag "Yearly" ((format-time-string "sent.%Y")))
  1225. function
  1226. sexp
  1227. string))
  1228. (defcustom gnus-secondary-servers nil
  1229. "List of NNTP servers that the user can choose between interactively.
  1230. To make Gnus query you for a server, you have to give `gnus' a
  1231. non-numeric prefix - `C-u M-x gnus', in short."
  1232. :group 'gnus-server
  1233. :type '(repeat string))
  1234. (make-obsolete-variable 'gnus-secondary-servers 'gnus-select-method "24.1")
  1235. (defcustom gnus-secondary-select-methods nil
  1236. "A list of secondary methods that will be used for reading news.
  1237. This is a list where each element is a complete select method (see
  1238. `gnus-select-method').
  1239. If, for instance, you want to read your mail with the nnml back end,
  1240. you could set this variable:
  1241. \(setq gnus-secondary-select-methods '((nnml \"\")))"
  1242. :group 'gnus-server
  1243. :type '(repeat gnus-select-method))
  1244. (defcustom gnus-local-domain nil
  1245. "Local domain name without a host name.
  1246. The DOMAINNAME environment variable is used instead if it is defined.
  1247. If the function `system-name' returns the full Internet name, there is
  1248. no need to set this variable."
  1249. :group 'gnus-message
  1250. :type '(choice (const :tag "default" nil)
  1251. string))
  1252. (make-obsolete-variable 'gnus-local-domain nil "Emacs 24.1")
  1253. ;; Customization variables
  1254. (defcustom gnus-refer-article-method 'current
  1255. "Preferred method for fetching an article by Message-ID.
  1256. The value of this variable must be a valid select method as discussed
  1257. in the documentation of `gnus-select-method'.
  1258. It can also be a list of select methods, as well as the special symbol
  1259. `current', which means to use the current select method. If it is a
  1260. list, Gnus will try all the methods in the list until it finds a match."
  1261. :version "24.1"
  1262. :group 'gnus-server
  1263. :type '(choice (const :tag "default" nil)
  1264. (const current)
  1265. (const :tag "Google" (nnweb "refer" (nnweb-type google)))
  1266. gnus-select-method
  1267. sexp
  1268. (repeat :menu-tag "Try multiple"
  1269. :tag "Multiple"
  1270. :value (current (nnweb "refer" (nnweb-type google)))
  1271. (choice :tag "Method"
  1272. (const current)
  1273. (const :tag "Google"
  1274. (nnweb "refer" (nnweb-type google)))
  1275. gnus-select-method))))
  1276. (defcustom gnus-use-cross-reference t
  1277. "*Non-nil means that cross referenced articles will be marked as read.
  1278. If nil, ignore cross references. If t, mark articles as read in
  1279. subscribed newsgroups. If neither t nor nil, mark as read in all
  1280. newsgroups."
  1281. :group 'gnus-server
  1282. :type '(choice (const :tag "off" nil)
  1283. (const :tag "subscribed" t)
  1284. (sexp :format "all"
  1285. :value always)))
  1286. (defcustom gnus-process-mark ?#
  1287. "*Process mark."
  1288. :group 'gnus-group-visual
  1289. :group 'gnus-summary-marks
  1290. :type 'character)
  1291. (defcustom gnus-large-newsgroup 200
  1292. "*The number of articles which indicates a large newsgroup.
  1293. If the number of articles in a newsgroup is greater than this value,
  1294. confirmation is required for selecting the newsgroup.
  1295. If it is nil, no confirmation is required.
  1296. Also see `gnus-large-ephemeral-newsgroup'."
  1297. :group 'gnus-group-select
  1298. :type '(choice (const :tag "No limit" nil)
  1299. integer))
  1300. (defcustom gnus-use-long-file-name (not (memq system-type '(usg-unix-v)))
  1301. "Non-nil means that the default name of a file to save articles in is the group name.
  1302. If it's nil, the directory form of the group name is used instead.
  1303. If this variable is a list, and the list contains the element
  1304. `not-score', long file names will not be used for score files; if it
  1305. contains the element `not-save', long file names will not be used for
  1306. saving; and if it contains the element `not-kill', long file names
  1307. will not be used for kill files.
  1308. Note that the default for this variable varies according to what system
  1309. type you're using. On `usg-unix-v' this variable defaults to nil while
  1310. on all other systems it defaults to t."
  1311. :group 'gnus-start
  1312. :type '(radio (sexp :format "Non-nil\n"
  1313. :match (lambda (widget value)
  1314. (and value (not (listp value))))
  1315. :value t)
  1316. (const nil)
  1317. (checklist (const :format "%v " not-score)
  1318. (const :format "%v " not-save)
  1319. (const not-kill))))
  1320. (defcustom gnus-kill-files-directory gnus-directory
  1321. "*Name of the directory where kill files will be stored (default \"~/News\")."
  1322. :group 'gnus-score-files
  1323. :group 'gnus-score-kill
  1324. :type 'directory)
  1325. (defcustom gnus-save-score nil
  1326. "*If non-nil, save group scoring info."
  1327. :group 'gnus-score-various
  1328. :group 'gnus-start
  1329. :type 'boolean)
  1330. (defcustom gnus-use-undo t
  1331. "*If non-nil, allow undoing in Gnus group mode buffers."
  1332. :group 'gnus-meta
  1333. :type 'boolean)
  1334. (defcustom gnus-use-adaptive-scoring nil
  1335. "*If non-nil, use some adaptive scoring scheme.
  1336. If a list, then the values `word' and `line' are meaningful. The
  1337. former will perform adaption on individual words in the subject
  1338. header while `line' will perform adaption on several headers."
  1339. :group 'gnus-meta
  1340. :group 'gnus-score-adapt
  1341. :type '(set (const word) (const line)))
  1342. (defcustom gnus-use-cache 'passive
  1343. "*If nil, Gnus will ignore the article cache.
  1344. If `passive', it will allow entering (and reading) articles
  1345. explicitly entered into the cache. If anything else, use the
  1346. cache to the full extent of the law."
  1347. :group 'gnus-meta
  1348. :group 'gnus-cache
  1349. :type '(choice (const :tag "off" nil)
  1350. (const :tag "passive" passive)
  1351. (const :tag "active" t)))
  1352. (defcustom gnus-use-trees nil
  1353. "*If non-nil, display a thread tree buffer."
  1354. :group 'gnus-meta
  1355. :type 'boolean)
  1356. (defcustom gnus-keep-backlog 20
  1357. "*If non-nil, Gnus will keep read articles for later re-retrieval.
  1358. If it is a number N, then Gnus will only keep the last N articles
  1359. read. If it is neither nil nor a number, Gnus will keep all read
  1360. articles. This is not a good idea."
  1361. :group 'gnus-meta
  1362. :type '(choice (const :tag "off" nil)
  1363. integer
  1364. (sexp :format "all"
  1365. :value t)))
  1366. (defcustom gnus-suppress-duplicates nil
  1367. "*If non-nil, Gnus will mark duplicate copies of the same article as read."
  1368. :group 'gnus-meta
  1369. :type 'boolean)
  1370. (defcustom gnus-use-scoring t
  1371. "*If non-nil, enable scoring."
  1372. :group 'gnus-meta
  1373. :type 'boolean)
  1374. (defcustom gnus-summary-prepare-exit-hook
  1375. '(gnus-summary-expire-articles)
  1376. "*A hook called when preparing to exit from the summary buffer.
  1377. It calls `gnus-summary-expire-articles' by default."
  1378. :group 'gnus-summary-exit
  1379. :type 'hook)
  1380. (defcustom gnus-novice-user t
  1381. "*Non-nil means that you are a Usenet novice.
  1382. If non-nil, verbose messages may be displayed and confirmations may be
  1383. required."
  1384. :group 'gnus-meta
  1385. :type 'boolean)
  1386. (defcustom gnus-expert-user nil
  1387. "*Non-nil means that you will never be asked for confirmation about anything.
  1388. That doesn't mean *anything* anything; particularly destructive
  1389. commands will still require prompting."
  1390. :group 'gnus-meta
  1391. :type 'boolean)
  1392. (defcustom gnus-interactive-catchup t
  1393. "*If non-nil, require your confirmation when catching up a group."
  1394. :group 'gnus-group-select
  1395. :type 'boolean)
  1396. (defcustom gnus-interactive-exit t
  1397. "*If non-nil, require your confirmation when exiting Gnus.
  1398. If `quiet', update any active summary buffers automatically
  1399. first before exiting."
  1400. :group 'gnus-exit
  1401. :type '(choice boolean
  1402. (const quiet)))
  1403. (defcustom gnus-extract-address-components 'gnus-extract-address-components
  1404. "*Function for extracting address components from a From header.
  1405. Two pre-defined function exist: `gnus-extract-address-components',
  1406. which is the default, quite fast, and too simplistic solution, and
  1407. `mail-extract-address-components', which works much better, but is
  1408. slower."
  1409. :group 'gnus-summary-format
  1410. :type '(radio (function-item gnus-extract-address-components)
  1411. (function-item mail-extract-address-components)
  1412. (function :tag "Other")))
  1413. (defcustom gnus-shell-command-separator ";"
  1414. "String used to separate shell commands."
  1415. :group 'gnus-files
  1416. :type 'string)
  1417. (defcustom gnus-valid-select-methods
  1418. '(("nntp" post address prompt-address physical-address)
  1419. ("nnspool" post address)
  1420. ("nnvirtual" post-mail virtual prompt-address)
  1421. ("nnmbox" mail respool address)
  1422. ("nnml" post-mail respool address)
  1423. ("nnmh" mail respool address)
  1424. ("nndir" post-mail prompt-address physical-address)
  1425. ("nneething" none address prompt-address physical-address)
  1426. ("nndoc" none address prompt-address)
  1427. ("nnbabyl" mail address respool)
  1428. ("nndraft" post-mail)
  1429. ("nnfolder" mail respool address)
  1430. ("nngateway" post-mail address prompt-address physical-address)
  1431. ("nnweb" none)
  1432. ("nnrss" none)
  1433. ("nnagent" post-mail)
  1434. ("nnimap" post-mail address prompt-address physical-address respool
  1435. server-marks)
  1436. ("nnmaildir" mail respool address server-marks)
  1437. ("nnnil" none))
  1438. "*An alist of valid select methods.
  1439. The first element of each list lists should be a string with the name
  1440. of the select method. The other elements may be the category of
  1441. this method (i. e., `post', `mail', `none' or whatever) or other
  1442. properties that this method has (like being respoolable).
  1443. If you implement a new select method, all you should have to change is
  1444. this variable. I think."
  1445. :group 'gnus-server
  1446. :type '(repeat (group (string :tag "Name")
  1447. (radio-button-choice (const :format "%v " post)
  1448. (const :format "%v " mail)
  1449. (const :format "%v " none)
  1450. (const post-mail))
  1451. (checklist :inline t
  1452. (const :format "%v " address)
  1453. (const :format "%v " prompt-address)
  1454. (const :format "%v " physical-address)
  1455. (const :format "%v " virtual)
  1456. (const respool))))
  1457. :version "24.1")
  1458. (defun gnus-redefine-select-method-widget ()
  1459. "Recomputes the select-method widget based on the value of
  1460. `gnus-valid-select-methods'."
  1461. (define-widget 'gnus-select-method 'list
  1462. "Widget for entering a select method."
  1463. :value '(nntp "")
  1464. :tag "Select Method"
  1465. :args `((choice :tag "Method"
  1466. ,@(mapcar (lambda (entry)
  1467. (list 'const :format "%v\n"
  1468. (intern (car entry))))
  1469. gnus-valid-select-methods)
  1470. (symbol :tag "other"))
  1471. (string :tag "Address")
  1472. (repeat :tag "Options"
  1473. :inline t
  1474. (list :format "%v"
  1475. variable
  1476. (sexp :tag "Value"))))))
  1477. (gnus-redefine-select-method-widget)
  1478. (defcustom gnus-updated-mode-lines '(group article summary tree)
  1479. "List of buffers that should update their mode lines.
  1480. The list may contain the symbols `group', `article', `tree' and
  1481. `summary'. If the corresponding symbol is present, Gnus will keep
  1482. that mode line updated with information that may be pertinent.
  1483. If this variable is nil, screen refresh may be quicker."
  1484. :group 'gnus-various
  1485. :type '(set (const group)
  1486. (const article)
  1487. (const summary)
  1488. (const tree)))
  1489. (defcustom gnus-mode-non-string-length 30
  1490. "*Max length of mode-line non-string contents.
  1491. If this is nil, Gnus will take space as is needed, leaving the rest
  1492. of the mode line intact."
  1493. :version "24.1"
  1494. :group 'gnus-various
  1495. :type '(choice (const nil)
  1496. integer))
  1497. ;; There should be special validation for this.
  1498. (define-widget 'gnus-email-address 'string
  1499. "An email address.")
  1500. (gnus-define-group-parameter
  1501. to-address
  1502. :function-document
  1503. "Return GROUP's to-address."
  1504. :variable-document
  1505. "*Alist of group regexps and correspondent to-addresses."
  1506. :variable-group gnus-group-parameter
  1507. :parameter-type '(gnus-email-address :tag "To Address")
  1508. :parameter-document "\
  1509. This will be used when doing followups and posts.
  1510. This is primarily useful in mail groups that represent closed
  1511. mailing lists--mailing lists where it's expected that everybody that
  1512. writes to the mailing list is subscribed to it. Since using this
  1513. parameter ensures that the mail only goes to the mailing list itself,
  1514. it means that members won't receive two copies of your followups.
  1515. Using `to-address' will actually work whether the group is foreign or
  1516. not. Let's say there's a group on the server that is called
  1517. `fa.4ad-l'. This is a real newsgroup, but the server has gotten the
  1518. articles from a mail-to-news gateway. Posting directly to this group
  1519. is therefore impossible--you have to send mail to the mailing list
  1520. address instead.
  1521. The gnus-group-split mail splitting mechanism will behave as if this
  1522. address was listed in gnus-group-split Addresses (see below).")
  1523. (gnus-define-group-parameter
  1524. to-list
  1525. :function-document
  1526. "Return GROUP's to-list."
  1527. :variable-document
  1528. "*Alist of group regexps and correspondent to-lists."
  1529. :variable-group gnus-group-parameter
  1530. :parameter-type '(gnus-email-address :tag "To List")
  1531. :parameter-document "\
  1532. This address will be used when doing a `a' in the group.
  1533. It is totally ignored when doing a followup--except that if it is
  1534. present in a news group, you'll get mail group semantics when doing
  1535. `f'.
  1536. The gnus-group-split mail splitting mechanism will behave as if this
  1537. address was listed in gnus-group-split Addresses (see below).")
  1538. (gnus-define-group-parameter
  1539. subscribed
  1540. :type bool
  1541. :function-document
  1542. "Return GROUP's subscription status."
  1543. :variable-document
  1544. "*Groups which are automatically considered subscribed."
  1545. :variable-group gnus-group-parameter
  1546. :parameter-type '(const :tag "Subscribed" t)
  1547. :parameter-document "\
  1548. Gnus assumed that you are subscribed to the To/List address.
  1549. When constructing a list of subscribed groups using
  1550. `gnus-find-subscribed-addresses', Gnus includes the To address given
  1551. above, or the list address (if the To address has not been set).")
  1552. (gnus-define-group-parameter
  1553. auto-expire
  1554. :type bool
  1555. :function gnus-group-auto-expirable-p
  1556. :function-document
  1557. "Check whether GROUP is auto-expirable or not."
  1558. :variable gnus-auto-expirable-newsgroups
  1559. :variable-default nil
  1560. :variable-document
  1561. "*Groups in which to automatically mark read articles as expirable.
  1562. If non-nil, this should be a regexp that should match all groups in
  1563. which to perform auto-expiry. This only makes sense for mail groups."
  1564. :variable-group nnmail-expire
  1565. :variable-type '(choice (const nil)
  1566. regexp)
  1567. :parameter-type '(const :tag "Automatic Expire" t)
  1568. :parameter-document
  1569. "All articles that are read will be marked as expirable.")
  1570. (gnus-define-group-parameter
  1571. total-expire
  1572. :type bool
  1573. :function gnus-group-total-expirable-p
  1574. :function-document
  1575. "Check whether GROUP is total-expirable or not."
  1576. :variable gnus-total-expirable-newsgroups
  1577. :variable-default nil
  1578. :variable-document
  1579. "*Groups in which to perform expiry of all read articles.
  1580. Use with extreme caution. All groups that match this regexp will be
  1581. expiring - which means that all read articles will be deleted after
  1582. \(say) one week. (This only goes for mail groups and the like, of
  1583. course.)"
  1584. :variable-group nnmail-expire
  1585. :variable-type '(choice (const nil)
  1586. regexp)
  1587. :parameter-type '(const :tag "Total Expire" t)
  1588. :parameter-document
  1589. "All read articles will be put through the expiry process
  1590. This happens even if they are not marked as expirable.
  1591. Use with caution.")
  1592. (gnus-define-group-parameter
  1593. charset
  1594. :function-document
  1595. "Return the default charset of GROUP."
  1596. :variable gnus-group-charset-alist
  1597. :variable-default
  1598. '(("\\(^\\|:\\)hk\\>\\|\\(^\\|:\\)tw\\>\\|\\<big5\\>" cn-big5)
  1599. ("\\(^\\|:\\)cn\\>\\|\\<chinese\\>" cn-gb-2312)
  1600. ("\\(^\\|:\\)fj\\>\\|\\(^\\|:\\)japan\\>" iso-2022-jp-2)
  1601. ("\\(^\\|:\\)tnn\\>\\|\\(^\\|:\\)pin\\>\\|\\(^\\|:\\)sci.lang.japan" iso-2022-7bit)
  1602. ("\\(^\\|:\\)relcom\\>" koi8-r)
  1603. ("\\(^\\|:\\)fido7\\>" koi8-r)
  1604. ("\\(^\\|:\\)\\(cz\\|hun\\|pl\\|sk\\|hr\\)\\>" iso-8859-2)
  1605. ("\\(^\\|:\\)israel\\>" iso-8859-1)
  1606. ("\\(^\\|:\\)han\\>" euc-kr)
  1607. ("\\(^\\|:\\)alt.chinese.text.big5\\>" chinese-big5)
  1608. ("\\(^\\|:\\)soc.culture.vietnamese\\>" vietnamese-viqr)
  1609. ("\\(^\\|:\\)\\(comp\\|rec\\|alt\\|sci\\|soc\\|news\\|gnu\\|bofh\\)\\>" iso-8859-1))
  1610. :variable-document
  1611. "Alist of regexps (to match group names) and default charsets to be used when reading."
  1612. :variable-group gnus-charset
  1613. :variable-type '(repeat (list (regexp :tag "Group")
  1614. (symbol :tag "Charset")))
  1615. :parameter-type '(symbol :tag "Charset")
  1616. :parameter-document "\
  1617. The default charset to use in the group.")
  1618. (gnus-define-group-parameter
  1619. post-method
  1620. :type list
  1621. :function-document
  1622. "Return a posting method for GROUP."
  1623. :variable gnus-post-method-alist
  1624. :variable-document
  1625. "Alist of regexps (to match group names) and method to be used when
  1626. posting an article."
  1627. :variable-group gnus-group-foreign
  1628. :parameter-type
  1629. '(choice :tag "Posting Method"
  1630. (const :tag "Use native server" native)
  1631. (const :tag "Use current server" current)
  1632. (list :convert-widget
  1633. (lambda (widget)
  1634. (list 'sexp :tag "Methods"
  1635. :value gnus-select-method))))
  1636. :parameter-document
  1637. "Posting method for this group.")
  1638. (gnus-define-group-parameter
  1639. large-newsgroup-initial
  1640. :type integer
  1641. :function-document
  1642. "Return GROUP's initial input of the number of articles."
  1643. :variable-document
  1644. "*Alist of group regexps and its initial input of the number of articles."
  1645. :variable-group gnus-group-parameter
  1646. :parameter-type '(choice :tag "Initial Input for Large Newsgroup"
  1647. (const :tag "All" nil)
  1648. (integer))
  1649. :parameter-document "\
  1650. This number will be prompted as the initial value of the number of
  1651. articles to list when the group is a large newsgroup (see
  1652. `gnus-large-newsgroup'). If it is nil, the default value is the
  1653. total number of articles in the group.")
  1654. ;; The Gnus registry's ignored groups
  1655. (gnus-define-group-parameter
  1656. registry-ignore
  1657. :type list
  1658. :function-document
  1659. "Whether this group should be ignored by the registry."
  1660. :variable gnus-registry-ignored-groups
  1661. :variable-default (mapcar
  1662. (lambda (g) (list g t))
  1663. '("delayed$" "drafts$" "queue$" "INBOX$"
  1664. "^nnmairix:" "^nnir:" "archive"))
  1665. :variable-document
  1666. "*Groups in which the registry should be turned off."
  1667. :variable-group gnus-registry
  1668. :variable-type '(repeat
  1669. (list
  1670. (regexp :tag "Group Name Regular Expression")
  1671. (boolean :tag "Ignored")))
  1672. :parameter-type '(boolean :tag "Group Ignored by the Registry")
  1673. :parameter-document
  1674. "Whether the Gnus Registry should ignore this group.")
  1675. ;; group parameters for spam processing added by Ted Zlatanov <tzz@lifelogs.com>
  1676. (defcustom gnus-install-group-spam-parameters t
  1677. "*Disable the group parameters for spam detection.
  1678. Enable if `G c' in XEmacs is giving you trouble, and make sure to submit a bug report."
  1679. :version "22.1"
  1680. :type 'boolean
  1681. :group 'gnus-start)
  1682. (when gnus-install-group-spam-parameters
  1683. (defvar gnus-group-spam-classification-spam t
  1684. "Spam group classification (requires spam.el).
  1685. This group contains spam messages. On summary entry, unread messages
  1686. will be marked as spam. On summary exit, the specified spam
  1687. processors will be invoked on spam-marked messages, then those
  1688. messages will be expired, so the spam processor will only see a
  1689. spam-marked message once.")
  1690. (defvar gnus-group-spam-classification-ham 'ask
  1691. "The ham value for the spam group parameter (requires spam.el).
  1692. On summary exit, the specified ham processors will be invoked on
  1693. ham-marked messages. Exercise caution, since the ham processor will
  1694. see the same message more than once because there is no ham message
  1695. registry.")
  1696. (gnus-define-group-parameter
  1697. spam-contents
  1698. :type list
  1699. :function-document
  1700. "The spam type (spam, ham, or neither) of the group."
  1701. :variable gnus-spam-newsgroup-contents
  1702. :variable-default nil
  1703. :variable-document
  1704. "*Group classification (spam, ham, or neither). Only
  1705. meaningful when spam.el is loaded. If non-nil, this should be a
  1706. list of group name regexps associated with a classification for
  1707. each one. In spam groups, new articles are marked as spam on
  1708. summary entry. There is other behavior associated with ham and
  1709. no classification when spam.el is loaded - see the manual."
  1710. :variable-group spam
  1711. :variable-type '(repeat
  1712. (list :tag "Group contents spam/ham classification"
  1713. (regexp :tag "Group")
  1714. (choice
  1715. (variable-item gnus-group-spam-classification-spam)
  1716. (variable-item gnus-group-spam-classification-ham)
  1717. (const :tag "Unclassified" nil))))
  1718. :parameter-type '(list :tag "Group contents spam/ham classification"
  1719. (choice :tag "Group contents classification for spam sorting"
  1720. (variable-item gnus-group-spam-classification-spam)
  1721. (variable-item gnus-group-spam-classification-ham)
  1722. (const :tag "Unclassified" nil)))
  1723. :parameter-document
  1724. "The spam classification (spam, ham, or neither) of this group.
  1725. When a spam group is entered, all unread articles are marked as
  1726. spam. There is other behavior associated with ham and no
  1727. classification when spam.el is loaded - see the manual.")
  1728. (gnus-define-group-parameter
  1729. spam-resend-to
  1730. :type list
  1731. :function-document
  1732. "The address to get spam resent (through spam-report-resend)."
  1733. :variable gnus-spam-resend-to
  1734. :variable-default nil
  1735. :variable-document
  1736. "The address to get spam resent (through spam-report-resend)."
  1737. :variable-group spam
  1738. :variable-type '(repeat
  1739. (list :tag "Group address for resending spam"
  1740. (regexp :tag "Group")
  1741. (string :tag "E-mail address for resending spam (requires the spam-use-resend exit processor)")))
  1742. :parameter-type 'string :tag "E-mail address for resending spam (requires the spam-use-resend exit processor)"
  1743. :parameter-document
  1744. "The address to get spam resent (through spam-report-resend).")
  1745. (gnus-define-group-parameter
  1746. ham-resend-to
  1747. :type list
  1748. :function-document
  1749. "The address to get ham resent (through spam-report-resend)."
  1750. :variable gnus-ham-resend-to
  1751. :variable-default nil
  1752. :variable-document
  1753. "The address to get ham resent (through spam-report-resend)."
  1754. :variable-group spam
  1755. :variable-type '(repeat
  1756. (list :tag "Group address for resending ham"
  1757. (regexp :tag "Group")
  1758. (string :tag "E-mail address for resending ham (requires the spam-use-resend exit processor)")))
  1759. :parameter-type 'string :tag "E-mail address for resending ham (requires the spam-use-resend exit processor)"
  1760. :parameter-document
  1761. "The address to get ham resent (through spam-report-resend).")
  1762. (defvar gnus-group-spam-exit-processor-ifile "ifile"
  1763. "OBSOLETE: The ifile summary exit spam processor.")
  1764. (defvar gnus-group-spam-exit-processor-stat "stat"
  1765. "OBSOLETE: The spam-stat summary exit spam processor.")
  1766. (defvar gnus-group-spam-exit-processor-bogofilter "bogofilter"
  1767. "OBSOLETE: The Bogofilter summary exit spam processor.")
  1768. (defvar gnus-group-spam-exit-processor-blacklist "blacklist"
  1769. "OBSOLETE: The Blacklist summary exit spam processor.")
  1770. (defvar gnus-group-spam-exit-processor-report-gmane "report-gmane"
  1771. "OBSOLETE: The Gmane reporting summary exit spam processor.
  1772. Only applicable to NNTP groups with articles from Gmane. See spam-report.el")
  1773. (defvar gnus-group-spam-exit-processor-spamoracle "spamoracle-spam"
  1774. "OBSOLETE: The spamoracle summary exit spam processor.")
  1775. (defvar gnus-group-ham-exit-processor-ifile "ifile-ham"
  1776. "OBSOLETE: The ifile summary exit ham processor.
  1777. Only applicable to non-spam (unclassified and ham) groups.")
  1778. (defvar gnus-group-ham-exit-processor-bogofilter "bogofilter-ham"
  1779. "OBSOLETE: The Bogofilter summary exit ham processor.
  1780. Only applicable to non-spam (unclassified and ham) groups.")
  1781. (defvar gnus-group-ham-exit-processor-stat "stat-ham"
  1782. "OBSOLETE: The spam-stat summary exit ham processor.
  1783. Only applicable to non-spam (unclassified and ham) groups.")
  1784. (defvar gnus-group-ham-exit-processor-whitelist "whitelist"
  1785. "OBSOLETE: The whitelist summary exit ham processor.
  1786. Only applicable to non-spam (unclassified and ham) groups.")
  1787. (defvar gnus-group-ham-exit-processor-BBDB "bbdb"
  1788. "OBSOLETE: The BBDB summary exit ham processor.
  1789. Only applicable to non-spam (unclassified and ham) groups.")
  1790. (defvar gnus-group-ham-exit-processor-copy "copy"
  1791. "OBSOLETE: The ham copy exit ham processor.
  1792. Only applicable to non-spam (unclassified and ham) groups.")
  1793. (defvar gnus-group-ham-exit-processor-spamoracle "spamoracle-ham"
  1794. "OBSOLETE: The spamoracle summary exit ham processor.
  1795. Only applicable to non-spam (unclassified and ham) groups.")
  1796. (gnus-define-group-parameter
  1797. spam-process
  1798. :type list
  1799. :parameter-type
  1800. '(choice
  1801. :tag "Spam Summary Exit Processor"
  1802. :value nil
  1803. (list :tag "Spam Summary Exit Processor Choices"
  1804. (set
  1805. (const :tag "Spam: Bogofilter" (spam spam-use-bogofilter))
  1806. (const :tag "Spam: Blacklist" (spam spam-use-blacklist))
  1807. (const :tag "Spam: Bsfilter" (spam spam-use-bsfilter))
  1808. (const :tag "Spam: Gmane Report" (spam spam-use-gmane))
  1809. (const :tag "Spam: Resend Message"(spam spam-use-resend))
  1810. (const :tag "Spam: ifile" (spam spam-use-ifile))
  1811. (const :tag "Spam: Spam Oracle" (spam spam-use-spamoracle))
  1812. (const :tag "Spam: Spam-stat" (spam spam-use-stat))
  1813. (const :tag "Spam: SpamAssassin" (spam spam-use-spamassassin))
  1814. (const :tag "Spam: CRM114" (spam spam-use-crm114))
  1815. (const :tag "Ham: BBDB" (ham spam-use-BBDB))
  1816. (const :tag "Ham: Bogofilter" (ham spam-use-bogofilter))
  1817. (const :tag "Ham: Bsfilter" (ham spam-use-bsfilter))
  1818. (const :tag "Ham: Copy" (ham spam-use-ham-copy))
  1819. (const :tag "Ham: Resend Message" (ham spam-use-resend))
  1820. (const :tag "Ham: ifile" (ham spam-use-ifile))
  1821. (const :tag "Ham: Spam Oracle" (ham spam-use-spamoracle))
  1822. (const :tag "Ham: Spam-stat" (ham spam-use-stat))
  1823. (const :tag "Ham: SpamAssassin" (ham spam-use-spamassassin))
  1824. (const :tag "Ham: CRM114" (ham spam-use-crm114))
  1825. (const :tag "Ham: Whitelist" (ham spam-use-whitelist))
  1826. (variable-item gnus-group-spam-exit-processor-ifile)
  1827. (variable-item gnus-group-spam-exit-processor-stat)
  1828. (variable-item gnus-group-spam-exit-processor-bogofilter)
  1829. (variable-item gnus-group-spam-exit-processor-blacklist)
  1830. (variable-item gnus-group-spam-exit-processor-spamoracle)
  1831. (variable-item gnus-group-spam-exit-processor-report-gmane)
  1832. (variable-item gnus-group-ham-exit-processor-bogofilter)
  1833. (variable-item gnus-group-ham-exit-processor-ifile)
  1834. (variable-item gnus-group-ham-exit-processor-stat)
  1835. (variable-item gnus-group-ham-exit-processor-whitelist)
  1836. (variable-item gnus-group-ham-exit-processor-BBDB)
  1837. (variable-item gnus-group-ham-exit-processor-spamoracle)
  1838. (variable-item gnus-group-ham-exit-processor-copy))))
  1839. :function-document
  1840. "Which spam or ham processors will be applied when the summary is exited."
  1841. :variable gnus-spam-process-newsgroups
  1842. :variable-default nil
  1843. :variable-document
  1844. "*Groups in which to automatically process spam or ham articles with
  1845. a backend on summary exit. If non-nil, this should be a list of group
  1846. name regexps that should match all groups in which to do automatic
  1847. spam processing, associated with the appropriate processor."
  1848. :variable-group spam
  1849. :variable-type
  1850. '(repeat :tag "Spam/Ham Processors"
  1851. (list :tag "Spam Summary Exit Processor Choices"
  1852. (regexp :tag "Group Regexp")
  1853. (set
  1854. :tag "Spam/Ham Summary Exit Processor"
  1855. (const :tag "Spam: Bogofilter" (spam spam-use-bogofilter))
  1856. (const :tag "Spam: Blacklist" (spam spam-use-blacklist))
  1857. (const :tag "Spam: Bsfilter" (spam spam-use-bsfilter))
  1858. (const :tag "Spam: Gmane Report" (spam spam-use-gmane))
  1859. (const :tag "Spam: Resend Message"(spam spam-use-resend))
  1860. (const :tag "Spam: ifile" (spam spam-use-ifile))
  1861. (const :tag "Spam: Spam-stat" (spam spam-use-stat))
  1862. (const :tag "Spam: Spam Oracle" (spam spam-use-spamoracle))
  1863. (const :tag "Spam: SpamAssassin" (spam spam-use-spamassassin))
  1864. (const :tag "Spam: CRM114" (spam spam-use-crm114))
  1865. (const :tag "Ham: BBDB" (ham spam-use-BBDB))
  1866. (const :tag "Ham: Bogofilter" (ham spam-use-bogofilter))
  1867. (const :tag "Ham: Bsfilter" (ham spam-use-bsfilter))
  1868. (const :tag "Ham: Copy" (ham spam-use-ham-copy))
  1869. (const :tag "Ham: Resend Message" (ham spam-use-resend))
  1870. (const :tag "Ham: ifile" (ham spam-use-ifile))
  1871. (const :tag "Ham: Spam-stat" (ham spam-use-stat))
  1872. (const :tag "Ham: Spam Oracle" (ham spam-use-spamoracle))
  1873. (const :tag "Ham: SpamAssassin" (ham spam-use-spamassassin))
  1874. (const :tag "Ham: CRM114" (ham spam-use-crm114))
  1875. (const :tag "Ham: Whitelist" (ham spam-use-whitelist))
  1876. (variable-item gnus-group-spam-exit-processor-ifile)
  1877. (variable-item gnus-group-spam-exit-processor-stat)
  1878. (variable-item gnus-group-spam-exit-processor-bogofilter)
  1879. (variable-item gnus-group-spam-exit-processor-blacklist)
  1880. (variable-item gnus-group-spam-exit-processor-spamoracle)
  1881. (variable-item gnus-group-spam-exit-processor-report-gmane)
  1882. (variable-item gnus-group-ham-exit-processor-bogofilter)
  1883. (variable-item gnus-group-ham-exit-processor-ifile)
  1884. (variable-item gnus-group-ham-exit-processor-stat)
  1885. (variable-item gnus-group-ham-exit-processor-whitelist)
  1886. (variable-item gnus-group-ham-exit-processor-BBDB)
  1887. (variable-item gnus-group-ham-exit-processor-spamoracle)
  1888. (variable-item gnus-group-ham-exit-processor-copy))))
  1889. :parameter-document
  1890. "Which spam or ham processors will be applied when the summary is exited.")
  1891. (gnus-define-group-parameter
  1892. spam-autodetect
  1893. :type list
  1894. :parameter-type
  1895. '(boolean :tag "Spam autodetection")
  1896. :function-document
  1897. "Should spam be autodetected (with spam-split) in this group?"
  1898. :variable gnus-spam-autodetect
  1899. :variable-default nil
  1900. :variable-document
  1901. "*Groups in which spam should be autodetected when they are entered.
  1902. Only unseen articles will be examined, unless
  1903. spam-autodetect-recheck-messages is set."
  1904. :variable-group spam
  1905. :variable-type
  1906. '(repeat
  1907. :tag "Autodetection setting"
  1908. (list
  1909. (regexp :tag "Group Regexp")
  1910. boolean))
  1911. :parameter-document
  1912. "Spam autodetection.
  1913. Only unseen articles will be examined, unless
  1914. spam-autodetect-recheck-messages is set.")
  1915. (gnus-define-group-parameter
  1916. spam-autodetect-methods
  1917. :type list
  1918. :parameter-type
  1919. '(choice :tag "Spam autodetection-specific methods"
  1920. (const none)
  1921. (const default)
  1922. (set :tag "Use specific methods"
  1923. (variable-item spam-use-blacklist)
  1924. (variable-item spam-use-gmane-xref)
  1925. (variable-item spam-use-regex-headers)
  1926. (variable-item spam-use-regex-body)
  1927. (variable-item spam-use-whitelist)
  1928. (variable-item spam-use-BBDB)
  1929. (variable-item spam-use-ifile)
  1930. (variable-item spam-use-spamoracle)
  1931. (variable-item spam-use-crm114)
  1932. (variable-item spam-use-spamassassin)
  1933. (variable-item spam-use-spamassassin-headers)
  1934. (variable-item spam-use-bsfilter)
  1935. (variable-item spam-use-bsfilter-headers)
  1936. (variable-item spam-use-stat)
  1937. (variable-item spam-use-blackholes)
  1938. (variable-item spam-use-hashcash)
  1939. (variable-item spam-use-bogofilter-headers)
  1940. (variable-item spam-use-bogofilter)))
  1941. :function-document
  1942. "Methods to be used for autodetection in each group"
  1943. :variable gnus-spam-autodetect-methods
  1944. :variable-default nil
  1945. :variable-document
  1946. "*Methods for autodetecting spam per group.
  1947. Requires the spam-autodetect parameter. Only unseen articles
  1948. will be examined, unless spam-autodetect-recheck-messages is
  1949. set."
  1950. :variable-group spam
  1951. :variable-type
  1952. '(repeat
  1953. :tag "Autodetection methods"
  1954. (list
  1955. (regexp :tag "Group Regexp")
  1956. (choice
  1957. (const none)
  1958. (const default)
  1959. (set :tag "Use specific methods"
  1960. (variable-item spam-use-blacklist)
  1961. (variable-item spam-use-gmane-xref)
  1962. (variable-item spam-use-regex-headers)
  1963. (variable-item spam-use-regex-body)
  1964. (variable-item spam-use-whitelist)
  1965. (variable-item spam-use-BBDB)
  1966. (variable-item spam-use-ifile)
  1967. (variable-item spam-use-spamoracle)
  1968. (variable-item spam-use-crm114)
  1969. (variable-item spam-use-stat)
  1970. (variable-item spam-use-blackholes)
  1971. (variable-item spam-use-hashcash)
  1972. (variable-item spam-use-spamassassin)
  1973. (variable-item spam-use-spamassassin-headers)
  1974. (variable-item spam-use-bsfilter)
  1975. (variable-item spam-use-bsfilter-headers)
  1976. (variable-item spam-use-bogofilter-headers)
  1977. (variable-item spam-use-bogofilter)))))
  1978. :parameter-document
  1979. "Spam autodetection methods.
  1980. Requires the spam-autodetect parameter. Only unseen articles
  1981. will be examined, unless spam-autodetect-recheck-messages is
  1982. set.")
  1983. (gnus-define-group-parameter
  1984. spam-process-destination
  1985. :type list
  1986. :parameter-type
  1987. '(choice :tag "Destination for spam-processed articles at summary exit"
  1988. (string :tag "Move to a group")
  1989. (repeat :tag "Move to multiple groups"
  1990. (string :tag "Destination group"))
  1991. (const :tag "Expire" nil))
  1992. :function-document
  1993. "Where spam-processed articles will go at summary exit."
  1994. :variable gnus-spam-process-destinations
  1995. :variable-default nil
  1996. :variable-document
  1997. "*Groups in which to explicitly send spam-processed articles to
  1998. another group, or expire them (the default). If non-nil, this should
  1999. be a list of group name regexps that should match all groups in which
  2000. to do spam-processed article moving, associated with the destination
  2001. group or nil for explicit expiration. This only makes sense for
  2002. mail groups."
  2003. :variable-group spam
  2004. :variable-type
  2005. '(repeat
  2006. :tag "Spam-processed articles destination"
  2007. (list
  2008. (regexp :tag "Group Regexp")
  2009. (choice
  2010. :tag "Destination for spam-processed articles at summary exit"
  2011. (string :tag "Move to a group")
  2012. (repeat :tag "Move to multiple groups"
  2013. (string :tag "Destination group"))
  2014. (const :tag "Expire" nil))))
  2015. :parameter-document
  2016. "Where spam-processed articles will go at summary exit.")
  2017. (gnus-define-group-parameter
  2018. ham-process-destination
  2019. :type list
  2020. :parameter-type
  2021. '(choice
  2022. :tag "Destination for ham articles at summary exit from a spam group"
  2023. (string :tag "Move to a group")
  2024. (repeat :tag "Move to multiple groups"
  2025. (string :tag "Destination group"))
  2026. (const :tag "Respool" respool)
  2027. (const :tag "Do nothing" nil))
  2028. :function-document
  2029. "Where ham articles will go at summary exit from a spam group."
  2030. :variable gnus-ham-process-destinations
  2031. :variable-default nil
  2032. :variable-document
  2033. "*Groups in which to explicitly send ham articles to
  2034. another group, or do nothing (the default). If non-nil, this should
  2035. be a list of group name regexps that should match all groups in which
  2036. to do ham article moving, associated with the destination
  2037. group or nil for explicit ignoring. This only makes sense for
  2038. mail groups, and only works in spam groups."
  2039. :variable-group spam
  2040. :variable-type
  2041. '(repeat
  2042. :tag "Ham articles destination"
  2043. (list
  2044. (regexp :tag "Group Regexp")
  2045. (choice
  2046. :tag "Destination for ham articles at summary exit from spam group"
  2047. (string :tag "Move to a group")
  2048. (repeat :tag "Move to multiple groups"
  2049. (string :tag "Destination group"))
  2050. (const :tag "Respool" respool)
  2051. (const :tag "Expire" nil))))
  2052. :parameter-document
  2053. "Where ham articles will go at summary exit from a spam group.")
  2054. (gnus-define-group-parameter
  2055. ham-marks
  2056. :type 'list
  2057. :parameter-type '(list :tag "Ham mark choices"
  2058. (set
  2059. (variable-item gnus-del-mark)
  2060. (variable-item gnus-read-mark)
  2061. (variable-item gnus-ticked-mark)
  2062. (variable-item gnus-killed-mark)
  2063. (variable-item gnus-kill-file-mark)
  2064. (variable-item gnus-low-score-mark)))
  2065. :parameter-document
  2066. "Marks considered ham (positively not spam). Such articles will be
  2067. processed as ham (non-spam) on group exit. When nil, the global
  2068. spam-ham-marks variable takes precedence."
  2069. :variable-default '((".*" ((gnus-del-mark
  2070. gnus-read-mark
  2071. gnus-killed-mark
  2072. gnus-kill-file-mark
  2073. gnus-low-score-mark))))
  2074. :variable-group spam
  2075. :variable-document
  2076. "*Groups in which to explicitly set the ham marks to some value.")
  2077. (gnus-define-group-parameter
  2078. spam-marks
  2079. :type 'list
  2080. :parameter-type '(list :tag "Spam mark choices"
  2081. (set
  2082. (variable-item gnus-spam-mark)
  2083. (variable-item gnus-killed-mark)
  2084. (variable-item gnus-kill-file-mark)
  2085. (variable-item gnus-low-score-mark)))
  2086. :parameter-document
  2087. "Marks considered spam.
  2088. Such articles will be processed as spam on group exit. When nil, the global
  2089. spam-spam-marks variable takes precedence."
  2090. :variable-default '((".*" ((gnus-spam-mark))))
  2091. :variable-group spam
  2092. :variable-document
  2093. "*Groups in which to explicitly set the spam marks to some value."))
  2094. (defcustom gnus-group-uncollapsed-levels 1
  2095. "Number of group name elements to leave alone when making a short group name."
  2096. :group 'gnus-group-visual
  2097. :type 'integer)
  2098. (defcustom gnus-group-use-permanent-levels nil
  2099. "*If non-nil, once you set a level, Gnus will use this level."
  2100. :group 'gnus-group-levels
  2101. :type 'boolean)
  2102. ;; Hooks.
  2103. (defcustom gnus-load-hook nil
  2104. "A hook run while Gnus is loaded."
  2105. :group 'gnus-start
  2106. :type 'hook)
  2107. (defcustom gnus-apply-kill-hook '(gnus-apply-kill-file)
  2108. "A hook called to apply kill files to a group.
  2109. This hook is intended to apply a kill file to the selected newsgroup.
  2110. The function `gnus-apply-kill-file' is called by default.
  2111. Since a general kill file is too heavy to use only for a few
  2112. newsgroups, I recommend you to use a lighter hook function. For
  2113. example, if you'd like to apply a kill file to articles which contains
  2114. a string `rmgroup' in subject in newsgroup `control', you can use the
  2115. following hook:
  2116. (setq gnus-apply-kill-hook
  2117. (list
  2118. (lambda ()
  2119. (cond ((string-match \"control\" gnus-newsgroup-name)
  2120. (gnus-kill \"Subject\" \"rmgroup\")
  2121. (gnus-expunge \"X\"))))))"
  2122. :group 'gnus-score-kill
  2123. :options '(gnus-apply-kill-file)
  2124. :type 'hook)
  2125. (defcustom gnus-group-change-level-function nil
  2126. "Function run when a group level is changed.
  2127. It is called with three parameters -- GROUP, LEVEL and OLDLEVEL."
  2128. :group 'gnus-group-levels
  2129. :type '(choice (const nil)
  2130. function))
  2131. ;;; Face thingies.
  2132. (defcustom gnus-visual
  2133. '(summary-highlight group-highlight article-highlight
  2134. mouse-face
  2135. summary-menu group-menu article-menu
  2136. tree-highlight menu highlight
  2137. browse-menu server-menu
  2138. page-marker tree-menu binary-menu pick-menu)
  2139. "*Enable visual features.
  2140. If `visual' is disabled, there will be no menus and few faces. Most of
  2141. the visual customization options below will be ignored. Gnus will use
  2142. less space and be faster as a result.
  2143. This variable can also be a list of visual elements to switch on. For
  2144. instance, to switch off all visual things except menus, you can say:
  2145. (setq gnus-visual '(menu))
  2146. Valid elements include `summary-highlight', `group-highlight',
  2147. `article-highlight', `mouse-face', `summary-menu', `group-menu',
  2148. `article-menu', `tree-highlight', `menu', `highlight', `browse-menu',
  2149. `server-menu', `page-marker', `tree-menu', `binary-menu', and`pick-menu'."
  2150. :group 'gnus-meta
  2151. :group 'gnus-visual
  2152. :type '(set (const summary-highlight)
  2153. (const group-highlight)
  2154. (const article-highlight)
  2155. (const mouse-face)
  2156. (const summary-menu)
  2157. (const group-menu)
  2158. (const article-menu)
  2159. (const tree-highlight)
  2160. (const menu)
  2161. (const highlight)
  2162. (const browse-menu)
  2163. (const server-menu)
  2164. (const page-marker)
  2165. (const tree-menu)
  2166. (const binary-menu)
  2167. (const pick-menu)))
  2168. ;; Byte-compiler warning.
  2169. (defvar gnus-visual)
  2170. ;; Find out whether the gnus-visual TYPE is wanted.
  2171. (defun gnus-visual-p (&optional type class)
  2172. (and gnus-visual ; Has to be non-nil, at least.
  2173. (if (not type) ; We don't care about type.
  2174. gnus-visual
  2175. (if (listp gnus-visual) ; It's a list, so we check it.
  2176. (or (memq type gnus-visual)
  2177. (memq class gnus-visual))
  2178. t))))
  2179. (defcustom gnus-mouse-face
  2180. (condition-case ()
  2181. (if (gnus-visual-p 'mouse-face 'highlight)
  2182. (if (boundp 'gnus-mouse-face)
  2183. (or gnus-mouse-face 'highlight)
  2184. 'highlight)
  2185. 'default)
  2186. (error 'highlight))
  2187. "*Face used for group or summary buffer mouse highlighting.
  2188. The line beneath the mouse pointer will be highlighted with this
  2189. face."
  2190. :group 'gnus-visual
  2191. :type 'face)
  2192. (defcustom gnus-article-save-directory gnus-directory
  2193. "*Name of the directory articles will be saved in (default \"~/News\")."
  2194. :group 'gnus-article-saving
  2195. :type 'directory)
  2196. (defvar gnus-plugged t
  2197. "Whether Gnus is plugged or not.")
  2198. (defcustom gnus-agent-cache t
  2199. "Controls use of the agent cache while plugged.
  2200. When set, Gnus will prefer using the locally stored content rather
  2201. than re-fetching it from the server. You also need to enable
  2202. `gnus-agent' for this to have any affect."
  2203. :version "22.1"
  2204. :group 'gnus-agent
  2205. :type 'boolean)
  2206. (defcustom gnus-default-charset 'undecided
  2207. "Default charset assumed to be used when viewing non-ASCII characters.
  2208. This variable is overridden on a group-to-group basis by the
  2209. `gnus-group-charset-alist' variable and is only used on groups not
  2210. covered by that variable."
  2211. :type 'symbol
  2212. :group 'gnus-charset)
  2213. ;; Fixme: Doc reference to agent.
  2214. (defcustom gnus-agent t
  2215. "Whether we want to use the Gnus agent or not.
  2216. You may customize gnus-agent to disable its use. However, some
  2217. back ends have started to use the agent as a client-side cache.
  2218. Disabling the agent may result in noticeable loss of performance."
  2219. :version "22.1"
  2220. :group 'gnus-agent
  2221. :type 'boolean)
  2222. (defcustom gnus-other-frame-function 'gnus
  2223. "Function called by the command `gnus-other-frame'."
  2224. :group 'gnus-start
  2225. :type '(choice (function-item gnus)
  2226. (function-item gnus-no-server)
  2227. (function-item gnus-slave)
  2228. (function-item gnus-slave-no-server)))
  2229. (defcustom gnus-other-frame-parameters nil
  2230. "Frame parameters used by `gnus-other-frame' to create a Gnus frame.
  2231. This should be an alist for Emacs, or a plist for XEmacs."
  2232. :group 'gnus-start
  2233. :type (if (featurep 'xemacs)
  2234. '(repeat (list :inline t :format "%v"
  2235. (symbol :tag "Property")
  2236. (sexp :tag "Value")))
  2237. '(repeat (cons :format "%v"
  2238. (symbol :tag "Parameter")
  2239. (sexp :tag "Value")))))
  2240. (defcustom gnus-user-agent '(emacs gnus type)
  2241. "Which information should be exposed in the User-Agent header.
  2242. Can be a list of symbols or a string. Valid symbols are `gnus'
  2243. \(show Gnus version\) and `emacs' \(show Emacs version\). In
  2244. addition to the Emacs version, you can add `codename' \(show
  2245. \(S\)XEmacs codename\) or either `config' \(show system
  2246. configuration\) or `type' \(show system type\). If you set it to
  2247. a string, be sure to use a valid format, see RFC 2616."
  2248. :version "22.1"
  2249. :group 'gnus-message
  2250. :type '(choice (list (set :inline t
  2251. (const gnus :tag "Gnus version")
  2252. (const emacs :tag "Emacs version")
  2253. (choice :tag "system"
  2254. (const type :tag "system type")
  2255. (const config :tag "system configuration"))
  2256. (const codename :tag "Emacs codename")))
  2257. (string)))
  2258. ;; Convert old (< 2005-01-10) symbol type values:
  2259. (when (symbolp gnus-user-agent)
  2260. (setq gnus-user-agent
  2261. (cond ((eq gnus-user-agent 'emacs-gnus-config)
  2262. '(emacs gnus config))
  2263. ((eq gnus-user-agent 'emacs-gnus-type)
  2264. '(emacs gnus type))
  2265. ((eq gnus-user-agent 'emacs-gnus)
  2266. '(emacs gnus))
  2267. ((eq gnus-user-agent 'gnus)
  2268. '(gnus))
  2269. (t gnus-user-agent)))
  2270. (gnus-message 1 "Converted `gnus-user-agent' to `%s'." gnus-user-agent)
  2271. (sit-for 1)
  2272. (if (get 'gnus-user-agent 'saved-value)
  2273. (customize-save-variable 'gnus-user-agent gnus-user-agent)
  2274. (gnus-message 1 "Edit your init file to make this change permanent.")
  2275. (sit-for 2)))
  2276. ;;; Internal variables
  2277. (defvar gnus-agent-gcc-header "X-Gnus-Agent-Gcc")
  2278. (defvar gnus-agent-meta-information-header "X-Gnus-Agent-Meta-Information")
  2279. (defvar gnus-agent-method-p-cache nil
  2280. ; Reset each time gnus-agent-covered-methods is changed else
  2281. ; gnus-agent-method-p may mis-report a methods status.
  2282. )
  2283. (defvar gnus-agent-target-move-group-header "X-Gnus-Agent-Move-To")
  2284. (defvar gnus-draft-meta-information-header "X-Draft-From")
  2285. (defvar gnus-group-get-parameter-function 'gnus-group-get-parameter)
  2286. (defvar gnus-original-article-buffer " *Original Article*")
  2287. (defvar gnus-newsgroup-name nil)
  2288. (defvar gnus-ephemeral-servers nil)
  2289. (defvar gnus-server-method-cache nil)
  2290. (defvar gnus-extended-servers nil)
  2291. ;; The carpal mode has been removed, but define the variable for
  2292. ;; backwards compatibility.
  2293. (defvar gnus-carpal nil)
  2294. (make-obsolete-variable 'gnus-carpal nil "Emacs 24.1")
  2295. (defvar gnus-agent-fetching nil
  2296. "Whether Gnus agent is in fetching mode.")
  2297. (defvar gnus-agent-covered-methods nil
  2298. "A list of servers, NOT methods, showing which servers are covered by the agent.")
  2299. (defvar gnus-command-method nil
  2300. "Dynamically bound variable that says what the current back end is.")
  2301. (defvar gnus-current-select-method nil
  2302. "The current method for selecting a newsgroup.")
  2303. (defvar gnus-tree-buffer "*Tree*"
  2304. "Buffer where Gnus thread trees are displayed.")
  2305. ;; Variable holding the user answers to all method prompts.
  2306. (defvar gnus-method-history nil)
  2307. ;; Variable holding the user answers to all mail method prompts.
  2308. (defvar gnus-mail-method-history nil)
  2309. ;; Variable holding the user answers to all group prompts.
  2310. (defvar gnus-group-history nil)
  2311. (defvar gnus-server-alist nil
  2312. "List of available servers.")
  2313. (defcustom gnus-cache-directory
  2314. (nnheader-concat gnus-directory "cache/")
  2315. "*The directory where cached articles will be stored."
  2316. :group 'gnus-cache
  2317. :type 'directory)
  2318. (defvar gnus-predefined-server-alist
  2319. `(("cache"
  2320. nnspool "cache"
  2321. (nnspool-spool-directory ,gnus-cache-directory)
  2322. (nnspool-nov-directory ,gnus-cache-directory)
  2323. (nnspool-active-file
  2324. ,(nnheader-concat gnus-cache-directory "active"))))
  2325. "List of predefined (convenience) servers.")
  2326. (defconst gnus-article-mark-lists
  2327. '((marked . tick) (replied . reply)
  2328. (expirable . expire) (killed . killed)
  2329. (bookmarks . bookmark) (dormant . dormant)
  2330. (scored . score) (saved . save)
  2331. (cached . cache) (downloadable . download)
  2332. (unsendable . unsend) (forwarded . forward)
  2333. (seen . seen)))
  2334. (defconst gnus-article-special-mark-lists
  2335. '((seen range)
  2336. (killed range)
  2337. (bookmark tuple)
  2338. (uid tuple)
  2339. (active tuple)
  2340. (score tuple)))
  2341. ;; Propagate flags to server, with the following exceptions:
  2342. ;; `seen' is private to each gnus installation
  2343. ;; `cache' is a internal gnus flag for each gnus installation
  2344. ;; `download' is a agent flag private to each gnus installation
  2345. ;; `unsend' are for nndraft groups only
  2346. ;; `score' is not a proper mark
  2347. ;; `bookmark': don't propagated it, or fix the bug in update-mark.
  2348. (defconst gnus-article-unpropagated-mark-lists
  2349. '(seen cache download unsend score bookmark)
  2350. "Marks that shouldn't be propagated to back ends.
  2351. Typical marks are those that make no sense in a standalone back end,
  2352. such as a mark that says whether an article is stored in the cache
  2353. \(which doesn't make sense in a standalone back end).")
  2354. (defvar gnus-headers-retrieved-by nil)
  2355. (defvar gnus-article-reply nil)
  2356. (defvar gnus-override-method nil)
  2357. (defvar gnus-opened-servers nil)
  2358. (defvar gnus-current-kill-article nil)
  2359. (defvar gnus-have-read-active-file nil)
  2360. (defconst gnus-maintainer
  2361. "submit@debbugs.gnu.org (The Gnus Bugfixing Girls + Boys)"
  2362. "The mail address of the Gnus maintainers.")
  2363. (defconst gnus-bug-package
  2364. "gnus"
  2365. "The package to use in the bug submission.")
  2366. (defvar gnus-info-nodes
  2367. '((gnus-group-mode "(gnus)Group Buffer")
  2368. (gnus-summary-mode "(gnus)Summary Buffer")
  2369. (gnus-article-mode "(gnus)Article Buffer")
  2370. (gnus-server-mode "(gnus)Server Buffer")
  2371. (gnus-browse-mode "(gnus)Browse Foreign Server")
  2372. (gnus-tree-mode "(gnus)Tree Display"))
  2373. "Alist of major modes and related Info nodes.")
  2374. (defvar gnus-group-buffer "*Group*")
  2375. (defvar gnus-summary-buffer "*Summary*")
  2376. (defvar gnus-article-buffer "*Article*")
  2377. (defvar gnus-server-buffer "*Server*")
  2378. (defvar gnus-slave nil
  2379. "Whether this Gnus is a slave or not.")
  2380. (defvar gnus-batch-mode nil
  2381. "Whether this Gnus is running in batch mode or not.")
  2382. (defvar gnus-variable-list
  2383. '(gnus-newsrc-options gnus-newsrc-options-n
  2384. gnus-newsrc-last-checked-date
  2385. gnus-newsrc-alist gnus-server-alist
  2386. gnus-killed-list gnus-zombie-list
  2387. gnus-topic-topology gnus-topic-alist)
  2388. "Gnus variables saved in the quick startup file.")
  2389. (defvar gnus-newsrc-alist nil
  2390. "Assoc list of read articles.
  2391. `gnus-newsrc-hashtb' should be kept so that both hold the same information.")
  2392. (defvar gnus-registry-alist nil
  2393. "Assoc list of registry data.
  2394. gnus-registry.el will populate this if it's loaded.")
  2395. (defvar gnus-newsrc-hashtb nil
  2396. "Hashtable of `gnus-newsrc-alist'.")
  2397. (defvar gnus-killed-list nil
  2398. "List of killed newsgroups.")
  2399. (defvar gnus-killed-hashtb nil
  2400. "Hash table equivalent of `gnus-killed-list'.")
  2401. (defvar gnus-zombie-list nil
  2402. "List of almost dead newsgroups.")
  2403. (defvar gnus-description-hashtb nil
  2404. "Descriptions of newsgroups.")
  2405. (defvar gnus-list-of-killed-groups nil
  2406. "List of newsgroups that have recently been killed by the user.")
  2407. (defvar gnus-active-hashtb nil
  2408. "Hashtable of active articles.")
  2409. (defvar gnus-moderated-hashtb nil
  2410. "Hashtable of moderated newsgroups.")
  2411. ;; Save window configuration.
  2412. (defvar gnus-prev-winconf nil)
  2413. (defvar gnus-reffed-article-number nil)
  2414. (defvar gnus-dead-summary nil)
  2415. (defvar gnus-invalid-group-regexp "[: `'\"/]\\|^$"
  2416. "Regexp matching invalid groups.")
  2417. (defvar gnus-other-frame-object nil
  2418. "A frame object which will be created by `gnus-other-frame'.")
  2419. ;;; End of variables.
  2420. ;; Define some autoload functions Gnus might use.
  2421. (eval-and-compile
  2422. ;; This little mapcar goes through the list below and marks the
  2423. ;; symbols in question as autoloaded functions.
  2424. (mapc
  2425. (lambda (package)
  2426. (let ((interactive (nth 1 (memq ':interactive package))))
  2427. (mapcar
  2428. (lambda (function)
  2429. (let (keymap)
  2430. (when (consp function)
  2431. (setq keymap (car (memq 'keymap function)))
  2432. (setq function (car function)))
  2433. (unless (fboundp function)
  2434. (autoload function (car package) nil interactive keymap))))
  2435. (if (eq (nth 1 package) ':interactive)
  2436. (nthcdr 3 package)
  2437. (cdr package)))))
  2438. '(("info" :interactive t Info-goto-node)
  2439. ("pp" pp-to-string)
  2440. ("qp" quoted-printable-decode-region quoted-printable-decode-string)
  2441. ("ps-print" ps-print-preprint)
  2442. ("message" :interactive t
  2443. message-send-and-exit message-yank-original)
  2444. ("babel" babel-as-string)
  2445. ("nnmail" nnmail-split-fancy nnmail-article-group)
  2446. ("nnvirtual" nnvirtual-catchup-group nnvirtual-convert-headers)
  2447. ;; This is only used in message.el, which has an autoload.
  2448. ("rmailout" rmail-output)
  2449. ;; Next two used in gnus-util, which has autoloads, and contrib/sendmail.
  2450. ("rmail" rmail-count-new-messages rmail-show-message
  2451. ;; Next two only used in gnus-util.
  2452. rmail-summary-exists rmail-select-summary)
  2453. ;; Only used in gnus-util, which has an autoload.
  2454. ("rmailsum" rmail-update-summary)
  2455. ("gnus-xmas" gnus-xmas-splash)
  2456. ("score-mode" :interactive t gnus-score-mode)
  2457. ("gnus-mh" gnus-summary-save-article-folder
  2458. gnus-Folder-save-name gnus-folder-save-name)
  2459. ("gnus-mh" :interactive t gnus-summary-save-in-folder)
  2460. ("gnus-demon" gnus-demon-add-scanmail
  2461. gnus-demon-add-rescan gnus-demon-add-scan-timestamps
  2462. gnus-demon-add-disconnection gnus-demon-add-handler
  2463. gnus-demon-remove-handler)
  2464. ("gnus-demon" :interactive t
  2465. gnus-demon-init gnus-demon-cancel)
  2466. ("gnus-fun" gnus-convert-gray-x-face-to-xpm gnus-display-x-face-in-from
  2467. gnus-convert-image-to-gray-x-face gnus-convert-face-to-png
  2468. gnus-face-from-file)
  2469. ("gnus-salt" gnus-highlight-selected-tree gnus-possibly-generate-tree
  2470. gnus-tree-open gnus-tree-close)
  2471. ("gnus-srvr" gnus-enter-server-buffer gnus-server-set-info
  2472. gnus-server-server-name)
  2473. ("gnus-srvr" gnus-browse-foreign-server)
  2474. ("gnus-cite" :interactive t
  2475. gnus-article-highlight-citation gnus-article-hide-citation-maybe
  2476. gnus-article-hide-citation gnus-article-fill-cited-article
  2477. gnus-article-hide-citation-in-followups
  2478. gnus-article-fill-cited-long-lines)
  2479. ("gnus-kill" gnus-kill gnus-apply-kill-file-internal
  2480. gnus-kill-file-edit-file gnus-kill-file-raise-followups-to-author
  2481. gnus-execute gnus-expunge gnus-batch-kill gnus-batch-score)
  2482. ("gnus-cache" gnus-cache-possibly-enter-article gnus-cache-save-buffers
  2483. gnus-cache-possibly-remove-articles gnus-cache-request-article
  2484. gnus-cache-retrieve-headers gnus-cache-possibly-alter-active
  2485. gnus-cache-enter-remove-article gnus-cached-article-p
  2486. gnus-cache-open gnus-cache-close gnus-cache-update-article
  2487. gnus-cache-articles-in-group)
  2488. ("gnus-cache" :interactive t gnus-jog-cache gnus-cache-enter-article
  2489. gnus-cache-remove-article gnus-summary-insert-cached-articles)
  2490. ("gnus-score" :interactive t
  2491. gnus-summary-increase-score gnus-summary-set-score
  2492. gnus-summary-raise-thread gnus-summary-raise-same-subject
  2493. gnus-summary-raise-score gnus-summary-raise-same-subject-and-select
  2494. gnus-summary-lower-thread gnus-summary-lower-same-subject
  2495. gnus-summary-lower-score gnus-summary-lower-same-subject-and-select
  2496. gnus-summary-current-score gnus-score-delta-default
  2497. gnus-score-flush-cache gnus-score-close
  2498. gnus-possibly-score-headers gnus-score-followup-article
  2499. gnus-score-followup-thread)
  2500. ("gnus-score"
  2501. (gnus-summary-score-map keymap) gnus-score-save gnus-score-headers
  2502. gnus-current-score-file-nondirectory gnus-score-adaptive
  2503. gnus-score-find-trace gnus-score-file-name)
  2504. ("gnus-cus" :interactive t gnus-group-customize gnus-score-customize)
  2505. ("gnus-topic" :interactive t gnus-topic-mode)
  2506. ("gnus-topic" gnus-topic-remove-group gnus-topic-set-parameters
  2507. gnus-subscribe-topics)
  2508. ("gnus-salt" :interactive t gnus-pick-mode gnus-binary-mode)
  2509. ("gnus-uu" (gnus-uu-extract-map keymap) (gnus-uu-mark-map keymap))
  2510. ("gnus-uu" :interactive t
  2511. gnus-uu-digest-mail-forward gnus-uu-digest-post-forward
  2512. gnus-uu-mark-series gnus-uu-mark-region gnus-uu-mark-buffer
  2513. gnus-uu-mark-by-regexp gnus-uu-mark-all
  2514. gnus-uu-mark-sparse gnus-uu-mark-thread gnus-uu-decode-uu
  2515. gnus-uu-decode-uu-and-save gnus-uu-decode-unshar
  2516. gnus-uu-decode-unshar-and-save gnus-uu-decode-save
  2517. gnus-uu-decode-binhex gnus-uu-decode-uu-view
  2518. gnus-uu-decode-uu-and-save-view gnus-uu-decode-unshar-view
  2519. gnus-uu-decode-unshar-and-save-view gnus-uu-decode-save-view
  2520. gnus-uu-decode-binhex-view gnus-uu-unmark-thread
  2521. gnus-uu-mark-over gnus-uu-post-news gnus-uu-invert-processable)
  2522. ("gnus-uu" gnus-uu-delete-work-dir gnus-uu-unmark-thread)
  2523. ("gnus-msg" (gnus-summary-send-map keymap)
  2524. gnus-article-mail gnus-copy-article-buffer gnus-extended-version)
  2525. ("gnus-msg" :interactive t
  2526. gnus-group-post-news gnus-group-mail gnus-group-news
  2527. gnus-summary-post-news gnus-summary-news-other-window
  2528. gnus-summary-followup gnus-summary-followup-with-original
  2529. gnus-summary-cancel-article gnus-summary-supersede-article
  2530. gnus-post-news gnus-summary-reply gnus-summary-reply-with-original
  2531. gnus-summary-mail-forward gnus-summary-mail-other-window
  2532. gnus-summary-resend-message gnus-summary-resend-bounced-mail
  2533. gnus-summary-wide-reply gnus-summary-followup-to-mail
  2534. gnus-summary-followup-to-mail-with-original gnus-bug
  2535. gnus-summary-wide-reply-with-original
  2536. gnus-summary-post-forward gnus-summary-wide-reply-with-original
  2537. gnus-summary-post-forward)
  2538. ("gnus-picon" :interactive t gnus-treat-from-picon)
  2539. ("smiley" :interactive t smiley-region)
  2540. ("gnus-win" gnus-configure-windows gnus-add-configuration)
  2541. ("gnus-sum" gnus-summary-insert-line gnus-summary-read-group
  2542. gnus-list-of-unread-articles gnus-list-of-read-articles
  2543. gnus-offer-save-summaries gnus-make-thread-indent-array
  2544. gnus-summary-exit gnus-update-read-articles gnus-summary-last-subject
  2545. gnus-summary-skip-intangible gnus-summary-article-number
  2546. gnus-data-header gnus-data-find)
  2547. ("gnus-group" gnus-group-insert-group-line gnus-group-quit
  2548. gnus-group-list-groups gnus-group-first-unread-group
  2549. gnus-group-set-mode-line gnus-group-set-info gnus-group-save-newsrc
  2550. gnus-group-setup-buffer gnus-group-get-new-news
  2551. gnus-group-make-help-group gnus-group-update-group
  2552. gnus-group-iterate gnus-group-group-name)
  2553. ("gnus-bcklg" gnus-backlog-request-article gnus-backlog-enter-article
  2554. gnus-backlog-remove-article)
  2555. ("gnus-art" gnus-article-read-summary-keys gnus-article-save
  2556. gnus-article-prepare gnus-article-set-window-start
  2557. gnus-article-next-page gnus-article-prev-page
  2558. gnus-request-article-this-buffer gnus-article-mode
  2559. gnus-article-setup-buffer gnus-narrow-to-page
  2560. gnus-article-delete-invisible-text gnus-treat-article)
  2561. ("gnus-art" :interactive t
  2562. gnus-article-hide-headers gnus-article-hide-boring-headers
  2563. gnus-article-treat-overstrike
  2564. gnus-article-remove-cr gnus-article-remove-trailing-blank-lines
  2565. gnus-article-display-x-face gnus-article-de-quoted-unreadable
  2566. gnus-article-de-base64-unreadable
  2567. gnus-article-decode-HZ
  2568. gnus-article-wash-html
  2569. gnus-article-unsplit-urls
  2570. gnus-article-hide-pem gnus-article-hide-signature
  2571. gnus-article-strip-leading-blank-lines gnus-article-date-local
  2572. gnus-article-date-original gnus-article-date-lapsed
  2573. ;;gnus-article-show-all-headers
  2574. gnus-article-edit-mode gnus-article-edit-article
  2575. gnus-article-edit-done gnus-article-decode-encoded-words
  2576. gnus-start-date-timer gnus-stop-date-timer
  2577. gnus-mime-view-all-parts)
  2578. ("gnus-int" gnus-request-type)
  2579. ("gnus-start" gnus-newsrc-parse-options gnus-1 gnus-no-server-1
  2580. gnus-dribble-enter gnus-read-init-file gnus-dribble-touch
  2581. gnus-check-reasonable-setup)
  2582. ("gnus-dup" gnus-dup-suppress-articles gnus-dup-unsuppress-article
  2583. gnus-dup-enter-articles)
  2584. ("gnus-range" gnus-copy-sequence)
  2585. ("gnus-eform" gnus-edit-form)
  2586. ("gnus-logic" gnus-score-advanced)
  2587. ("gnus-undo" gnus-undo-mode gnus-undo-register)
  2588. ("gnus-async" gnus-async-request-fetched-article gnus-async-prefetch-next
  2589. gnus-async-prefetch-article gnus-async-prefetch-remove-group
  2590. gnus-async-halt-prefetch)
  2591. ("gnus-agent" gnus-open-agent gnus-agent-get-function
  2592. gnus-agent-save-active gnus-agent-method-p
  2593. gnus-agent-get-undownloaded-list gnus-agent-fetch-session
  2594. gnus-summary-set-agent-mark gnus-agent-save-group-info
  2595. gnus-agent-request-article gnus-agent-retrieve-headers
  2596. gnus-agent-store-article gnus-agent-group-covered-p)
  2597. ("gnus-agent" :interactive t
  2598. gnus-unplugged gnus-agentize gnus-agent-batch)
  2599. ("gnus-vm" :interactive t gnus-summary-save-in-vm
  2600. gnus-summary-save-article-vm)
  2601. ("compface" uncompface)
  2602. ("gnus-draft" :interactive t gnus-draft-mode gnus-group-send-queue)
  2603. ("gnus-mlspl" gnus-group-split gnus-group-split-fancy)
  2604. ("gnus-mlspl" :interactive t gnus-group-split-setup
  2605. gnus-group-split-update)
  2606. ("gnus-delay" gnus-delay-initialize))))
  2607. ;;; gnus-sum.el thingies
  2608. (defcustom gnus-summary-line-format "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n"
  2609. "*The format specification of the lines in the summary buffer.
  2610. It works along the same lines as a normal formatting string,
  2611. with some simple extensions.
  2612. %N Article number, left padded with spaces (string)
  2613. %S Subject (string)
  2614. %s Subject if it is at the root of a thread, and \"\"
  2615. otherwise (string)
  2616. %n Name of the poster (string)
  2617. %a Extracted name of the poster (string)
  2618. %A Extracted address of the poster (string)
  2619. %F Contents of the From: header (string)
  2620. %f Contents of the From: or To: headers (string)
  2621. %x Contents of the Xref: header (string)
  2622. %D Date of the article (string)
  2623. %d Date of the article (string) in DD-MMM format
  2624. %o Date of the article (string) in YYYYMMDD`T'HHMMSS
  2625. format
  2626. %M Message-id of the article (string)
  2627. %r References of the article (string)
  2628. %c Number of characters in the article (integer)
  2629. %k Pretty-printed version of the above (string)
  2630. For example, \"1.2k\" or \"0.4M\".
  2631. %L Number of lines in the article (integer)
  2632. %I Indentation based on thread level (a string of
  2633. spaces)
  2634. %B A complex trn-style thread tree (string)
  2635. The variables `gnus-sum-thread-*' can be used for
  2636. customization.
  2637. %T A string with two possible values: 80 spaces if the
  2638. article is on thread level two or larger and 0 spaces
  2639. on level one
  2640. %R \"A\" if this article has been replied to, \" \"
  2641. otherwise (character)
  2642. %U \"Read\" status of this article.
  2643. See Info node `(gnus)Marking Articles'
  2644. %[ Opening bracket (character, \"[\" or \"<\")
  2645. %] Closing bracket (character, \"]\" or \">\")
  2646. %> Spaces of length thread-level (string)
  2647. %< Spaces of length (- 20 thread-level) (string)
  2648. %i Article score (number)
  2649. %z Article zcore (character)
  2650. %t Number of articles under the current thread (number).
  2651. %e Whether the thread is empty or not (character).
  2652. %V Total thread score (number).
  2653. %P The line number (number).
  2654. %O Download mark (character).
  2655. %* If present, indicates desired cursor position
  2656. (instead of after first colon).
  2657. %u User defined specifier. The next character in the
  2658. format string should be a letter. Gnus will call the
  2659. function gnus-user-format-function-X, where X is the
  2660. letter following %u. The function will be passed the
  2661. current header as argument. The function should
  2662. return a string, which will be inserted into the
  2663. summary just like information from any other summary
  2664. specifier.
  2665. &user-date; Age sensitive date format. Various date format is
  2666. defined in `gnus-summary-user-date-format-alist'.
  2667. The %U (status), %R (replied) and %z (zcore) specs have to be handled
  2668. with care. For reasons of efficiency, Gnus will compute what column
  2669. these characters will end up in, and \"hard-code\" that. This means that
  2670. it is invalid to have these specs after a variable-length spec. Well,
  2671. you might not be arrested, but your summary buffer will look strange,
  2672. which is bad enough.
  2673. The smart choice is to have these specs as far to the left as
  2674. possible.
  2675. This restriction may disappear in later versions of Gnus.
  2676. General format specifiers can also be used.
  2677. See Info node `(gnus)Formatting Variables'."
  2678. :link '(custom-manual "(gnus)Formatting Variables")
  2679. :type 'string
  2680. :group 'gnus-summary-format)
  2681. ;;;
  2682. ;;; Skeleton keymaps
  2683. ;;;
  2684. (defun gnus-suppress-keymap (keymap)
  2685. (suppress-keymap keymap)
  2686. (let ((keys `([backspace] [delete] "\177" "\M-u"))) ;gnus-mouse-2
  2687. (while keys
  2688. (define-key keymap (pop keys) 'undefined))))
  2689. (defvar gnus-article-mode-map
  2690. (let ((keymap (make-sparse-keymap)))
  2691. (gnus-suppress-keymap keymap)
  2692. keymap))
  2693. (defvar gnus-summary-mode-map
  2694. (let ((keymap (make-keymap)))
  2695. (gnus-suppress-keymap keymap)
  2696. keymap))
  2697. (defvar gnus-group-mode-map
  2698. (let ((keymap (make-keymap)))
  2699. (gnus-suppress-keymap keymap)
  2700. keymap))
  2701. ;; Fix by Hallvard B Furuseth <h.b.furuseth@usit.uio.no>.
  2702. ;; If you want the cursor to go somewhere else, set these two
  2703. ;; functions in some startup hook to whatever you want.
  2704. (defalias 'gnus-summary-position-point 'gnus-goto-colon)
  2705. (defalias 'gnus-group-position-point 'gnus-goto-colon)
  2706. ;;; Various macros and substs.
  2707. (defun gnus-header-from (header)
  2708. (mail-header-from header))
  2709. (defmacro gnus-gethash (string hashtable)
  2710. "Get hash value of STRING in HASHTABLE."
  2711. `(symbol-value (intern-soft ,string ,hashtable)))
  2712. (defmacro gnus-gethash-safe (string hashtable)
  2713. "Get hash value of STRING in HASHTABLE.
  2714. Return nil if not defined."
  2715. `(let ((sym (intern-soft ,string ,hashtable)))
  2716. (and (boundp sym) (symbol-value sym))))
  2717. (defmacro gnus-sethash (string value hashtable)
  2718. "Set hash value. Arguments are STRING, VALUE, and HASHTABLE."
  2719. `(set (intern ,string ,hashtable) ,value))
  2720. (put 'gnus-sethash 'edebug-form-spec '(form form form))
  2721. (defmacro gnus-group-unread (group)
  2722. "Get the currently computed number of unread articles in GROUP."
  2723. `(car (gnus-gethash ,group gnus-newsrc-hashtb)))
  2724. (defmacro gnus-group-entry (group)
  2725. "Get the newsrc entry for GROUP."
  2726. `(gnus-gethash ,group gnus-newsrc-hashtb))
  2727. (defmacro gnus-active (group)
  2728. "Get active info on GROUP."
  2729. `(gnus-gethash ,group gnus-active-hashtb))
  2730. (defmacro gnus-set-active (group active)
  2731. "Set GROUP's active info."
  2732. `(gnus-sethash ,group ,active gnus-active-hashtb))
  2733. ;; Info access macros.
  2734. (defmacro gnus-info-group (info)
  2735. `(nth 0 ,info))
  2736. (defmacro gnus-info-rank (info)
  2737. `(nth 1 ,info))
  2738. (defmacro gnus-info-read (info)
  2739. `(nth 2 ,info))
  2740. (defmacro gnus-info-marks (info)
  2741. `(nth 3 ,info))
  2742. (defmacro gnus-info-method (info)
  2743. `(nth 4 ,info))
  2744. (defmacro gnus-info-params (info)
  2745. `(nth 5 ,info))
  2746. (defmacro gnus-info-level (info)
  2747. `(let ((rank (gnus-info-rank ,info)))
  2748. (if (consp rank)
  2749. (car rank)
  2750. rank)))
  2751. (defmacro gnus-info-score (info)
  2752. `(let ((rank (gnus-info-rank ,info)))
  2753. (or (and (consp rank) (cdr rank)) 0)))
  2754. (defmacro gnus-info-set-group (info group)
  2755. `(setcar ,info ,group))
  2756. (defmacro gnus-info-set-rank (info rank)
  2757. `(setcar (nthcdr 1 ,info) ,rank))
  2758. (defmacro gnus-info-set-read (info read)
  2759. `(setcar (nthcdr 2 ,info) ,read))
  2760. (defmacro gnus-info-set-marks (info marks &optional extend)
  2761. (if extend
  2762. `(gnus-info-set-entry ,info ,marks 3)
  2763. `(setcar (nthcdr 3 ,info) ,marks)))
  2764. (defmacro gnus-info-set-method (info method &optional extend)
  2765. (if extend
  2766. `(gnus-info-set-entry ,info ,method 4)
  2767. `(setcar (nthcdr 4 ,info) ,method)))
  2768. (defmacro gnus-info-set-params (info params &optional extend)
  2769. (if extend
  2770. `(gnus-info-set-entry ,info ,params 5)
  2771. `(setcar (nthcdr 5 ,info) ,params)))
  2772. (defun gnus-info-set-entry (info entry number)
  2773. ;; Extend the info until we have enough elements.
  2774. (while (<= (length info) number)
  2775. (nconc info (list nil)))
  2776. ;; Set the entry.
  2777. (setcar (nthcdr number info) entry))
  2778. (defmacro gnus-info-set-level (info level)
  2779. `(let ((rank (cdr ,info)))
  2780. (if (consp (car rank))
  2781. (setcar (car rank) ,level)
  2782. (setcar rank ,level))))
  2783. (defmacro gnus-info-set-score (info score)
  2784. `(let ((rank (cdr ,info)))
  2785. (if (consp (car rank))
  2786. (setcdr (car rank) ,score)
  2787. (setcar rank (cons (car rank) ,score)))))
  2788. (defmacro gnus-get-info (group)
  2789. `(nth 2 (gnus-gethash ,group gnus-newsrc-hashtb)))
  2790. (defun gnus-set-info (group info)
  2791. (setcar (nthcdr 2 (gnus-gethash group gnus-newsrc-hashtb))
  2792. info))
  2793. ;;; Load the compatibility functions.
  2794. (require 'gnus-ems)
  2795. ;;;
  2796. ;;; Shutdown
  2797. ;;;
  2798. (defvar gnus-shutdown-alist nil)
  2799. (defun gnus-add-shutdown (function &rest symbols)
  2800. "Run FUNCTION whenever one of SYMBOLS is shut down."
  2801. (push (cons function symbols) gnus-shutdown-alist))
  2802. (defun gnus-shutdown (symbol)
  2803. "Shut down everything that waits for SYMBOL."
  2804. (dolist (entry gnus-shutdown-alist)
  2805. (when (memq symbol (cdr entry))
  2806. (funcall (car entry)))))
  2807. ;;;
  2808. ;;; Gnus Utility Functions
  2809. ;;;
  2810. (defun gnus-find-subscribed-addresses ()
  2811. "Return a regexp matching the addresses of all subscribed mail groups.
  2812. It consists of the `to-address' or `to-list' parameter of all groups
  2813. with a `subscribed' parameter."
  2814. (let (group address addresses)
  2815. (dolist (entry (cdr gnus-newsrc-alist))
  2816. (setq group (car entry))
  2817. (when (gnus-parameter-subscribed group)
  2818. (setq address (mail-strip-quoted-names
  2819. (or (gnus-group-fast-parameter group 'to-address)
  2820. (gnus-group-fast-parameter group 'to-list))))
  2821. (when address
  2822. (add-to-list 'addresses address))))
  2823. (when addresses
  2824. (list (mapconcat 'regexp-quote addresses "\\|")))))
  2825. (defmacro gnus-string-or (&rest strings)
  2826. "Return the first element of STRINGS that is a non-blank string.
  2827. STRINGS will be evaluated in normal `or' order."
  2828. `(gnus-string-or-1 (list ,@strings)))
  2829. (defun gnus-string-or-1 (strings)
  2830. (let (string)
  2831. (while strings
  2832. (setq string (pop strings))
  2833. (if (string-match "^[ \t]*$" string)
  2834. (setq string nil)
  2835. (setq strings nil)))
  2836. string))
  2837. (defun gnus-version (&optional arg)
  2838. "Version number of this version of Gnus.
  2839. If ARG, insert string at point."
  2840. (interactive "P")
  2841. (if arg
  2842. (insert (message gnus-version))
  2843. (message gnus-version)))
  2844. (defun gnus-continuum-version (&optional version)
  2845. "Return VERSION as a floating point number."
  2846. (unless version
  2847. (setq version gnus-version))
  2848. (when (or (string-match "^\\([^ ]+\\)? ?Gnus v?\\([0-9.]+\\)$" version)
  2849. (string-match "^\\(.?\\)gnus-\\([0-9.]+\\)$" version))
  2850. (let ((alpha (and (match-beginning 1) (match-string 1 version)))
  2851. (number (match-string 2 version))
  2852. major minor least)
  2853. (unless (string-match
  2854. "\\([0-9]\\)\\.\\([0-9]+\\)\\.?\\([0-9]+\\)?" number)
  2855. (error "Invalid version string: %s" version))
  2856. (setq major (string-to-number (match-string 1 number))
  2857. minor (string-to-number (match-string 2 number))
  2858. least (if (match-beginning 3)
  2859. (string-to-number (match-string 3 number))
  2860. 0))
  2861. (string-to-number
  2862. (if (zerop major)
  2863. (format "%s00%02d%02d"
  2864. (if (member alpha '("(ding)" "d"))
  2865. "4.99"
  2866. (+ 5 (* 0.02
  2867. (abs
  2868. (- (mm-char-int (aref (downcase alpha) 0))
  2869. (mm-char-int ?t))))
  2870. -0.01))
  2871. minor least)
  2872. (format "%d.%02d%02d" major minor least))))))
  2873. (defun gnus-info-find-node (&optional nodename)
  2874. "Find Info documentation of Gnus."
  2875. (interactive)
  2876. ;; Enlarge info window if needed.
  2877. (let (gnus-info-buffer)
  2878. (Info-goto-node (or nodename (cadr (assq major-mode gnus-info-nodes))))
  2879. (setq gnus-info-buffer (current-buffer))
  2880. (gnus-configure-windows 'info)))
  2881. ;;;
  2882. ;;; gnus-interactive
  2883. ;;;
  2884. (defvar gnus-current-prefix-symbol nil
  2885. "Current prefix symbol.")
  2886. (defvar gnus-current-prefix-symbols nil
  2887. "List of current prefix symbols.")
  2888. (defun gnus-interactive (string &optional params)
  2889. "Return a list that can be fed to `interactive'.
  2890. See `interactive' for full documentation.
  2891. Adds the following specs:
  2892. y -- The current symbolic prefix.
  2893. Y -- A list of the current symbolic prefix(es).
  2894. A -- Article number.
  2895. H -- Article header.
  2896. g -- Group name."
  2897. (let ((i 0)
  2898. out c prompt)
  2899. (while (< i (length string))
  2900. (string-match ".\\([^\n]*\\)\n?" string i)
  2901. (setq c (aref string i))
  2902. (when (match-end 1)
  2903. (setq prompt (match-string 1 string)))
  2904. (setq i (match-end 0))
  2905. ;; We basically emulate just about everything that
  2906. ;; `interactive' does, but add the specs listed above.
  2907. (push
  2908. (cond
  2909. ((= c ?a)
  2910. (completing-read prompt obarray 'fboundp t))
  2911. ((= c ?b)
  2912. (read-buffer prompt (current-buffer) t))
  2913. ((= c ?B)
  2914. (read-buffer prompt (other-buffer (current-buffer))))
  2915. ((= c ?c)
  2916. (read-char))
  2917. ((= c ?C)
  2918. (completing-read prompt obarray 'commandp t))
  2919. ((= c ?d)
  2920. (point))
  2921. ((= c ?D)
  2922. (read-directory-name prompt nil default-directory 'lambda))
  2923. ((= c ?f)
  2924. (read-file-name prompt nil nil 'lambda))
  2925. ((= c ?F)
  2926. (read-file-name prompt))
  2927. ((= c ?k)
  2928. (read-key-sequence prompt))
  2929. ((= c ?K)
  2930. (error "Not implemented spec"))
  2931. ((= c ?e)
  2932. (error "Not implemented spec"))
  2933. ((= c ?m)
  2934. (mark))
  2935. ((= c ?N)
  2936. (error "Not implemented spec"))
  2937. ((= c ?n)
  2938. (string-to-number (read-from-minibuffer prompt)))
  2939. ((= c ?p)
  2940. (prefix-numeric-value current-prefix-arg))
  2941. ((= c ?P)
  2942. current-prefix-arg)
  2943. ((= c ?r)
  2944. 'gnus-prefix-nil)
  2945. ((= c ?s)
  2946. (read-string prompt))
  2947. ((= c ?S)
  2948. (intern (read-string prompt)))
  2949. ((= c ?v)
  2950. (read-variable prompt))
  2951. ((= c ?x)
  2952. (read-minibuffer prompt))
  2953. ((= c ?x)
  2954. (eval-minibuffer prompt))
  2955. ;; And here the new specs come.
  2956. ((= c ?y)
  2957. gnus-current-prefix-symbol)
  2958. ((= c ?Y)
  2959. gnus-current-prefix-symbols)
  2960. ((= c ?g)
  2961. (gnus-group-group-name))
  2962. ((= c ?A)
  2963. (gnus-summary-skip-intangible)
  2964. (or (get-text-property (point) 'gnus-number)
  2965. (gnus-summary-last-subject)))
  2966. ((= c ?H)
  2967. (gnus-data-header (gnus-data-find (gnus-summary-article-number))))
  2968. (t
  2969. (error "Non-implemented spec")))
  2970. out)
  2971. (cond
  2972. ((= c ?r)
  2973. (push (if (< (point) (mark)) (point) (mark)) out)
  2974. (push (if (> (point) (mark)) (point) (mark)) out))))
  2975. (setq out (delq 'gnus-prefix-nil out))
  2976. (nreverse out)))
  2977. (defun gnus-symbolic-argument (&optional arg)
  2978. "Read a symbolic argument and a command, and then execute command."
  2979. (interactive "P")
  2980. (let* ((in-command (this-command-keys))
  2981. (command in-command)
  2982. gnus-current-prefix-symbols
  2983. gnus-current-prefix-symbol
  2984. syms)
  2985. (while (equal in-command command)
  2986. (message "%s-" (key-description (this-command-keys)))
  2987. (push (intern (char-to-string (read-char))) syms)
  2988. (setq command (read-key-sequence nil t)))
  2989. (setq gnus-current-prefix-symbols (nreverse syms)
  2990. gnus-current-prefix-symbol (car gnus-current-prefix-symbols))
  2991. (call-interactively (key-binding command t))))
  2992. ;;; More various functions.
  2993. (defsubst gnus-check-backend-function (func group)
  2994. "Check whether GROUP supports function FUNC.
  2995. GROUP can either be a string (a group name) or a select method."
  2996. (ignore-errors
  2997. (let ((method (if (stringp group)
  2998. (car (gnus-find-method-for-group group))
  2999. group)))
  3000. (unless (featurep method)
  3001. (require method))
  3002. (fboundp (intern (format "%s-%s" method func))))))
  3003. (defun gnus-group-read-only-p (&optional group)
  3004. "Check whether GROUP supports editing or not.
  3005. If GROUP is nil, `gnus-newsgroup-name' will be checked instead. Note
  3006. that that variable is buffer-local to the summary buffers."
  3007. (let ((group (or group gnus-newsgroup-name)))
  3008. (not (gnus-check-backend-function 'request-replace-article group))))
  3009. (defun gnus-virtual-group-p (group)
  3010. "Say whether GROUP is virtual or not."
  3011. (memq 'virtual (assoc (symbol-name (car (gnus-find-method-for-group group)))
  3012. gnus-valid-select-methods)))
  3013. (defun gnus-news-group-p (group &optional article)
  3014. "Return non-nil if GROUP (and ARTICLE) come from a news server."
  3015. (cond ((gnus-member-of-valid 'post group) ;Ordinary news group
  3016. t) ;is news of course.
  3017. ((not (gnus-member-of-valid 'post-mail group)) ;Non-combined.
  3018. nil) ;must be mail then.
  3019. ((vectorp article) ;Has header info.
  3020. (eq (gnus-request-type group (mail-header-id article)) 'news))
  3021. ((null article) ;Hasn't header info
  3022. (eq (gnus-request-type group) 'news)) ;(unknown ==> mail)
  3023. ((< article 0) ;Virtual message
  3024. nil) ;we don't know, guess mail.
  3025. (t ;Has positive number
  3026. (eq (gnus-request-type group article) 'news)))) ;use it.
  3027. ;; Returns a list of writable groups.
  3028. (defun gnus-writable-groups ()
  3029. (let ((alist gnus-newsrc-alist)
  3030. groups group)
  3031. (while (setq group (car (pop alist)))
  3032. (unless (gnus-group-read-only-p group)
  3033. (push group groups)))
  3034. (nreverse groups)))
  3035. ;; Check whether to use long file names.
  3036. (defun gnus-use-long-file-name (symbol)
  3037. ;; The variable has to be set...
  3038. (and gnus-use-long-file-name
  3039. ;; If it isn't a list, then we return t.
  3040. (or (not (listp gnus-use-long-file-name))
  3041. ;; If it is a list, and the list contains `symbol', we
  3042. ;; return nil.
  3043. (not (memq symbol gnus-use-long-file-name)))))
  3044. ;; Generate a unique new group name.
  3045. (defun gnus-generate-new-group-name (leaf)
  3046. (let ((name leaf)
  3047. (num 0))
  3048. (while (gnus-group-entry name)
  3049. (setq name (concat leaf "<" (int-to-string (setq num (1+ num))) ">")))
  3050. name))
  3051. (defun gnus-ephemeral-group-p (group)
  3052. "Say whether GROUP is ephemeral or not."
  3053. (gnus-group-get-parameter group 'quit-config t))
  3054. (defun gnus-group-quit-config (group)
  3055. "Return the quit-config of GROUP."
  3056. (gnus-group-get-parameter group 'quit-config t))
  3057. (defun gnus-kill-ephemeral-group (group)
  3058. "Remove ephemeral GROUP from relevant structures."
  3059. (gnus-sethash group nil gnus-newsrc-hashtb))
  3060. (defun gnus-simplify-mode-line ()
  3061. "Make mode lines a bit simpler."
  3062. (setq mode-line-modified (cdr gnus-mode-line-modified))
  3063. (when (listp mode-line-format)
  3064. (make-local-variable 'mode-line-format)
  3065. (setq mode-line-format (copy-sequence mode-line-format))
  3066. (when (equal (nth 3 mode-line-format) " ")
  3067. (setcar (nthcdr 3 mode-line-format) " "))))
  3068. ;;; Servers and groups.
  3069. (defsubst gnus-server-add-address (method)
  3070. (let ((method-name (symbol-name (car method))))
  3071. (if (and (memq 'address (assoc method-name gnus-valid-select-methods))
  3072. (not (assq (intern (concat method-name "-address")) method))
  3073. (memq 'physical-address (assq (car method)
  3074. gnus-valid-select-methods)))
  3075. (append method (list (list (intern (concat method-name "-address"))
  3076. (nth 1 method))))
  3077. method)))
  3078. (defsubst gnus-method-to-server (method &optional nocache no-enter-cache)
  3079. (catch 'server-name
  3080. (setq method (or method gnus-select-method))
  3081. ;; Perhaps it is already in the cache.
  3082. (unless nocache
  3083. (mapc (lambda (name-method)
  3084. (if (equal (cdr name-method) method)
  3085. (throw 'server-name (car name-method))))
  3086. gnus-server-method-cache))
  3087. (mapc
  3088. (lambda (server-alist)
  3089. (mapc (lambda (name-method)
  3090. (when (gnus-methods-equal-p (cdr name-method) method)
  3091. (unless (member name-method gnus-server-method-cache)
  3092. (push name-method gnus-server-method-cache))
  3093. (throw 'server-name (car name-method))))
  3094. server-alist))
  3095. (list gnus-server-alist
  3096. gnus-predefined-server-alist))
  3097. (let* ((name (if (member (cadr method) '(nil ""))
  3098. (format "%s" (car method))
  3099. (format "%s:%s" (car method) (cadr method))))
  3100. (name-method (cons name method)))
  3101. (when (and (not (member name-method gnus-server-method-cache))
  3102. (not no-enter-cache)
  3103. (not (assoc (car name-method) gnus-server-method-cache)))
  3104. (push name-method gnus-server-method-cache))
  3105. name)))
  3106. (defsubst gnus-server-to-method (server)
  3107. "Map virtual server names to select methods."
  3108. (or (and server (listp server) server)
  3109. (cdr (assoc server gnus-server-method-cache))
  3110. (let ((result
  3111. (or
  3112. ;; Perhaps this is the native server?
  3113. (and (equal server "native") gnus-select-method)
  3114. ;; It should be in the server alist.
  3115. (cdr (assoc server gnus-server-alist))
  3116. ;; It could be in the predefined server alist.
  3117. (cdr (assoc server gnus-predefined-server-alist))
  3118. ;; If not, we look through all the opened server
  3119. ;; to see whether we can find it there.
  3120. (let ((opened gnus-opened-servers))
  3121. (while (and opened
  3122. (not (equal server (format "%s:%s" (caaar opened)
  3123. (cadaar opened)))))
  3124. (pop opened))
  3125. (caar opened))
  3126. ;; It could be a named method, search all servers
  3127. (let ((servers gnus-secondary-select-methods))
  3128. (while (and servers
  3129. (not (equal server (format "%s:%s" (caar servers)
  3130. (cadar servers)))))
  3131. (pop servers))
  3132. (car servers))
  3133. ;; This could be some sort of foreign server that I
  3134. ;; simply haven't opened (yet). Do a brute-force scan
  3135. ;; of the entire gnus-newsrc-alist for the server name
  3136. ;; of every method. As a side-effect, loads the
  3137. ;; gnus-server-method-cache so this only happens once,
  3138. ;; if at all.
  3139. (let ((alist (cdr gnus-newsrc-alist))
  3140. method match)
  3141. (while alist
  3142. (setq method (gnus-info-method (pop alist)))
  3143. (when (and (not (stringp method))
  3144. (equal server
  3145. (gnus-method-to-server method nil t)))
  3146. (setq match method
  3147. alist nil)))
  3148. match))))
  3149. (when (and result
  3150. (not (assoc server gnus-server-method-cache)))
  3151. (push (cons server result) gnus-server-method-cache))
  3152. result)))
  3153. (defsubst gnus-server-get-method (group method)
  3154. ;; Input either a server name, and extended server name, or a
  3155. ;; select method, and return a select method.
  3156. (cond ((stringp method)
  3157. (gnus-server-to-method method))
  3158. ((equal method gnus-select-method)
  3159. gnus-select-method)
  3160. ((and (stringp (car method))
  3161. group)
  3162. (gnus-server-extend-method group method))
  3163. ((and method
  3164. (not group)
  3165. (equal (cadr method) ""))
  3166. method)
  3167. (t
  3168. (gnus-server-add-address method))))
  3169. (defmacro gnus-method-equal (ss1 ss2)
  3170. "Say whether two servers are equal."
  3171. `(let ((s1 ,ss1)
  3172. (s2 ,ss2))
  3173. (or (equal s1 s2)
  3174. (and (= (length s1) (length s2))
  3175. (progn
  3176. (while (and s1 (member (car s1) s2))
  3177. (setq s1 (cdr s1)))
  3178. (null s1))))))
  3179. (defun gnus-methods-equal-p (m1 m2)
  3180. (let ((m1 (or m1 gnus-select-method))
  3181. (m2 (or m2 gnus-select-method)))
  3182. (or (equal m1 m2)
  3183. (and (eq (car m1) (car m2))
  3184. (or (not (memq 'address (assoc (symbol-name (car m1))
  3185. gnus-valid-select-methods)))
  3186. (equal (nth 1 m1) (nth 1 m2)))))))
  3187. (defsubst gnus-sloppily-equal-method-parameters (m1 m2)
  3188. ;; Check parameters for sloppy equality.
  3189. (let ((p1 (copy-sequence (cddr m1)))
  3190. (p2 (copy-sequence (cddr m2)))
  3191. e1 e2)
  3192. (block nil
  3193. (while (setq e1 (pop p1))
  3194. (unless (setq e2 (assq (car e1) p2))
  3195. ;; The parameter doesn't exist in p2.
  3196. (return nil))
  3197. (setq p2 (delq e2 p2))
  3198. (unless (equal e1 e2)
  3199. (if (not (and (stringp (cadr e1))
  3200. (stringp (cadr e2))))
  3201. (return nil)
  3202. ;; Special-case string parameter comparison so that we
  3203. ;; can uniquify them.
  3204. (let ((s1 (cadr e1))
  3205. (s2 (cadr e2)))
  3206. (when (string-match "/$" s1)
  3207. (setq s1 (directory-file-name s1)))
  3208. (when (string-match "/$" s2)
  3209. (setq s2 (directory-file-name s2)))
  3210. (unless (equal s1 s2)
  3211. (return nil))))))
  3212. ;; If p2 now is empty, they were equal.
  3213. (null p2))))
  3214. (defun gnus-method-ephemeral-p (method)
  3215. (let ((equal nil))
  3216. (dolist (ephemeral gnus-ephemeral-servers)
  3217. (when (gnus-sloppily-equal-method-parameters method ephemeral)
  3218. (setq equal t)))
  3219. equal))
  3220. (defun gnus-methods-sloppily-equal (m1 m2)
  3221. ;; Same method.
  3222. (or
  3223. (eq m1 m2)
  3224. ;; Type and name are equal.
  3225. (and
  3226. (eq (car m1) (car m2))
  3227. (equal (cadr m1) (cadr m2))
  3228. (gnus-sloppily-equal-method-parameters m1 m2))))
  3229. (defun gnus-server-equal (m1 m2)
  3230. "Say whether two methods are equal."
  3231. (let ((m1 (cond ((null m1) gnus-select-method)
  3232. ((stringp m1) (gnus-server-to-method m1))
  3233. (t m1)))
  3234. (m2 (cond ((null m2) gnus-select-method)
  3235. ((stringp m2) (gnus-server-to-method m2))
  3236. (t m2))))
  3237. (gnus-method-equal m1 m2)))
  3238. (defun gnus-servers-using-backend (backend)
  3239. "Return a list of known servers using BACKEND."
  3240. (let ((opened gnus-opened-servers)
  3241. out)
  3242. (while opened
  3243. (when (eq backend (caaar opened))
  3244. (push (caar opened) out))
  3245. (pop opened))
  3246. out))
  3247. (defun gnus-archive-server-wanted-p ()
  3248. "Say whether the user wants to use the archive server."
  3249. (cond
  3250. ((or (not gnus-message-archive-method)
  3251. (not gnus-message-archive-group))
  3252. nil)
  3253. ((and gnus-message-archive-method gnus-message-archive-group)
  3254. t)
  3255. (t
  3256. (let ((active (cadr (assq 'nnfolder-active-file
  3257. gnus-message-archive-method))))
  3258. (and active
  3259. (file-exists-p active))))))
  3260. (defsubst gnus-method-to-server-name (method)
  3261. (concat
  3262. (format "%s" (car method))
  3263. (when (and
  3264. (or (assoc (format "%s" (car method))
  3265. (gnus-methods-using 'address))
  3266. (gnus-server-equal method gnus-message-archive-method))
  3267. (nth 1 method)
  3268. (not (string= (nth 1 method) "")))
  3269. (concat "+" (nth 1 method)))))
  3270. (defsubst gnus-method-to-full-server-name (method)
  3271. (format "%s+%s" (car method) (nth 1 method)))
  3272. (defun gnus-group-prefixed-name (group method &optional full)
  3273. "Return the whole name from GROUP and METHOD.
  3274. Call with full set to get the fully qualified group name (even if the
  3275. server is native)."
  3276. (when (stringp method)
  3277. (setq method (gnus-server-to-method method)))
  3278. (if (or (not method)
  3279. (and (not full) (gnus-server-equal method "native"))
  3280. ;;;!!! This might not be right. We'll see...
  3281. ;(string-match ":" group)
  3282. )
  3283. group
  3284. (concat (gnus-method-to-server-name method) ":" group)))
  3285. (defun gnus-group-guess-prefixed-name (group)
  3286. "Guess the whole name from GROUP and METHOD."
  3287. (gnus-group-prefixed-name group (gnus-find-method-for-group
  3288. group)))
  3289. (defun gnus-group-full-name (group method)
  3290. "Return the full name from GROUP and METHOD, even if the method is native."
  3291. (gnus-group-prefixed-name group method t))
  3292. (defun gnus-group-guess-full-name (group)
  3293. "Guess the full name from GROUP, even if the method is native."
  3294. (if (gnus-group-prefixed-p group)
  3295. group
  3296. (gnus-group-full-name group (gnus-find-method-for-group group))))
  3297. (defun gnus-group-guess-full-name-from-command-method (group)
  3298. "Guess the full name from GROUP, even if the method is native."
  3299. (if (gnus-group-prefixed-p group)
  3300. group
  3301. (gnus-group-full-name group gnus-command-method)))
  3302. (defun gnus-group-real-prefix (group)
  3303. "Return the prefix of the current group name."
  3304. (if (stringp group)
  3305. (if (string-match "^[^:]+:" group)
  3306. (substring group 0 (match-end 0))
  3307. "")
  3308. nil))
  3309. (defun gnus-group-short-name (group)
  3310. "Return the short group name."
  3311. (let ((prefix (gnus-group-real-prefix group)))
  3312. (if (< 0 (length prefix))
  3313. (substring group (length prefix) nil)
  3314. group)))
  3315. (defun gnus-group-prefixed-p (group)
  3316. "Return the prefix of the current group name."
  3317. (< 0 (length (gnus-group-real-prefix group))))
  3318. (declare-function gnus-group-decoded-name "gnus-group" (string))
  3319. (defun gnus-summary-buffer-name (group)
  3320. "Return the summary buffer name of GROUP."
  3321. (concat "*Summary " (gnus-group-decoded-name group) "*"))
  3322. (defun gnus-group-method (group)
  3323. "Return the server or method used for selecting GROUP.
  3324. You should probably use `gnus-find-method-for-group' instead."
  3325. (let ((prefix (gnus-group-real-prefix group)))
  3326. (if (equal prefix "")
  3327. gnus-select-method
  3328. (let ((servers gnus-opened-servers)
  3329. (server "")
  3330. backend possible found)
  3331. (if (string-match "^[^\\+]+\\+" prefix)
  3332. (setq backend (intern (substring prefix 0 (1- (match-end 0))))
  3333. server (substring prefix (match-end 0) (1- (length prefix))))
  3334. (setq backend (intern (substring prefix 0 (1- (length prefix))))))
  3335. (while servers
  3336. (when (eq (caaar servers) backend)
  3337. (setq possible (caar servers))
  3338. (when (equal (cadaar servers) server)
  3339. (setq found (caar servers))))
  3340. (pop servers))
  3341. (or (car (rassoc found gnus-server-alist))
  3342. found
  3343. (car (rassoc possible gnus-server-alist))
  3344. possible
  3345. (list backend server))))))
  3346. (defsubst gnus-native-method-p (method)
  3347. "Return whether METHOD is the native select method."
  3348. (gnus-method-equal method gnus-select-method))
  3349. (defsubst gnus-secondary-method-p (method)
  3350. "Return whether METHOD is a secondary select method."
  3351. (let ((methods gnus-secondary-select-methods)
  3352. (gmethod (inline (gnus-server-get-method nil method))))
  3353. (while (and methods
  3354. (not (gnus-method-equal
  3355. (inline (gnus-server-get-method nil (car methods)))
  3356. gmethod)))
  3357. (setq methods (cdr methods)))
  3358. methods))
  3359. (defun gnus-method-simplify (method)
  3360. "Return the shortest uniquely identifying string or method for METHOD."
  3361. (cond ((stringp method)
  3362. method)
  3363. ((gnus-native-method-p method)
  3364. nil)
  3365. ((gnus-secondary-method-p method)
  3366. (format "%s:%s" (nth 0 method) (nth 1 method)))
  3367. (t
  3368. method)))
  3369. (defun gnus-groups-from-server (server)
  3370. "Return a list of all groups that are fetched from SERVER."
  3371. (let ((alist (cdr gnus-newsrc-alist))
  3372. info groups)
  3373. (while (setq info (pop alist))
  3374. (when (gnus-server-equal (gnus-info-method info) server)
  3375. (push (gnus-info-group info) groups)))
  3376. (sort groups 'string<)))
  3377. (defun gnus-group-foreign-p (group)
  3378. "Say whether a group is foreign or not."
  3379. (and (not (gnus-group-native-p group))
  3380. (not (gnus-group-secondary-p group))))
  3381. (defun gnus-group-native-p (group)
  3382. "Say whether the group is native or not."
  3383. (not (string-match ":" group)))
  3384. (defun gnus-group-secondary-p (group)
  3385. "Say whether the group is secondary or not."
  3386. (gnus-secondary-method-p (gnus-find-method-for-group group)))
  3387. (defun gnus-parameters-get-parameter (group)
  3388. "Return the group parameters for GROUP from `gnus-parameters'."
  3389. (let ((case-fold-search (if (eq gnus-parameters-case-fold-search 'default)
  3390. case-fold-search
  3391. gnus-parameters-case-fold-search))
  3392. params-list)
  3393. (dolist (elem gnus-parameters)
  3394. (when (string-match (car elem) group)
  3395. (setq params-list
  3396. (nconc (gnus-expand-group-parameters
  3397. (car elem) (cdr elem) group)
  3398. params-list))))
  3399. params-list))
  3400. (defun gnus-expand-group-parameter (match value group)
  3401. "Use MATCH to expand VALUE in GROUP."
  3402. (let ((start (string-match match group)))
  3403. (if start
  3404. (let ((matched-string (substring group start (match-end 0))))
  3405. ;; Build match groups
  3406. (string-match match matched-string)
  3407. (replace-match value nil nil matched-string))
  3408. group)))
  3409. (defun gnus-expand-group-parameters (match parameters group)
  3410. "Go through PARAMETERS and expand them according to the match data."
  3411. (let (new)
  3412. (dolist (elem parameters)
  3413. (if (and (stringp (cdr elem))
  3414. (string-match "\\\\[0-9&]" (cdr elem)))
  3415. (push (cons (car elem)
  3416. (gnus-expand-group-parameter match (cdr elem) group))
  3417. new)
  3418. (push elem new)))
  3419. new))
  3420. (defun gnus-group-fast-parameter (group symbol &optional allow-list)
  3421. "For GROUP, return the value of SYMBOL.
  3422. You should call this in the `gnus-group-buffer' buffer.
  3423. The function `gnus-group-find-parameter' will do that for you."
  3424. ;; The speed trick: No cons'ing and quit early.
  3425. (let* ((params (funcall gnus-group-get-parameter-function group))
  3426. ;; Start easy, check the "real" group parameters.
  3427. (simple-results
  3428. (gnus-group-parameter-value params symbol allow-list t)))
  3429. (if simple-results
  3430. ;; Found results; return them.
  3431. (car simple-results)
  3432. ;; We didn't find it there, try `gnus-parameters'.
  3433. (let ((result nil)
  3434. (head nil)
  3435. (tail gnus-parameters))
  3436. ;; A good old-fashioned non-cl loop.
  3437. (while tail
  3438. (setq head (car tail)
  3439. tail (cdr tail))
  3440. ;; The car is regexp matching for matching the group name.
  3441. (when (string-match (car head) group)
  3442. ;; The cdr is the parameters.
  3443. (let ((this-result
  3444. (gnus-group-parameter-value (cdr head) symbol allow-list t)))
  3445. (when this-result
  3446. (setq result (car this-result))
  3447. ;; Expand if necessary.
  3448. (if (and (stringp result) (string-match "\\\\[0-9&]" result))
  3449. (setq result (gnus-expand-group-parameter
  3450. (car head) result group)))))))
  3451. ;; Done.
  3452. result))))
  3453. (defun gnus-group-find-parameter (group &optional symbol allow-list)
  3454. "Return the group parameters for GROUP.
  3455. If SYMBOL, return the value of that symbol in the group parameters.
  3456. If you call this function inside a loop, consider using the faster
  3457. `gnus-group-fast-parameter' instead."
  3458. (with-current-buffer (if (buffer-live-p (get-buffer gnus-group-buffer))
  3459. gnus-group-buffer
  3460. (current-buffer))
  3461. (if symbol
  3462. (gnus-group-fast-parameter group symbol allow-list)
  3463. (nconc
  3464. (copy-sequence
  3465. (funcall gnus-group-get-parameter-function group))
  3466. (gnus-parameters-get-parameter group)))))
  3467. (defun gnus-group-get-parameter (group &optional symbol allow-list)
  3468. "Return the group parameters for GROUP.
  3469. If SYMBOL, return the value of that symbol in the group parameters.
  3470. If ALLOW-LIST, also allow list as a result.
  3471. Most functions should use `gnus-group-find-parameter', which
  3472. also examines the topic parameters."
  3473. (let ((params (gnus-info-params (gnus-get-info group))))
  3474. (if symbol
  3475. (gnus-group-parameter-value params symbol allow-list)
  3476. params)))
  3477. (defun gnus-group-parameter-value (params symbol &optional
  3478. allow-list present-p)
  3479. "Return the value of SYMBOL in group PARAMS.
  3480. If ALLOW-LIST, also allow list as a result."
  3481. ;; We only wish to return group parameters (dotted lists) and
  3482. ;; not local variables, which may have the same names.
  3483. ;; But first we handle single elements...
  3484. (or (car (memq symbol params))
  3485. ;; Handle alist.
  3486. (let (elem)
  3487. (catch 'found
  3488. (while (setq elem (pop params))
  3489. (when (and (consp elem)
  3490. (eq (car elem) symbol)
  3491. (or allow-list
  3492. (atom (cdr elem))))
  3493. (throw 'found (if present-p (list (cdr elem))
  3494. (cdr elem)))))))))
  3495. (defun gnus-group-add-parameter (group param)
  3496. "Add parameter PARAM to GROUP."
  3497. (let ((info (gnus-get-info group)))
  3498. (when info
  3499. (gnus-group-remove-parameter group (if (consp param) (car param) param))
  3500. ;; Cons the new param to the old one and update.
  3501. (gnus-group-set-info (cons param (gnus-info-params info))
  3502. group 'params))))
  3503. (defun gnus-group-set-parameter (group name value)
  3504. "Set parameter NAME to VALUE in GROUP.
  3505. GROUP can also be an INFO structure."
  3506. (let ((info (if (listp group)
  3507. group
  3508. (gnus-get-info group))))
  3509. (when info
  3510. (gnus-group-remove-parameter group name)
  3511. (let ((old-params (gnus-info-params info))
  3512. (new-params (list (cons name value))))
  3513. (while old-params
  3514. (when (or (not (listp (car old-params)))
  3515. (not (eq (caar old-params) name)))
  3516. (setq new-params (append new-params (list (car old-params)))))
  3517. (setq old-params (cdr old-params)))
  3518. (if (listp group)
  3519. (gnus-info-set-params info new-params t)
  3520. (gnus-group-set-info new-params (gnus-info-group info) 'params))))))
  3521. (defun gnus-group-remove-parameter (group name)
  3522. "Remove parameter NAME from GROUP.
  3523. GROUP can also be an INFO structure."
  3524. (let ((info (if (listp group)
  3525. group
  3526. (gnus-get-info group))))
  3527. (when info
  3528. (let ((params (gnus-info-params info)))
  3529. (when params
  3530. (setq params (delq name params))
  3531. (while (assq name params)
  3532. (gnus-alist-pull name params))
  3533. (gnus-info-set-params info params))))))
  3534. (defun gnus-group-add-score (group &optional score)
  3535. "Add SCORE to the GROUP score.
  3536. If SCORE is nil, add 1 to the score of GROUP."
  3537. (let ((info (gnus-get-info group)))
  3538. (when info
  3539. (gnus-info-set-score info (+ (gnus-info-score info) (or score 1))))))
  3540. (defun gnus-short-group-name (group &optional levels)
  3541. "Collapse GROUP name LEVELS.
  3542. Select methods are stripped and any remote host name is stripped down to
  3543. just the host name."
  3544. (let* ((name "")
  3545. (foreign "")
  3546. (depth 0)
  3547. (skip 1)
  3548. (levels (or levels
  3549. gnus-group-uncollapsed-levels
  3550. (progn
  3551. (while (string-match "\\." group skip)
  3552. (setq skip (match-end 0)
  3553. depth (+ depth 1)))
  3554. depth))))
  3555. ;; Separate foreign select method from group name and collapse.
  3556. ;; If method contains a server, collapse to non-domain server name,
  3557. ;; otherwise collapse to select method.
  3558. (let* ((colon (string-match ":" group))
  3559. (server (and colon (substring group 0 colon)))
  3560. (plus (and server (string-match "+" server))))
  3561. (when server
  3562. (if plus
  3563. (setq foreign (substring server (+ 1 plus)
  3564. (string-match "\\." server))
  3565. group (substring group (+ 1 colon)))
  3566. (setq foreign server
  3567. group (substring group (+ 1 colon))))
  3568. (setq foreign (concat foreign ":")))
  3569. ;; Collapse group name leaving LEVELS uncollapsed elements
  3570. (let* ((slist (split-string group "/"))
  3571. (slen (length slist))
  3572. (dlist (split-string group "\\."))
  3573. (dlen (length dlist))
  3574. glist
  3575. glen
  3576. gsep
  3577. res)
  3578. (if (> slen dlen)
  3579. (setq glist slist
  3580. glen slen
  3581. gsep "/")
  3582. (setq glist dlist
  3583. glen dlen
  3584. gsep "."))
  3585. (setq levels (- glen levels))
  3586. (dolist (g glist)
  3587. (push (if (>= (decf levels) 0)
  3588. (if (zerop (length g))
  3589. ""
  3590. (substring g 0 1))
  3591. g)
  3592. res))
  3593. (concat foreign (mapconcat 'identity (nreverse res) gsep))))))
  3594. (defun gnus-narrow-to-body ()
  3595. "Narrow to the body of an article."
  3596. (narrow-to-region
  3597. (progn
  3598. (goto-char (point-min))
  3599. (or (search-forward "\n\n" nil t)
  3600. (point-max)))
  3601. (point-max)))
  3602. ;;;
  3603. ;;; Kill file handling.
  3604. ;;;
  3605. (defun gnus-apply-kill-file ()
  3606. "Apply a kill file to the current newsgroup.
  3607. Returns the number of articles marked as read."
  3608. (if (or (file-exists-p (gnus-newsgroup-kill-file nil))
  3609. (file-exists-p (gnus-newsgroup-kill-file gnus-newsgroup-name)))
  3610. (gnus-apply-kill-file-internal)
  3611. 0))
  3612. (defun gnus-kill-save-kill-buffer ()
  3613. (let ((file (gnus-newsgroup-kill-file gnus-newsgroup-name)))
  3614. (when (get-file-buffer file)
  3615. (with-current-buffer (get-file-buffer file)
  3616. (when (buffer-modified-p)
  3617. (save-buffer))
  3618. (kill-buffer (current-buffer))))))
  3619. (defcustom gnus-kill-file-name "KILL"
  3620. "Suffix of the kill files."
  3621. :group 'gnus-score-kill
  3622. :group 'gnus-score-files
  3623. :type 'string)
  3624. (defun gnus-newsgroup-kill-file (newsgroup)
  3625. "Return the name of a kill file name for NEWSGROUP.
  3626. If NEWSGROUP is nil, return the global kill file name instead."
  3627. (cond
  3628. ;; The global KILL file is placed at top of the directory.
  3629. ((or (null newsgroup)
  3630. (string-equal newsgroup ""))
  3631. (expand-file-name gnus-kill-file-name
  3632. gnus-kill-files-directory))
  3633. ;; Append ".KILL" to newsgroup name.
  3634. ((gnus-use-long-file-name 'not-kill)
  3635. (expand-file-name (concat (gnus-newsgroup-savable-name newsgroup)
  3636. "." gnus-kill-file-name)
  3637. gnus-kill-files-directory))
  3638. ;; Place "KILL" under the hierarchical directory.
  3639. (t
  3640. (expand-file-name (concat (gnus-newsgroup-directory-form newsgroup)
  3641. "/" gnus-kill-file-name)
  3642. gnus-kill-files-directory))))
  3643. ;;; Server things.
  3644. (defun gnus-member-of-valid (symbol group)
  3645. "Find out if GROUP has SYMBOL as part of its \"valid\" spec."
  3646. (memq symbol (assoc
  3647. (symbol-name (car (gnus-find-method-for-group group)))
  3648. gnus-valid-select-methods)))
  3649. (defun gnus-method-option-p (method option)
  3650. "Return non-nil if select METHOD has OPTION as a parameter."
  3651. (when (stringp method)
  3652. (setq method (gnus-server-to-method method)))
  3653. (memq option (assoc (format "%s" (car method))
  3654. gnus-valid-select-methods)))
  3655. (defun gnus-similar-server-opened (method)
  3656. "Return non-nil if we have a similar server opened.
  3657. This is defined as a server with the same name, but different
  3658. parameters."
  3659. (let ((opened gnus-opened-servers)
  3660. open)
  3661. (while (and method opened)
  3662. (setq open (car (pop opened)))
  3663. ;; Type and name are the same...
  3664. (when (and (equal (car method) (car open))
  3665. (equal (cadr method) (cadr open))
  3666. ;; ... but the rest of the parameters differ.
  3667. (not (gnus-methods-sloppily-equal method open)))
  3668. (setq method nil)))
  3669. (not method)))
  3670. (defun gnus-server-extend-method (group method)
  3671. ;; This function "extends" a virtual server. If the server is
  3672. ;; "hello", and the select method is ("hello" (my-var "something"))
  3673. ;; in the group "alt.alt", this will result in a new virtual server
  3674. ;; called "hello+alt.alt".
  3675. (if (or (not (inline (gnus-similar-server-opened method)))
  3676. (not (cddr method)))
  3677. method
  3678. (let ((address-slot
  3679. (intern (format "%s-address" (car method)))))
  3680. (setq method
  3681. (if (assq address-slot (cddr method))
  3682. `(,(car method) ,(concat (cadr method) "+" group)
  3683. ,@(cddr method))
  3684. `(,(car method) ,(concat (cadr method) "+" group)
  3685. (,address-slot ,(cadr method))
  3686. ,@(cddr method))))
  3687. (push method gnus-extended-servers)
  3688. method)))
  3689. (defun gnus-server-status (method)
  3690. "Return the status of METHOD."
  3691. (nth 1 (assoc method gnus-opened-servers)))
  3692. (defun gnus-group-name-to-method (group)
  3693. "Guess a select method based on GROUP."
  3694. (if (string-match ":" group)
  3695. (let ((server (substring group 0 (match-beginning 0))))
  3696. (if (string-match "\\+" server)
  3697. (list (intern (substring server 0 (match-beginning 0)))
  3698. (substring server (match-end 0)))
  3699. (list (intern server) "")))
  3700. gnus-select-method))
  3701. (defun gnus-server-string (server)
  3702. "Return a readable string that describes SERVER."
  3703. (let* ((server (gnus-server-to-method server))
  3704. (address (nth 1 server)))
  3705. (if (and address
  3706. (not (zerop (length address))))
  3707. (format "%s using %s" address (car server))
  3708. (format "%s" (car server)))))
  3709. (defun gnus-same-method-different-name (method)
  3710. (let ((slot (intern (concat (symbol-name (car method)) "-address"))))
  3711. (unless (assq slot (cddr method))
  3712. (setq method
  3713. (append method (list (list slot (nth 1 method)))))))
  3714. (let ((methods gnus-extended-servers)
  3715. open found)
  3716. (while (and (not found)
  3717. (setq open (pop methods)))
  3718. (when (and (eq (car method) (car open))
  3719. (gnus-sloppily-equal-method-parameters method open))
  3720. (setq found open)))
  3721. found))
  3722. (defun gnus-find-method-for-group (group &optional info)
  3723. "Find the select method that GROUP uses."
  3724. (or gnus-override-method
  3725. (and (not group)
  3726. gnus-select-method)
  3727. (and (not (gnus-group-entry group))
  3728. ;; Killed or otherwise unknown group.
  3729. (or
  3730. ;; If we know a virtual server by that name, return its method.
  3731. (gnus-server-to-method (gnus-group-server group))
  3732. ;; Guess a new method as last resort.
  3733. (gnus-group-name-to-method group)))
  3734. (let ((info (or info (gnus-get-info group)))
  3735. method)
  3736. (if (or (not info)
  3737. (not (setq method (gnus-info-method info)))
  3738. (equal method "native"))
  3739. gnus-select-method
  3740. (setq method
  3741. (cond ((stringp method)
  3742. (inline (gnus-server-to-method method)))
  3743. ((stringp (cadr method))
  3744. (or
  3745. (inline
  3746. (gnus-same-method-different-name method))
  3747. (inline (gnus-server-extend-method group method))))
  3748. (t
  3749. method)))
  3750. (cond ((equal (cadr method) "")
  3751. method)
  3752. ((null (cadr method))
  3753. (list (car method) ""))
  3754. (t
  3755. (gnus-server-add-address method)))))))
  3756. (defun gnus-methods-using (feature)
  3757. "Find all methods that have FEATURE."
  3758. (let ((valids gnus-valid-select-methods)
  3759. outs)
  3760. (while valids
  3761. (when (memq feature (car valids))
  3762. (push (car valids) outs))
  3763. (setq valids (cdr valids)))
  3764. outs))
  3765. (eval-and-compile
  3766. (autoload 'message-y-or-n-p "message" nil nil 'macro))
  3767. (defun gnus-read-group (prompt &optional default)
  3768. "Prompt the user for a group name.
  3769. Disallow invalid group names."
  3770. (let ((prefix "")
  3771. group)
  3772. (while (not group)
  3773. (when (string-match
  3774. gnus-invalid-group-regexp
  3775. (setq group (read-string (concat prefix prompt)
  3776. (cons (or default "") 0)
  3777. 'gnus-group-history)))
  3778. (let ((match (match-string 0 group)))
  3779. ;; Might be okay (e.g. for nnimap), so ask the user:
  3780. (unless (and (not (string-match "^$\\|:" match))
  3781. (message-y-or-n-p
  3782. "Proceed and create group anyway? " t
  3783. "The group name \"" group "\" contains a forbidden character: \"" match "\".
  3784. Usually, it's dangerous to create a group with this name, because it's not
  3785. supported by all back ends and servers. On IMAP servers it should work,
  3786. though. If you are really sure, you can proceed anyway and create the group.
  3787. You may customize the variable `gnus-invalid-group-regexp', which currently is
  3788. set to \"" gnus-invalid-group-regexp
  3789. "\", if you want to get rid of this query permanently."))
  3790. (setq prefix (format "Invalid group name: \"%s\". " group)
  3791. group nil)))))
  3792. group))
  3793. (defun gnus-read-method (prompt)
  3794. "Prompt the user for a method.
  3795. Allow completion over sensible values."
  3796. (let* ((open-servers
  3797. (mapcar (lambda (i) (cons (format "%s:%s" (caar i) (cadar i)) i))
  3798. gnus-opened-servers))
  3799. (valid-methods
  3800. (let (methods)
  3801. (dolist (method gnus-valid-select-methods)
  3802. (if (or (memq 'prompt-address method)
  3803. (not (assoc (format "%s:" (car method)) open-servers)))
  3804. (push method methods)))
  3805. methods))
  3806. (servers
  3807. (append valid-methods
  3808. open-servers
  3809. gnus-predefined-server-alist
  3810. gnus-server-alist))
  3811. (method
  3812. (gnus-completing-read
  3813. prompt (mapcar 'car servers)
  3814. t nil 'gnus-method-history)))
  3815. (cond
  3816. ((equal method "")
  3817. (setq method gnus-select-method))
  3818. ((assoc method gnus-valid-select-methods)
  3819. (let ((address (if (memq 'prompt-address
  3820. (assoc method gnus-valid-select-methods))
  3821. (read-string "Address: ")
  3822. "")))
  3823. (or (cadr (assoc (format "%s:%s" method address) open-servers))
  3824. (list (intern method) address))))
  3825. ((assoc method servers)
  3826. method)
  3827. (t
  3828. (list (intern method) "")))))
  3829. ;;; Agent functions
  3830. (defun gnus-agent-method-p (method-or-server)
  3831. "Say whether METHOD is covered by the agent."
  3832. (or (eq (car gnus-agent-method-p-cache) method-or-server)
  3833. (let* ((method (if (stringp method-or-server)
  3834. (gnus-server-to-method method-or-server)
  3835. method-or-server))
  3836. (server (gnus-method-to-server method t)))
  3837. (setq gnus-agent-method-p-cache
  3838. (cons method-or-server
  3839. (member server gnus-agent-covered-methods)))))
  3840. (cdr gnus-agent-method-p-cache))
  3841. (defun gnus-online (method)
  3842. (not
  3843. (if gnus-plugged
  3844. (eq (cadr (assoc method gnus-opened-servers)) 'offline)
  3845. (gnus-agent-method-p method))))
  3846. ;;; User-level commands.
  3847. ;;;###autoload
  3848. (defun gnus-slave-no-server (&optional arg)
  3849. "Read network news as a slave, without connecting to the local server."
  3850. (interactive "P")
  3851. (gnus-no-server arg t))
  3852. ;;;###autoload
  3853. (defun gnus-no-server (&optional arg slave)
  3854. "Read network news.
  3855. If ARG is a positive number, Gnus will use that as the startup
  3856. level. If ARG is nil, Gnus will be started at level 2. If ARG is
  3857. non-nil and not a positive number, Gnus will prompt the user for the
  3858. name of an NNTP server to use.
  3859. As opposed to `gnus', this command will not connect to the local
  3860. server."
  3861. (interactive "P")
  3862. (gnus-no-server-1 arg slave))
  3863. ;;;###autoload
  3864. (defun gnus-slave (&optional arg)
  3865. "Read news as a slave."
  3866. (interactive "P")
  3867. (gnus arg nil 'slave))
  3868. ;;;###autoload
  3869. (defun gnus-other-frame (&optional arg display)
  3870. "Pop up a frame to read news.
  3871. This will call one of the Gnus commands which is specified by the user
  3872. option `gnus-other-frame-function' (default `gnus') with the argument
  3873. ARG if Gnus is not running, otherwise just pop up a Gnus frame. The
  3874. optional second argument DISPLAY should be a standard display string
  3875. such as \"unix:0\" to specify where to pop up a frame. If DISPLAY is
  3876. omitted or the function `make-frame-on-display' is not available, the
  3877. current display is used."
  3878. (interactive "P")
  3879. (if (fboundp 'make-frame-on-display)
  3880. (unless display
  3881. (setq display (gnus-frame-or-window-display-name (selected-frame))))
  3882. (setq display nil))
  3883. (let ((alive (gnus-alive-p)))
  3884. (unless (and alive
  3885. (catch 'found
  3886. (walk-windows
  3887. (lambda (window)
  3888. (when (and (or (not display)
  3889. (equal display
  3890. (gnus-frame-or-window-display-name
  3891. window)))
  3892. (with-current-buffer (window-buffer window)
  3893. (string-match "\\`gnus-"
  3894. (symbol-name major-mode))))
  3895. (gnus-select-frame-set-input-focus
  3896. (setq gnus-other-frame-object (window-frame window)))
  3897. (select-window window)
  3898. (throw 'found t)))
  3899. 'ignore t)))
  3900. (gnus-select-frame-set-input-focus
  3901. (setq gnus-other-frame-object
  3902. (if display
  3903. (make-frame-on-display display gnus-other-frame-parameters)
  3904. (make-frame gnus-other-frame-parameters))))
  3905. (if alive
  3906. (switch-to-buffer gnus-group-buffer)
  3907. (funcall gnus-other-frame-function arg)
  3908. (add-hook 'gnus-exit-gnus-hook
  3909. (lambda nil
  3910. (when (and (frame-live-p gnus-other-frame-object)
  3911. (cdr (frame-list)))
  3912. (delete-frame gnus-other-frame-object))
  3913. (setq gnus-other-frame-object nil)))))))
  3914. ;;;###autoload
  3915. (defun gnus (&optional arg dont-connect slave)
  3916. "Read network news.
  3917. If ARG is non-nil and a positive number, Gnus will use that as the
  3918. startup level. If ARG is non-nil and not a positive number, Gnus will
  3919. prompt the user for the name of an NNTP server to use."
  3920. (interactive "P")
  3921. ;; When using the development version of Gnus, load the gnus-load
  3922. ;; file.
  3923. (unless (string-match "^Gnus" gnus-version)
  3924. (load "gnus-load" nil t))
  3925. (unless (byte-code-function-p (symbol-function 'gnus))
  3926. (message "You should byte-compile Gnus")
  3927. (sit-for 2))
  3928. (let ((gnus-action-message-log (list nil)))
  3929. (gnus-1 arg dont-connect slave)
  3930. (gnus-final-warning)))
  3931. (eval-and-compile
  3932. (unless (fboundp 'debbugs-gnu)
  3933. (autoload 'debbugs-gnu "debbugs-gnu" "List all outstanding Emacs bugs." t)))
  3934. (defun gnus-list-debbugs ()
  3935. "List all open Gnus bug reports."
  3936. (interactive)
  3937. (debbugs-gnu nil "gnus"))
  3938. ;; Allow redefinition of Gnus functions.
  3939. (gnus-ems-redefine)
  3940. (provide 'gnus)
  3941. ;;; gnus.el ends here