annotate lisp/mail/mh-speed.el @ 49120:30c4902b654d

Upgraded to MH-E version 7.1.
author Bill Wohler <wohler@newt.com>
date Wed, 08 Jan 2003 23:21:16 +0000
parents 8aaba207e44b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1 ;;; mh-speed.el --- Speedbar interface for MH-E.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
3 ;; Copyright (C) 2002 Free Software Foundation, Inc.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
4
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
5 ;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
6 ;; Maintainer: Bill Wohler <wohler@newt.com>
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
7 ;; Keywords: mail
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
8 ;; See: mh-e.el
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
9
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
10 ;; This file is part of GNU Emacs.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
11
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
15 ;; any later version.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
16
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
17 ;; GNU Emacs is distributed in the hope that it will be useful,
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
20 ;; GNU General Public License for more details.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
21
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
25 ;; Boston, MA 02111-1307, USA.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
26
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
27 ;;; Commentary:
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
28 ;; Future versions should only use flists.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
29
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
30 ;; Speedbar support for MH-E package.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
31
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
32 ;;; Change Log:
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
33
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
34 ;; $Id: mh-speed.el,v 1.34 2003/01/07 21:15:20 satyaki Exp $
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
35
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
36 ;;; Code:
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
37
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
38 ;; Requires
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
39 (require 'cl)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
40 (require 'mh-e)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
41 (require 'speedbar)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
42
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
43 ;; Global variables
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
44 (defvar mh-speed-refresh-flag nil)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
45 (defvar mh-speed-last-selected-folder nil)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
46 (defvar mh-speed-folder-map (make-hash-table :test #'equal))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
47 (defvar mh-speed-folders-cache (make-hash-table :test #'equal))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
48 (defvar mh-speed-flists-cache (make-hash-table :test #'equal))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
49 (defvar mh-speed-flists-process nil)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
50 (defvar mh-speed-flists-timer nil)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
51 (defvar mh-speed-partial-line "")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
52
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
53 ;; Add our stealth update function
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
54 (unless (member 'mh-speed-stealth-update
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
55 (cdr (assoc "files" speedbar-stealthy-function-list)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
56 ;; Is changing constant lists in elisp safe?
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
57 (setq speedbar-stealthy-function-list
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
58 (copy-tree speedbar-stealthy-function-list))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
59 (push 'mh-speed-stealth-update
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
60 (cdr (assoc "files" speedbar-stealthy-function-list))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
61
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
62 ;; Functions called by speedbar to initialize display...
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
63 ;;;###mh-autoload
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
64 (defun mh-folder-speedbar-buttons (buffer)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
65 "Interface function to create MH-E speedbar buffer.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
66 BUFFER is the MH-E buffer for which the speedbar buffer is to be created."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
67 (unless (get-text-property (point-min) 'mh-level)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
68 (erase-buffer)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
69 (clrhash mh-speed-folder-map)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
70 (speedbar-make-tag-line 'bracket ?+ 'mh-speed-toggle nil " " 'ignore nil
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
71 'mh-speedbar-folder-face 0)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
72 (forward-line -1)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
73 (setf (gethash nil mh-speed-folder-map)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
74 (set-marker (make-marker) (1+ (line-beginning-position))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
75 (add-text-properties
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
76 (line-beginning-position) (1+ (line-beginning-position))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
77 `(mh-folder nil mh-expanded nil mh-children-p t mh-level 0))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
78 (mh-speed-stealth-update t)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
79 (when mh-speed-run-flists-flag
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
80 (mh-speed-flists nil))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
81
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
82 ;;;###mh-autoload
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
83 (defalias 'mh-show-speedbar-buttons 'mh-folder-speedbar-buttons)
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
84 ;;;###mh-autoload
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
85 (defalias 'mh-letter-speedbar-buttons 'mh-folder-speedbar-buttons)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
86
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
87 ;; Keymaps for speedbar...
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
88 (defvar mh-folder-speedbar-key-map (speedbar-make-specialized-keymap)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
89 "Specialized speedbar keymap for MH-E buffers.")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
90 (gnus-define-keys mh-folder-speedbar-key-map
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
91 "+" mh-speed-expand-folder
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
92 "-" mh-speed-contract-folder
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
93 "\r" mh-speed-view
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
94 "f" mh-speed-flists
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
95 "i" mh-speed-invalidate-map)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
96
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
97 (defvar mh-show-speedbar-key-map mh-folder-speedbar-key-map)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
98 (defvar mh-letter-speedbar-key-map mh-folder-speedbar-key-map)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
99
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
100 ;; Menus for speedbar...
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
101 (defvar mh-folder-speedbar-menu-items
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
102 '(["Visit Folder" mh-speed-view
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
103 (save-excursion
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
104 (set-buffer speedbar-buffer)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
105 (get-text-property (line-beginning-position) 'mh-folder))]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
106 ["Expand nested folders" mh-speed-expand-folder
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
107 (and (get-text-property (line-beginning-position) 'mh-children-p)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
108 (not (get-text-property (line-beginning-position) 'mh-expanded)))]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
109 ["Contract nested folders" mh-speed-contract-folder
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
110 (and (get-text-property (line-beginning-position) 'mh-children-p)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
111 (get-text-property (line-beginning-position) 'mh-expanded))]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
112 ["Run Flists" mh-speed-flists t]
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
113 ["Invalidate cached folders" mh-speed-invalidate-map t])
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
114 "Extra menu items for speedbar.")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
115
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
116 (defvar mh-show-speedbar-menu-items mh-folder-speedbar-menu-items)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
117 (defvar mh-letter-speedbar-menu-items mh-folder-speedbar-menu-items)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
118
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
119 (defmacro mh-speed-select-attached-frame ()
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
120 "Compatibility macro to handle speedbar versions 0.11a and 0.14beta4."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
121 (cond ((fboundp 'dframe-select-attached-frame)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
122 '(dframe-select-attached-frame speedbar-frame))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
123 ((boundp 'speedbar-attached-frame)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
124 '(select-frame speedbar-attached-frame))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
125 (t (error "Installed speedbar version not supported by MH-E"))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
126
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
127 (defun mh-speed-update-current-folder (force)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
128 "Update speedbar highlighting of the current folder.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
129 The function tries to be smart so that work done is minimized. The currently
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
130 highlighted folder is cached and no highlighting happens unless it changes.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
131 Also highlighting is suspended while the speedbar frame is selected.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
132 Otherwise you get the disconcerting behavior of folders popping open on their
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
133 own when you are trying to navigate around in the speedbar buffer.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
134
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
135 The update is always carried out if FORCE is non-nil."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
136 (let* ((lastf (selected-frame))
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
137 (newcf (save-excursion
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
138 (mh-speed-select-attached-frame)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
139 (prog1 (mh-speed-extract-folder-name (buffer-name))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
140 (select-frame lastf))))
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
141 (lastb (current-buffer))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
142 (case-fold-search t))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
143 (when (or force
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
144 (and mh-speed-refresh-flag (not (eq lastf speedbar-frame)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
145 (and (stringp newcf)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
146 (equal (substring newcf 0 1) "+")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
147 (not (equal newcf mh-speed-last-selected-folder))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
148 (setq mh-speed-refresh-flag nil)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
149 (select-frame speedbar-frame)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
150 (set-buffer speedbar-buffer)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
151
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
152 ;; Remove highlight from previous match...
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
153 (mh-speed-highlight mh-speed-last-selected-folder
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
154 'mh-speedbar-folder-face)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
155
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
156 ;; If we found a match highlight it...
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
157 (when (mh-speed-goto-folder newcf)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
158 (mh-speed-highlight newcf 'mh-speedbar-selected-folder-face))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
159
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
160 (setq mh-speed-last-selected-folder newcf)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
161 (speedbar-position-cursor-on-line)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
162 (set-window-point (frame-first-window speedbar-frame) (point))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
163 (set-buffer lastb)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
164 (select-frame lastf))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
165 (when (eq lastf speedbar-frame)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
166 (setq mh-speed-refresh-flag t))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
167
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
168 (defun mh-speed-normal-face (face)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
169 "Return normal face for given FACE."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
170 (cond ((eq face 'mh-speedbar-folder-with-unseen-messages-face)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
171 'mh-speedbar-folder-face)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
172 ((eq face 'mh-speedbar-selected-folder-with-unseen-messages-face)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
173 'mh-speedbar-selected-folder-face)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
174 (t face)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
175
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
176 (defun mh-speed-bold-face (face)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
177 "Return bold face for given FACE."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
178 (cond ((eq face 'mh-speedbar-folder-face)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
179 'mh-speedbar-folder-with-unseen-messages-face)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
180 ((eq face 'mh-speedbar-selected-folder-face)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
181 'mh-speedbar-selected-folder-with-unseen-messages-face)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
182 (t face)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
183
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
184 (defun mh-speed-highlight (folder face)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
185 "Set FOLDER to FACE."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
186 (save-excursion
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
187 (speedbar-with-writable
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
188 (goto-char (gethash folder mh-speed-folder-map (point)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
189 (beginning-of-line)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
190 (if (re-search-forward "([1-9][0-9]*/[0-9]+)" (line-end-position) t)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
191 (setq face (mh-speed-bold-face face))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
192 (setq face (mh-speed-normal-face face)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
193 (beginning-of-line)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
194 (when (re-search-forward "\\[.\\] " (line-end-position) t)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
195 (put-text-property (point) (line-end-position) 'face face)))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
196
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
197 (defun mh-speed-stealth-update (&optional force)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
198 "Do stealth update.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
199 With non-nil FORCE, the update is always carried out."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
200 (cond ((save-excursion (set-buffer speedbar-buffer)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
201 (get-text-property (point-min) 'mh-level))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
202 ;; Execute this hook and *don't* run anything else
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
203 (mh-speed-update-current-folder force)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
204 nil)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
205 ;; Otherwise on to your regular programming
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
206 (t t)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
207
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
208 (defun mh-speed-goto-folder (folder)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
209 "Move point to line containing FOLDER.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
210 The function will expand out parent folders of FOLDER if needed."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
211 (let ((prefix folder)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
212 (suffix-list ())
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
213 (last-slash t))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
214 (while (and (not (gethash prefix mh-speed-folder-map)) last-slash)
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
215 (setq last-slash (mh-search-from-end ?/ prefix))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
216 (when (integerp last-slash)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
217 (push (substring prefix (1+ last-slash)) suffix-list)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
218 (setq prefix (substring prefix 0 last-slash))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
219 (let ((prefix-position (gethash prefix mh-speed-folder-map)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
220 (if prefix-position
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
221 (goto-char prefix-position)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
222 (goto-char (point-min))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
223 (mh-speed-toggle)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
224 (unless (get-text-property (point) 'mh-expanded)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
225 (mh-speed-toggle))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
226 (goto-char (gethash prefix mh-speed-folder-map))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
227 (while suffix-list
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
228 ;; We always need atleast one toggle. We need two if the directory list
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
229 ;; is stale since a folder was added.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
230 (when (equal prefix (get-text-property (line-beginning-position)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
231 'mh-folder))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
232 (mh-speed-toggle)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
233 (unless (get-text-property (point) 'mh-expanded)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
234 (mh-speed-toggle)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
235 (setq prefix (format "%s/%s" prefix (pop suffix-list)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
236 (goto-char (gethash prefix mh-speed-folder-map (point))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
237 (beginning-of-line)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
238 (equal folder (get-text-property (point) 'mh-folder))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
239
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
240 (defun mh-speed-extract-folder-name (buffer)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
241 "Given an MH-E BUFFER find the folder that should be highlighted.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
242 Do the right thing for the different kinds of buffers that MH-E uses."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
243 (save-excursion
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
244 (set-buffer buffer)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
245 (cond ((eq major-mode 'mh-folder-mode)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
246 mh-current-folder)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
247 ((eq major-mode 'mh-show-mode)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
248 (set-buffer mh-show-folder-buffer)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
249 mh-current-folder)
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
250 ((eq major-mode 'mh-letter-mode)
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
251 (when (string-match mh-user-path buffer-file-name)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
252 (let* ((rel-path (substring buffer-file-name (match-end 0)))
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
253 (directory-end (mh-search-from-end ?/ rel-path)))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
254 (when directory-end
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
255 (format "+%s" (substring rel-path 0 directory-end)))))))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
256
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
257 (defun mh-speed-add-buttons (folder level)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
258 "Add speedbar button for FOLDER which is at indented by LEVEL amount."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
259 (let ((folder-list (mh-speed-folders folder)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
260 (mapc
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
261 (lambda (f)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
262 (let* ((folder-name (format "%s%s%s" (or folder "+")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
263 (if folder "/" "") (car f)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
264 (counts (gethash folder-name mh-speed-flists-cache)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
265 (speedbar-with-writable
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
266 (speedbar-make-tag-line
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
267 'bracket (if (cdr f) ?+ ? )
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
268 'mh-speed-toggle nil
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
269 (format "%s%s"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
270 (car f)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
271 (if counts
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
272 (format " (%s/%s)" (car counts) (cdr counts))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
273 ""))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
274 'mh-speed-view nil
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
275 (if (and counts (> (car counts) 0))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
276 'mh-speedbar-folder-with-unseen-messages-face
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
277 'mh-speedbar-folder-face)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
278 level)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
279 (save-excursion
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
280 (forward-line -1)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
281 (setf (gethash folder-name mh-speed-folder-map)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
282 (set-marker (make-marker) (1+ (line-beginning-position))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
283 (add-text-properties
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
284 (line-beginning-position) (1+ (line-beginning-position))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
285 `(mh-folder ,folder-name
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
286 mh-expanded nil
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
287 mh-children-p ,(not (not (cdr f)))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
288 ,@(if counts `(mh-count
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
289 (,(car counts) . ,(cdr counts))) ())
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
290 mh-level ,level))))))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
291 folder-list)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
292
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
293 ;;;###mh-autoload
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
294 (defun mh-speed-toggle (&rest args)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
295 "Toggle the display of child folders.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
296 The otional ARGS are ignored and there for compatibilty with speedbar."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
297 (interactive)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
298 (declare (ignore args))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
299 (beginning-of-line)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
300 (let ((parent (get-text-property (point) 'mh-folder))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
301 (kids-p (get-text-property (point) 'mh-children-p))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
302 (expanded (get-text-property (point) 'mh-expanded))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
303 (level (get-text-property (point) 'mh-level))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
304 (point (point))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
305 start-region)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
306 (speedbar-with-writable
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
307 (cond ((not kids-p) nil)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
308 (expanded
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
309 (forward-line)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
310 (setq start-region (point))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
311 (while (and (get-text-property (point) 'mh-level)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
312 (> (get-text-property (point) 'mh-level) level))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
313 (remhash (get-text-property (point) 'mh-folder)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
314 mh-speed-folder-map)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
315 (forward-line))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
316 (delete-region start-region (point))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
317 (forward-line -1)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
318 (speedbar-change-expand-button-char ?+)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
319 (add-text-properties
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
320 (line-beginning-position) (1+ (line-beginning-position))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
321 '(mh-expanded nil)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
322 (t
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
323 (forward-line)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
324 (mh-speed-add-buttons parent (1+ level))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
325 (goto-char point)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
326 (speedbar-change-expand-button-char ?-)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
327 (add-text-properties
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
328 (line-beginning-position) (1+ (line-beginning-position))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
329 `(mh-expanded t)))))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
330
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
331 (defalias 'mh-speed-expand-folder 'mh-speed-toggle)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
332 (defalias 'mh-speed-contract-folder 'mh-speed-toggle)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
333
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
334 ;;;###mh-autoload
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
335 (defun mh-speed-view (&rest args)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
336 "View folder on current line.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
337 Optional ARGS are ignored."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
338 (interactive)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
339 (declare (ignore args))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
340 (let* ((folder (get-text-property (line-beginning-position) 'mh-folder))
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
341 (range (and (stringp folder) (mh-read-msg-range folder))))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
342 (when (stringp folder)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
343 (speedbar-with-attached-buffer
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
344 (mh-visit-folder folder range)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
345 (delete-other-windows)))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
346
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
347 (defun mh-speed-folders (folder)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
348 "Find the subfolders of FOLDER.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
349 The function avoids running folders unnecessarily by caching the results of
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
350 the actual folders call."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
351 (let ((match (gethash folder mh-speed-folders-cache 'no-result)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
352 (cond ((eq match 'no-result)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
353 (setf (gethash folder mh-speed-folders-cache)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
354 (mh-speed-folders-actual folder)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
355 (t match))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
356
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
357 (defun mh-speed-folders-actual (folder)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
358 "Execute the command folders to return the sub-folders of FOLDER.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
359 Filters out the folder names that start with \".\" so that directories that
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
360 aren't usually mail folders are hidden."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
361 (let* ((folder (cond ((and (stringp folder)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
362 (equal (substring folder 0 1) "+"))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
363 folder)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
364 (t nil)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
365 (arg-list `(,(expand-file-name "folders" mh-progs)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
366 nil (t nil) nil "-noheader" "-norecurse"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
367 ,@(if (stringp folder) (list folder) ())))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
368 (results ()))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
369 (with-temp-buffer
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
370 (apply #'call-process arg-list)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
371 (goto-char (point-min))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
372 (while (not (and (eolp) (bolp)))
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
373 (goto-char (line-end-position))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
374 (let ((has-pos (search-backward " has " (line-beginning-position) t)))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
375 (when (integerp has-pos)
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
376 (while (or (equal (char-after has-pos) ? )
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
377 (equal (char-after has-pos) ?+))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
378 (decf has-pos))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
379 (incf has-pos)
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
380 (let ((name (buffer-substring (line-beginning-position) has-pos)))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
381 (let ((first-char (substring name 0 1)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
382 (unless (or (string-equal first-char ".")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
383 (string-equal first-char "#")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
384 (string-equal first-char ","))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
385 (push
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
386 (cons name
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
387 (search-forward "(others)" (line-end-position) t))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
388 results)))))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
389 (forward-line 1))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
390 (setq results (nreverse results))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
391 (when (stringp folder)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
392 (setq results (cdr results))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
393 (let ((folder-name-len (length (format "%s/" (substring folder 1)))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
394 (setq results (mapcar (lambda (f)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
395 (cons (substring (car f) folder-name-len)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
396 (cdr f)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
397 results))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
398 results))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
399
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
400 ;;;###mh-autoload
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
401 (defun mh-speed-flists (force)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
402 "Execute flists -recurse and update message counts.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
403 If FORCE is non-nil the timer is reset."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
404 (interactive (list t))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
405 (when force
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
406 (when (timerp mh-speed-flists-timer)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
407 (cancel-timer mh-speed-flists-timer))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
408 (setq mh-speed-flists-timer nil)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
409 (when (and (processp mh-speed-flists-process)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
410 (not (eq (process-status mh-speed-flists-process) 'exit)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
411 (kill-process mh-speed-flists-process)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
412 (setq mh-speed-flists-process nil)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
413 (unless mh-speed-flists-timer
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
414 (setq mh-speed-flists-timer
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
415 (run-at-time
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
416 nil mh-speed-flists-interval
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
417 (lambda ()
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
418 (unless (and (processp mh-speed-flists-process)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
419 (not (eq (process-status mh-speed-flists-process)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
420 'exit)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
421 (setq mh-speed-flists-process
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
422 (start-process (expand-file-name "flists" mh-progs) nil
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
423 "flists" "-recurse"
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
424 "-sequence" (symbol-name mh-unseen-seq)))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
425 (set-process-filter mh-speed-flists-process
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
426 'mh-speed-parse-flists-output)))))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
427
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
428 ;; Copied from mh-make-folder-list-filter...
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
429 (defun mh-speed-parse-flists-output (process output)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
430 "Parse the incremental results from flists.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
431 PROCESS is the flists process and OUTPUT is the results that must be handled
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
432 next."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
433 (let ((prevailing-match-data (match-data))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
434 (position 0)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
435 line-end line folder unseen total)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
436 (unwind-protect
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
437 (while (setq line-end (string-match "\n" output position))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
438 (setq line (format "%s%s"
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
439 mh-speed-partial-line
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
440 (substring output position line-end))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
441 mh-speed-partial-line "")
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
442 (multiple-value-setq (folder unseen total)
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
443 (mh-parse-flist-output-line line))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
444 (when (and folder unseen total)
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
445 (setf (gethash folder mh-speed-flists-cache) (cons unseen total))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
446 (save-excursion
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
447 (when (buffer-live-p (get-buffer speedbar-buffer))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
448 (set-buffer speedbar-buffer)
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
449 (speedbar-with-writable
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
450 (when (get-text-property (point-min) 'mh-level)
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
451 (let ((pos (gethash folder mh-speed-folder-map))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
452 face)
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
453 (when pos
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
454 (goto-char pos)
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
455 (goto-char (line-beginning-position))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
456 (cond
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
457 ((null (get-text-property (point) 'mh-count))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
458 (goto-char (line-end-position))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
459 (setq face (get-text-property (1- (point)) 'face))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
460 (insert (format " (%s/%s)" unseen total))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
461 (mh-speed-highlight 'unknown face)
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
462 (goto-char (line-beginning-position))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
463 (add-text-properties (point) (1+ (point))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
464 `(mh-count (,unseen . ,total))))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
465 ((not (equal (get-text-property (point) 'mh-count)
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
466 (cons unseen total)))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
467 (goto-char (line-end-position))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
468 (setq face (get-text-property (1- (point)) 'face))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
469 (re-search-backward " " (line-beginning-position) t)
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
470 (delete-region (point) (line-end-position))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
471 (insert (format " (%s/%s)" unseen total))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
472 (mh-speed-highlight 'unknown face)
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
473 (goto-char (line-beginning-position))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
474 (add-text-properties
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
475 (point) (1+ (point))
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
476 `(mh-count (,unseen . ,total))))))))))))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
477 (setq position (1+ line-end)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
478 (set-match-data prevailing-match-data))
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
479 (setq mh-speed-partial-line (substring output position))))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
480
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
481 ;;;###mh-autoload
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
482 (defun mh-speed-invalidate-map (folder)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
483 "Remove FOLDER from various optimization caches."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
484 (interactive (list ""))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
485 (save-excursion
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
486 (set-buffer speedbar-buffer)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
487 (let* ((speedbar-update-flag nil)
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
488 (last-slash (mh-search-from-end ?/ folder))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
489 (parent (if last-slash (substring folder 0 last-slash) nil))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
490 (parent-position (gethash parent mh-speed-folder-map))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
491 (parent-change nil))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
492 (remhash parent mh-speed-folders-cache)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
493 (remhash folder mh-speed-folders-cache)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
494 (when parent-position
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
495 (let ((parent-kids (mh-speed-folders parent)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
496 (cond ((null parent-kids)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
497 (setq parent-change ?+))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
498 ((and (null (cdr parent-kids))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
499 (equal (if last-slash
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
500 (substring folder (1+ last-slash))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
501 (substring folder 1))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
502 (caar parent-kids)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
503 (setq parent-change ? ))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
504 (goto-char parent-position)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
505 (when (equal (get-text-property (line-beginning-position) 'mh-folder)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
506 parent)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
507 (when (get-text-property (line-beginning-position) 'mh-expanded)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
508 (mh-speed-toggle))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
509 (when parent-change
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
510 (speedbar-with-writable
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
511 (mh-speedbar-change-expand-button-char parent-change)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
512 (add-text-properties
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
513 (line-beginning-position) (1+ (line-beginning-position))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
514 `(mh-children-p ,(equal parent-change ?+)))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
515 (mh-speed-highlight mh-speed-last-selected-folder
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
516 'mh-speedbar-folder-face)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
517 (setq mh-speed-last-selected-folder nil)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
518 (setq mh-speed-refresh-flag t)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
519 (when (equal folder "")
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
520 (clrhash mh-speed-folders-cache)))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
521
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
522 ;;;###mh-autoload
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
523 (defun mh-speed-add-folder (folder)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
524 "Add FOLDER since it is being created.
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
525 The function invalidates the latest ancestor that is present."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
526 (save-excursion
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
527 (set-buffer speedbar-buffer)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
528 (let ((speedbar-update-flag nil)
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
529 (last-slash (mh-search-from-end ?/ folder))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
530 (ancestor folder)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
531 (ancestor-pos nil))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
532 (block while-loop
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
533 (while last-slash
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
534 (setq ancestor (substring ancestor 0 last-slash))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
535 (setq ancestor-pos (gethash ancestor mh-speed-folder-map))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
536 (when ancestor-pos
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
537 (return-from while-loop))
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
538 (setq last-slash (mh-search-from-end ?/ ancestor))))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
539 (unless ancestor-pos (setq ancestor nil))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
540 (goto-char (or ancestor-pos (gethash nil mh-speed-folder-map)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
541 (speedbar-with-writable
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
542 (mh-speedbar-change-expand-button-char ?+)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
543 (add-text-properties
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
544 (line-beginning-position) (1+ (line-beginning-position))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
545 `(mh-children-p t)))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
546 (when (get-text-property (line-beginning-position) 'mh-expanded)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
547 (mh-speed-toggle))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
548 (remhash ancestor mh-speed-folders-cache)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
549 (setq mh-speed-refresh-flag t))))
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
550
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
551 ;; Make it slightly more general to allow for [ ] buttons to be changed to
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
552 ;; [+].
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
553 (defun mh-speedbar-change-expand-button-char (char)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
554 "Change the expansion button character to CHAR for the current line."
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
555 (save-excursion
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
556 (beginning-of-line)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
557 (if (re-search-forward "\\[.\\]" (line-end-position) t)
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
558 (speedbar-with-writable
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
559 (backward-char 2)
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
560 (delete-char 1)
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
561 (insert-char char 1 t)
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
562 (put-text-property (point) (1- (point)) 'invisible nil)
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
563 ;; make sure we fix the image on the text here.
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
564 (speedbar-insert-image-button-maybe (- (point) 2) 3)))))
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
565
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
566 (provide 'mh-speed)
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
567
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
568 ;;; Local Variables:
49120
30c4902b654d Upgraded to MH-E version 7.1.
Bill Wohler <wohler@newt.com>
parents: 48595
diff changeset
569 ;;; indent-tabs-mode: nil
48595
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
570 ;;; sentence-end-double-space: nil
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
571 ;;; End:
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
572
8aaba207e44b Upgraded to MH-E version 7.0.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
573 ;;; mh-speed.el ends here