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