summaryrefslogtreecommitdiff
path: root/lisp/menu-bar.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/menu-bar.el')
-rw-r--r--lisp/menu-bar.el35
1 files changed, 18 insertions, 17 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 2fdfcc8b582..8def1575b24 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -79,9 +79,6 @@
:help "Print current buffer with page headings"))
menu))
-;; Only declared obsolete (and only made a proper alias) in 23.3.
-(define-obsolete-variable-alias
- 'menu-bar-files-menu 'menu-bar-file-menu "22.1")
(defvar menu-bar-file-menu
(let ((menu (make-sparse-keymap "File")))
@@ -459,9 +456,6 @@
(defvar menu-bar-edit-menu
(let ((menu (make-sparse-keymap "Edit")))
- (bindings--define-key menu [props]
- '(menu-item "Text Properties" facemenu-menu))
-
;; ns-win.el said: Add spell for platform consistency.
(if (featurep 'ns)
(bindings--define-key menu [spell]
@@ -495,7 +489,7 @@
'(menu-item "Select All" mark-whole-buffer
:help "Mark the whole buffer for a subsequent cut/copy"))
(bindings--define-key menu [clear]
- '(menu-item "Clear" delete-region
+ '(menu-item "Clear" delete-active-region
:enable (and mark-active
(not buffer-read-only))
:help
@@ -576,7 +570,9 @@
(defun clipboard-yank ()
"Insert the clipboard contents, or the last stretch of killed text."
(interactive "*")
- (let ((select-enable-clipboard t))
+ (let ((select-enable-clipboard t)
+ ;; Ensure that we defeat the DWIM login in `gui-selection-value'.
+ (gui--last-selected-text-clipboard nil))
(yank)))
(defun clipboard-kill-ring-save (beg end &optional region)
@@ -604,7 +600,7 @@ Do the same for the keys of the same name."
(define-key global-map [f20] 'clipboard-kill-region)
(define-key global-map [f16] 'clipboard-kill-ring-save)
(define-key global-map [f18] 'clipboard-yank)
- ;; X11R6 versions:
+ ;; X11 versions:
(define-key global-map [cut] 'clipboard-kill-region)
(define-key global-map [copy] 'clipboard-kill-ring-save)
(define-key global-map [paste] 'clipboard-yank))
@@ -636,9 +632,9 @@ Do the same for the keys of the same name."
:help "Customize value of specific option"))
(bindings--define-key menu [separator-2]
menu-bar-separator)
- (bindings--define-key menu [customize-changed-options]
- '(menu-item "New Options..." customize-changed-options
- :help "Options added or changed in recent Emacs versions"))
+ (bindings--define-key menu [customize-changed]
+ '(menu-item "New Options..." customize-changed
+ :help "Options and faces added or changed in recent Emacs versions"))
(bindings--define-key menu [customize-saved]
'(menu-item "Saved Options" customize-saved
:help "Customize previously saved options"))
@@ -1882,6 +1878,9 @@ they ran"))
(bindings--define-key menu [describe-function]
'(menu-item "Describe Function..." describe-function
:help "Display documentation of function/command"))
+ (bindings--define-key menu [describe-command]
+ '(menu-item "Describe Command..." describe-command
+ :help "Display documentation of command"))
(bindings--define-key menu [shortdoc-display-group]
'(menu-item "Function Group Overview..." shortdoc-display-group
:help "Display a function overview for a specific topic"))
@@ -2244,6 +2243,7 @@ Buffers menu is regenerated."
"String to display in buffer listings for buffers not visiting a file.")
(defun menu-bar-select-buffer ()
+ (declare (obsolete nil "28.1"))
(interactive)
(switch-to-buffer last-command-event))
@@ -2291,9 +2291,10 @@ It must accept a buffer as its only required argument.")
(setq i (1- i))
(aset buffers-vec i
(cons (car pair)
- `(lambda ()
- (interactive)
- (funcall menu-bar-select-buffer-function ,(cdr pair))))))
+ (let ((buf (cdr pair)))
+ (lambda ()
+ (interactive)
+ (funcall menu-bar-select-buffer-function buf))))))
buffers-vec))
(defun menu-bar-update-buffers (&optional force)
@@ -2348,8 +2349,8 @@ It must accept a buffer as its only required argument.")
(aset frames-vec i
(cons
(frame-parameter frame 'name)
- `(lambda ()
- (interactive) (menu-bar-select-frame ,frame))))
+ (lambda ()
+ (interactive) (menu-bar-select-frame frame))))
(setq i (1+ i)))
;; Put it after the normal buffers
(setq buffers-menu