Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
25b048ee
Commit
25b048ee
authored
Jun 29, 1995
by
Richard M. Stallman
Browse files
Make more menu-enables check (not buffer-read-only).
Add minibuffer local menu bar menus.
parent
6ac403a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
7 deletions
+50
-7
lisp/menu-bar.el
lisp/menu-bar.el
+50
-7
No files found.
lisp/menu-bar.el
View file @
25b048ee
...
...
@@ -235,17 +235,20 @@
(
message
"Select a region with the mouse does `copy' automatically"
)
(
kill-ring-save
beg
end
)))
(
put
'fill-region
'menu-enable
'mark-active
)
(
put
'kill-region
'menu-enable
'mark-active
)
(
put
'fill-region
'menu-enable
'
(
and
mark-active
(
not
buffer-read-only
))
)
(
put
'kill-region
'menu-enable
'
(
and
mark-active
(
not
buffer-read-only
))
)
(
put
'menu-bar-kill-ring-save
'menu-enable
'mark-active
)
(
put
'yank
'menu-enable
'
(
x-selection-exists-p
))
(
put
'yank-menu
'menu-enable
'
(
cdr
yank-menu
))
(
put
'yank
'menu-enable
'
(
and
(
x-selection-exists-p
)
(
not
buffer-read-only
))
)
(
put
'yank-menu
'menu-enable
'
(
and
(
cdr
yank-menu
)
(
not
buffer-read-only
))
)
(
put
'delete-region
'menu-enable
'
(
and
mark-active
(
not
buffer-read-only
)
(
not
(
mouse-region-match
))))
(
put
'undo
'menu-enable
'
(
if
(
eq
last-command
'undo
)
pending-undo-list
(
consp
buffer-undo-list
)))
(
put
'undo
'menu-enable
'
(
and
(
not
buffer-read-only
)
(
if
(
eq
last-command
'undo
)
pending-undo-list
(
consp
buffer-undo-list
))))
(
put
'query-replace
'menu-enable
'
(
not
buffer-read-only
))
(
put
'query-replace-regexp
'menu-enable
'
(
not
buffer-read-only
))
(
autoload
'ispell-menu-map
"ispell"
nil
t
'keymap
)
...
...
@@ -590,6 +593,46 @@ A large number or nil slows down menu responsiveness.")
;;; mode-name
;;; (or (buffer-file-name) ""))))))
;;; Set up a menu bar menu for the minibuffer.
(
mapcar
(
function
(
lambda
(
map
)
(
define-key
map
[menu-bar
minibuf]
(
cons
"Minibuf"
(
make-sparse-keymap
"Minibuf"
)))))
(
list
minibuffer-local-ns-map
minibuffer-local-must-match-map
minibuffer-local-isearch-map
minibuffer-local-map
minibuffer-local-completion-map
))
(
mapcar
(
function
(
lambda
(
map
)
(
define-key
map
[menu-bar
minibuf
?\?]
'
(
"List Completions"
.
minibuffer-completion-help
))
(
define-key
map
[menu-bar
minibuf
space]
'
(
"Complete Word"
.
minibuffer-complete-word
))
(
define-key
map
[menu-bar
minibuf
tab]
'
(
"Complete"
.
'minibuffer-complete
))
))
(
list
minibuffer-local-must-match-map
minibuffer-local-completion-map
))
(
mapcar
(
function
(
lambda
(
map
)
(
define-key
map
[menu-bar
minibuf
quit]
'
(
"Quit"
.
keyboard-escape-quit
))
(
define-key
map
[menu-bar
minibuf
return]
'
(
"Enter"
.
exit-minibuffer
))
))
(
list
minibuffer-local-ns-map
minibuffer-local-must-match-map
minibuffer-local-isearch-map
minibuffer-local-map
minibuffer-local-completion-map
))
(
defvar
menu-bar-mode
nil
)
(
defun
menu-bar-mode
(
flag
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment