From: ueno Date: Sun, 12 Dec 2004 02:32:06 +0000 (+0000) Subject: Check (featurep 'toolbar). X-Git-Tag: riece-1_0_7~92 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02a8effb92f3342ad00fab00f7f2e1c0d8b476d2;p=elisp%2Friece.git Check (featurep 'toolbar). --- diff --git a/lisp/riece-toolbar.el b/lisp/riece-toolbar.el index bd410a6..c335a74 100644 --- a/lisp/riece-toolbar.el +++ b/lisp/riece-toolbar.el @@ -52,31 +52,34 @@ item)) (if (featurep 'xemacs) - (progn - (defun riece-make-toolbar-from-menu (items menu-items map) - (let ((pointer items) - toolbar - file - menu-item) - (while pointer - (setq file (locate-file (symbol-name (car pointer)) - load-path - '(".xpm" ".pbm" ".xbm")) - menu-item (riece-toolbar-find-menu-item (car pointer))) - (if (and file (file-exists-p file)) - (setq toolbar - (toolbar-add-item - toolbar - (toolbar-new-button - file - (car pointer) - (if menu-item - (aref menu-item 0) - (symbol-name (car pointer))))))) - (setq pointer (cdr pointer))) - toolbar)) - (defun riece-set-toolbar (toolbar) - (set-specifier default-toolbar toolbar (current-buffer)))) + (if (featurep 'toolbar) + (progn + (defun riece-make-toolbar-from-menu (items menu-items map) + (let ((pointer items) + toolbar + file + menu-item) + (while pointer + (setq file (locate-file (symbol-name (car pointer)) + load-path + '(".xpm" ".pbm" ".xbm")) + menu-item (riece-toolbar-find-menu-item (car pointer))) + (if (and file (file-exists-p file)) + (setq toolbar + (toolbar-add-item + toolbar + (toolbar-new-button + file + (car pointer) + (if menu-item + (aref menu-item 0) + (symbol-name (car pointer))))))) + (setq pointer (cdr pointer))) + toolbar)) + (defun riece-set-toolbar (toolbar) + (set-specifier default-toolbar toolbar (current-buffer)))) + (defalias 'riece-make-toolbar-from-menu 'ignore) + (defalias 'riece-set-toolbar 'ignore)) (defun riece-make-toolbar-from-menu (items menu-items map) (let ((pointer items) (tool-bar-map (make-sparse-keymap)))