[PATCH 2/9] lib: private string map (associative array) API
[notmuch-archives.git] / b1 / 227a21dde551abf9c0d52931e7c321841f8c1f
1 Return-Path: <pieter@praet.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 98E3E429E26\r
6         for <notmuch@notmuchmail.org>; Thu, 12 Jan 2012 09:14:29 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id h145FXU1T+aB for <notmuch@notmuchmail.org>;\r
16         Thu, 12 Jan 2012 09:14:28 -0800 (PST)\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
18  [74.125.82.45])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
19  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
20  E6C27431FB6    for <notmuch@notmuchmail.org>; Thu, 12 Jan 2012 09:14:27 -0800\r
21  (PST)\r
22 Received: by wgbds11 with SMTP id ds11so1952136wgb.2\r
23         for <notmuch@notmuchmail.org>; Thu, 12 Jan 2012 09:14:26 -0800 (PST)\r
24 Received: by 10.180.106.202 with SMTP id gw10mr2414889wib.3.1326388466760;\r
25         Thu, 12 Jan 2012 09:14:26 -0800 (PST)\r
26 Received: from localhost ([109.131.126.209])\r
27         by mx.google.com with ESMTPS id em13sm926228wid.7.2012.01.12.09.14.24\r
28         (version=TLSv1/SSLv3 cipher=OTHER);\r
29         Thu, 12 Jan 2012 09:14:25 -0800 (PST)\r
30 From: Pieter Praet <pieter@praet.org>\r
31 To: David Bremner <david@tethera.net>,\r
32         Jameson Graef Rollins <jrollins@finestructure.net>,\r
33         Daniel Schoepe <daniel@schoepe.org>\r
34 Subject: [PATCH v2] emacs: logically group def{custom,face}s\r
35 Date: Thu, 12 Jan 2012 18:12:16 +0100\r
36 Message-Id: <1326388336-15940-1-git-send-email-pieter@praet.org>\r
37 X-Mailer: git-send-email 1.7.8.1\r
38 In-Reply-To: <87bos6tcgp.fsf@zancas.localnet>\r
39 References: <87bos6tcgp.fsf@zancas.localnet>\r
40 Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Thu, 12 Jan 2012 17:14:29 -0000\r
54 \r
55 To allow for expansion whilst keeping everything tidy and organized,\r
56 move all defcustom/defface variables to the following subgroups,\r
57 defined in notmuch-lib.el:\r
58 \r
59 - Hello\r
60 - Search\r
61 - Show\r
62 - Send\r
63 - Crypto\r
64 - Hooks\r
65 - Appearance\r
66 - External Commands\r
67 \r
68 As an added benefit, defcustom keyword args are now consistently\r
69 in order of appearance @ defcustom's docstring (OCD much?).\r
70 ---\r
71  emacs/notmuch-address.el     |    3 +-\r
72  emacs/notmuch-crypto.el      |   22 +++++++++++++-------\r
73  emacs/notmuch-hello.el       |   34 ++++++++++++++++++--------------\r
74  emacs/notmuch-lib.el         |   44 ++++++++++++++++++++++++++++++++++++++++-\r
75  emacs/notmuch-maildir-fcc.el |    6 ++--\r
76  emacs/notmuch-message.el     |    2 +-\r
77  emacs/notmuch-mua.el         |   21 ++++++++++---------\r
78  emacs/notmuch-show.el        |   33 ++++++++++++++++---------------\r
79  emacs/notmuch.el             |   35 +++++++++++++++++++++------------\r
80  9 files changed, 131 insertions(+), 69 deletions(-)\r
81 \r
82 diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el\r
83 index 8eba7a0..2e8b840 100644\r
84 --- a/emacs/notmuch-address.el\r
85 +++ b/emacs/notmuch-address.el\r
86 @@ -28,7 +28,8 @@\r
87  single argument and output a list of possible matches, one per\r
88  line."\r
89    :type 'string\r
90 -  :group 'notmuch)\r
91 +  :group 'notmuch-send\r
92 +  :group 'notmuch-external)\r
93  \r
94  (defvar notmuch-address-message-alist-member\r
95    '("^\\(Resent-\\)?\\(To\\|B?Cc\\|Reply-To\\|From\\|Mail-Followup-To\\|Mail-Copies-To\\):"\r
96 diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el\r
97 index ac30098..232c1a0 100644\r
98 --- a/emacs/notmuch-crypto.el\r
99 +++ b/emacs/notmuch-crypto.el\r
100 @@ -34,38 +34,44 @@ The effect of setting this variable can be seen temporarily by\r
101  providing a prefix when viewing a signed or encrypted message, or\r
102  by providing a prefix when reloading the message in notmuch-show\r
103  mode."\r
104 -  :group 'notmuch\r
105 -  :type 'boolean)\r
106 +  :type 'boolean\r
107 +  :group 'notmuch-crypto)\r
108  \r
109  (defface notmuch-crypto-part-header\r
110    '((t (:foreground "blue")))\r
111    "Face used for crypto parts headers."\r
112 -  :group 'notmuch)\r
113 +  :group 'notmuch-crypto\r
114 +  :group 'notmuch-appearance)\r
115  \r
116  (defface notmuch-crypto-signature-good\r
117    '((t (:background "green" :foreground "black")))\r
118    "Face used for good signatures."\r
119 -  :group 'notmuch)\r
120 +  :group 'notmuch-crypto\r
121 +  :group 'notmuch-appearance)\r
122  \r
123  (defface notmuch-crypto-signature-good-key\r
124    '((t (:background "orange" :foreground "black")))\r
125    "Face used for good signatures."\r
126 -  :group 'notmuch)\r
127 +  :group 'notmuch-crypto\r
128 +  :group 'notmuch-appearance)\r
129  \r
130  (defface notmuch-crypto-signature-bad\r
131    '((t (:background "red" :foreground "black")))\r
132    "Face used for bad signatures."\r
133 -  :group 'notmuch)\r
134 +  :group 'notmuch-crypto\r
135 +  :group 'notmuch-appearance)\r
136  \r
137  (defface notmuch-crypto-signature-unknown\r
138    '((t (:background "red" :foreground "black")))\r
139    "Face used for signatures of unknown status."\r
140 -  :group 'notmuch)\r
141 +  :group 'notmuch-crypto\r
142 +  :group 'notmuch-appearance)\r
143  \r
144  (defface notmuch-crypto-decryption\r
145    '((t (:background "purple" :foreground "black")))\r
146    "Face used for encryption/decryption status messages."\r
147 -  :group 'notmuch)\r
148 +  :group 'notmuch-crypto\r
149 +  :group 'notmuch-appearance)\r
150  \r
151  (define-button-type 'notmuch-crypto-status-button-type\r
152    'action (lambda (button) (message (button-get button 'help-echo)))\r
153 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
154 index 333d4c1..fad9027 100644\r
155 --- a/emacs/notmuch-hello.el\r
156 +++ b/emacs/notmuch-hello.el\r
157 @@ -35,12 +35,12 @@\r
158  (defcustom notmuch-recent-searches-max 10\r
159    "The number of recent searches to store and display."\r
160    :type 'integer\r
161 -  :group 'notmuch)\r
162 +  :group 'notmuch-hello)\r
163  \r
164  (defcustom notmuch-show-empty-saved-searches nil\r
165    "Should saved searches with no messages be listed?"\r
166    :type 'boolean\r
167 -  :group 'notmuch)\r
168 +  :group 'notmuch-hello)\r
169  \r
170  (defun notmuch-sort-saved-searches (alist)\r
171    "Generate an alphabetically sorted saved searches alist."\r
172 @@ -60,7 +60,7 @@ alist to be used."\r
173                  (const :tag "Sort alphabetically" notmuch-sort-saved-searches)\r
174                  (function :tag "Custom sort function"\r
175                            :value notmuch-sort-saved-searches))\r
176 -  :group 'notmuch)\r
177 +  :group 'notmuch-hello)\r
178  \r
179  (defvar notmuch-hello-indent 4\r
180    "How much to indent non-headers.")\r
181 @@ -68,12 +68,13 @@ alist to be used."\r
182  (defcustom notmuch-show-logo t\r
183    "Should the notmuch logo be shown?"\r
184    :type 'boolean\r
185 -  :group 'notmuch)\r
186 +  :group 'notmuch-hello\r
187 +  :group 'notmuch-appearance)\r
188  \r
189  (defcustom notmuch-show-all-tags-list nil\r
190    "Should all tags be shown in the notmuch-hello view?"\r
191    :type 'boolean\r
192 -  :group 'notmuch)\r
193 +  :group 'notmuch-hello)\r
194  \r
195  (defcustom notmuch-hello-tag-list-make-query nil\r
196    "Function or string to generate queries for the all tags list.\r
197 @@ -89,12 +90,12 @@ should return a filter for that tag, or nil to hide the tag."\r
198                  (string :tag "Custom filter"\r
199                          :value "tag:unread")\r
200                  (function :tag "Custom filter function"))\r
201 -  :group 'notmuch)\r
202 +  :group 'notmuch-hello)\r
203  \r
204  (defcustom notmuch-hello-hide-tags nil\r
205    "List of tags to be hidden in the \"all tags\"-section."\r
206    :type '(repeat string)\r
207 -  :group 'notmuch)\r
208 +  :group 'notmuch-hello)\r
209  \r
210  (defface notmuch-hello-logo-background\r
211    '((((class color)\r
212 @@ -104,7 +105,8 @@ should return a filter for that tag, or nil to hide the tag."\r
213        (background light))\r
214       (:background "white")))\r
215    "Background colour for the notmuch logo."\r
216 -  :group 'notmuch)\r
217 +  :group 'notmuch-hello\r
218 +  :group 'notmuch-appearance)\r
219  \r
220  (defcustom notmuch-column-control t\r
221    "Controls the number of columns for saved searches/tags in notmuch view.\r
222 @@ -126,11 +128,11 @@ So:\r
223    30.\r
224  - if you don't want to worry about all of this nonsense, leave\r
225    this set to `t'."\r
226 -  :group 'notmuch\r
227    :type '(choice\r
228           (const :tag "Automatically calculated" t)\r
229           (integer :tag "Number of characters")\r
230 -         (float :tag "Fraction of window")))\r
231 +         (float :tag "Fraction of window"))\r
232 +  :group 'notmuch-hello)\r
233  \r
234  (defcustom notmuch-hello-thousands-separator " "\r
235    "The string used as a thousands separator.\r
236 @@ -138,18 +140,20 @@ So:\r
237  Typically \",\" in the US and UK and \".\" or \" \" in Europe.\r
238  The latter is recommended in the SI/ISO 31-0 standard and by the\r
239  International Bureau of Weights and Measures."\r
240 -  :group 'notmuch\r
241 -  :type 'string)\r
242 +  :type 'string\r
243 +  :group 'notmuch-hello)\r
244  \r
245  (defcustom notmuch-hello-mode-hook nil\r
246    "Functions called after entering `notmuch-hello-mode'."\r
247 -  :group 'notmuch\r
248 -  :type 'hook)\r
249 +  :type 'hook\r
250 +  :group 'notmuch-hello\r
251 +  :group 'notmuch-hooks)\r
252  \r
253  (defcustom notmuch-hello-refresh-hook nil\r
254    "Functions called after updating a `notmuch-hello' buffer."\r
255    :type 'hook\r
256 -  :group 'notmuch)\r
257 +  :group 'notmuch-hello\r
258 +  :group 'notmuch-hooks)\r
259  \r
260  (defvar notmuch-hello-url "http://notmuchmail.org"\r
261    "The `notmuch' web site.")\r
262 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
263 index 0f856bf..b089dfc 100644\r
264 --- a/emacs/notmuch-lib.el\r
265 +++ b/emacs/notmuch-lib.el\r
266 @@ -28,17 +28,57 @@\r
267    "Notmuch mail reader for Emacs."\r
268    :group 'mail)\r
269  \r
270 +(defgroup notmuch-hello nil\r
271 +  ""\r
272 +  :tag "Notmuch Hello"\r
273 +  :group 'notmuch)\r
274 +\r
275 +(defgroup notmuch-search nil\r
276 +  ""\r
277 +  :tag "Notmuch Search"\r
278 +  :group 'notmuch)\r
279 +\r
280 +(defgroup notmuch-show nil\r
281 +  ""\r
282 +  :tag "Notmuch Show"\r
283 +  :group 'notmuch)\r
284 +\r
285 +(defgroup notmuch-send nil\r
286 +  ""\r
287 +  :tag "Notmuch Send"\r
288 +  :group 'notmuch)\r
289 +\r
290 +(defgroup notmuch-crypto nil\r
291 +  ""\r
292 +  :tag "Notmuch Crypto"\r
293 +  :group 'notmuch)\r
294 +\r
295 +(defgroup notmuch-hooks nil\r
296 +  ""\r
297 +  :tag "Notmuch Hooks"\r
298 +  :group 'notmuch)\r
299 +\r
300 +(defgroup notmuch-appearance nil\r
301 +  ""\r
302 +  :tag "Notmuch Appearance"\r
303 +  :group 'notmuch)\r
304 +\r
305 +(defgroup notmuch-external nil\r
306 +  ""\r
307 +  :tag "Notmuch External Commands"\r
308 +  :group 'notmuch)\r
309 +\r
310  (defcustom notmuch-search-oldest-first t\r
311    "Show the oldest mail first when searching."\r
312    :type 'boolean\r
313 -  :group 'notmuch)\r
314 +  :group 'notmuch-search)\r
315  \r
316  ;;\r
317  \r
318  (defcustom notmuch-saved-searches nil\r
319    "A list of saved searches to display."\r
320    :type '(alist :key-type string :value-type string)\r
321 -  :group 'notmuch)\r
322 +  :group 'notmuch-hello)\r
323  \r
324  (defvar notmuch-folders nil\r
325    "Deprecated name for what is now known as `notmuch-saved-searches'.")\r
326 diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el\r
327 index 6fbf82d..dcfbc4b 100644\r
328 --- a/emacs/notmuch-maildir-fcc.el\r
329 +++ b/emacs/notmuch-maildir-fcc.el\r
330 @@ -51,13 +51,13 @@ the database.path option in the notmuch configuration file).\r
331  You will be prompted to create the directory if it does not exist\r
332  yet when sending a mail."\r
333  \r
334 - :require 'notmuch-fcc-initialization\r
335 - :group 'notmuch\r
336   :type '(choice\r
337          (const :tag "No FCC header" nil)\r
338          (string :tag "A single folder")\r
339          (repeat :tag "A folder based on the From header"\r
340 -                (cons regexp (string :tag "Folder")))))\r
341 +                (cons regexp (string :tag "Folder"))))\r
342 + :require 'notmuch-fcc-initialization\r
343 + :group 'notmuch-send)\r
344  \r
345  (defun notmuch-fcc-initialization ()\r
346    "If notmuch-fcc-directories is set,\r
347 diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el\r
348 index 08e5b17..264a5b9 100644\r
349 --- a/emacs/notmuch-message.el\r
350 +++ b/emacs/notmuch-message.el\r
351 @@ -31,7 +31,7 @@ For example, if you wanted to add a \"replied\" tag and remove\r
352  the \"inbox\" and \"todo\", you would set\r
353      (\"replied\" \"-inbox\" \"-todo\"\)"\r
354    :type 'list\r
355 -  :group 'notmuch)\r
356 +  :group 'notmuch-send)\r
357  \r
358  (defun notmuch-message-mark-replied ()\r
359    ;; get the in-reply-to header and parse it for the message id.\r
360 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
361 index 32e2e30..e256302 100644\r
362 --- a/emacs/notmuch-mua.el\r
363 +++ b/emacs/notmuch-mua.el\r
364 @@ -28,25 +28,26 @@\r
365  \r
366  (defcustom notmuch-mua-send-hook '(notmuch-mua-message-send-hook)\r
367    "Hook run before sending messages."\r
368 -  :group 'notmuch\r
369 -  :type 'hook)\r
370 +  :type 'hook\r
371 +  :group 'notmuch-send\r
372 +  :group 'notmuch-hooks)\r
373  \r
374  (defcustom notmuch-mua-user-agent-function 'notmuch-mua-user-agent-full\r
375    "Function used to generate a `User-Agent:' string. If this is\r
376  `nil' then no `User-Agent:' will be generated."\r
377 -  :group 'notmuch\r
378    :type '(choice (const :tag "No user agent string" nil)\r
379                  (const :tag "Full" notmuch-mua-user-agent-full)\r
380                  (const :tag "Notmuch" notmuch-mua-user-agent-notmuch)\r
381                  (const :tag "Emacs" notmuch-mua-user-agent-emacs)\r
382                  (function :tag "Custom user agent function"\r
383 -                          :value notmuch-mua-user-agent-full)))\r
384 +                          :value notmuch-mua-user-agent-full))\r
385 +  :group 'notmuch-send)\r
386  \r
387  (defcustom notmuch-mua-hidden-headers '("^User-Agent:")\r
388    "Headers that are added to the `message-mode' hidden headers\r
389  list."\r
390 -  :group 'notmuch\r
391 -  :type '(repeat string))\r
392 +  :type '(repeat string)\r
393 +  :group 'notmuch-send)\r
394  \r
395  ;;\r
396  \r
397 @@ -154,16 +155,16 @@ OTHER-ARGS are passed through to `message-mail'."\r
398  \r
399  If this variable is left unset, then a list will be constructed from the\r
400  name and addresses configured in the notmuch configuration file."\r
401 -  :group 'notmuch\r
402 -  :type '(repeat string))\r
403 +  :type '(repeat string)\r
404 +  :group 'notmuch-send)\r
405  \r
406  (defcustom notmuch-always-prompt-for-sender nil\r
407    "Always prompt for the From: address when composing or forwarding a message.\r
408  \r
409  This is not taken into account when replying to a message, because in that case\r
410  the From: header is already filled in by notmuch."\r
411 -  :group 'notmuch\r
412 -  :type 'boolean)\r
413 +  :type 'boolean\r
414 +  :group 'notmuch-send)\r
415  \r
416  (defvar notmuch-mua-sender-history nil)\r
417  \r
418 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
419 index 5502efd..d576e81 100644\r
420 --- a/emacs/notmuch-show.el\r
421 +++ b/emacs/notmuch-show.el\r
422 @@ -47,8 +47,8 @@ For an open message, all of these headers will be made visible\r
423  according to `notmuch-message-headers-visible' or can be toggled\r
424  with `notmuch-show-toggle-headers'. For a closed message, only\r
425  the first header in the list will be visible."\r
426 -  :group 'notmuch\r
427 -  :type '(repeat string))\r
428 +  :type '(repeat string)\r
429 +  :group 'notmuch-show)\r
430  \r
431  (defcustom notmuch-message-headers-visible t\r
432    "Should the headers be visible by default?\r
433 @@ -58,13 +58,13 @@ If this value is non-nil, then all of the headers defined in\r
434  of each message. Otherwise, these headers will be hidden and\r
435  `notmuch-show-toggle-headers' can be used to make the visible for\r
436  any given message."\r
437 -  :group 'notmuch\r
438 -  :type 'boolean)\r
439 +  :type 'boolean\r
440 +  :group 'notmuch-show)\r
441  \r
442  (defcustom notmuch-show-relative-dates t\r
443    "Display relative dates in the message summary line."\r
444 -  :group 'notmuch\r
445 -  :type 'boolean)\r
446 +  :type 'boolean\r
447 +  :group 'notmuch-show)\r
448  \r
449  (defvar notmuch-show-markup-headers-hook '(notmuch-show-colour-headers)\r
450    "A list of functions called to decorate the headers listed in\r
451 @@ -72,27 +72,27 @@ any given message."\r
452  \r
453  (defcustom notmuch-show-hook nil\r
454    "Functions called after populating a `notmuch-show' buffer."\r
455 -  :group 'notmuch\r
456 -  :type 'hook)\r
457 +  :type 'hook\r
458 +  :group 'notmuch-show)\r
459  \r
460  (defcustom notmuch-show-insert-text/plain-hook '(notmuch-wash-wrap-long-lines\r
461                                                  notmuch-wash-tidy-citations\r
462                                                  notmuch-wash-elide-blank-lines\r
463                                                  notmuch-wash-excerpt-citations)\r
464    "Functions used to improve the display of text/plain parts."\r
465 -  :group 'notmuch\r
466    :type 'hook\r
467    :options '(notmuch-wash-convert-inline-patch-to-part\r
468              notmuch-wash-wrap-long-lines\r
469              notmuch-wash-tidy-citations\r
470              notmuch-wash-elide-blank-lines\r
471 -            notmuch-wash-excerpt-citations))\r
472 +            notmuch-wash-excerpt-citations)\r
473 +  :group 'notmuch-show)\r
474  \r
475  ;; Mostly useful for debugging.\r
476  (defcustom notmuch-show-all-multipart/alternative-parts t\r
477    "Should all parts of multipart/alternative parts be shown?"\r
478 -  :group 'notmuch\r
479 -  :type 'boolean)\r
480 +  :type 'boolean\r
481 +  :group 'notmuch-show)\r
482  \r
483  (defcustom notmuch-indent-messages-width 1\r
484    "Width of message indentation in threads.\r
485 @@ -101,14 +101,15 @@ Messages are shown indented according to their depth in a thread.\r
486  This variable determines the width of this indentation measured\r
487  in number of blanks.  Defaults to `1', choose `0' to disable\r
488  indentation."\r
489 -  :group 'notmuch\r
490 -  :type 'integer)\r
491 +  :type 'integer\r
492 +  :group 'notmuch-show\r
493 +  :group 'notmuch-appearance)\r
494  \r
495  (defcustom notmuch-show-indent-multipart nil\r
496    "Should the sub-parts of a multipart/* part be indented?"\r
497    ;; dme: Not sure which is a good default.\r
498 -  :group 'notmuch\r
499 -  :type 'boolean)\r
500 +  :type 'boolean\r
501 +  :group 'notmuch-show)\r
502  \r
503  (defmacro with-current-notmuch-show-message (&rest body)\r
504    "Evaluate body with current buffer set to the text of current message"\r
505 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
506 index 1e61775..dca38af 100644\r
507 --- a/emacs/notmuch.el\r
508 +++ b/emacs/notmuch.el\r
509 @@ -70,7 +70,7 @@ For example:\r
510         (setq notmuch-search-result-format \(\(\"authors\" . \"%-40s\"\)\r
511                                              \(\"subject\" . \"%s\"\)\)\)"\r
512    :type '(alist :key-type (string) :value-type (string))\r
513 -  :group 'notmuch)\r
514 +  :group 'notmuch-search)\r
515  \r
516  (defvar notmuch-query-history nil\r
517    "Variable to store minibuffer history for notmuch queries")\r
518 @@ -199,7 +199,8 @@ For a mouse binding, return nil."\r
519    "List of functions to call when notmuch displays the search results."\r
520    :type 'hook\r
521    :options '(hl-line-mode)\r
522 -  :group 'notmuch)\r
523 +  :group 'notmuch-search\r
524 +  :group 'notmuch-hooks)\r
525  \r
526  (defvar notmuch-search-mode-map\r
527    (let ((map (make-sparse-keymap)))\r
528 @@ -306,27 +307,32 @@ For a mouse binding, return nil."\r
529   '((((class color) (background light)) (:background "#f0f0f0"))\r
530     (((class color) (background dark)) (:background "#303030")))\r
531   "Face for the single-line message summary in notmuch-show-mode."\r
532 - :group 'notmuch)\r
533 + :group 'notmuch-show\r
534 + :group 'notmuch-appearance)\r
535  \r
536  (defface notmuch-search-date\r
537    '((t :inherit default))\r
538    "Face used in search mode for dates."\r
539 -  :group 'notmuch)\r
540 +  :group 'notmuch-search\r
541 +  :group 'notmuch-appearance)\r
542  \r
543  (defface notmuch-search-count\r
544    '((t :inherit default))\r
545    "Face used in search mode for the count matching the query."\r
546 -  :group 'notmuch)\r
547 +  :group 'notmuch-search\r
548 +  :group 'notmuch-appearance)\r
549  \r
550  (defface notmuch-search-subject\r
551    '((t :inherit default))\r
552    "Face used in search mode for subjects."\r
553 -  :group 'notmuch)\r
554 +  :group 'notmuch-search\r
555 +  :group 'notmuch-appearance)\r
556  \r
557  (defface notmuch-search-matching-authors\r
558    '((t :inherit default))\r
559    "Face used in search mode for authors matching the query."\r
560 -  :group 'notmuch)\r
561 +  :group 'notmuch-search\r
562 +  :group 'notmuch-appearance)\r
563  \r
564  (defface notmuch-search-non-matching-authors\r
565    '((((class color)\r
566 @@ -338,7 +344,8 @@ For a mouse binding, return nil."\r
567      (t\r
568       (:italic t)))\r
569    "Face used in search mode for authors not matching the query."\r
570 -  :group 'notmuch)\r
571 +  :group 'notmuch-search\r
572 +  :group 'notmuch-appearance)\r
573  \r
574  (defface notmuch-tag-face\r
575    '((((class color)\r
576 @@ -350,7 +357,8 @@ For a mouse binding, return nil."\r
577      (t\r
578       (:bold t)))\r
579    "Face used in search mode face for tags."\r
580 -  :group 'notmuch)\r
581 +  :group 'notmuch-search\r
582 +  :group 'notmuch-appearance)\r
583  \r
584  (defun notmuch-search-mode ()\r
585    "Major mode displaying results of a notmuch search.\r
586 @@ -495,7 +503,7 @@ the messages that are about to be tagged"\r
587  \r
588    :type 'hook\r
589    :options '(hl-line-mode)\r
590 -  :group 'notmuch)\r
591 +  :group 'notmuch-hooks)\r
592  \r
593  (defcustom notmuch-after-tag-hook nil\r
594    "Hooks that are run after tags of a message are modified.\r
595 @@ -506,7 +514,7 @@ a list of strings of the form \"+TAG\" or \"-TAG\".\r
596  the messages that were tagged"\r
597    :type 'hook\r
598    :options '(hl-line-mode)\r
599 -  :group 'notmuch)\r
600 +  :group 'notmuch-hooks)\r
601  \r
602  (defun notmuch-search-set-tags (tags)\r
603    (save-excursion\r
604 @@ -662,7 +670,8 @@ attributes overriding earlier. A message having both \"delete\"\r
605  and \"unread\" tags with the above settings would have a green\r
606  foreground and blue background."\r
607    :type '(alist :key-type (string) :value-type (custom-face-edit))\r
608 -  :group 'notmuch)\r
609 +  :group 'notmuch-search\r
610 +  :group 'notmuch-appearance)\r
611  \r
612  (defun notmuch-search-color-line (start end line-tag-list)\r
613    "Colorize lines in `notmuch-show' based on tags."\r
614 @@ -997,7 +1006,7 @@ Note that the recommended way of achieving the same is using\r
615    :type '(choice (const :tag "notmuch new" nil)\r
616                  (const :tag "Disabled" "")\r
617                  (string :tag "Custom script"))\r
618 -  :group 'notmuch)\r
619 +  :group 'notmuch-external)\r
620  \r
621  (defun notmuch-poll ()\r
622    "Run \"notmuch new\" or an external script to import mail.\r
623 -- \r
624 1.7.8.1\r
625 \r