Mercurial > emacs
annotate lisp/mh-e/mh-tool-bar.el @ 69423:cb37d3ec5eb1
Add period to last sentence added.
author | Bill Wohler <wohler@newt.com> |
---|---|
date | Sat, 11 Mar 2006 22:50:06 +0000 |
parents | f3bbf5f32462 |
children | 7ff38193167f |
rev | line source |
---|---|
68465 | 1 ;;; mh-tool-bar.el --- MH-E tool bar support |
2 | |
3 ;; Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. | |
4 | |
5 ;; Author: Satyaki Das <satyaki@theforce.stanford.edu> | |
6 ;; Maintainer: Bill Wohler <wohler@newt.com> | |
7 ;; Keywords: mail | |
8 ;; See: mh-e.el | |
9 | |
10 ;; This file is part of GNU Emacs. | |
11 | |
12 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
13 ;; it under the terms of the GNU General Public License as published by | |
14 ;; the Free Software Foundation; either version 2, or (at your option) | |
15 ;; any later version. | |
16 | |
17 ;; GNU Emacs is distributed in the hope that it will be useful, | |
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 ;; GNU General Public License for more details. | |
21 | |
22 ;; You should have received a copy of the GNU General Public License | |
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
25 ;; Boston, MA 02110-1301, USA. | |
26 | |
27 ;;; Commentary: | |
28 | |
29 ;;; Change Log: | |
30 | |
31 ;;; Code: | |
32 | |
33 (require 'mh-e) | |
68597
04d228a1b5c8
* mh-tool-bar.el: Add conditional require of 'tool-bar or 'toolbar
Mark D. Baushke <mdb@gnu.org>
parents:
68470
diff
changeset
|
34 (mh-do-in-gnu-emacs |
04d228a1b5c8
* mh-tool-bar.el: Add conditional require of 'tool-bar or 'toolbar
Mark D. Baushke <mdb@gnu.org>
parents:
68470
diff
changeset
|
35 (require 'tool-bar)) |
04d228a1b5c8
* mh-tool-bar.el: Add conditional require of 'tool-bar or 'toolbar
Mark D. Baushke <mdb@gnu.org>
parents:
68470
diff
changeset
|
36 (mh-do-in-xemacs |
04d228a1b5c8
* mh-tool-bar.el: Add conditional require of 'tool-bar or 'toolbar
Mark D. Baushke <mdb@gnu.org>
parents:
68470
diff
changeset
|
37 (require 'toolbar)) |
68465 | 38 |
39 ;;; Tool Bar Commands | |
40 | |
41 (defun mh-tool-bar-search (&optional arg) | |
42 "Interactively call `mh-tool-bar-search-function'. | |
43 Optional argument ARG is not used." | |
44 (interactive "P") | |
45 (call-interactively mh-tool-bar-search-function)) | |
46 | |
47 (defun mh-tool-bar-customize () | |
48 "Call `mh-customize' from the tool bar." | |
49 (interactive) | |
50 (mh-customize t)) | |
51 | |
52 (defun mh-tool-bar-folder-help () | |
53 "Visit \"(mh-e)Top\"." | |
54 (interactive) | |
55 (info "(mh-e)Top") | |
56 (delete-other-windows)) | |
57 | |
58 (defun mh-tool-bar-letter-help () | |
59 "Visit \"(mh-e)Editing Drafts\"." | |
60 (interactive) | |
61 (info "(mh-e)Editing Drafts") | |
62 (delete-other-windows)) | |
63 | |
64 (defmacro mh-tool-bar-reply-generator (function recipient folder-buffer-flag) | |
65 "Generate FUNCTION that replies to RECIPIENT. | |
66 If FOLDER-BUFFER-FLAG is nil then the function generated... | |
67 When INCLUDE-FLAG is non-nil, include message body being replied to." | |
68 `(defun ,function (&optional arg) | |
69 ,(format "Reply to \"%s\".\nWhen ARG is non-nil include message in reply." | |
70 recipient) | |
71 (interactive "P") | |
72 ,(if folder-buffer-flag nil '(set-buffer mh-show-folder-buffer)) | |
73 (mh-reply (mh-get-msg-num nil) ,recipient arg))) | |
74 | |
75 (mh-tool-bar-reply-generator mh-tool-bar-reply-from "from" t) | |
76 (mh-tool-bar-reply-generator mh-show-tool-bar-reply-from "from" nil) | |
77 (mh-tool-bar-reply-generator mh-tool-bar-reply-to "to" t) | |
78 (mh-tool-bar-reply-generator mh-show-tool-bar-reply-to "to" nil) | |
79 (mh-tool-bar-reply-generator mh-tool-bar-reply-all "all" t) | |
80 (mh-tool-bar-reply-generator mh-show-tool-bar-reply-all "all" nil) | |
81 | |
82 | |
83 | |
84 ;;; Tool Bar Creation | |
85 | |
86 (defmacro mh-tool-bar-define (defaults &rest buttons) | |
87 "Define a tool bar for MH-E. | |
88 DEFAULTS is the list of buttons that are present by default. It | |
89 is a list of lists where the sublists are of the following form: | |
90 | |
91 (:KEYWORD FUNC1 FUNC2 FUNC3 ...) | |
92 | |
93 Here :KEYWORD is one of :folder or :letter. If it is :folder then | |
94 the default buttons in the folder and show mode buffers are being | |
95 specified. If it is :letter then the default buttons in the | |
96 letter mode are listed. FUNC1, FUNC2, FUNC3, ... are the names of | |
97 the functions that the buttons would execute. | |
98 | |
99 Each element of BUTTONS is a list consisting of four mandatory | |
100 items and one optional item as follows: | |
101 | |
102 (FUNCTION MODES ICON DOC &optional ENABLE-EXPR) | |
103 | |
104 where, | |
105 | |
106 FUNCTION is the name of the function that will be executed when | |
107 the button is clicked. | |
108 | |
109 MODES is a list of symbols. List elements must be from \"folder\", | |
110 \"letter\" and \"sequence\". If \"folder\" is present then the button is | |
111 available in the folder and show buffer. If the name of FUNCTION is | |
112 of the form \"mh-foo\", where foo is some arbitrary string, then we | |
113 check if the function `mh-show-foo' exists. If it exists then that | |
114 function is used in the show buffer. Otherwise the original function | |
115 `mh-foo' is used in the show buffer as well. Presence of \"sequence\" | |
116 is handled similar to the above. The only difference is that the | |
117 button is shown only when the folder is narrowed to a sequence. If | |
118 \"letter\" is present in MODES, then the button is available during | |
119 draft editing and runs FUNCTION when clicked. | |
120 | |
121 ICON is the icon that is drawn in the button. | |
122 | |
123 DOC is the documentation for the button. It is used in tool-tips and | |
124 in providing other help to the user. GNU Emacs uses only the first | |
125 line of the string. So the DOC should be formatted such that the | |
126 first line is useful and complete without the rest of the string. | |
127 | |
128 Optional item ENABLE-EXPR is an arbitrary lisp expression. If it | |
129 evaluates to nil, then the button is deactivated, otherwise it is | |
130 active. If it isn't present then the button is always active." | |
131 ;; The following variable names have been carefully chosen to make code | |
132 ;; generation easier. Modifying the names should be done carefully. | |
133 (let (folder-buttons folder-docs folder-button-setter sequence-button-setter | |
134 show-buttons show-button-setter show-seq-button-setter | |
135 letter-buttons letter-docs letter-button-setter | |
136 folder-defaults letter-defaults | |
137 folder-vectors show-vectors letter-vectors) | |
138 (dolist (x defaults) | |
139 (cond ((eq (car x) :folder) (setq folder-defaults (cdr x))) | |
140 ((eq (car x) :letter) (setq letter-defaults (cdr x))))) | |
141 (dolist (button buttons) | |
142 (unless (and (listp button) | |
143 (or (equal (length button) 4) (equal (length button) 5))) | |
144 (error "Incorrect MH-E tool-bar button specification: %s" button)) | |
145 (let* ((name (nth 0 button)) | |
146 (name-str (symbol-name name)) | |
147 (icon (nth 2 button)) | |
148 (xemacs-icon (mh-do-in-xemacs | |
149 (cdr (assoc (intern icon) mh-xemacs-icon-map)))) | |
150 (full-doc (nth 3 button)) | |
151 (doc (if (string-match "\\(.*\\)\n" full-doc) | |
152 (match-string 1 full-doc) | |
153 full-doc)) | |
154 (enable-expr (or (nth 4 button) t)) | |
155 (modes (nth 1 button)) | |
156 functions show-sym) | |
157 (when (memq 'letter modes) (setq functions `(:letter ,name))) | |
158 (when (or (memq 'folder modes) (memq 'sequence modes)) | |
159 (setq functions | |
160 (append `(,(if (memq 'folder modes) :folder :sequence) ,name) | |
161 functions)) | |
162 (setq show-sym | |
163 (if (string-match "^mh-\\(.*\\)$" name-str) | |
164 (intern (concat "mh-show-" (match-string 1 name-str))) | |
165 name)) | |
166 (setq functions | |
167 (append `(,(if (memq 'folder modes) :show :show-seq) | |
168 ,(if (fboundp show-sym) show-sym name)) | |
169 functions))) | |
170 (do ((functions functions (cddr functions))) | |
171 ((null functions)) | |
172 (let* ((type (car functions)) | |
173 (function (cadr functions)) | |
174 (type1 (substring (symbol-name type) 1)) | |
175 (vector-list (cond ((eq type :show) 'show-vectors) | |
176 ((eq type :show-seq) 'show-vectors) | |
177 ((eq type :letter) 'letter-vectors) | |
178 (t 'folder-vectors))) | |
179 (list (cond ((eq type :letter) 'mh-tool-bar-letter-buttons) | |
180 (t 'mh-tool-bar-folder-buttons))) | |
181 (key (intern (concat "mh-" type1 "tool-bar-" name-str))) | |
182 (setter (intern (concat type1 "-button-setter"))) | |
183 (mbuttons (cond ((eq type :letter) 'letter-buttons) | |
184 ((eq type :show) 'show-buttons) | |
185 ((eq type :show-seq) 'show-buttons) | |
186 (t 'folder-buttons))) | |
187 (docs (cond ((eq mbuttons 'letter-buttons) 'letter-docs) | |
188 ((eq mbuttons 'folder-buttons) 'folder-docs)))) | |
189 (add-to-list vector-list `[,xemacs-icon ,function t ,full-doc]) | |
190 (add-to-list | |
191 setter `(when (member ',name ,list) | |
192 (mh-funcall-if-exists | |
193 tool-bar-add-item ,icon ',function ',key | |
194 :help ,doc :enable ',enable-expr))) | |
195 (add-to-list mbuttons name) | |
196 (if docs (add-to-list docs doc)))))) | |
197 (setq folder-buttons (nreverse folder-buttons) | |
198 letter-buttons (nreverse letter-buttons) | |
199 show-buttons (nreverse show-buttons) | |
200 letter-docs (nreverse letter-docs) | |
201 folder-docs (nreverse folder-docs) | |
202 folder-vectors (nreverse folder-vectors) | |
203 show-vectors (nreverse show-vectors) | |
204 letter-vectors (nreverse letter-vectors)) | |
205 (dolist (x folder-defaults) | |
206 (unless (memq x folder-buttons) | |
69245
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
207 (error "Folder defaults contains unknown button %s" x))) |
68465 | 208 (dolist (x letter-defaults) |
209 (unless (memq x letter-buttons) | |
69245
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
210 (error "Letter defaults contains unknown button %s" x))) |
68465 | 211 `(eval-when (compile load eval) |
212 (defun mh-buffer-exists-p (mode) | |
213 "Test whether a buffer with major mode MODE is present." | |
214 (loop for buf in (buffer-list) | |
215 when (save-excursion | |
216 (set-buffer buf) | |
217 (eq major-mode mode)) | |
218 return t)) | |
219 | |
220 ;; GNU Emacs tool bar specific code | |
221 (mh-do-in-gnu-emacs | |
222 ;; Tool bar initialization functions | |
223 (defun mh-tool-bar-folder-buttons-init () | |
224 (when (mh-buffer-exists-p 'mh-folder-mode) | |
225 (setq mh-folder-tool-bar-map | |
226 (let ((tool-bar-map (make-sparse-keymap))) | |
227 ,@(nreverse folder-button-setter) | |
228 tool-bar-map)) | |
229 (setq mh-show-tool-bar-map | |
230 (let ((tool-bar-map (make-sparse-keymap))) | |
231 ,@(nreverse show-button-setter) | |
232 tool-bar-map)) | |
233 (setq mh-show-seq-tool-bar-map | |
234 (let ((tool-bar-map (copy-keymap mh-show-tool-bar-map))) | |
235 ,@(nreverse show-seq-button-setter) | |
236 tool-bar-map)) | |
237 (setq mh-folder-seq-tool-bar-map | |
238 (let ((tool-bar-map (copy-keymap mh-folder-tool-bar-map))) | |
239 ,@(nreverse sequence-button-setter) | |
240 tool-bar-map)))) | |
241 (defun mh-tool-bar-letter-buttons-init () | |
242 (when (mh-buffer-exists-p 'mh-letter-mode) | |
243 (setq mh-letter-tool-bar-map | |
244 (let ((tool-bar-map (make-sparse-keymap))) | |
245 ,@(nreverse letter-button-setter) | |
246 tool-bar-map)))) | |
247 ;; Custom setter functions | |
248 (defun mh-tool-bar-folder-buttons-set (symbol value) | |
249 "Construct tool bar for `mh-folder-mode' and `mh-show-mode'." | |
250 (set-default symbol value) | |
251 (mh-tool-bar-folder-buttons-init)) | |
252 (defun mh-tool-bar-letter-buttons-set (symbol value) | |
253 "Construct tool bar for `mh-letter-mode'." | |
254 (set-default symbol value) | |
255 (mh-tool-bar-letter-buttons-init))) | |
256 ;; XEmacs specific code | |
257 (mh-do-in-xemacs | |
258 (defvar mh-tool-bar-folder-vector-map | |
259 ',(loop for button in folder-buttons | |
260 for vector in folder-vectors | |
261 collect (cons button vector))) | |
262 (defvar mh-tool-bar-show-vector-map | |
263 ',(loop for button in show-buttons | |
264 for vector in show-vectors | |
265 collect (cons button vector))) | |
266 (defvar mh-tool-bar-letter-vector-map | |
267 ',(loop for button in letter-buttons | |
268 for vector in letter-vectors | |
269 collect (cons button vector))) | |
270 (defvar mh-tool-bar-folder-buttons nil) | |
271 (defvar mh-tool-bar-show-buttons nil) | |
272 (defvar mh-tool-bar-letter-buttons nil) | |
273 ;; Custom setter functions | |
274 (defun mh-tool-bar-letter-buttons-set (symbol value) | |
275 (set-default symbol value) | |
276 (when mh-xemacs-has-tool-bar-flag | |
277 (setq mh-tool-bar-letter-buttons | |
278 (loop for b in value | |
279 collect (cdr (assoc b mh-tool-bar-letter-vector-map)))))) | |
280 (defun mh-tool-bar-folder-buttons-set (symbol value) | |
281 (set-default symbol value) | |
282 (when mh-xemacs-has-tool-bar-flag | |
283 (setq mh-tool-bar-folder-buttons | |
284 (loop for b in value | |
285 collect (cdr (assoc b mh-tool-bar-folder-vector-map)))) | |
286 (setq mh-tool-bar-show-buttons | |
287 (loop for b in value | |
288 collect (cdr (assoc b mh-tool-bar-show-vector-map)))))) | |
289 (defun mh-tool-bar-init (mode) | |
290 "Install tool bar in MODE." | |
291 (let ((tool-bar (cond ((eq mode :folder) mh-tool-bar-folder-buttons) | |
292 ((eq mode :letter) mh-tool-bar-letter-buttons) | |
293 ((eq mode :show) mh-tool-bar-show-buttons))) | |
294 (height 37) | |
295 (width 40) | |
296 (buffer (current-buffer))) | |
297 (when mh-xemacs-use-tool-bar-flag | |
298 (cond | |
299 ((eq mh-xemacs-tool-bar-position 'top) | |
300 (set-specifier top-toolbar tool-bar buffer) | |
301 (set-specifier top-toolbar-visible-p t) | |
302 (set-specifier top-toolbar-height height)) | |
303 ((eq mh-xemacs-tool-bar-position 'bottom) | |
304 (set-specifier bottom-toolbar tool-bar buffer) | |
305 (set-specifier bottom-toolbar-visible-p t) | |
306 (set-specifier bottom-toolbar-height height)) | |
307 ((eq mh-xemacs-tool-bar-position 'left) | |
308 (set-specifier left-toolbar tool-bar buffer) | |
309 (set-specifier left-toolbar-visible-p t) | |
310 (set-specifier left-toolbar-width width)) | |
311 ((eq mh-xemacs-tool-bar-position 'right) | |
312 (set-specifier right-toolbar tool-bar buffer) | |
313 (set-specifier right-toolbar-visible-p t) | |
314 (set-specifier right-toolbar-width width)) | |
315 (t (set-specifier default-toolbar tool-bar buffer))))))) | |
316 ;; Declare customizable tool bars | |
317 (custom-declare-variable | |
318 'mh-tool-bar-folder-buttons | |
319 '(list ,@(mapcar (lambda (x) `(quote ,x)) folder-defaults)) | |
320 "List of buttons to include in MH-Folder tool bar." | |
321 :group 'mh-tool-bar :set 'mh-tool-bar-folder-buttons-set | |
322 :type '(set ,@(loop for x in folder-buttons | |
323 for y in folder-docs | |
324 collect `(const :tag ,y ,x)))) | |
325 (custom-declare-variable | |
326 'mh-tool-bar-letter-buttons | |
327 '(list ,@(mapcar (lambda (x) `(quote ,x)) letter-defaults)) | |
328 "List of buttons to include in MH-Letter tool bar." | |
329 :group 'mh-tool-bar :set 'mh-tool-bar-letter-buttons-set | |
330 :type '(set ,@(loop for x in letter-buttons | |
331 for y in letter-docs | |
332 collect `(const :tag ,y ,x))))))) | |
333 | |
334 (mh-tool-bar-define | |
69245
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
335 ((:folder mh-inc-folder mh-mime-save-parts mh-previous-undeleted-msg |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
336 mh-page-msg mh-next-undeleted-msg mh-delete-msg mh-refile-msg |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
337 mh-undo mh-execute-commands mh-toggle-tick mh-reply |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
338 mh-alias-grab-from-field mh-send mh-rescan-folder |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
339 mh-tool-bar-search mh-visit-folder |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
340 mh-tool-bar-customize mh-tool-bar-folder-help mh-widen) |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
341 (:letter mh-send-letter mh-compose-insertion ispell-message save-buffer |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
342 undo kill-region menu-bar-kill-ring-save yank mh-fully-kill-draft |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
343 mh-tool-bar-customize mh-tool-bar-letter-help)) |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
344 ;; Folder/Show buffer buttons |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
345 (mh-inc-folder (folder) "mail" "Incorporate new mail in Inbox |
68465 | 346 This button runs `mh-inc-folder' which drags any |
69245
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
347 new mail into your Inbox folder") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
348 (mh-mime-save-parts (folder) "attach" "Save MIME parts from this message |
68465 | 349 This button runs `mh-mime-save-parts' which saves a message's |
69245
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
350 different parts into separate files") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
351 (mh-previous-undeleted-msg (folder) "left-arrow" |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
352 "Go to the previous undeleted message |
68465 | 353 This button runs `mh-previous-undeleted-msg'") |
69245
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
354 (mh-page-msg (folder) "page-down" "Page the current message forwards |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
355 This button runs `mh-page-msg'") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
356 (mh-next-undeleted-msg (folder) "right-arrow" "Go to the next undeleted message |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
357 The button runs `mh-next-undeleted-msg'") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
358 (mh-delete-msg (folder) "close" "Mark this message for deletion |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
359 This button runs `mh-delete-msg'") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
360 (mh-refile-msg (folder) "mail/refile" "Refile this message |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
361 This button runs `mh-refile-msg'") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
362 (mh-undo (folder) "undo" "Undo last operation |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
363 This button runs `undo'" |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
364 (mh-outstanding-commands-p)) |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
365 (mh-execute-commands (folder) "execute" "Perform moves and deletes |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
366 This button runs `mh-execute-commands'" |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
367 (mh-outstanding-commands-p)) |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
368 (mh-toggle-tick (folder) "highlight" "Toggle tick mark |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
369 This button runs `mh-toggle-tick'") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
370 (mh-toggle-showing (folder) "show" "Toggle showing message |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
371 This button runs `mh-toggle-showing'") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
372 (mh-tool-bar-reply-from (folder) "mail/reply-from" "Reply to \"from\"") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
373 (mh-tool-bar-reply-to (folder) "mail/reply-to" "Reply to \"to\"") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
374 (mh-tool-bar-reply-all (folder) "mail/reply-all" "Reply to \"all\"") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
375 (mh-reply (folder) "mail/reply" "Reply to this message |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
376 This button runs `mh-reply'") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
377 (mh-alias-grab-from-field (folder) "mail/alias" "Grab From alias |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
378 This button runs `mh-alias-grab-from-field'" |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
379 (and (mh-extract-from-header-value) |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
380 (not (mh-alias-for-from-p)))) |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
381 (mh-send (folder) "mail/compose" "Compose new message |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
382 This button runs `mh-send'") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
383 (mh-rescan-folder (folder) "refresh" "Rescan this folder |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
384 This button runs `mh-rescan-folder'") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
385 (mh-pack-folder (folder) "mail/repack" "Repack this folder |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
386 This button runs `mh-pack-folder'") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
387 (mh-tool-bar-search (folder) "search" "Search |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
388 This button runs `mh-tool-bar-search-function'") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
389 (mh-visit-folder (folder) "fld-open" "Visit other folder |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
390 This button runs `mh-visit-folder'") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
391 ;; Letter buffer buttons |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
392 (mh-send-letter (letter) "mail/send" "Send this letter") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
393 (mh-compose-insertion (letter) "attach" "Insert attachment") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
394 (ispell-message (letter) "spell" "Check spelling") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
395 (save-buffer (letter) "save" "Save current buffer to its file" |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
396 (buffer-modified-p)) |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
397 (undo (letter) "undo" "Undo last operation") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
398 (kill-region (letter) "cut" "Cut (kill) text in region") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
399 (menu-bar-kill-ring-save (letter) "copy" "Copy text in region") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
400 (yank (letter) "paste" "Paste (yank) text cut or copied earlier") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
401 (mh-fully-kill-draft (letter) "close" "Kill this draft") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
402 ;; Common buttons |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
403 (mh-tool-bar-customize (folder letter) "preferences" "MH-E Preferences") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
404 (mh-tool-bar-folder-help (folder) "help" "Help! (general help) |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
405 This button runs `info'") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
406 (mh-tool-bar-letter-help (letter) "help" "Help! (general help) |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
407 This button runs `info'") |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
408 ;; Folder narrowed to sequence buttons |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
409 (mh-widen (sequence) "widen" "Widen from the sequence |
f3bbf5f32462
* mh-folder.el (mh-tool-bar-init): Autoload.
Bill Wohler <wohler@newt.com>
parents:
68597
diff
changeset
|
410 This button runs `mh-widen'")) |
68465 | 411 |
412 (provide 'mh-tool-bar) | |
413 | |
414 ;; Local Variables: | |
415 ;; indent-tabs-mode: nil | |
416 ;; sentence-end-double-space: nil | |
417 ;; End: | |
418 | |
68470 | 419 ;; arch-tag: 28c2436d-bb8d-486a-a8d7-5a4d9cae3513 |
68465 | 420 ;;; mh-tool-bar.el ends here |