Mercurial > hg > xemacs-beta
annotate lisp/toolbar-items.el @ 5716:1003acd5a4b8
Fix cygwin build on new win32api.
author | Vin Shelton <acs@xemacs.org> |
---|---|
date | Mon, 04 Feb 2013 20:03:04 -0500 |
parents | bcd74c477a38 |
children |
rev | line source |
---|---|
428 | 1 ;;; toolbar-items.el -- Static initialization of XEmacs toolbar |
2 | |
3 ;; Copyright (C) 1997 Free Software Foundation, Inc. | |
4 ;; Copyright (C) 1994 Andy Piper <andyp@parallax.demon.co.uk> | |
5 ;; Copyright (C) 1995 Board of Trustees, University of Illinois | |
6 ;; Copyright (C) 1996 Ben Wing <ben@xemacs.org> | |
7 | |
8 ;; Maintainer: XEmacs development team | |
9 ;; Keywords: frames, dumped | |
10 | |
11 ;; This file is part of XEmacs. | |
12 | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
776
diff
changeset
|
13 ;; XEmacs is free software: you can redistribute it and/or modify it |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
776
diff
changeset
|
14 ;; under the terms of the GNU General Public License as published by the |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
776
diff
changeset
|
15 ;; Free Software Foundation, either version 3 of the License, or (at your |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
776
diff
changeset
|
16 ;; option) any later version. |
428 | 17 |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
776
diff
changeset
|
18 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
776
diff
changeset
|
19 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
776
diff
changeset
|
20 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
776
diff
changeset
|
21 ;; for more details. |
428 | 22 |
23 ;; You should have received a copy of the GNU General Public License | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
776
diff
changeset
|
24 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>. |
428 | 25 |
26 ;;; Synched up: Not in FSF | |
27 | |
28 ;;; Commentary: | |
29 | |
30 ;; This file is dumped with XEmacs (when window system and toolbar support | |
31 ;; is compiled in). | |
32 | |
33 ;; Miscellaneous toolbar functions, useful for users to redefine, in | |
34 ;; order to get different behavior. | |
35 | |
36 ;;; Code: | |
37 | |
38 (defgroup toolbar nil | |
39 "Configure XEmacs Toolbar functions and properties" | |
40 :group 'environment) | |
41 | |
42 ;; #### The following function is slightly obnoxious as it stands. I | |
43 ;; think it should print a message like "Toolbar not configured; press | |
44 ;; me again to configure it", and when the button is pressed again | |
45 ;; (within a reasonable period of time), `customize-variable' should | |
46 ;; be invoked for the appropriate variable. | |
47 | |
48 (defun toolbar-not-configured () | |
49 (interactive) | |
50 ;; Note: we don't use `susbtitute-command-keys' here, because | |
51 ;; Customize is bound to `C-h C' by default, and that binding is not | |
52 ;; familiar to people. This is more descriptive. | |
53 (error | |
54 "Configure the item via `M-x customize RET toolbar RET'")) | |
55 | |
56 (defcustom toolbar-open-function 'find-file | |
57 "*Function to call when the open icon is selected." | |
58 :type '(radio (function-item find-file) | |
59 (function :tag "Other")) | |
60 :group 'toolbar) | |
61 | |
62 (defun toolbar-open () | |
63 (interactive) | |
64 (call-interactively toolbar-open-function)) | |
65 | |
66 (defcustom toolbar-dired-function 'dired | |
67 "*Function to call when the dired icon is selected." | |
68 :type '(radio (function-item dired) | |
69 (function :tag "Other")) | |
70 :group 'toolbar) | |
71 | |
673 | 72 (defun toolbar-dired (dir) |
73 (interactive "DDired directory: ") | |
74 (funcall toolbar-dired-function dir)) | |
428 | 75 |
76 (defcustom toolbar-save-function 'save-buffer | |
77 "*Function to call when the save icon is selected." | |
78 :type '(radio (function-item save-buffer) | |
79 (function :tag "Other")) | |
80 :group 'toolbar) | |
81 | |
82 (defun toolbar-save () | |
83 (interactive) | |
84 (call-interactively toolbar-save-function)) | |
85 | |
86 (defcustom toolbar-print-function 'lpr-buffer | |
87 "*Function to call when the print icon is selected." | |
88 :type '(radio (function-item lpr-buffer) | |
89 (function :tag "Other")) | |
90 :group 'toolbar) | |
91 | |
92 (defun toolbar-print () | |
93 (interactive) | |
94 (call-interactively toolbar-print-function)) | |
95 | |
96 (defcustom toolbar-cut-function 'kill-primary-selection | |
97 "*Function to call when the cut icon is selected." | |
98 :type '(radio (function-item kill-primary-selection) | |
99 (function :tag "Other")) | |
100 :group 'toolbar) | |
101 | |
102 (defun toolbar-cut () | |
103 (interactive) | |
104 (call-interactively toolbar-cut-function)) | |
105 | |
106 (defcustom toolbar-copy-function 'copy-primary-selection | |
107 "*Function to call when the copy icon is selected." | |
108 :type '(radio (function-item copy-primary-selection) | |
109 (function :tag "Other")) | |
110 :group 'toolbar) | |
111 | |
112 (defun toolbar-copy () | |
113 (interactive) | |
114 (call-interactively toolbar-copy-function)) | |
115 | |
116 (defcustom toolbar-paste-function 'yank-clipboard-selection | |
117 "*Function to call when the paste icon is selected." | |
118 :type '(radio (function-item yank-clipboard-selection) | |
119 (function :tag "Other")) | |
120 :group 'toolbar) | |
121 | |
122 (defun toolbar-paste () | |
123 (interactive) | |
124 ;; This horrible kludge is for pending-delete to work correctly. | |
776 | 125 (and-boundp 'pending-delete-mode |
126 pending-delete-mode | |
127 (let ((this-command toolbar-paste-function)) | |
128 (declare-fboundp (pending-delete-pre-hook)))) | |
428 | 129 (call-interactively toolbar-paste-function)) |
130 | |
131 (defcustom toolbar-undo-function 'undo | |
132 "*Function to call when the undo icon is selected." | |
133 :type '(radio (function-item undo) | |
134 (function :tag "Other")) | |
135 :group 'toolbar) | |
136 | |
137 (defun toolbar-undo () | |
138 (interactive) | |
139 (call-interactively toolbar-undo-function)) | |
140 | |
141 (defcustom toolbar-replace-function 'query-replace | |
142 "*Function to call when the replace icon is selected." | |
143 :type '(radio (function-item query-replace) | |
144 (function :tag "Other")) | |
145 :group 'toolbar) | |
146 | |
147 (defun toolbar-replace () | |
148 (interactive) | |
149 (call-interactively toolbar-replace-function)) | |
150 | |
151 ;; | |
152 ;; toolbar ispell variables and defuns | |
153 ;; | |
154 | |
155 (defun toolbar-ispell-internal () | |
156 (interactive) | |
776 | 157 (if-fboundp 'ispell-region |
158 (with-fboundp '(ispell-message ispell-buffer) | |
159 (cond | |
160 ((region-active-p) (ispell-region (region-beginning) (region-end))) | |
161 ((eq major-mode 'mail-mode) (ispell-message)) | |
162 ((eq major-mode 'message-mode) (ispell-message)) | |
163 (t (ispell-buffer)))) | |
164 (error 'unimplemented "`ispell' package unavailable"))) | |
428 | 165 |
166 (defcustom toolbar-ispell-function 'toolbar-ispell-internal | |
167 "*Function to call when the ispell icon is selected." | |
168 :type '(radio (function-item toolbar-ispell-internal) | |
169 (function :tag "Other")) | |
170 :group 'toolbar) | |
171 | |
172 (defun toolbar-ispell () | |
173 "Intelligently spell the region or buffer." | |
174 (interactive) | |
175 (call-interactively toolbar-ispell-function)) | |
176 | |
177 ;; | |
178 ;; toolbar mail variables and defuns | |
179 ;; | |
180 | |
181 ;; This used to be a macro that expanded its arguments to a form that | |
182 ;; called `call-process'. With the advent of customize, it's better | |
183 ;; to have it as a defun, to make customization easier. | |
184 (defun toolbar-external (process &rest args) | |
185 (interactive) | |
186 (apply 'call-process process nil 0 nil args)) | |
187 | |
188 (defcustom toolbar-mail-commands-alist | |
189 `((not-configured . toolbar-not-configured) | |
190 (vm . vm) | |
191 (gnus . gnus-no-server) | |
192 (rmail . rmail) | |
193 (mh . mh-rmail) | |
194 (pine . (toolbar-external "xterm" "-e" "pine")) ; *gag* | |
195 (elm . (toolbar-external "xterm" "-e" "elm")) | |
196 (mutt . (toolbar-external "xterm" "-e" "mutt")) | |
197 (exmh . (toolbar-external "exmh")) | |
198 (netscape . (toolbar-external "netscape" "mailbox:")) | |
199 (send . mail)) | |
200 "*Alist of mail readers and their commands. | |
201 The car of each alist element is the mail reader, and the cdr is the form | |
202 used to start it." | |
203 :type '(repeat (cons :format "%v" | |
204 (symbol :tag "Mailer") (function :tag "Start with"))) | |
205 :group 'toolbar) | |
206 | |
207 (defcustom toolbar-mail-reader 'not-configured | |
208 "*Mail reader toolbar will invoke. | |
209 The legal values are the keys from `toolbar-mail-command-alist', which | |
210 should be used to add new mail readers. | |
211 Mail readers known by default are vm, gnus, rmail, mh, pine, elm, | |
212 mutt, exmh, netscape and send." | |
213 :type '(choice (const :tag "Not Configured" not-configured) | |
214 (const vm) (const gnus) (const rmail) (const mh) | |
215 (const pine) (const elm) (const mutt) (const exmh) | |
216 (const netscape) | |
217 (const send) | |
218 (symbol :tag "Other" | |
219 :validate (lambda (wid) | |
220 (if (assq (widget-value wid) | |
221 toolbar-mail-commands-alist) | |
222 nil | |
223 (widget-put wid :error | |
224 "Unknown mail reader") | |
225 wid)))) | |
226 :group 'toolbar) | |
227 | |
228 | |
229 (defun toolbar-mail () | |
230 "Run mail in a separate frame." | |
231 (interactive) | |
232 (let ((command (cdr (assq toolbar-mail-reader toolbar-mail-commands-alist)))) | |
233 (or command | |
234 (error "Uknown mail reader %s" toolbar-mail-reader)) | |
235 (if (symbolp command) | |
236 (call-interactively command) | |
237 (eval command)))) | |
238 | |
239 ;; | |
240 ;; toolbar info variables and defuns | |
241 ;; | |
242 | |
243 (defcustom toolbar-info-use-separate-frame t | |
244 "*Whether Info is invoked in a separate frame." | |
245 :type 'boolean | |
246 :group 'toolbar) | |
247 | |
248 (defcustom toolbar-info-frame-plist | |
249 ;; Info pages are 80 characters wide, so it makes a good default. | |
250 `(width 80 ,@(let ((h (plist-get default-frame-plist 'height))) | |
251 (and h `(height ,h)))) | |
252 "*The properties of the frame in which news is displayed." | |
253 :type 'plist | |
254 :group 'info) | |
255 | |
256 (define-obsolete-variable-alias 'Info-frame-plist | |
257 'toolbar-info-frame-plist) | |
258 | |
259 (defvar toolbar-info-frame nil | |
260 "The frame in which info is displayed.") | |
261 | |
262 (defun toolbar-info () | |
263 "Run info in a separate frame." | |
264 (interactive) | |
265 (when toolbar-info-use-separate-frame | |
266 (cond ((or (not toolbar-info-frame) | |
267 (not (frame-live-p toolbar-info-frame))) | |
268 ;; We used to raise frame here, but it's a bad idea, | |
269 ;; because raising is a matter of WM policy. However, we | |
270 ;; *must* select it, to ensure that the info buffer goes to | |
271 ;; the right frame. | |
272 (setq toolbar-info-frame (make-frame toolbar-info-frame-plist)) | |
273 (select-frame toolbar-info-frame)) | |
274 (t | |
275 ;; However, if the frame already exists, and the user | |
276 ;; clicks on info, it's OK to raise it. | |
277 (select-frame toolbar-info-frame) | |
278 (raise-frame toolbar-info-frame))) | |
279 (when (frame-iconified-p toolbar-info-frame) | |
280 (deiconify-frame toolbar-info-frame))) | |
281 (info)) | |
282 | |
283 ;; | |
284 ;; toolbar debug variables and defuns | |
285 ;; | |
286 | |
287 (defun toolbar-debug () | |
288 (interactive) | |
289 (if (featurep 'eos-debugger) | |
290 (call-interactively 'eos::start-debugger) | |
291 (require 'gdbsrc) | |
292 (call-interactively 'gdbsrc))) | |
293 | |
294 (defun toolbar-compile () | |
295 "Run compile without having to touch the keyboard." | |
296 (interactive) | |
442 | 297 (declare (special compile-command toolbar-compile-already-run)) |
776 | 298 (if-fboundp 'compile |
299 (progn | |
300 (require 'compile) | |
301 (if (boundp 'toolbar-compile-already-run) | |
302 (compile compile-command) | |
303 (setq toolbar-compile-already-run t) | |
304 (if (should-use-dialog-box-p) | |
305 (make-dialog-box 'question | |
306 :question | |
307 (concat "Compile:\n " compile-command) | |
308 :buttons | |
309 '(["Compile" (compile compile-command) t] | |
310 ["Edit command" compile t] | |
311 nil | |
312 ["Cancel" (message "Quit") t])) | |
313 (compile compile-command)))) | |
314 (error 'unimplemented "`compile' package unavailable"))) | |
428 | 315 |
316 ;; | |
317 ;; toolbar news variables and defuns | |
318 ;; | |
319 | |
320 (defcustom toolbar-news-commands-alist | |
321 `((not-configured . toolbar-not-configured) | |
322 (gnus . toolbar-gnus) ; M-x all-hail-gnus | |
323 (rn . (toolbar-external "xterm" "-e" "rn")) | |
324 (nn . (toolbar-external "xterm" "-e" "nn")) | |
325 (trn . (toolbar-external "xterm" "-e" "trn")) | |
326 (xrn . (toolbar-external "xrn")) | |
327 (slrn . (toolbar-external "xterm" "-e" "slrn")) | |
328 (pine . (toolbar-external "xterm" "-e" "pine")) ; *gag* | |
329 (tin . (toolbar-external "xterm" "-e" "tin")) ; *gag* | |
330 (netscape . (toolbar-external "netscape" "news:"))) | |
331 "*Alist of news readers and their commands. | |
332 The car of each alist element the pair is the news reader, and the cdr | |
333 is the form used to start it." | |
334 :type '(repeat (cons :format "%v" | |
335 (symbol :tag "Reader") (sexp :tag "Start with"))) | |
336 :group 'toolbar) | |
337 | |
338 (defcustom toolbar-news-reader 'gnus | |
339 "*News reader toolbar will invoke. | |
340 The legal values are the keys from `toolbar-news-command-alist', which should | |
341 be used to add new news readers. | |
342 Newsreaders known by default are gnus, rn, nn, trn, xrn, slrn, pine | |
343 and netscape." | |
344 :type '(choice (const :tag "Not Configured" not-configured) | |
345 (const gnus) (const rn) (const nn) (const trn) | |
346 (const xrn) (const slrn) (const pine) (const tin) | |
347 (const netscape) | |
348 (symbol :tag "Other" | |
349 :validate (lambda (wid) | |
350 (if (assq (widget-value wid) | |
351 toolbar-news-commands-alist) | |
352 nil | |
353 (widget-put wid :error | |
354 "Unknown news reader") | |
355 wid)))) | |
356 :group 'toolbar) | |
357 | |
358 (defcustom toolbar-news-use-separate-frame t | |
359 "*Whether Gnus is invoked in a separate frame." | |
360 :type 'boolean | |
361 :group 'toolbar) | |
362 | |
363 (defvar toolbar-news-frame nil | |
364 "The frame in which news is displayed.") | |
365 | |
366 (defcustom toolbar-news-frame-plist nil | |
367 "*The properties of the frame in which news is displayed." | |
368 :type 'plist | |
369 :group 'toolbar) | |
370 | |
371 (define-obsolete-variable-alias 'toolbar-news-frame-properties | |
372 'toolbar-news-frame-plist) | |
373 | |
374 (defun toolbar-gnus () | |
375 "Run Gnus in a separate frame." | |
376 (interactive) | |
776 | 377 (if-fboundp 'gnus |
378 (progn | |
379 (if (not toolbar-news-use-separate-frame) | |
380 (gnus) | |
381 (unless (frame-live-p toolbar-news-frame) | |
382 (setq toolbar-news-frame (make-frame toolbar-news-frame-plist)) | |
383 (add-hook 'gnus-exit-gnus-hook | |
384 (lambda () | |
385 (when (frame-live-p toolbar-news-frame) | |
386 (if (cdr (frame-list)) | |
387 (delete-frame toolbar-news-frame)) | |
388 (setq toolbar-news-frame nil)))) | |
389 (select-frame toolbar-news-frame) | |
390 (gnus)) | |
391 (when (framep toolbar-news-frame) | |
392 (when (frame-iconified-p toolbar-news-frame) | |
393 (deiconify-frame toolbar-news-frame)) | |
394 (select-frame toolbar-news-frame) | |
395 (raise-frame toolbar-news-frame)))) | |
396 (error 'unimplemented "`gnus' package unavailable"))) | |
428 | 397 |
398 (defun toolbar-news () | |
399 "Run News." | |
400 (interactive) | |
401 (let ((command (cdr-safe | |
402 (assq toolbar-news-reader toolbar-news-commands-alist)))) | |
403 (or command | |
5384
3889ef128488
Fix misspelled words, and some grammar, across the entire source tree.
Jerry James <james@xemacs.org>
parents:
776
diff
changeset
|
404 (error "Unknown news reader %s" toolbar-news-reader)) |
428 | 405 (if (symbolp command) |
406 (call-interactively command) | |
407 (eval command)))) | |
408 | |
409 (defvar toolbar-last-win-icon nil "A `last-win' icon set.") | |
410 (defvar toolbar-next-win-icon nil "A `next-win' icon set.") | |
411 (defvar toolbar-file-icon nil "A `file' icon set.") | |
412 (defvar toolbar-folder-icon nil "A `folder' icon set") | |
413 (defvar toolbar-disk-icon nil "A `disk' icon set.") | |
414 (defvar toolbar-printer-icon nil "A `printer' icon set.") | |
415 (defvar toolbar-cut-icon nil "A `cut' icon set.") | |
416 (defvar toolbar-copy-icon nil "A `copy' icon set.") | |
417 (defvar toolbar-paste-icon nil "A `paste' icon set.") | |
418 (defvar toolbar-undo-icon nil "An `undo' icon set.") | |
419 (defvar toolbar-spell-icon nil "A `spell' icon set.") | |
420 (defvar toolbar-replace-icon nil "A `replace' icon set.") | |
421 (defvar toolbar-mail-icon nil "A `mail' icon set.") | |
422 (defvar toolbar-info-icon nil "An `info' icon set.") | |
423 (defvar toolbar-compile-icon nil "A `compile' icon set.") | |
424 (defvar toolbar-debug-icon nil "A `debugger' icon set.") | |
425 (defvar toolbar-news-icon nil "A `news' icon set.") | |
426 | |
427 ;;; each entry maps a variable to the prefix used. | |
428 | |
487 | 429 (defvar init-toolbar-list |
428 | 430 '((toolbar-last-win-icon . "last-win") |
431 (toolbar-next-win-icon . "next-win") | |
432 (toolbar-file-icon . "file") | |
433 (toolbar-folder-icon . "folder") | |
434 (toolbar-disk-icon . "disk") | |
435 (toolbar-printer-icon . "printer") | |
436 (toolbar-cut-icon . "cut") | |
437 (toolbar-copy-icon . "copy") | |
438 (toolbar-paste-icon . "paste") | |
439 (toolbar-undo-icon . "undo") | |
440 (toolbar-spell-icon . "spell") | |
441 (toolbar-replace-icon . "replace") | |
442 (toolbar-mail-icon . "mail") | |
443 (toolbar-info-icon . "info-def") | |
444 (toolbar-compile-icon . "compile") | |
445 (toolbar-debug-icon . "debug") | |
446 (toolbar-news-icon . "news"))) | |
447 | |
487 | 448 (defun init-toolbar () |
449 (toolbar-add-item-data init-toolbar-list) | |
428 | 450 ;; do this now because errors will occur if the icon symbols |
451 ;; are not initted | |
452 (set-specifier default-toolbar initial-toolbar-spec)) | |
453 | |
487 | 454 (defun toolbar-add-item-data (icon-list &optional icon-dir) |
428 | 455 (if (eq icon-dir nil) |
456 (setq icon-dir toolbar-icon-directory)) | |
5519
bcd74c477a38
Switch to #'dolist instead of #'mapcar in a couple of places if result not used
Aidan Kehoe <kehoea@parhasard.net>
parents:
5474
diff
changeset
|
457 (dolist (cons icon-list) |
bcd74c477a38
Switch to #'dolist instead of #'mapcar in a couple of places if result not used
Aidan Kehoe <kehoea@parhasard.net>
parents:
5474
diff
changeset
|
458 (let ((prefix (expand-file-name (cdr cons) icon-dir))) |
bcd74c477a38
Switch to #'dolist instead of #'mapcar in a couple of places if result not used
Aidan Kehoe <kehoea@parhasard.net>
parents:
5474
diff
changeset
|
459 ;; #### This should use a better mechanism for finding the |
bcd74c477a38
Switch to #'dolist instead of #'mapcar in a couple of places if result not used
Aidan Kehoe <kehoea@parhasard.net>
parents:
5474
diff
changeset
|
460 ;; glyphs, allowing for formats other than x[pb]m. Look at |
bcd74c477a38
Switch to #'dolist instead of #'mapcar in a couple of places if result not used
Aidan Kehoe <kehoea@parhasard.net>
parents:
5474
diff
changeset
|
461 ;; `widget-glyph-find' for an example how it might be done. |
bcd74c477a38
Switch to #'dolist instead of #'mapcar in a couple of places if result not used
Aidan Kehoe <kehoea@parhasard.net>
parents:
5474
diff
changeset
|
462 (set (car cons) |
bcd74c477a38
Switch to #'dolist instead of #'mapcar in a couple of places if result not used
Aidan Kehoe <kehoea@parhasard.net>
parents:
5474
diff
changeset
|
463 (if (load-time-value (featurep 'xpm)) |
bcd74c477a38
Switch to #'dolist instead of #'mapcar in a couple of places if result not used
Aidan Kehoe <kehoea@parhasard.net>
parents:
5474
diff
changeset
|
464 (toolbar-make-button-list (concat prefix "-up.xpm") nil |
bcd74c477a38
Switch to #'dolist instead of #'mapcar in a couple of places if result not used
Aidan Kehoe <kehoea@parhasard.net>
parents:
5474
diff
changeset
|
465 (concat prefix "-xx.xpm") |
bcd74c477a38
Switch to #'dolist instead of #'mapcar in a couple of places if result not used
Aidan Kehoe <kehoea@parhasard.net>
parents:
5474
diff
changeset
|
466 (concat prefix "-cap-up.xpm") |
bcd74c477a38
Switch to #'dolist instead of #'mapcar in a couple of places if result not used
Aidan Kehoe <kehoea@parhasard.net>
parents:
5474
diff
changeset
|
467 nil (concat prefix "-cap-xx.xpm")) |
bcd74c477a38
Switch to #'dolist instead of #'mapcar in a couple of places if result not used
Aidan Kehoe <kehoea@parhasard.net>
parents:
5474
diff
changeset
|
468 (toolbar-make-button-list (concat prefix "-up.xbm") |
bcd74c477a38
Switch to #'dolist instead of #'mapcar in a couple of places if result not used
Aidan Kehoe <kehoea@parhasard.net>
parents:
5474
diff
changeset
|
469 (concat prefix "-dn.xbm") |
bcd74c477a38
Switch to #'dolist instead of #'mapcar in a couple of places if result not used
Aidan Kehoe <kehoea@parhasard.net>
parents:
5474
diff
changeset
|
470 (concat prefix "-xx.xbm"))))))) |
428 | 471 |
472 (defvar toolbar-vector-open | |
473 [toolbar-file-icon toolbar-open t "Open a file"] | |
474 "Define the vector for the \"Open\" toolbar button") | |
475 | |
476 (defvar toolbar-vector-dired | |
477 [toolbar-folder-icon toolbar-dired t "Edit a directory"] | |
478 "Define the vector for the \"Dired\" toolbar button") | |
479 | |
480 (defvar toolbar-vector-save | |
481 [toolbar-disk-icon toolbar-save t "Save buffer"] | |
482 "Define the vector for the \"Save\" toolbar button") | |
483 | |
484 (defvar toolbar-vector-print | |
485 [toolbar-printer-icon toolbar-print t "Print buffer"] | |
486 "Define the vector for the \"Printer\" toolbar button") | |
487 | |
488 (defvar toolbar-vector-cut | |
489 [toolbar-cut-icon toolbar-cut t "Kill region"] | |
490 "Define the vector for the \"Cut\" toolbar button") | |
491 | |
492 (defvar toolbar-vector-copy | |
493 [toolbar-copy-icon toolbar-copy t "Copy region"] | |
494 "Define the vector for the \"Copy\" toolbar button") | |
495 | |
496 (defvar toolbar-vector-paste | |
497 [toolbar-paste-icon toolbar-paste t "Paste from clipboard"] | |
498 "Define the vector for the \"Paste\" toolbar button") | |
499 | |
500 (defvar toolbar-vector-undo | |
501 [toolbar-undo-icon toolbar-undo t "Undo edit"] | |
502 "Define the vector for the \"Undo\" toolbar button") | |
503 | |
504 (defvar toolbar-vector-spell | |
505 [toolbar-spell-icon toolbar-ispell t "Check spelling"] | |
506 "Define the vector for the \"Spell\" toolbar button") | |
507 | |
508 (defvar toolbar-vector-replace | |
509 [toolbar-replace-icon toolbar-replace t "Search & Replace"] | |
510 "Define the vector for the \"Replace\" toolbar button") | |
511 | |
512 (defvar toolbar-vector-mail | |
513 [toolbar-mail-icon toolbar-mail t "Read mail"] | |
514 "Define the vector for the \"Mail\" toolbar button") | |
515 | |
516 (defvar toolbar-vector-info | |
517 [toolbar-info-icon toolbar-info t "Info documentation"] | |
518 "Define the vector for the \"Info\" toolbar button") | |
519 | |
520 (defvar toolbar-vector-compile | |
521 [toolbar-compile-icon toolbar-compile t "Start a compilation"] | |
522 "Define the vector for the \"Compile\" toolbar button") | |
523 | |
524 (defvar toolbar-vector-debug | |
525 [toolbar-debug-icon toolbar-debug t "Start a debugger"] | |
526 "Define the vector for the \"Debug\" toolbar button") | |
527 | |
528 (defvar toolbar-vector-news | |
529 [toolbar-news-icon toolbar-news t "Read news"] | |
530 "Define the vector for the \"News\" toolbar button") | |
531 | |
532 (defvar initial-toolbar-spec | |
533 (list | |
534 ;;[toolbar-last-win-icon pop-window-configuration | |
535 ;;(frame-property (selected-frame) | |
536 ;; 'window-config-stack) t "Most recent window config"] | |
537 ;; #### Illicit knowledge? | |
538 ;; #### These don't work right - not consistent! | |
539 ;; I don't know what's wrong; perhaps `selected-frame' is wrong | |
540 ;; sometimes when this is evaluated. Note that I even tried to | |
541 ;; kludge-fix this by calls to `set-specifier-dirty-flag' in | |
542 ;; pop-window-configuration and such. | |
543 | |
544 ;;[toolbar-next-win-icon unpop-window-configuration | |
545 ;;(frame-property (selected-frame) | |
546 ;; 'window-config-unpop-stack) t "Undo \"Most recent window config\""] | |
547 ;; #### Illicit knowledge? | |
548 toolbar-vector-open | |
549 toolbar-vector-dired | |
550 toolbar-vector-save | |
551 toolbar-vector-print | |
552 toolbar-vector-cut | |
553 toolbar-vector-copy | |
554 toolbar-vector-paste | |
555 toolbar-vector-undo | |
556 toolbar-vector-spell | |
557 toolbar-vector-replace | |
558 toolbar-vector-mail | |
559 toolbar-vector-info | |
560 toolbar-vector-compile | |
561 toolbar-vector-debug | |
562 toolbar-vector-news | |
563 ) | |
564 "The initial toolbar for a buffer.") | |
565 | |
566 ;;; toolbar-items.el ends here |