comparison lisp/menubar-items.el @ 371:cc15677e0335 r21-2b1

Import from CVS: tag r21-2b1
author cvs
date Mon, 13 Aug 2007 11:03:08 +0200
parents 30d2cfa1092a
children 6240c7796c7a
comparison
equal deleted inserted replaced
370:bd866891f083 371:cc15677e0335
154 ["Set coding system of terminal" 154 ["Set coding system of terminal"
155 set-terminal-coding-system :active nil] 155 set-terminal-coding-system :active nil]
156 ;; not implemented yet 156 ;; not implemented yet
157 ["Set coding system of keyboard" 157 ["Set coding system of keyboard"
158 set-keyboard-coding-system :active nil] 158 set-keyboard-coding-system :active nil]
159 ;; not implemented yet
159 ["Set coding system of process" 160 ["Set coding system of process"
160 set-buffer-process-coding-system 161 set-current-process-coding-system :active nil]
161 :active (get-buffer-process (current-buffer))]
162 "--" 162 "--"
163 ["Show character table" view-charset-by-menu] 163 ["Show character table" view-charset-by-menu]
164 ;; not implemented yet 164 ;; not implemented yet
165 ["Show diagnosis for MULE" mule-diag :active nil] 165 ["Show diagnosis for MULE" mule-diag :active nil]
166 ["Show many languages" view-hello-file]))) 166 ["Show many languages" view-hello-file])))
174 :active (fboundp 'compose-mail)] 174 :active (fboundp 'compose-mail)]
175 ["Usenet News" gnus 175 ["Usenet News" gnus
176 :active (fboundp 'gnus)] 176 :active (fboundp 'gnus)]
177 ["Browse the Web" w3 177 ["Browse the Web" w3
178 :active (fboundp 'w3)] 178 :active (fboundp 'w3)]
179 ["Gopher" gopher
180 :active (fboundp 'gopher)]
179 "----" 181 "----"
180 ["Spell-Check Buffer" ispell-buffer 182 ["Spell-Check Buffer" ispell-buffer
181 :active (fboundp 'ispell-buffer)] 183 :active (fboundp 'ispell-buffer)]
182 ["Toggle VI emulation" toggle-viper-mode 184 ["Toggle VI emulation" toggle-viper-mode
183 :active (fboundp 'toggle-viper-mode)] 185 :active (fboundp 'toggle-viper-mode)]
227 ["Variable..." customize-variable] 229 ["Variable..." customize-variable]
228 ["Face..." customize-face] 230 ["Face..." customize-face]
229 ["Saved..." customize-saved] 231 ["Saved..." customize-saved]
230 ["Set..." customize-customized] 232 ["Set..." customize-customized]
231 ["Apropos..." customize-apropos] 233 ["Apropos..." customize-apropos]
232 ["Browse..." customize-browse]) 234 ["Browse..." customize-browse]
233 235 ["Update Packages" package-get-custom])
234 ("Manage Packages"
235 ("Add Download Site"
236 :filter (lambda (&rest junk)
237 (package-get-download-menu)))
238 ["Update Package Index" package-get-update-base]
239 ["List & Install" pui-list-packages]
240 ["Update Installed Packages" package-get-update-all]
241 ;; hack-o-matic, we can't force a laod of package-base here
242 ;; since it triggers dialog box interactions which we can't
243 ;; deal while using a menu
244 ("Using Custom"
245 :filter (lambda (&rest junk)
246 (if package-get-base
247 (cdr (custom-menu-create 'packages))
248 '(["Please load Package Index" #'ignore nil]))))
249
250 ["Help" (Info-goto-node "(xemacs)Packages")])
251
252 "---"
253
254 ("Editing Options" 236 ("Editing Options"
255 ["Overstrike" 237 ["Overstrike"
256 (progn 238 (progn
257 (setq overwrite-mode (if overwrite-mode nil 'overwrite-mode-textual)) 239 (setq overwrite-mode (if overwrite-mode nil 'overwrite-mode-textual))
258 (customize-set-variable 'overwrite-mode overwrite-mode)) 240 (customize-set-variable 'overwrite-mode overwrite-mode))
478 nil 460 nil
479 (customize-set-variable 'font-lock-maximum-decoration nil) 461 (customize-set-variable 'font-lock-maximum-decoration nil)
480 (font-lock-recompute-variables))) 462 (font-lock-recompute-variables)))
481 :style radio 463 :style radio
482 :active (fboundp 'font-lock-mode) 464 :active (fboundp 'font-lock-mode)
483 :selected (and (boundp 'font-lock-maximum-decoration) 465 :selected (and (boundp 'font-lock-maximium-decoration)
484 (or (and (not (integerp font-lock-maximum-decoration)) 466 (or (and (not (integerp font-lock-maximum-decoration))
485 (not (eq t font-lock-maximum-decoration))) 467 (not (eq t font-lock-maximum-decoration)))
486 (and (integerp font-lock-maximum-decoration) 468 (and (integerp font-lock-maximum-decoration)
487 (<= font-lock-maximum-decoration 0))))] 469 (<= font-lock-maximum-decoration 0))))]
488 ["More" 470 ["More"
493 nil 475 nil
494 (customize-set-variable 'font-lock-maximum-decoration 1) 476 (customize-set-variable 'font-lock-maximum-decoration 1)
495 (font-lock-recompute-variables))) 477 (font-lock-recompute-variables)))
496 :style radio 478 :style radio
497 :active (fboundp 'font-lock-mode) 479 :active (fboundp 'font-lock-mode)
498 :selected (and (boundp 'font-lock-maximum-decoration) 480 :selected (and (boundp 'font-lock-maximium-decoration)
499 (integerp font-lock-maximum-decoration) 481 (integerp font-lock-maximum-decoration)
500 (= 1 font-lock-maximum-decoration))] 482 (= 1 font-lock-maximum-decoration))]
501 ["Even More" 483 ["Even More"
502 (progn 484 (progn
503 (require 'font-lock) 485 (require 'font-lock)
814 :style radio 796 :style radio
815 :selected (and (boundp 'browse-url-browser-function) 797 :selected (and (boundp 'browse-url-browser-function)
816 (eq browse-url-browser-function 'browse-url-grail)) 798 (eq browse-url-browser-function 'browse-url-grail))
817 :active (and (boundp 'browse-url-browser-function) 799 :active (and (boundp 'browse-url-browser-function)
818 (fboundp 'browse-url-grail))] 800 (fboundp 'browse-url-grail))]
819 ["Kfm"
820 (customize-set-variable 'browse-url-browser-function
821 'browse-url-kfm)
822 :style radio
823 :selected (and (boundp 'browse-url-browser-function)
824 (eq browse-url-browser-function 'browse-url-kfm))
825 :active (and (boundp 'browse-url-browser-function)
826 (fboundp 'browse-url-kfm))]
827 ) 801 )
828 "-----" 802 "-----"
829 ["Edit Faces..." (customize-face nil)] 803 ["Browse Faces..." (customize-face nil)]
830 ("Font" :filter font-menu-family-constructor) 804 ("Font" :filter font-menu-family-constructor)
831 ("Size" :filter font-menu-size-constructor) 805 ("Size" :filter font-menu-size-constructor)
832 ; ("Weight" :filter font-menu-weight-constructor) 806 ("Weight" :filter font-menu-weight-constructor)
833 "-----" 807 "-----"
834 ["Save Options" customize-save-customized] 808 ["Save Options" customize-save-customized]
835 ) 809 )
836 810
837 ("Buffers" 811 ("Buffers"
953 ["Recent Messages" view-lossage] 927 ["Recent Messages" view-lossage]
954 ("Misc" 928 ("Misc"
955 ["No Warranty" describe-no-warranty] 929 ["No Warranty" describe-no-warranty]
956 ["XEmacs License" describe-copying] 930 ["XEmacs License" describe-copying]
957 ["The Latest Version" describe-distribution]) 931 ["The Latest Version" describe-distribution])
958 ["Send Bug Report..." report-emacs-bug 932 ["Send Bug Report..." report-emacs-bug]))))
959 :active (fboundp 'report-emacs-bug)]))))
960 933
961 934
962 (defun maybe-add-init-button () 935 (defun maybe-add-init-button ()
963 "Don't call this. 936 "Don't call this.
964 Adds `Load .emacs' button to menubar when starting up with -q." 937 Adds `Load .emacs' button to menubar when starting up with -q."
938 ;; by Stig@hackvan.com
965 (cond 939 (cond
966 (init-file-user nil) 940 (init-file-user nil)
967 ((file-exists-p (expand-file-name ".emacs" "~")) 941 ((file-exists-p (expand-file-name ".emacs" "~"))
968 (add-menu-button 942 (add-menu-button nil
969 nil 943 ["Load .emacs"
970 ["Load .emacs" 944 (progn (delete-menu-item '("Load .emacs"))
971 (progn 945 (load-user-init-file (user-login-name)))
972 (mapc #'(lambda (buf) 946 ]
973 (with-current-buffer buf 947 "Help"))
974 (delete-menu-item '("Load .emacs"))))
975 (buffer-list))
976 (load-user-init-file (user-login-name)))
977 ]
978 "Help"))
979 (t nil))) 948 (t nil)))
980 949
981 (add-hook 'before-init-hook 'maybe-add-init-button) 950 (add-hook 'before-init-hook 'maybe-add-init-button)
982 951
983 952