diff options
author | Glenn Morris <rgm@gnu.org> | 2018-03-01 13:08:47 -0500 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2018-03-01 13:08:47 -0500 |
commit | c16ef04f83965ad43e64e14f362c4182f4e59330 (patch) | |
tree | 20e8806b445e3c1708685b6691dc68b267abc48f /lisp/mh-e | |
parent | 02a71e6c2f2e0e17756ef4d040453d96637d76c7 (diff) | |
download | emacs-c16ef04f83965ad43e64e14f362c4182f4e59330.tar.gz |
Simplify mh-thread-set-tables
* lisp/mh-e/mh-thread.el (mh-thread-set-tables):
Rewrite to simplify and remove compiler warning.
Diffstat (limited to 'lisp/mh-e')
-rw-r--r-- | lisp/mh-e/mh-thread.el | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/lisp/mh-e/mh-thread.el b/lisp/mh-e/mh-thread.el index 41a79b6f0b4..ff8e6602e50 100644 --- a/lisp/mh-e/mh-thread.el +++ b/lisp/mh-e/mh-thread.el @@ -647,20 +647,17 @@ 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." - (mh-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)))) + (dolist (v '(mh-thread-id-hash + mh-thread-subject-hash + mh-thread-id-table + mh-thread-id-index-map + mh-thread-index-id-map + mh-thread-scan-line-map + mh-thread-subject-container-hash + mh-thread-duplicates + mh-thread-history)) + ;; Emacs >= 22.1: (buffer-local-value v folder). + (set v (with-current-buffer folder (symbol-value v))))) (defun mh-thread-process-in-reply-to (reply-to-header) "Extract message id's from REPLY-TO-HEADER. |