Mercurial > hg > xemacs-beta
comparison lisp/x11/x-toolbar.el @ 4:b82b59fe008d r19-15b3
Import from CVS: tag r19-15b3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:46:56 +0200 |
parents | 376386a54a3c |
children | 49a24b4fd526 |
comparison
equal
deleted
inserted
replaced
3:30df88044ec6 | 4:b82b59fe008d |
---|---|
98 (require 'gdbsrc) | 98 (require 'gdbsrc) |
99 (call-interactively 'gdbsrc)) | 99 (call-interactively 'gdbsrc)) |
100 ) | 100 ) |
101 | 101 |
102 (defvar compile-command) | 102 (defvar compile-command) |
103 (defvar toolbar-compile-already-run nil) | |
103 | 104 |
104 (defun toolbar-compile () | 105 (defun toolbar-compile () |
105 "Run compile without having to touch the keyboard." | 106 "Run compile without having to touch the keyboard." |
106 (interactive) | 107 (interactive) |
107 (require 'compile) | 108 (require 'compile) |
108 (popup-dialog-box | 109 (if toolbar-compile-already-run |
109 `(,(concat "Compile:\n " compile-command) | 110 (compile compile-command) |
110 ["Compile" (compile compile-command) t] | 111 (setq toolbar-compile-already-run t) |
111 ["Edit command" compile t] | 112 (popup-dialog-box |
112 nil | 113 `(,(concat "Compile:\n " compile-command) |
113 ["Cancel" (message "Quit") t]))) | 114 ["Compile" (compile compile-command) t] |
115 ["Edit command" compile t] | |
116 nil | |
117 ["Cancel" (message "Quit") t])))) | |
114 | 118 |
115 ;; | 119 ;; |
116 ;; toolbar news variables and defuns | 120 ;; toolbar news variables and defuns |
117 ;; | 121 ;; |
118 | 122 |
135 (gnus))) | 139 (gnus))) |
136 (if (frame-iconified-p toolbar-news-frame) | 140 (if (frame-iconified-p toolbar-news-frame) |
137 (deiconify-frame toolbar-news-frame)) | 141 (deiconify-frame toolbar-news-frame)) |
138 (select-frame toolbar-news-frame) | 142 (select-frame toolbar-news-frame) |
139 (raise-frame toolbar-news-frame)) | 143 (raise-frame toolbar-news-frame)) |
144 | |
145 ;; | |
146 ;; toolbar printing variable and defun | |
147 ;; | |
148 (defvar toolbar-print-command 'lpr-buffer | |
149 "Command to run when the Print Icon is selected from the toolbar. | |
150 Set this to `ps-print-buffer-with-faces' if you primarily print with | |
151 a postscript printer.") | |
152 | |
153 (defun toolbar-print () | |
154 "Print current buffer." | |
155 (funcall toolbar-print-command)) | |
156 | |
157 ;; | |
158 ;; toolbar replacement variable and defun | |
159 ;; | |
160 (defvar toolbar-replace-command 'query-replace | |
161 "Command to run when the Replace Icon is selected from the toolbar. | |
162 One possibility for a different value would be `query-replace-regexp'.") | |
163 | |
164 (defun toolbar-replace () | |
165 "Run a query-replace -type function on the current buffer." | |
166 (funcall toolbar-replace-command)) | |
140 | 167 |
141 (defvar toolbar-last-win-icon nil "A `last-win' icon set.") | 168 (defvar toolbar-last-win-icon nil "A `last-win' icon set.") |
142 (defvar toolbar-next-win-icon nil "A `next-win' icon set.") | 169 (defvar toolbar-next-win-icon nil "A `next-win' icon set.") |
143 (defvar toolbar-file-icon nil "A `file' icon set.") | 170 (defvar toolbar-file-icon nil "A `file' icon set.") |
144 (defvar toolbar-folder-icon nil "A `folder' icon set") | 171 (defvar toolbar-folder-icon nil "A `folder' icon set") |
224 ; t | 251 ; t |
225 ; "Undo \"Most recent window config\""] | 252 ; "Undo \"Most recent window config\""] |
226 [toolbar-file-icon find-file t "Open a file" ] | 253 [toolbar-file-icon find-file t "Open a file" ] |
227 [toolbar-folder-icon dired t "View directory"] | 254 [toolbar-folder-icon dired t "View directory"] |
228 [toolbar-disk-icon save-buffer t "Save buffer" ] | 255 [toolbar-disk-icon save-buffer t "Save buffer" ] |
229 [toolbar-printer-icon lpr-buffer t "Print buffer" ] | 256 [toolbar-printer-icon toolbar-print t "Print buffer" ] |
230 [toolbar-cut-icon x-kill-primary-selection t "Kill region"] | 257 [toolbar-cut-icon x-kill-primary-selection t "Kill region"] |
231 [toolbar-copy-icon x-copy-primary-selection t "Copy region"] | 258 [toolbar-copy-icon x-copy-primary-selection t "Copy region"] |
232 [toolbar-paste-icon x-yank-clipboard-selection t | 259 [toolbar-paste-icon x-yank-clipboard-selection t |
233 "Paste from clipboard"] | 260 "Paste from clipboard"] |
234 [toolbar-undo-icon undo t "Undo edit" ] | 261 [toolbar-undo-icon undo t "Undo edit" ] |
235 [toolbar-spell-icon toolbar-ispell t "Spellcheck" ] | 262 [toolbar-spell-icon toolbar-ispell t "Spellcheck" ] |
236 [toolbar-replace-icon query-replace t "Replace text" ] | 263 [toolbar-replace-icon toolbar-replace t "Replace text" ] |
237 [toolbar-mail-icon toolbar-mail t "Mail" ] | 264 [toolbar-mail-icon toolbar-mail t "Mail" ] |
238 [toolbar-info-icon toolbar-info t "Information" ] | 265 [toolbar-info-icon toolbar-info t "Information" ] |
239 [toolbar-compile-icon toolbar-compile t "Compile" ] | 266 [toolbar-compile-icon toolbar-compile t "Compile" ] |
240 [toolbar-debug-icon toolbar-debug t "Debug" ] | 267 [toolbar-debug-icon toolbar-debug t "Debug" ] |
241 [toolbar-news-icon toolbar-news t "News" ]) | 268 [toolbar-news-icon toolbar-news t "News" ]) |