Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
775:7d972c3de90a | 776:79940b592197 |
---|---|
122 :group 'toolbar) | 122 :group 'toolbar) |
123 | 123 |
124 (defun toolbar-paste () | 124 (defun toolbar-paste () |
125 (interactive) | 125 (interactive) |
126 ;; This horrible kludge is for pending-delete to work correctly. | 126 ;; This horrible kludge is for pending-delete to work correctly. |
127 (and (boundp 'pending-delete-mode) | 127 (and-boundp 'pending-delete-mode |
128 (declare-boundp pending-delete-mode) | 128 pending-delete-mode |
129 (let ((this-command toolbar-paste-function)) | 129 (let ((this-command toolbar-paste-function)) |
130 (declare-fboundp (pending-delete-pre-hook)))) | 130 (declare-fboundp (pending-delete-pre-hook)))) |
131 (call-interactively toolbar-paste-function)) | 131 (call-interactively toolbar-paste-function)) |
132 | 132 |
133 (defcustom toolbar-undo-function 'undo | 133 (defcustom toolbar-undo-function 'undo |
134 "*Function to call when the undo icon is selected." | 134 "*Function to call when the undo icon is selected." |
135 :type '(radio (function-item undo) | 135 :type '(radio (function-item undo) |
154 ;; toolbar ispell variables and defuns | 154 ;; toolbar ispell variables and defuns |
155 ;; | 155 ;; |
156 | 156 |
157 (defun toolbar-ispell-internal () | 157 (defun toolbar-ispell-internal () |
158 (interactive) | 158 (interactive) |
159 (cond | 159 (if-fboundp 'ispell-region |
160 ((region-active-p) (ispell-region (region-beginning) (region-end))) | 160 (with-fboundp '(ispell-message ispell-buffer) |
161 ((eq major-mode 'mail-mode) (ispell-message)) | 161 (cond |
162 ((eq major-mode 'message-mode) (ispell-message)) | 162 ((region-active-p) (ispell-region (region-beginning) (region-end))) |
163 (t (ispell-buffer)))) | 163 ((eq major-mode 'mail-mode) (ispell-message)) |
164 ((eq major-mode 'message-mode) (ispell-message)) | |
165 (t (ispell-buffer)))) | |
166 (error 'unimplemented "`ispell' package unavailable"))) | |
164 | 167 |
165 (defcustom toolbar-ispell-function 'toolbar-ispell-internal | 168 (defcustom toolbar-ispell-function 'toolbar-ispell-internal |
166 "*Function to call when the ispell icon is selected." | 169 "*Function to call when the ispell icon is selected." |
167 :type '(radio (function-item toolbar-ispell-internal) | 170 :type '(radio (function-item toolbar-ispell-internal) |
168 (function :tag "Other")) | 171 (function :tag "Other")) |
292 | 295 |
293 (defun toolbar-compile () | 296 (defun toolbar-compile () |
294 "Run compile without having to touch the keyboard." | 297 "Run compile without having to touch the keyboard." |
295 (interactive) | 298 (interactive) |
296 (declare (special compile-command toolbar-compile-already-run)) | 299 (declare (special compile-command toolbar-compile-already-run)) |
297 (require 'compile) | 300 (if-fboundp 'compile |
298 (if (boundp 'toolbar-compile-already-run) | 301 (progn |
299 (compile compile-command) | 302 (require 'compile) |
300 (setq toolbar-compile-already-run t) | 303 (if (boundp 'toolbar-compile-already-run) |
301 (if (should-use-dialog-box-p) | 304 (compile compile-command) |
302 (make-dialog-box 'question | 305 (setq toolbar-compile-already-run t) |
303 :question (concat "Compile:\n " compile-command) | 306 (if (should-use-dialog-box-p) |
304 :buttons | 307 (make-dialog-box 'question |
305 '(["Compile" (compile compile-command) t] | 308 :question |
306 ["Edit command" compile t] | 309 (concat "Compile:\n " compile-command) |
307 nil | 310 :buttons |
308 ["Cancel" (message "Quit") t])) | 311 '(["Compile" (compile compile-command) t] |
309 (compile compile-command)))) | 312 ["Edit command" compile t] |
313 nil | |
314 ["Cancel" (message "Quit") t])) | |
315 (compile compile-command)))) | |
316 (error 'unimplemented "`compile' package unavailable"))) | |
310 | 317 |
311 ;; | 318 ;; |
312 ;; toolbar news variables and defuns | 319 ;; toolbar news variables and defuns |
313 ;; | 320 ;; |
314 | 321 |
367 'toolbar-news-frame-plist) | 374 'toolbar-news-frame-plist) |
368 | 375 |
369 (defun toolbar-gnus () | 376 (defun toolbar-gnus () |
370 "Run Gnus in a separate frame." | 377 "Run Gnus in a separate frame." |
371 (interactive) | 378 (interactive) |
372 (if (not toolbar-news-use-separate-frame) | 379 (if-fboundp 'gnus |
373 (gnus) | 380 (progn |
374 (unless (frame-live-p toolbar-news-frame) | 381 (if (not toolbar-news-use-separate-frame) |
375 (setq toolbar-news-frame (make-frame toolbar-news-frame-plist)) | 382 (gnus) |
376 (add-hook 'gnus-exit-gnus-hook | 383 (unless (frame-live-p toolbar-news-frame) |
377 (lambda () | 384 (setq toolbar-news-frame (make-frame toolbar-news-frame-plist)) |
378 (when (frame-live-p toolbar-news-frame) | 385 (add-hook 'gnus-exit-gnus-hook |
379 (if (cdr (frame-list)) | 386 (lambda () |
380 (delete-frame toolbar-news-frame)) | 387 (when (frame-live-p toolbar-news-frame) |
381 (setq toolbar-news-frame nil)))) | 388 (if (cdr (frame-list)) |
382 (select-frame toolbar-news-frame) | 389 (delete-frame toolbar-news-frame)) |
383 (gnus)) | 390 (setq toolbar-news-frame nil)))) |
384 (when (framep toolbar-news-frame) | 391 (select-frame toolbar-news-frame) |
385 (when (frame-iconified-p toolbar-news-frame) | 392 (gnus)) |
386 (deiconify-frame toolbar-news-frame)) | 393 (when (framep toolbar-news-frame) |
387 (select-frame toolbar-news-frame) | 394 (when (frame-iconified-p toolbar-news-frame) |
388 (raise-frame toolbar-news-frame)))) | 395 (deiconify-frame toolbar-news-frame)) |
396 (select-frame toolbar-news-frame) | |
397 (raise-frame toolbar-news-frame)))) | |
398 (error 'unimplemented "`gnus' package unavailable"))) | |
389 | 399 |
390 (defun toolbar-news () | 400 (defun toolbar-news () |
391 "Run News." | 401 "Run News." |
392 (interactive) | 402 (interactive) |
393 (let ((command (cdr-safe | 403 (let ((command (cdr-safe |