X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/249635f0dfb22bcae4c7134e95f01640a6a0d149..07efa3f0ba196c1eea130032c765d5d1a62fa627:/lisp/menu-bar.el?ds=sidebyside diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 35f996c575..12fb192c35 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -470,17 +470,14 @@ [paste-from-menu]) ;; ns-win.el said: Change text to be more consistent with ;; surrounding menu items `paste', etc." - `(menu-item ,(if (featurep 'ns) "Select and Paste" - "Paste from Kill Menu") yank-menu + `(menu-item ,(if (featurep 'ns) "Select and Paste" "Paste from Kill Menu") + yank-menu :enable (and (cdr yank-menu) (not buffer-read-only)) :help "Choose a string from the kill ring and paste it")) (bindings--define-key menu [paste] '(menu-item "Paste" yank :enable (and (or - ;; Emacs compiled --without-x (or --with-ns) - ;; doesn't have x-selection-exists-p. - (and (fboundp 'x-selection-exists-p) - (x-selection-exists-p 'CLIPBOARD)) + (gui-call gui-selection-exists-p 'CLIPBOARD) (if (featurep 'ns) ; like paste-from-menu (cdr yank-menu) kill-ring)) @@ -537,9 +534,8 @@ '(and mark-active (not buffer-read-only))) (put 'clipboard-kill-ring-save 'menu-enable 'mark-active) (put 'clipboard-yank 'menu-enable - '(and (or (not (fboundp 'x-selection-exists-p)) - (x-selection-exists-p) - (x-selection-exists-p 'CLIPBOARD)) + '(and (or (gui-call gui-selection-exists-p 'PRIMARY) + (gui-call gui-selection-exists-p 'CLIPBOARD)) (not buffer-read-only))) (defun clipboard-yank () @@ -1330,9 +1326,6 @@ mail status in mode line")) (bindings--define-key menu [life] '(menu-item "Life" life :help "Watch how John Conway's cellular automaton evolves")) - (bindings--define-key menu [land] - '(menu-item "Landmark" landmark - :help "Watch a neural-network robot learn landmarks")) (bindings--define-key menu [hanoi] '(menu-item "Towers of Hanoi" hanoi :help "Watch Towers-of-Hanoi puzzle solved by Emacs")) @@ -2310,7 +2303,8 @@ If FRAME is nil or not given, use the selected frame." global-map (vector 'menu-bar menu)) (lookup-key-ignore-too-long (current-local-map) (vector 'menu-bar menu)) - (cdar (minor-mode-key-binding (vector 'menu-bar menu)))) + (cdar (minor-mode-key-binding (vector 'menu-bar menu))) + (mouse-menu-bar-map)) (posn-at-x-y x 0 nil t) nil t))) (t (with-selected-frame (or frame (selected-frame)) (tmm-menubar))))))