49
49
; ; It gets modified in place when menu-bar-update-buffers is called.
50
50
(defvar global-buffers-menu-map (make-sparse-keymap " Buffers" ))
51
51
52
+ (defvar menu-bar-print-menu
53
+ (let ((menu (make-sparse-keymap " Print" )))
54
+ (bindings--define-key menu [ps-print-region]
55
+ '(menu-item " PostScript Print Region (B+W)" ps-print-region
56
+ :enable mark-active
57
+ :help " Pretty-print marked region in black and white to PostScript printer" ))
58
+ (bindings--define-key menu [ps-print-buffer]
59
+ '(menu-item " PostScript Print Buffer (B+W)" ps-print-buffer
60
+ :enable (menu-bar-menu-frame-live-and-visible-p )
61
+ :help " Pretty-print current buffer in black and white to PostScript printer" ))
62
+ (bindings--define-key menu [ps-print-region-faces]
63
+ '(menu-item " PostScript Print Region"
64
+ ps-print-region-with-faces
65
+ :enable mark-active
66
+ :help " Pretty-print marked region to PostScript printer" ))
67
+ (bindings--define-key menu [ps-print-buffer-faces]
68
+ '(menu-item " PostScript Print Buffer"
69
+ ps-print-buffer-with-faces
70
+ :enable (menu-bar-menu-frame-live-and-visible-p )
71
+ :help " Pretty-print current buffer to PostScript printer" ))
72
+ (bindings--define-key menu [print-region]
73
+ '(menu-item " Print Region" print-region
74
+ :enable mark-active
75
+ :help " Print region between mark and current position" ))
76
+ (bindings--define-key menu [print-buffer]
77
+ '(menu-item " Print Buffer" print-buffer
78
+ :enable (menu-bar-menu-frame-live-and-visible-p )
79
+ :help " Print current buffer with page headings" ))
80
+ menu ))
81
+
52
82
; ; Only declared obsolete (and only made a proper alias) in 23.3.
53
83
(define-obsolete-variable-alias
54
84
'menu-bar-files-menu 'menu-bar-file-menu " 22.1" )
63
93
(bindings--define-key menu [separator-exit]
64
94
menu-bar-separator)
65
95
96
+ (bindings--define-key menu [print]
97
+ `(menu-item " Print" , menu-bar-print-menu ))
98
+
99
+ (bindings--define-key menu [separator-print]
100
+ menu-bar-separator)
101
+
102
+ (unless (featurep 'ns )
103
+ (bindings--define-key menu [close-tab]
104
+ '(menu-item " Close Tab" tab-close
105
+ :visible (fboundp 'tab-close )
106
+ :help " Close currently selected tab" ))
107
+ (bindings--define-key menu [make-tab]
108
+ '(menu-item " New Tab" tab-new
109
+ :visible (fboundp 'tab-new )
110
+ :help " Open a new tab" ))
111
+
112
+ (bindings--define-key menu [separator-tab]
113
+ menu-bar-separator))
114
+
66
115
; ; Don't use delete-frame as event name because that is a special
67
116
; ; event.
68
117
(bindings--define-key menu [delete-this-frame]
69
118
'(menu-item " Delete Frame" delete-frame
70
119
:visible (fboundp 'delete-frame )
71
120
:enable (delete-frame-enabled-p )
72
121
:help " Delete currently selected frame" ))
122
+ (bindings--define-key menu [make-frame-on-monitor]
123
+ '(menu-item " New Frame on Monitor..." make-frame-on-monitor
124
+ :visible (fboundp 'make-frame-on-monitor )
125
+ :help " Open a new frame on another monitor" ))
73
126
(bindings--define-key menu [make-frame-on-display]
74
127
'(menu-item " New Frame on Display..." make-frame-on-display
75
128
:visible (fboundp 'make-frame-on-display )
102
155
(bindings--define-key menu [separator-window]
103
156
menu-bar-separator)
104
157
105
- (bindings--define-key menu [ps-print-region]
106
- '(menu-item " PostScript Print Region (B+W)" ps-print-region
107
- :enable mark-active
108
- :help " Pretty-print marked region in black and white to PostScript printer" ))
109
- (bindings--define-key menu [ps-print-buffer]
110
- '(menu-item " PostScript Print Buffer (B+W)" ps-print-buffer
111
- :enable (menu-bar-menu-frame-live-and-visible-p )
112
- :help " Pretty-print current buffer in black and white to PostScript printer" ))
113
- (bindings--define-key menu [ps-print-region-faces]
114
- '(menu-item " PostScript Print Region"
115
- ps-print-region-with-faces
116
- :enable mark-active
117
- :help " Pretty-print marked region to PostScript printer" ))
118
- (bindings--define-key menu [ps-print-buffer-faces]
119
- '(menu-item " PostScript Print Buffer"
120
- ps-print-buffer-with-faces
121
- :enable (menu-bar-menu-frame-live-and-visible-p )
122
- :help " Pretty-print current buffer to PostScript printer" ))
123
- (bindings--define-key menu [print-region]
124
- '(menu-item " Print Region" print-region
125
- :enable mark-active
126
- :help " Print region between mark and current position" ))
127
- (bindings--define-key menu [print-buffer]
128
- '(menu-item " Print Buffer" print-buffer
129
- :enable (menu-bar-menu-frame-live-and-visible-p )
130
- :help " Print current buffer with page headings" ))
131
-
132
- (bindings--define-key menu [separator-print]
133
- menu-bar-separator)
134
-
135
158
(bindings--define-key menu [recover-session]
136
159
'(menu-item " Recover Crashed Session" recover-session
137
160
:enable
@@ -1228,6 +1251,12 @@ mail status in mode line"))
1228
1251
(frame-visible-p
1229
1252
(symbol-value 'speedbar-frame ))))))
1230
1253
1254
+ (bindings--define-key menu [showhide-tab-line-mode]
1255
+ '(menu-item " Window Tab Line" global-tab-line-mode
1256
+ :help " Turn window-local tab-lines on/off"
1257
+ :visible (fboundp 'global-tab-line-mode )
1258
+ :button (:toggle . global-tab-line-mode)))
1259
+
1231
1260
(bindings--define-key menu [showhide-window-divider]
1232
1261
`(menu-item " Window Divider" , menu-bar-showhide-window-divider-menu
1233
1262
:visible (memq (window-system ) '(x w32))))
@@ -1254,13 +1283,14 @@ mail status in mode line"))
1254
1283
(frame-parameter (menu-bar-frame-for-menubar )
1255
1284
'menu-bar-lines )))))
1256
1285
1257
- (bindings--define-key menu [showhide-tab-bar]
1258
- '(menu-item " Tab Bar" toggle-tab-bar-mode-from-frame
1259
- :help " Turn tab bar on/off"
1260
- :button
1261
- (:toggle . (menu-bar-positive-p
1262
- (frame-parameter (menu-bar-frame-for-menubar )
1263
- 'tab-bar-lines )))))
1286
+ (unless (featurep 'ns )
1287
+ (bindings--define-key menu [showhide-tab-bar]
1288
+ '(menu-item " Tab Bar" toggle-tab-bar-mode-from-frame
1289
+ :help " Turn tab bar on/off"
1290
+ :button
1291
+ (:toggle . (menu-bar-positive-p
1292
+ (frame-parameter (menu-bar-frame-for-menubar )
1293
+ 'tab-bar-lines ))))))
1264
1294
1265
1295
(if (and (boundp 'menu-bar-showhide-tool-bar-menu )
1266
1296
(keymapp menu-bar-showhide-tool-bar-menu))
@@ -1720,6 +1750,9 @@ mail status in mode line"))
1720
1750
(bindings--define-key menu [compile]
1721
1751
'(menu-item " Compile..." compile
1722
1752
:help " Invoke compiler or Make, view compilation errors" ))
1753
+ (bindings--define-key menu [rgrep]
1754
+ '(menu-item " Recursive Grep..." rgrep
1755
+ :help " Interactively ask for parameters and search recursively" ))
1723
1756
(bindings--define-key menu [grep]
1724
1757
'(menu-item " Search Files (Grep)..." grep
1725
1758
:help " Search files for strings or regexps (with Grep)" ))
0 commit comments