43c3562b716ccf446c177b369c307e38dd3133ea
[more-wl.git] / elmo / modb-standard.el
blob43c3562b716ccf446c177b369c307e38dd3133ea
1 ;;; modb-standard.el --- Standartd Implement of MODB.
3 ;; Copyright (C) 2003 Yuuichi Teranishi <teranisi@gohome.org>
5 ;; Author: Yuuichi Teranishi <teranisi@gohome.org>
6 ;; Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
7 ;; Keywords: mail, net news
9 ;; This file is part of ELMO (Elisp Library for Message Orchestration).
11 ;; This program is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
14 ;; any later version.
16 ;; This program is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
27 ;;; Commentary:
30 ;;; Code:
32 (eval-when-compile (require 'cl))
34 (require 'elmo-util)
35 (require 'modb)
37 (defcustom modb-standard-divide-number 500
38 "*Standard modb divide entity number."
39 :type '(choice (const :tag "Not divide" nil)
40 number)
41 :group 'elmo)
43 (defvar modb-standard-entity-filename "entity"
44 "Message entity database.")
46 (defvar modb-standard-flag-filename "flag"
47 "Message number <=> Flag status database.")
49 (defvar modb-standard-msgid-filename "msgid"
50 "Message number <=> Message-Id database.")
52 (eval-and-compile
53 (luna-define-class modb-standard (modb-generic)
54 (number-list ; sorted list of message numbers.
55 entity-map ; number, msg-id -> entity mapping.
56 flag-map ; number -> flag-list mapping
57 flag-count ; list of (FLAG . COUNT)
58 overview-handler ; instance of modb-entity-handler.
60 (luna-define-internal-accessors 'modb-standard))
62 ;; for internal use only
63 (defsubst modb-standard-key (number)
64 (concat "#" (number-to-string number)))
66 (defsubst modb-standard-entity-id (entity)
67 (if (eq 'autoload (car-safe entity))
68 (cddr entity)
69 (elmo-msgdb-message-entity-field
70 (elmo-message-entity-handler entity)
71 entity 'message-id)))
73 (defsubst modb-standard-entity-map (modb)
74 (or (modb-standard-entity-map-internal modb)
75 (modb-standard-set-entity-map-internal
76 modb
77 (elmo-make-hash (elmo-msgdb-length modb)))))
79 (defsubst modb-standard-flag-map (modb)
80 (or (modb-standard-flag-map-internal modb)
81 (modb-standard-set-flag-map-internal
82 modb
83 (elmo-make-hash (elmo-msgdb-length modb)))))
85 (defsubst modb-standard-set-message-modified (modb number)
86 (if modb-standard-divide-number
87 (let ((section (/ number modb-standard-divide-number))
88 (modified (modb-generic-message-modified-internal modb)))
89 (unless (memq section modified)
90 (modb-generic-set-message-modified-internal
91 modb (cons section modified))))
92 (modb-generic-set-message-modified-internal modb t)))
94 (defsubst modb-standard-set-flag-modified (modb number)
95 (modb-generic-set-flag-modified-internal modb t))
97 (defsubst modb-standard-message-flags (modb number)
98 (cdr (elmo-get-hash-val (modb-standard-key number)
99 (modb-standard-flag-map-internal modb))))
101 (defsubst modb-standard-match-flags (check-flags flags)
102 (catch 'done
103 (while check-flags
104 (when (memq (car check-flags) flags)
105 (throw 'done t))
106 (setq check-flags (cdr check-flags)))))
108 (defsubst modb-standard-countup-flags (modb flags &optional delta)
109 (let ((flag-count (modb-standard-flag-count-internal modb))
110 (delta (or delta 1))
111 elem)
112 (dolist (flag flags)
113 (if (setq elem (assq flag flag-count))
114 (setcdr elem (+ (cdr elem) delta))
115 (setq flag-count (cons (cons flag delta) flag-count))))
116 (modb-standard-set-flag-count-internal modb flag-count)))
118 ;; save and load functions
119 (defun modb-standard-load-msgid (modb path)
120 (let* ((alist (elmo-object-load
121 (expand-file-name modb-standard-msgid-filename path)))
122 (table (or (modb-standard-entity-map-internal modb)
123 (elmo-make-hash (length alist))))
124 numbers info)
125 (dolist (pair alist)
126 (setq info (cons 'autoload pair))
127 (elmo-set-hash-val (modb-standard-key (car pair)) info table)
128 (elmo-set-hash-val (cdr pair) info table)
129 (setq numbers (cons (car pair) numbers)))
130 (modb-standard-set-number-list-internal modb (nreverse numbers))
131 (modb-standard-set-entity-map-internal modb table)))
133 (defun modb-standard-save-msgid (modb path)
134 (let ((table (modb-standard-entity-map-internal modb))
135 entity alist)
136 (dolist (number (modb-standard-number-list-internal modb))
137 (setq entity (elmo-get-hash-val (modb-standard-key number) table))
138 (setq alist (cons (cons number (modb-standard-entity-id entity))
139 alist)))
140 (elmo-object-save
141 (expand-file-name modb-standard-msgid-filename path)
142 (nreverse alist))))
144 (defun modb-standard-load-flag (modb path)
145 (let ((table (or (modb-standard-flag-map-internal modb)
146 (elmo-make-hash (elmo-msgdb-length modb)))))
147 (dolist (info (elmo-object-load
148 (expand-file-name modb-standard-flag-filename path)))
149 (modb-standard-countup-flags modb (cdr info))
150 (elmo-set-hash-val (modb-standard-key (car info)) info table))
151 (modb-standard-set-flag-map-internal modb table)))
153 (defun modb-standard-save-flag (modb path)
154 (let (table flist info)
155 (when (setq table (modb-standard-flag-map-internal modb))
156 (mapatoms
157 (lambda (atom)
158 (setq info (symbol-value atom))
159 (when (cdr info)
160 (setq flist (cons info flist))))
161 table))
162 (elmo-object-save
163 (expand-file-name modb-standard-flag-filename path)
164 flist)))
166 (defsubst modb-standard-entity-filename (section)
167 (if section
168 (concat modb-standard-entity-filename
170 (number-to-string section))
171 modb-standard-entity-filename))
173 (defsubst modb-standard-loaded-message-id (msgdb number)
174 "Get message-id for autoloaded entity."
175 (let ((ret (elmo-get-hash-val
176 (modb-standard-key number)
177 (modb-standard-entity-map-internal msgdb))))
178 (cond
179 ((null ret)
180 ;; Garbage entity.
181 (elmo-clear-hash-val (modb-standard-key number)
182 (modb-standard-entity-map-internal msgdb))
183 nil) ; return nil.
184 ((eq (car-safe ret) 'autoload)
185 (cdr (cdr ret))) ; message-id.
186 ((elmo-msgdb-message-entity-field (elmo-message-entity-handler ret)
187 ret 'message-id)) ; Already loaded.
188 (t (error "Internal error: invalid msgdb status")))))
190 (defun modb-standard-load-entity (modb path &optional section)
191 (let ((table (or (modb-standard-entity-map-internal modb)
192 (elmo-make-hash (elmo-msgdb-length modb))))
193 (objects (elmo-object-load
194 (expand-file-name
195 (modb-standard-entity-filename section)
196 path)))
197 number msgid)
198 (cond ((eq (car objects) 'modb-standard-entity-handler)
199 ;; (standard PARAMETERS ENTITY*)
200 (let ((handler (apply #'luna-make-entity
201 (car objects)
202 (car (cdr objects))))
203 entity)
204 (dolist (element (cdr (cdr objects)))
205 (setq entity (cons handler (cons nil element))
206 number (elmo-msgdb-message-entity-number handler entity)
207 msgid (modb-standard-loaded-message-id modb number))
208 (when msgid
209 (elmo-msgdb-message-entity-set-field
210 handler entity 'message-id msgid)
211 (elmo-set-hash-val (modb-standard-key number) entity table)
212 (elmo-set-hash-val msgid entity table)))))
214 ;; legacy format
215 (dolist (entity objects)
216 (setq number (elmo-msgdb-message-entity-number
217 (elmo-message-entity-handler entity)
218 entity)
219 msgid (modb-standard-loaded-message-id modb number))
220 (when msgid
221 (setcar entity msgid)
222 (elmo-set-hash-val (modb-standard-key number) entity table)
223 (elmo-set-hash-val msgid entity table)))))
224 (modb-standard-set-entity-map-internal modb table)))
226 (defsubst modb-standard-save-entity-1 (modb path &optional section)
227 (let ((table (modb-standard-entity-map-internal modb))
228 (filename (expand-file-name
229 (modb-standard-entity-filename (car section)) path))
230 (handler (elmo-msgdb-message-entity-handler modb))
231 entity entities)
232 (dolist (number (or (cdr section)
233 (modb-standard-number-list-internal modb)))
234 (when (setq entity (elmo-msgdb-message-entity modb number))
235 (unless (modb-entity-handler-equal-p
236 handler
237 (elmo-message-entity-handler entity))
238 (setq entity (elmo-msgdb-copy-message-entity
239 (elmo-message-entity-handler entity)
240 entity handler)))
241 (setq entities (cons (cdr (cdr entity)) entities))))
242 (if entities
243 (elmo-object-save filename
244 (nconc
245 (list (luna-class-name handler)
246 (modb-entity-handler-dump-parameters handler))
247 entities))
248 (ignore-errors (delete-file filename)))))
250 (defun modb-standard-cleanup-stale-entities (modb path)
251 (message "Removing stale entities...")
252 (let ((entities (elmo-uniq-list
253 (mapcar
254 #'(lambda (x) (/ x modb-standard-divide-number))
255 (modb-standard-number-list-internal modb))))
256 (files (mapcar #'(lambda(x)
257 (when (string-match "^entity-\\([0-9]+\\)" x)
258 (string-to-int (match-string 1 x))))
259 (directory-files path nil "^entity-"))))
260 (dolist (entity (car (elmo-list-diff-nonsortable files entities)))
261 (ignore-errors (delete-file (expand-file-name
262 (modb-standard-entity-filename entity) path))))))
264 (defun modb-standard-save-entity (modb path)
265 (let ((modified (modb-generic-message-modified-internal modb)))
266 (cond ((listp modified)
267 (let ((sections (mapcar 'list modified))
268 section)
269 (dolist (number (modb-standard-number-list-internal modb))
270 (when (setq section (assq (/ number modb-standard-divide-number)
271 sections))
272 (nconc section (list number))))
273 (dolist (section sections)
274 (modb-standard-save-entity-1 modb path section))))
275 (modified
276 (modb-standard-save-entity-1 modb path))))
277 (modb-standard-cleanup-stale-entities modb path))
279 ;;; Implement
281 (luna-define-method elmo-msgdb-load ((msgdb modb-standard))
282 (let ((inhibit-quit t)
283 (path (elmo-msgdb-location msgdb)))
284 (when (file-exists-p (expand-file-name modb-standard-flag-filename path))
285 (modb-standard-load-msgid msgdb path)
286 (modb-standard-load-flag msgdb path)
287 (unless modb-standard-divide-number
288 (modb-standard-load-entity msgdb path))
289 t)))
291 (luna-define-method elmo-msgdb-save ((msgdb modb-standard))
292 (let ((path (elmo-msgdb-location msgdb))
293 (inhibit-quit t))
294 (when (elmo-msgdb-message-modified-p msgdb)
295 (modb-standard-save-msgid msgdb path)
296 (modb-standard-save-entity msgdb path)
297 (modb-generic-set-message-modified-internal msgdb nil))
298 (when (elmo-msgdb-flag-modified-p msgdb)
299 (modb-standard-save-flag msgdb path)
300 (modb-generic-set-flag-modified-internal msgdb nil))))
302 (luna-define-method elmo-msgdb-append :around ((msgdb modb-standard)
303 msgdb-append)
304 (when (> (elmo-msgdb-length msgdb-append) 0)
305 (if (eq (luna-class-name msgdb-append) 'modb-standard)
306 (let ((numbers (modb-standard-number-list-internal msgdb-append))
307 duplicates)
308 ;; number-list
309 (modb-standard-set-number-list-internal
310 msgdb
311 (nconc (modb-standard-number-list-internal msgdb)
312 numbers))
313 ;; entity-map
314 (let ((table (modb-standard-entity-map msgdb))
315 entity msg-id)
316 (dolist (number numbers)
317 (setq entity (elmo-msgdb-message-entity msgdb-append number)
318 msg-id (modb-standard-entity-id entity))
319 (if (elmo-get-hash-val msg-id table)
320 (setq duplicates (cons number duplicates))
321 (elmo-set-hash-val msg-id entity table))
322 (elmo-set-hash-val (modb-standard-key number)
323 entity
324 table)))
325 ;; flag-map
326 (let ((table (modb-standard-flag-map msgdb)))
327 (mapatoms
328 (lambda (atom)
329 (elmo-set-hash-val (symbol-name atom)
330 (symbol-value atom)
331 table))
332 (modb-standard-flag-map msgdb-append)))
333 ;; flag-count
334 (dolist (pair (modb-standard-flag-count-internal msgdb-append))
335 (modb-standard-countup-flags msgdb (list (car pair)) (cdr pair)))
336 ;; modification flags
337 (dolist (number (modb-standard-number-list-internal msgdb-append))
338 (modb-standard-set-message-modified msgdb number)
339 (modb-standard-set-flag-modified msgdb number))
340 duplicates)
341 (luna-call-next-method))))
343 (luna-define-method elmo-msgdb-clear :after ((msgdb modb-standard))
344 (modb-standard-set-number-list-internal msgdb nil)
345 (modb-standard-set-entity-map-internal msgdb nil)
346 (modb-standard-set-flag-map-internal msgdb nil)
347 (modb-standard-set-flag-count-internal msgdb nil))
349 (luna-define-method elmo-msgdb-length ((msgdb modb-standard))
350 (length (modb-standard-number-list-internal msgdb)))
352 (luna-define-method elmo-msgdb-flag-available-p ((msgdb modb-standard) flag)
355 (luna-define-method elmo-msgdb-flags ((msgdb modb-standard) number)
356 (modb-standard-message-flags msgdb number))
358 (luna-define-method elmo-msgdb-set-flag ((msgdb modb-standard)
359 number flag)
360 (case flag
361 (read
362 (elmo-msgdb-unset-flag msgdb number 'unread))
363 (uncached
364 (elmo-msgdb-unset-flag msgdb number 'cached))
366 (let ((cur-flags (modb-standard-message-flags msgdb number))
367 new-flags diff)
368 (unless (memq flag cur-flags)
369 (setq new-flags (cons flag cur-flags))
370 (setq diff (elmo-list-diff-nonsortable new-flags cur-flags))
371 (modb-standard-countup-flags msgdb (car diff))
372 (modb-standard-countup-flags msgdb (cadr diff) -1)
373 (elmo-set-hash-val (modb-standard-key number)
374 (cons number new-flags)
375 (modb-standard-flag-map msgdb))
376 (modb-standard-set-flag-modified msgdb number))))))
378 (luna-define-method elmo-msgdb-unset-flag ((msgdb modb-standard)
379 number flag)
380 (case flag
381 (read
382 (elmo-msgdb-set-flag msgdb number 'unread))
383 (uncached
384 (elmo-msgdb-set-flag msgdb number 'cached))
385 (all
386 (modb-standard-countup-flags msgdb
387 (modb-standard-message-flags msgdb number)
389 (elmo-clear-hash-val (modb-standard-key number)
390 (modb-standard-flag-map msgdb)))
392 (let ((cur-flags (modb-standard-message-flags msgdb number))
393 (inhibit-quit t)
394 new-flags diff)
395 (when (memq flag cur-flags)
396 (setq new-flags (delq flag (copy-sequence cur-flags)))
397 (setq diff (elmo-list-diff-nonsortable new-flags cur-flags))
398 (modb-standard-countup-flags msgdb (car diff))
399 (modb-standard-countup-flags msgdb (cadr diff) -1)
400 (elmo-set-hash-val (modb-standard-key number)
401 (cons number new-flags)
402 (modb-standard-flag-map msgdb))
403 (modb-standard-set-flag-modified msgdb number))
404 (when (eq flag 'unread)
405 (elmo-msgdb-unset-flag msgdb number 'new))))))
407 (luna-define-method elmo-msgdb-flag-count ((msgdb modb-standard))
408 (modb-standard-flag-count-internal msgdb))
410 (luna-define-method elmo-msgdb-list-messages ((msgdb modb-standard))
411 (copy-sequence
412 (modb-standard-number-list-internal msgdb)))
414 (luna-define-method elmo-msgdb-list-flagged ((msgdb modb-standard) flag)
415 (let (entry matched)
416 (case flag
417 (read
418 (dolist (number (modb-standard-number-list-internal msgdb))
419 (unless (memq 'unread (modb-standard-message-flags msgdb number))
420 (setq matched (cons number matched)))))
421 (uncached
422 (dolist (number (modb-standard-number-list-internal msgdb))
423 (unless (memq 'cached (modb-standard-message-flags msgdb number))
424 (setq matched (cons number matched)))))
425 (any
426 (mapatoms
427 (lambda (atom)
428 (setq entry (symbol-value atom))
429 (unless (and (eq (length (cdr entry)) 1)
430 (eq (car (cdr entry)) 'cached))
431 ;; If there is a flag other than cached, then the message
432 ;; matches to `any'.
433 (setq matched (cons (car entry) matched))))
434 (modb-standard-flag-map msgdb)))
435 (digest
436 (let ((flags (append elmo-digest-flags
437 (elmo-get-global-flags t t))))
438 (mapatoms
439 (lambda (atom)
440 (setq entry (symbol-value atom))
441 (when (modb-standard-match-flags flags (cdr entry))
442 (setq matched (cons (car entry) matched))))
443 (modb-standard-flag-map msgdb))))
445 (mapatoms
446 (lambda (atom)
447 (setq entry (symbol-value atom))
448 (when (memq flag (cdr entry))
449 (setq matched (cons (car entry) matched))))
450 (modb-standard-flag-map msgdb))))
451 matched))
453 (luna-define-method elmo-msgdb-search ((msgdb modb-standard)
454 condition &optional numbers)
455 (if (vectorp condition)
456 (let ((key (elmo-filter-key condition))
457 results)
458 (cond
459 ((and (string= key "flag")
460 (eq (elmo-filter-type condition) 'match))
461 (setq results (elmo-msgdb-list-flagged
462 msgdb
463 (intern (elmo-filter-value condition))))
464 (if numbers
465 (elmo-list-filter numbers results)
466 results))
467 ((member key '("first" "last"))
468 (let* ((numbers (or numbers
469 (modb-standard-number-list-internal msgdb)))
470 (len (length numbers))
471 (lastp (string= key "last"))
472 (value (string-to-number (elmo-filter-value condition))))
473 (when (eq (elmo-filter-type condition) 'unmatch)
474 (setq lastp (not lastp)
475 value (- len value)))
476 (if lastp
477 (nthcdr (max (- len value) 0) numbers)
478 (when (> value 0)
479 (let* ((numbers (copy-sequence numbers))
480 (last (nthcdr (1- value) numbers)))
481 (when last
482 (setcdr last nil))
483 numbers)))))
485 t)))
488 (luna-define-method elmo-msgdb-append-entity ((msgdb modb-standard)
489 entity &optional flags)
490 (when entity
491 (let ((number (elmo-msgdb-message-entity-number
492 (elmo-message-entity-handler entity) entity))
493 (msg-id (elmo-msgdb-message-entity-field
494 (elmo-message-entity-handler entity) entity 'message-id))
495 duplicate)
496 (when (and number msg-id)
497 ;; number-list
498 (modb-standard-set-number-list-internal
499 msgdb
500 (nconc (modb-standard-number-list-internal msgdb)
501 (list number)))
502 ;; entity-map
503 (let ((table (modb-standard-entity-map msgdb)))
504 (setq duplicate (elmo-get-hash-val msg-id table))
505 (elmo-set-hash-val (modb-standard-key number) entity table)
506 (elmo-set-hash-val msg-id entity table))
507 ;; modification flags
508 (modb-standard-set-message-modified msgdb number)
509 ;; flag-map
510 (when flags
511 (elmo-set-hash-val
512 (modb-standard-key number)
513 (cons number flags)
514 (modb-standard-flag-map msgdb))
515 (modb-standard-countup-flags msgdb flags)
516 (modb-standard-set-flag-modified msgdb number))
517 duplicate))))
519 (luna-define-method elmo-msgdb-update-entity ((msgdb modb-standard)
520 entity values)
521 (let ((handler (elmo-message-entity-handler entity)))
522 (when (elmo-msgdb-message-entity-update-fields handler entity values)
523 (modb-standard-set-message-modified
524 msgdb
525 (elmo-msgdb-message-entity-number handler entity))
526 t)))
528 (luna-define-method elmo-msgdb-delete-messages ((msgdb modb-standard)
529 numbers)
530 (let ((number-list (modb-standard-number-list-internal msgdb))
531 (entity-map (modb-standard-entity-map-internal msgdb))
532 (flag-map (modb-standard-flag-map-internal msgdb))
533 key entity)
534 (dolist (number numbers)
535 (setq key (modb-standard-key number)
536 entity (elmo-get-hash-val key entity-map))
537 (when entity
538 ;; number-list
539 (setq number-list (delq number number-list))
540 ;; entity-map
541 (elmo-clear-hash-val key entity-map)
542 (elmo-clear-hash-val (modb-standard-entity-id entity) entity-map)
543 ;; flag-count (must be BEFORE flag-map)
544 (modb-standard-countup-flags
545 msgdb
546 (modb-standard-message-flags msgdb number)
548 ;; flag-map
549 (elmo-clear-hash-val key flag-map)
550 (modb-standard-set-message-modified msgdb number)
551 (modb-standard-set-flag-modified msgdb number)))
552 (modb-standard-set-number-list-internal msgdb number-list)
553 (modb-standard-set-entity-map-internal msgdb entity-map)
554 (modb-standard-set-flag-map-internal msgdb flag-map)
557 (luna-define-method elmo-msgdb-sort-entities ((msgdb modb-standard)
558 predicate &optional app-data)
559 (message "Sorting...")
560 (let ((numbers (modb-standard-number-list-internal msgdb)))
561 (modb-standard-set-number-list-internal
562 msgdb
563 (sort numbers (lambda (a b)
564 (funcall predicate
565 (elmo-msgdb-message-entity msgdb a)
566 (elmo-msgdb-message-entity msgdb b)
567 app-data))))
568 (message "Sorting...done")
569 msgdb))
571 (defun modb-standard-message-entity (msgdb key load)
572 (let ((ret (elmo-get-hash-val
574 (modb-standard-entity-map-internal msgdb)))
575 (inhibit-quit t))
576 (if (eq 'autoload (car-safe ret))
577 (when (and load modb-standard-divide-number)
578 (modb-standard-load-entity
579 msgdb
580 (elmo-msgdb-location msgdb)
581 (/ (nth 1 ret) modb-standard-divide-number))
582 (modb-standard-message-entity msgdb key nil))
583 ret)))
585 (luna-define-method elmo-msgdb-message-number ((msgdb modb-standard)
586 message-id)
587 (let ((ret (elmo-get-hash-val
588 message-id
589 (modb-standard-entity-map-internal msgdb))))
590 (if (eq 'autoload (car-safe ret))
591 ;; Not loaded yet but can return number.
592 (nth 1 ret)
593 (elmo-message-entity-number ret))))
595 (luna-define-method elmo-msgdb-message-field ((msgdb modb-standard)
596 number field &optional type)
597 (let ((ret (elmo-get-hash-val
598 (modb-standard-key number)
599 (modb-standard-entity-map-internal msgdb))))
600 (if (and (eq 'autoload (car-safe ret)) (eq field 'message-id))
601 ;; Not loaded yet but can return message-id
602 (cdr (cdr ret))
603 (elmo-message-entity-field (elmo-msgdb-message-entity
604 msgdb (modb-standard-key number))
605 field type))))
607 (luna-define-method elmo-msgdb-message-entity ((msgdb modb-standard) key)
608 (when key
609 (modb-standard-message-entity
610 msgdb
611 (cond ((stringp key) key)
612 ((numberp key) (modb-standard-key key)))
613 'autoload)))
615 (luna-define-method elmo-msgdb-message-entity-handler ((msgdb modb-standard))
616 (or (modb-standard-overview-handler-internal msgdb)
617 (modb-standard-set-overview-handler-internal
618 msgdb
619 (luna-make-entity 'modb-standard-entity-handler
620 :mime-charset
621 (modb-generic-mime-charset-internal msgdb)))))
623 (require 'product)
624 (product-provide (provide 'modb-standard) (require 'elmo-version))
626 ;;; modb-standard.el ends here