Mercurial > emacs
comparison lisp/tool-bar.el @ 111666:f57fcf34eb00
* tool-bar.el (tool-bar-setup): Remove save as, print and customize.
author | Jan D. <jan.h.d@swipnet.se> |
---|---|
date | Sun, 21 Nov 2010 19:29:08 +0100 |
parents | 8fd0d7bcdf7d |
children | 968255ee954a |
comparison
equal
deleted
inserted
replaced
111665:946fe738ec2b | 111666:f57fcf34eb00 |
---|---|
269 (tool-bar-add-item-from-menu 'save-buffer "save" nil :vert-only t | 269 (tool-bar-add-item-from-menu 'save-buffer "save" nil :vert-only t |
270 :visible '(or buffer-file-name | 270 :visible '(or buffer-file-name |
271 (not (eq 'special | 271 (not (eq 'special |
272 (get major-mode | 272 (get major-mode |
273 'mode-class))))) | 273 'mode-class))))) |
274 (tool-bar-add-item-from-menu 'write-file "saveas" nil :vert-only t | |
275 :visible '(or buffer-file-name | |
276 (not (eq 'special | |
277 (get major-mode | |
278 'mode-class))))) | |
279 (tool-bar-add-item-from-menu 'undo "undo" nil :vert-only t | 274 (tool-bar-add-item-from-menu 'undo "undo" nil :vert-only t |
280 :visible '(not (eq 'special (get major-mode | 275 :visible '(not (eq 'special (get major-mode |
281 'mode-class)))) | 276 'mode-class)))) |
282 (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [cut]) | 277 (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [cut]) |
283 "cut" nil :vert-only t | 278 "cut" nil :vert-only t |
295 | 290 |
296 ;; There's no icon appropriate for News and we need a command rather | 291 ;; There's no icon appropriate for News and we need a command rather |
297 ;; than a lambda for Read Mail. | 292 ;; than a lambda for Read Mail. |
298 ;;(tool-bar-add-item-from-menu 'compose-mail "mail/compose") | 293 ;;(tool-bar-add-item-from-menu 'compose-mail "mail/compose") |
299 | 294 |
300 (tool-bar-add-item-from-menu 'print-buffer "print" nil :label "Print") | |
301 | 295 |
302 ;; tool-bar-add-item-from-menu itself operates on | 296 ;; tool-bar-add-item-from-menu itself operates on |
303 ;; (default-value 'tool-bar-map), but when we don't use that function, | 297 ;; (default-value 'tool-bar-map), but when we don't use that function, |
304 ;; we must explicitly operate on the default value. | 298 ;; we must explicitly operate on the default value. |
305 | 299 |
306 (let ((tool-bar-map (default-value 'tool-bar-map))) | 300 (let ((tool-bar-map (default-value 'tool-bar-map))) |
307 (tool-bar-add-item "preferences" 'customize 'customize | |
308 :help "Edit preferences (customize)") | |
309 | |
310 (tool-bar-add-item "help" (lambda () | 301 (tool-bar-add-item "help" (lambda () |
311 (interactive) | 302 (interactive) |
312 (popup-menu menu-bar-help-menu)) | 303 (popup-menu menu-bar-help-menu)) |
313 'help | 304 'help |
314 :help "Pop up the Help menu"))) | 305 :help "Pop up the Help menu"))) |