avoid recursive `require' when loading semantic
[bpt/emacs.git] / lisp / mh-e / mh-thread.el
index c6f33a1..3fa7c2c 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mh-thread.el --- MH-E threading support
 
-;; Copyright (C) 2002-2004, 2006-201 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2004, 2006-2014 Free Software Foundation, Inc.
 
 ;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
 ;; Maintainer: Bill Wohler <wohler@newt.com>
 ;; The threading portion of this files tries to implement the
 ;; algorithm described at:
 ;;   http://www.jwz.org/doc/threading.html
-;; It also begins to implement the IMAP Threading extension RFC. The
-;; implementation lacks the reference and subject canonicalization of
-;; the RFC.
+;; It also begins to implement the threading section of the IMAP -
+;; SORT and THREAD Extensions RFC at:
+;;   http://tools.ietf.org/html/rfc5256
+;; The implementation lacks the reference and subject canonicalization
+;; of the RFC.
 
 ;; In the presentation buffer, children messages are shown indented
 ;; with either [ ] or < > around them. Square brackets ([ ]) denote
@@ -645,19 +647,20 @@ Only information about messages in MSG-LIST are added to the tree."
 
 (defun mh-thread-set-tables (folder)
   "Use the tables of FOLDER in current buffer."
-  (flet ((mh-get-table (symbol)
-                       (with-current-buffer folder
-                         (symbol-value symbol))))
-    (setq mh-thread-id-hash (mh-get-table 'mh-thread-id-hash))
-    (setq mh-thread-subject-hash (mh-get-table 'mh-thread-subject-hash))
-    (setq mh-thread-id-table (mh-get-table 'mh-thread-id-table))
-    (setq mh-thread-id-index-map (mh-get-table 'mh-thread-id-index-map))
-    (setq mh-thread-index-id-map (mh-get-table 'mh-thread-index-id-map))
-    (setq mh-thread-scan-line-map (mh-get-table 'mh-thread-scan-line-map))
-    (setq mh-thread-subject-container-hash
-          (mh-get-table 'mh-thread-subject-container-hash))
-    (setq mh-thread-duplicates (mh-get-table 'mh-thread-duplicates))
-    (setq mh-thread-history (mh-get-table 'mh-thread-history))))
+  (mh-cl-flet
+   ((mh-get-table (symbol)
+                  (with-current-buffer folder
+                    (symbol-value symbol))))
+   (setq mh-thread-id-hash (mh-get-table 'mh-thread-id-hash))
+   (setq mh-thread-subject-hash (mh-get-table 'mh-thread-subject-hash))
+   (setq mh-thread-id-table (mh-get-table 'mh-thread-id-table))
+   (setq mh-thread-id-index-map (mh-get-table 'mh-thread-id-index-map))
+   (setq mh-thread-index-id-map (mh-get-table 'mh-thread-index-id-map))
+   (setq mh-thread-scan-line-map (mh-get-table 'mh-thread-scan-line-map))
+   (setq mh-thread-subject-container-hash
+         (mh-get-table 'mh-thread-subject-container-hash))
+   (setq mh-thread-duplicates (mh-get-table 'mh-thread-duplicates))
+   (setq mh-thread-history (mh-get-table 'mh-thread-history))))
 
 (defun mh-thread-process-in-reply-to (reply-to-header)
   "Extract message id's from REPLY-TO-HEADER.