Mercurial > hg > xemacs-beta
diff lisp/toolbar-items.el @ 776:79940b592197
[xemacs-hg @ 2002-03-15 07:43:14 by ben]
.cvsignore: ignore .tmp files that are getting auto-created by VC.
Makefile.in.in: Use -no-packages to avoid problems with package files shadowing
core files (e.g. unicode.el in mule-ucs).
alloc.c, emacs.c, lisp.h: add new -no-packages. make sure list of args for sorting is
actually correct. clean up arg parsing code.
xemacs.mak: Use -no-packages to avoid problems with package files shadowing
core files (e.g. unicode.el in mule-ucs).
Makefile: Use -no-packages to avoid problems with package files shadowing
core files (e.g. unicode.el in mule-ucs).
mule\chinese.el, mule\japan-util.el: fix warnings.
behavior-defs.el: fix errors with require.
bytecomp-runtime.el: add new funs {when,and}-{f}boundp, clean up docs.
cus-edit.el: pretty-print values.
dump-paths.el, find-paths.el, startup.el, setup-paths.el: fix problems/inconsistencies parsing options. support new
-no-packages option. merge code duplication in dump-paths and
startup.
lisp-mode.el: indent macrolet and labels correctly. update comments about
lisp-indent-function. flet already handled in cl.
apropos.el, auto-save.el, buff-menu.el, cl-extra.el, dragdrop.el, faces.el, files.el, fill.el, font-lock.el, font.el, gtk-faces.el, gui.el, help.el, hyper-apropos.el, info.el, isearch-mode.el, keymap.el, lisp-mnt.el, mouse.el, package-admin.el, package-get.el, printer.el, process.el, resize-minibuffer.el, simple.el, toolbar-items.el, wid-edit.el, win32-native.el: fix warnings.
very-early-lisp.el: update docs.
mule\chinese.el, mule\japan-util.el: fix warnings.
mule\chinese.el, mule\japan-util.el: fix warnings.
behavior-defs.el: fix errors with require.
bytecomp-runtime.el: add new funs {when,and}-{f}boundp, clean up docs.
cus-edit.el: pretty-print values.
dump-paths.el, find-paths.el, startup.el, setup-paths.el: fix problems/inconsistencies parsing options. support new
-no-packages option. merge code duplication in dump-paths and
startup.
lisp-mode.el: indent macrolet and labels correctly. update comments about
lisp-indent-function. flet already handled in cl.
apropos.el, auto-save.el, buff-menu.el, cl-extra.el, dragdrop.el, faces.el, files.el, fill.el, font-lock.el, font.el, gtk-faces.el, gui.el, help.el, hyper-apropos.el, info.el, isearch-mode.el, keymap.el, lisp-mnt.el, mouse.el, package-admin.el, package-get.el, printer.el, process.el, resize-minibuffer.el, simple.el, toolbar-items.el, wid-edit.el, win32-native.el: fix warnings.
very-early-lisp.el: update docs.
mule\chinese.el, mule\japan-util.el: fix warnings.
Makefile.in.in: Use -no-packages to avoid problems with package files shadowing
core files (e.g. unicode.el in mule-ucs).
Makefile.in.in: Use -no-packages to avoid problems with package files shadowing
core files (e.g. unicode.el in mule-ucs).
author | ben |
---|---|
date | Fri, 15 Mar 2002 07:43:43 +0000 |
parents | 685b588e92d8 |
children | 3889ef128488 308d34e9f07d |
line wrap: on
line diff
--- a/lisp/toolbar-items.el Thu Mar 14 11:50:17 2002 +0000 +++ b/lisp/toolbar-items.el Fri Mar 15 07:43:43 2002 +0000 @@ -124,10 +124,10 @@ (defun toolbar-paste () (interactive) ;; This horrible kludge is for pending-delete to work correctly. - (and (boundp 'pending-delete-mode) - (declare-boundp pending-delete-mode) - (let ((this-command toolbar-paste-function)) - (declare-fboundp (pending-delete-pre-hook)))) + (and-boundp 'pending-delete-mode + pending-delete-mode + (let ((this-command toolbar-paste-function)) + (declare-fboundp (pending-delete-pre-hook)))) (call-interactively toolbar-paste-function)) (defcustom toolbar-undo-function 'undo @@ -156,11 +156,14 @@ (defun toolbar-ispell-internal () (interactive) - (cond - ((region-active-p) (ispell-region (region-beginning) (region-end))) - ((eq major-mode 'mail-mode) (ispell-message)) - ((eq major-mode 'message-mode) (ispell-message)) - (t (ispell-buffer)))) + (if-fboundp 'ispell-region + (with-fboundp '(ispell-message ispell-buffer) + (cond + ((region-active-p) (ispell-region (region-beginning) (region-end))) + ((eq major-mode 'mail-mode) (ispell-message)) + ((eq major-mode 'message-mode) (ispell-message)) + (t (ispell-buffer)))) + (error 'unimplemented "`ispell' package unavailable"))) (defcustom toolbar-ispell-function 'toolbar-ispell-internal "*Function to call when the ispell icon is selected." @@ -294,19 +297,23 @@ "Run compile without having to touch the keyboard." (interactive) (declare (special compile-command toolbar-compile-already-run)) - (require 'compile) - (if (boundp 'toolbar-compile-already-run) - (compile compile-command) - (setq toolbar-compile-already-run t) - (if (should-use-dialog-box-p) - (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)))) + (if-fboundp 'compile + (progn + (require 'compile) + (if (boundp 'toolbar-compile-already-run) + (compile compile-command) + (setq toolbar-compile-already-run t) + (if (should-use-dialog-box-p) + (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)))) + (error 'unimplemented "`compile' package unavailable"))) ;; ;; toolbar news variables and defuns @@ -369,23 +376,26 @@ (defun toolbar-gnus () "Run Gnus in a separate frame." (interactive) - (if (not toolbar-news-use-separate-frame) - (gnus) - (unless (frame-live-p toolbar-news-frame) - (setq toolbar-news-frame (make-frame toolbar-news-frame-plist)) - (add-hook 'gnus-exit-gnus-hook - (lambda () - (when (frame-live-p toolbar-news-frame) - (if (cdr (frame-list)) - (delete-frame toolbar-news-frame)) - (setq toolbar-news-frame nil)))) - (select-frame toolbar-news-frame) - (gnus)) - (when (framep toolbar-news-frame) - (when (frame-iconified-p toolbar-news-frame) - (deiconify-frame toolbar-news-frame)) - (select-frame toolbar-news-frame) - (raise-frame toolbar-news-frame)))) + (if-fboundp 'gnus + (progn + (if (not toolbar-news-use-separate-frame) + (gnus) + (unless (frame-live-p toolbar-news-frame) + (setq toolbar-news-frame (make-frame toolbar-news-frame-plist)) + (add-hook 'gnus-exit-gnus-hook + (lambda () + (when (frame-live-p toolbar-news-frame) + (if (cdr (frame-list)) + (delete-frame toolbar-news-frame)) + (setq toolbar-news-frame nil)))) + (select-frame toolbar-news-frame) + (gnus)) + (when (framep toolbar-news-frame) + (when (frame-iconified-p toolbar-news-frame) + (deiconify-frame toolbar-news-frame)) + (select-frame toolbar-news-frame) + (raise-frame toolbar-news-frame)))) + (error 'unimplemented "`gnus' package unavailable"))) (defun toolbar-news () "Run News."