X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fmenubar-items.el;h=0b950090a7c4ea9c56889d3c00fd536a3451e2d9;hb=976b002b16336930724ae22476014583ad022e7d;hp=a096e9d56c42ef7f28defc8c1ab8214e3f515914;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/menubar-items.el b/lisp/menubar-items.el index a096e9d..0b95009 100644 --- a/lisp/menubar-items.el +++ b/lisp/menubar-items.el @@ -137,33 +137,33 @@ ["Show Message Log" show-message-log] ) - ,@(if (featurep 'mule) - '(("Mule" - ("Describe language support") - ("Set language environment") - "--" - ["Toggle input method" toggle-input-method] - ["Select input method" select-input-method] - ["Describe input method" describe-input-method] - "--" - ["Describe current coding systems" - describe-current-coding-system] - ["Set coding system of buffer file" - set-buffer-file-coding-system] - ;; not implemented yet - ["Set coding system of terminal" - set-terminal-coding-system :active nil] - ;; not implemented yet - ["Set coding system of keyboard" - set-keyboard-coding-system :active nil] - ;; not implemented yet - ["Set coding system of process" - set-current-process-coding-system :active nil] - "--" - ["Show character table" view-charset-by-menu] - ;; not implemented yet - ["Show diagnosis for MULE" mule-diag :active nil] - ["Show many languages" view-hello-file]))) + ,@(when (featurep 'mule) + '(("Mule" + ("Describe language support") + ("Set language environment") + "--" + ["Toggle input method" toggle-input-method] + ["Select input method" select-input-method] + ["Describe input method" describe-input-method] + "--" + ["Describe current coding systems" + describe-current-coding-system] + ["Set coding system of buffer file" + set-buffer-file-coding-system] + ;; not implemented yet + ["Set coding system of terminal" + set-terminal-coding-system :active nil] + ;; not implemented yet + ["Set coding system of keyboard" + set-keyboard-coding-system :active nil] + ["Set coding system of process" + set-buffer-process-coding-system + :active (get-buffer-process (current-buffer))] + "--" + ["Show character table" view-charset-by-menu] + ;; not implemented yet + ["Show diagnosis for MULE" mule-diag :active nil] + ["Show many languages" view-hello-file]))) ("Apps" ["Read Mail (VM)..." vm @@ -176,8 +176,6 @@ :active (fboundp 'gnus)] ["Browse the Web" w3 :active (fboundp 'w3)] - ["Gopher" gopher - :active (fboundp 'gopher)] "----" ["Spell-Check Buffer" ispell-buffer :active (fboundp 'ispell-buffer)] @@ -231,19 +229,39 @@ ["Saved..." customize-saved] ["Set..." customize-customized] ["Apropos..." customize-apropos] - ["Browse..." customize-browse] - ["Update Packages" package-get-custom]) + ["Browse..." customize-browse]) + + ("Manage Packages" + ("Add Download Site" + :filter (lambda (&rest junk) + (package-get-download-menu))) + ["Update Package Index" package-get-update-base] + ["List & Install" pui-list-packages] + ["Update Installed Packages" package-get-update-all] + ;; hack-o-matic, we can't force a laod of package-base here + ;; since it triggers dialog box interactions which we can't + ;; deal while using a menu + ("Using Custom" + :filter (lambda (&rest junk) + (if package-get-base + (cdr (custom-menu-create 'packages)) + '(["Please load Package Index" (lamda (&rest junk) ()) nil])))) + + ["Help" (Info-goto-node "(xemacs)Packages")]) + + "---" + ("Editing Options" ["Overstrike" (progn (setq overwrite-mode (if overwrite-mode nil 'overwrite-mode-textual)) (customize-set-variable 'overwrite-mode overwrite-mode)) :style toggle :selected overwrite-mode] - ["Case Sensitive Search" - (customize-set-variable 'case-fold-search + ["Case Sensitive Search" + (customize-set-variable 'case-fold-search (setq case-fold-search (not case-fold-search))) :style toggle :selected (not case-fold-search)] - ["Case Matching Replace" + ["Case Matching Replace" (customize-set-variable 'case-replace (not case-replace)) :style toggle :selected case-replace] ["Auto Delete Selection" @@ -251,10 +269,10 @@ :style toggle :selected (and (boundp 'pending-delete-mode) pending-delete-mode) :active (boundp 'pending-delete-mode)] - ["Active Regions" + ["Active Regions" (customize-set-variable 'zmacs-regions (not zmacs-regions)) :style toggle :selected zmacs-regions] - ["Mouse Paste At Text Cursor" + ["Mouse Paste At Text Cursor" (customize-set-variable 'mouse-yank-at-point (not mouse-yank-at-point)) :style toggle :selected mouse-yank-at-point] ("Newline at end of file..." @@ -268,20 +286,20 @@ (customize-set-variable 'require-final-newline 'ask) :style radio :selected (and require-final-newline (not (eq require-final-newline t)))]) - ["Add Newline When Moving Past End" - (customize-set-variable 'next-line-add-newlines + ["Add Newline When Moving Past End" + (customize-set-variable 'next-line-add-newlines (not next-line-add-newlines)) :style toggle :selected next-line-add-newlines] ) ("General Options" - ["Teach Extended Commands" + ["Teach Extended Commands" (customize-set-variable 'teach-extended-commands-p (not teach-extended-commands-p)) :style toggle :selected teach-extended-commands-p] ["Debug On Error" (customize-set-variable 'debug-on-error (not debug-on-error)) :style toggle :selected debug-on-error] - ["Debug On Quit" + ["Debug On Quit" (customize-set-variable 'debug-on-quit (not debug-on-quit)) :style toggle :selected debug-on-quit] ) @@ -313,7 +331,7 @@ :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'statement)) :active (boundp 'ps-paper-type)] - ["Executive" + ["Executive" (customize-set-variable 'ps-paper-type 'executive) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'executive)) @@ -323,7 +341,7 @@ :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'tabloid)) :active (boundp 'ps-paper-type)] - ["Ledger" + ["Ledger" (customize-set-variable 'ps-paper-type 'ledger) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'ledger)) @@ -333,22 +351,22 @@ :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a3)) :active (boundp 'ps-paper-type)] - ["A4" + ["A4" (customize-set-variable 'ps-paper-type 'a4) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4)) :active (boundp 'ps-paper-type)] - ["A4small" + ["A4small" (customize-set-variable 'ps-paper-type 'a4small) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4small)) :active (boundp 'ps-paper-type)] - ["B4" + ["B4" (customize-set-variable 'ps-paper-type 'b4) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b4)) :active (boundp 'ps-paper-type)] - ["B5" + ["B5" (customize-set-variable 'ps-paper-type 'b5) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b5)) @@ -363,15 +381,15 @@ (set-face-background 'default original-face-background))) (t (customize-set-variable 'ps-print-color-p t) - (setq original-face-background + (setq original-face-background (face-background-instance 'default)) (set-face-background 'default "white"))) - :style toggle + :style toggle :selected (and (boundp 'ps-print-color-p) ps-print-color-p) :active (boundp 'ps-print-color-p)]) ("\"Other Window\" Location" ["Always in Same Frame" - (customize-set-variable + (customize-set-variable 'get-frame-for-buffer-default-instance-limit nil) :style radio :selected (null get-frame-for-buffer-default-instance-limit)] @@ -397,7 +415,7 @@ :selected (eq 0 get-frame-for-buffer-default-instance-limit)] "-----" ["Temp Buffers Always in Same Frame" - (customize-set-variable 'temp-buffer-show-function + (customize-set-variable 'temp-buffer-show-function 'show-temp-buffer-in-current-frame) :style radio :selected (eq temp-buffer-show-function @@ -415,11 +433,11 @@ ) "-----" ("Syntax Highlighting" - ["In This Buffer" + ["In This Buffer" (progn ;; becomes buffer local (font-lock-mode) (customize-set-variable 'font-lock-mode font-lock-mode)) - :style toggle + :style toggle :selected (and (boundp 'font-lock-mode) font-lock-mode) :active (boundp 'font-lock-mode)] ["Automatic" @@ -429,7 +447,7 @@ :selected (and (boundp 'font-lock-auto-fontify) font-lock-auto-fontify) :active (fboundp 'font-lock-mode)] "-----" - ["Fonts" + ["Fonts" (progn (require 'font-lock) (font-lock-use-default-fonts) @@ -467,7 +485,7 @@ (not (eq t font-lock-maximum-decoration))) (and (integerp font-lock-maximum-decoration) (<= font-lock-maximum-decoration 0))))] - ["More" + ["More" (progn (require 'font-lock) (if (and (integerp font-lock-maximum-decoration) @@ -480,7 +498,7 @@ :selected (and (boundp 'font-lock-maximium-decoration) (integerp font-lock-maximum-decoration) (= 1 font-lock-maximum-decoration))] - ["Even More" + ["Even More" (progn (require 'font-lock) (if (and (integerp font-lock-maximum-decoration) @@ -517,7 +535,7 @@ ;; be a redisplay bug lurking somewhere (or ;; possibly another event handler bug) (redraw-modeline)) - :active (and (boundp 'font-lock-mode) (boundp 'lazy-shot-mode) + :active (and (boundp 'font-lock-mode) (boundp 'lazy-shot-mode) font-lock-mode) :style toggle :selected (and (boundp 'lazy-shot-mode) lazy-shot-mode)] @@ -537,7 +555,7 @@ ("Paren Highlighting" ["None" (customize-set-variable 'paren-mode nil) - :style radio + :style radio :selected (and (boundp 'paren-mode) (not paren-mode)) :active (boundp 'paren-mode)] ["Blinking Paren" @@ -547,33 +565,33 @@ :active (boundp 'paren-mode)] ["Steady Paren" (customize-set-variable 'paren-mode 'paren) - :style radio + :style radio :selected (and (boundp 'paren-mode) (eq paren-mode 'paren)) :active (boundp 'paren-mode)] ["Expression" (customize-set-variable 'paren-mode 'sexp) - :style radio + :style radio :selected (and (boundp 'paren-mode) (eq paren-mode 'sexp)) :active (boundp 'paren-mode)] -;; ["Nested Shading" +;; ["Nested Shading" ;; (customize-set-variable 'paren-mode 'nested) -;; :style radio +;; :style radio ;; :selected (and (boundp 'paren-mode) (eq paren-mode 'nested)) ;; :active (boundp 'paren-mode)] ) "-----" ("Frame Appearance" - ["Frame-Local Font Menu" + ["Frame-Local Font Menu" (customize-set-variable 'font-menu-this-frame-only-p (not font-menu-this-frame-only-p)) - :style toggle + :style toggle :selected (and (boundp 'font-menu-this-frame-only-p) font-menu-this-frame-only-p)] ,@(if (featurep 'scrollbar) '(["Scrollbars" (customize-set-variable 'scrollbars-visible-p (not scrollbars-visible-p)) - :style toggle + :style toggle :selected scrollbars-visible-p])) ;; I don't think this is of any interest. - dverna apr. 98 ;; #### I beg to differ! Many FSFmacs converts hate the 3D @@ -581,14 +599,14 @@ ;; off through the Options menu. I would have uncommented this ;; source, but the code for saving options would not save the ;; modeline 3D-ness. Grrr. --hniksic -;; ["3D Modeline" -;; (progn +;; ["3D Modeline" +;; (progn ;; (if (zerop (specifier-instance modeline-shadow-thickness)) ;; (set-specifier modeline-shadow-thickness 2) ;; (set-specifier modeline-shadow-thickness 0)) -;; (redraw-modeline t)) -;; :style toggle -;; :selected (let ((thickness +;; (redraw-modeline t)) +;; :style toggle +;; :selected (let ((thickness ;; (specifier-instance modeline-shadow-thickness))) ;; (and (integerp thickness) ;; (> thickness 0)))] @@ -604,23 +622,23 @@ :selected (and (boundp 'blink-cursor-mode) blink-cursor-mode) :active (boundp 'blink-cursor-mode)] "-----" - ["Block cursor" + ["Block cursor" (progn (customize-set-variable 'bar-cursor nil) (force-cursor-redisplay)) :style radio :selected (null bar-cursor)] - ["Bar cursor (1 pixel)" + ["Bar cursor (1 pixel)" (progn (customize-set-variable 'bar-cursor t) (force-cursor-redisplay)) :style radio :selected (eq bar-cursor t)] - ["Bar cursor (2 pixels)" + ["Bar cursor (2 pixels)" (progn (customize-set-variable 'bar-cursor 2) (force-cursor-redisplay)) - :style radio + :style radio :selected (and bar-cursor (not (eq bar-cursor t)))] "------" ["Line Numbers" @@ -640,7 +658,7 @@ (customize-set-variable 'buffers-menu-max-size ;; would it be better to open a customization buffer ? - (let ((val + (let ((val (read-number "Enter number of buffers to display (or 0 for unlimited): "))) (if (eq val 0) nil val)))] @@ -666,10 +684,10 @@ buffers-menu-sort-function)] ["By Major Mode, Then Alphabetically" (progn - (customize-set-variable + (customize-set-variable 'buffers-menu-sort-function 'sort-buffers-menu-by-mode-then-alphabetically) - (customize-set-variable + (customize-set-variable 'buffers-menu-grouping-function 'group-buffers-menu-by-mode-then-alphabetically)) :style radio @@ -684,18 +702,18 @@ ["Ignore Scaled Fonts" (customize-set-variable 'font-menu-ignore-scaled-fonts (not font-menu-ignore-scaled-fonts)) - :style toggle + :style toggle :selected (and (boundp 'font-menu-ignore-scaled-fonts) font-menu-ignore-scaled-fonts)] ) ,@(if (featurep 'toolbar) '(("Toolbar Appearance" - ["Visible" + ["Visible" (customize-set-variable 'toolbar-visible-p (not toolbar-visible-p)) :style toggle :selected toolbar-visible-p] - ["Captioned" + ["Captioned" (customize-set-variable 'toolbar-captioned-p (not toolbar-captioned-p)) :style toggle @@ -703,9 +721,9 @@ ("Default Location" ["Top" (customize-set-variable 'default-toolbar-position 'top) - :style radio + :style radio :selected (eq default-toolbar-position 'top)] - ["Bottom" + ["Bottom" (customize-set-variable 'default-toolbar-position 'bottom) :style radio :selected (eq default-toolbar-position 'bottom)] @@ -721,7 +739,7 @@ ))) ("Mouse" ["Avoid Text..." - (customize-set-variable 'mouse-avoidance-mode + (customize-set-variable 'mouse-avoidance-mode (if mouse-avoidance-mode nil 'banish)) :style toggle :selected (and (boundp 'mouse-avoidance-mode) mouse-avoidance-mode) @@ -735,7 +753,7 @@ (device-on-window-system-p))] ) ("Open URLs With" - ["Emacs-W3" + ["Emacs-W3" (customize-set-variable 'browse-url-browser-function 'browse-url-w3) :style radio :selected (and (boundp 'browse-url-browser-function) @@ -743,15 +761,15 @@ :active (and (boundp 'browse-url-browser-function) (fboundp 'browse-url-w3) (fboundp 'w3-fetch))] - ["Netscape" - (customize-set-variable 'browse-url-browser-function + ["Netscape" + (customize-set-variable 'browse-url-browser-function 'browse-url-netscape) :style radio :selected (and (boundp 'browse-url-browser-function) (eq browse-url-browser-function 'browse-url-netscape)) :active (and (boundp 'browse-url-browser-function) (fboundp 'browse-url-netscape))] - ["Mosaic" + ["Mosaic" (customize-set-variable 'browse-url-browser-function 'browse-url-mosaic) :style radio @@ -759,22 +777,22 @@ (eq browse-url-browser-function 'browse-url-mosaic)) :active (and (boundp 'browse-url-browser-function) (fboundp 'browse-url-mosaic))] - ["Mosaic (CCI)" + ["Mosaic (CCI)" (customize-set-variable 'browse-url-browser-function 'browse-url-cci) :style radio :selected (and (boundp 'browse-url-browser-function) (eq browse-url-browser-function 'browse-url-cci)) :active (and (boundp 'browse-url-browser-function) (fboundp 'browse-url-cci))] - ["IXI Mosaic" - (customize-set-variable 'browse-url-browser-function + ["IXI Mosaic" + (customize-set-variable 'browse-url-browser-function 'browse-url-iximosaic) :style radio :selected (and (boundp 'browse-url-browser-function) (eq browse-url-browser-function 'browse-url-iximosaic)) :active (and (boundp 'browse-url-browser-function) (fboundp 'browse-url-iximosaic))] - ["Lynx (xterm)" + ["Lynx (xterm)" (customize-set-variable 'browse-url-browser-function 'browse-url-lynx-xterm) :style radio @@ -790,7 +808,7 @@ (eq browse-url-browser-function 'browse-url-lynx-emacs)) :active (and (boundp 'browse-url-browser-function) (fboundp 'browse-url-lynx-emacs))] - ["Grail" + ["Grail" (customize-set-variable 'browse-url-browser-function 'browse-url-grail) :style radio @@ -798,12 +816,20 @@ (eq browse-url-browser-function 'browse-url-grail)) :active (and (boundp 'browse-url-browser-function) (fboundp 'browse-url-grail))] + ["Kfm" + (customize-set-variable 'browse-url-browser-function + 'browse-url-kfm) + :style radio + :selected (and (boundp 'browse-url-browser-function) + (eq browse-url-browser-function 'browse-url-kfm)) + :active (and (boundp 'browse-url-browser-function) + (fboundp 'browse-url-kfm))] ) "-----" - ["Browse Faces..." (customize-face nil)] + ["Edit Faces..." (customize-face nil)] ("Font" :filter font-menu-family-constructor) ("Size" :filter font-menu-size-constructor) - ("Weight" :filter font-menu-weight-constructor) +; ("Weight" :filter font-menu-weight-constructor) "-----" ["Save Options" customize-save-customized] ) @@ -1471,10 +1497,18 @@ The menu is computed by combining `global-popup-menu' and `mode-popup-menu'." (defun xemacs-splash-buffer () "Redisplay XEmacs splash screen in a buffer." (interactive) - (let ((buffer (get-buffer-create "*Splash*"))) + (let ((buffer (get-buffer-create "*Splash*")) + tmout) (set-buffer buffer) + (setq buffer-read-only t) (erase-buffer buffer) - (startup-splash-frame) + (setq tmout (display-splash-frame)) + (when tmout + (make-local-hook 'kill-buffer-hook) + (add-hook 'kill-buffer-hook + `(lambda () + (disable-timeout ,tmout)) + nil t)) (pop-to-buffer buffer) (delete-other-windows)))