X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Ftoolbar-items.el;h=39d1f5114ce2e8b0f550080f68d5a9471f18c24b;hb=0f32e94e63549a803257dd1612fcdb83dbd6a149;hp=26ed785fb9ad47ff704a4e9fbf568d3f383d9535;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/toolbar-items.el b/lisp/toolbar-items.el index 26ed785..39d1f51 100644 --- a/lisp/toolbar-items.el +++ b/lisp/toolbar-items.el @@ -33,7 +33,7 @@ ;; is compiled in). ;; Miscellaneous toolbar functions, useful for users to redefine, in -;; order to get different behaviour. +;; order to get different behavior. ;;; Code: @@ -78,9 +78,9 @@ (function :tag "Other")) :group 'toolbar) -(defun toolbar-dired () - (interactive) - (call-interactively toolbar-dired-function)) +(defun toolbar-dired (dir) + (interactive "DDired directory: ") + (funcall toolbar-dired-function dir)) (defcustom toolbar-save-function 'save-buffer "*Function to call when the save icon is selected." @@ -297,23 +297,22 @@ Mail readers known by default are vm, gnus, rmail, mh, pine, elm, (require 'gdbsrc) (call-interactively 'gdbsrc))) -(defvar compile-command) -(defvar toolbar-compile-already-run nil) - (defun toolbar-compile () "Run compile without having to touch the keyboard." (interactive) + (declare (special compile-command toolbar-compile-already-run)) (require 'compile) - (if toolbar-compile-already-run + (if (boundp 'toolbar-compile-already-run) (compile compile-command) (setq toolbar-compile-already-run t) (if (should-use-dialog-box-p) - (popup-dialog-box - `(,(concat "Compile:\n " compile-command) - ["Compile" (compile compile-command) t] - ["Edit command" compile t] - nil - ["Cancel" (message "Quit") t])) + (make-dialog-box 'question + :question (concat "Compile:\n " compile-command) + :buttons + '(["Compile" (compile compile-command) t] + ["Edit command" compile t] + nil + ["Cancel" (message "Quit") t])) (compile compile-command)))) ;; @@ -401,7 +400,7 @@ Newsreaders known by default are gnus, rn, nn, trn, xrn, slrn, pine (let ((command (cdr-safe (assq toolbar-news-reader toolbar-news-commands-alist)))) (or command - (error "Unkown news reader %s" toolbar-news-reader)) + (error "Unknown news reader %s" toolbar-news-reader)) (if (symbolp command) (call-interactively command) (eval command))))