Mercurial > emacs
comparison lisp/toolbar/tool-bar.el @ 31895:6d04db7a9256
(tool-bar-help): New function.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 26 Sep 2000 09:34:55 +0000 |
parents | 3c4b8a33fed9 |
children | 742016ea45ce |
comparison
equal
deleted
inserted
replaced
31894:26af159ff0df | 31895:6d04db7a9256 |
---|---|
149 ;;(tool-bar-add-item-from-menu 'compose-mail "mail_compose") | 149 ;;(tool-bar-add-item-from-menu 'compose-mail "mail_compose") |
150 | 150 |
151 (tool-bar-add-item-from-menu 'print-buffer "print") | 151 (tool-bar-add-item-from-menu 'print-buffer "print") |
152 (tool-bar-add-item "preferences" 'customize 'customize nil | 152 (tool-bar-add-item "preferences" 'customize 'customize nil |
153 :help "Edit preferences (customize)") | 153 :help "Edit preferences (customize)") |
154 (tool-bar-add-item "help" | 154 |
155 (lambda () | 155 (defun tool-bar-help () |
156 (interactive) | 156 "Pop up the help menu from the tool-bar." |
157 (let ((p (mouse-position))) | 157 (interactive) |
158 (x-popup-menu (list (list (cadr p) (cddr p)) (car p)) | 158 (let* ((p (mouse-position)) |
159 menu-bar-help-menu))) | 159 (menu menu-bar-help-menu) |
160 (selection (x-popup-menu (list (list (cadr p) (cddr p)) (car p)) | |
161 menu)) | |
162 binding) | |
163 (while selection | |
164 (setq binding (lookup-key (or binding menu) (vector (car selection))) | |
165 selection (cdr selection))) | |
166 (when binding | |
167 (call-interactively binding)))) | |
168 | |
169 (tool-bar-add-item "help" 'tool-bar-help | |
160 'help nil :help "Pop up the Help menu") | 170 'help nil :help "Pop up the Help menu") |
161 | 171 |
162 (provide 'tool-bar) | 172 (provide 'tool-bar) |
163 | 173 |
164 ;;; tool-bar.el ends here | 174 ;;; tool-bar.el ends here |