comparison lisp/x-menubar.el @ 217:d44af0c54775 r20-4b7

Import from CVS: tag r20-4b7
author cvs
date Mon, 13 Aug 2007 10:08:34 +0200
parents 78f53ef88e17
children 262b8bb4a523
comparison
equal deleted inserted replaced
216:43306a74e31c 217:d44af0c54775
86 "----" 86 "----"
87 ["Search (Regexp)..." isearch-forward-regexp t] 87 ["Search (Regexp)..." isearch-forward-regexp t]
88 ["Search Backward (Regexp)..." isearch-backward-regexp t] 88 ["Search Backward (Regexp)..." isearch-backward-regexp t]
89 ["Replace (Regexp)..." query-replace-regexp t] 89 ["Replace (Regexp)..." query-replace-regexp t]
90 "----" 90 "----"
91 ("Bookmarks"
92 ("Jump to bookmark"
93 :filter bookmark-menu-filter)
94 ["Set bookmark" bookmark-set t]
95 "---"
96 ["Insert contents" bookmark-menu-insert t]
97 ["Insert location" bookmark-menu-locate t]
98 "---"
99 ["Rename bookmark" bookmark-menu-rename t]
100 ("Delete bookmark"
101 :filter bookmark-delete-filter)
102 ["Edit Bookmark List" bookmark-bmenu-list t]
103 "---"
104 ["Save bookmarks" bookmark-save t]
105 ["Save bookmarks as..." bookmark-write t]
106 ["Load a bookmark file" bookmark-load t])
107 "----"
108 ["Goto Line..." goto-line t] 91 ["Goto Line..." goto-line t]
109 ["What Line" what-line t] 92 ["What Line" what-line t]
93 ("Bookmarks":filter bookmark-menu-filter)
110 "----" 94 "----"
111 ["Start Macro Recording" start-kbd-macro (not defining-kbd-macro)] 95 ["Start Macro Recording" start-kbd-macro (not defining-kbd-macro)]
112 ["End Macro Recording" end-kbd-macro defining-kbd-macro] 96 ["End Macro Recording" end-kbd-macro defining-kbd-macro]
113 ["Execute Last Macro" call-last-kbd-macro last-kbd-macro] 97 ["Execute Last Macro" call-last-kbd-macro last-kbd-macro]
114 "----" 98 "----"
278 ["B5" 262 ["B5"
279 (setq ps-paper-type 'b5) 263 (setq ps-paper-type 'b5)
280 :style radio 264 :style radio
281 :selected (eq ps-paper-type 'b5)] 265 :selected (eq ps-paper-type 'b5)]
282 ) 266 )
283 ["Enable Color Printing" 267 ["Color Printing"
284 (progn 268 (when (boundp 'ps-print-color-p)
285 (set-face-background 'default "white") 269 (if ps-print-color-p
286 (setq ps-print-color-p t)) 270 (progn
287 t] 271 (setq ps-print-color-p nil)
272 (when (and (boundp 'original-face-background)
273 original-face-background)
274 (set-face-background 'default original-face-background)))
275 (setq original-face-background (face-background-instance 'default))
276 (set-face-background 'default "white")
277 (setq ps-print-color-p t)))
278 :style toggle :selected (and (boundp 'ps-print-color-p)
279 ps-print-color-p)]
288 ) 280 )
289 ("\"Other Window\" Location" 281 ("\"Other Window\" Location"
290 ["Always in Same Frame" 282 ["Always in Same Frame"
291 (setq get-frame-for-buffer-default-instance-limit nil) 283 (setq get-frame-for-buffer-default-instance-limit nil)
292 :style radio 284 :style radio
845 result)) 837 result))
846 838
847 839
848 ;;; The Bookmarks menu 840 ;;; The Bookmarks menu
849 841
850 (defun bookmark-menu-filter (menu-items) 842 (defun bookmark-menu-filter (&rest ignore)
851 "*Build the bookmark jump submenu dynamically from all defined bookmarks." 843 (let ((definedp (and (boundp 'bookmark-alist)
852 (if (bookmark-all-names) 844 bookmark-alist
853 (mapcar 845 t)))
854 #'(lambda (bmk) 846 `(,(if definedp
855 (vector bmk `(bookmark-jump ',bmk) t)) (bookmark-all-names)) 847 '("Jump to Bookmark"
856 '(["No Bookmarks Set" nil nil]))) 848 :filter (lambda (&rest junk)
857 849 (mapcar #'(lambda (bmk)
858 (defun bookmark-delete-filter (menu-items) 850 `[,bmk (bookmark-jump ',bmk) t])
859 "*Build the bookmark delete submenu dynamically from all defined bookmarks." 851 (bookmark-all-names))))
860 (if (bookmark-all-names) 852 ["Jump to Bookmark" nil nil])
861 (mapcar 853 ["Set bookmark" bookmark-set t]
862 #'(lambda (bmk) 854 "---"
863 (vector bmk `(bookmark-delete ',bmk) t)) (bookmark-all-names)) 855 ["Insert contents" bookmark-menu-insert t]
864 '(["No Bookmarks Set" nil nil]))) 856 ["Insert location" bookmark-menu-locate t]
857 "---"
858 ["Rename bookmark" bookmark-menu-rename t]
859 ,(if definedp
860 '("Delete Bookmark"
861 :filter (lambda (&rest junk)
862 (mapcar #'(lambda (bmk)
863 `[,bmk (bookmark-delete ',bmk) t])
864 (bookmark-all-names))))
865 ["Delete Bookmark" nil nil])
866 ["Edit Bookmark List" bookmark-bmenu-list ,definedp]
867 "---"
868 ["Save bookmarks" bookmark-save ,definedp]
869 ["Save bookmarks as..." bookmark-write ,definedp]
870 ["Load a bookmark file" bookmark-load t])))
865 871
866 ;;; The Buffers menu 872 ;;; The Buffers menu
867 873
868 (defgroup buffers-menu nil 874 (defgroup buffers-menu nil
869 "Customization of `Buffers' menu." 875 "Customization of `Buffers' menu."