aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2021-10-16 00:07:03 -0400
committerStefan Monnier2021-10-16 00:07:03 -0400
commite4b99f24f8e8e63cf3d3c1da47d5dc1e6dda61bb (patch)
tree880140daca6cd076fe795e80aef646562cfd6675
parentca3d7234d39fd55e6cd4521e5e583aba12434402 (diff)
downloademacs-e4b99f24f8e8e63cf3d3c1da47d5dc1e6dda61bb.tar.gz
emacs-e4b99f24f8e8e63cf3d3c1da47d5dc1e6dda61bb.zip
* lisp/menu-bar.el (menu-bar-edit-menu): Expose lambdas to the compiler
-rw-r--r--lisp/menu-bar.el34
1 files changed, 17 insertions, 17 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 1c3b8014e96..6dd1896a29e 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -515,10 +515,10 @@
515 kill-ring)) 515 kill-ring))
516 (not buffer-read-only)))) 516 (not buffer-read-only))))
517 :help "Paste (yank) text most recently cut/copied" 517 :help "Paste (yank) text most recently cut/copied"
518 :keys (lambda () 518 :keys ,(lambda ()
519 (if cua-mode 519 (if cua-mode
520 "\\[cua-paste]" 520 "\\[cua-paste]"
521 "\\[yank]")))) 521 "\\[yank]"))))
522 (bindings--define-key menu [copy] 522 (bindings--define-key menu [copy]
523 ;; ns-win.el said: Substitute a Copy function that works better 523 ;; ns-win.el said: Substitute a Copy function that works better
524 ;; under X (for GNUstep). 524 ;; under X (for GNUstep).
@@ -527,23 +527,23 @@
527 'kill-ring-save) 527 'kill-ring-save)
528 :enable mark-active 528 :enable mark-active
529 :help "Copy text in region between mark and current position" 529 :help "Copy text in region between mark and current position"
530 :keys (lambda () 530 :keys ,(lambda ()
531 (cond 531 (cond
532 ((featurep 'ns) 532 ((featurep 'ns)
533 "\\[ns-copy-including-secondary]") 533 "\\[ns-copy-including-secondary]")
534 ((and cua-mode mark-active) 534 ((and cua-mode mark-active)
535 "\\[cua-copy-handler]") 535 "\\[cua-copy-handler]")
536 (t 536 (t
537 "\\[kill-ring-save]"))))) 537 "\\[kill-ring-save]")))))
538 (bindings--define-key menu [cut] 538 (bindings--define-key menu [cut]
539 '(menu-item "Cut" kill-region 539 `(menu-item "Cut" kill-region
540 :enable (and mark-active (not buffer-read-only)) 540 :enable (and mark-active (not buffer-read-only))
541 :help 541 :help
542 "Cut (kill) text in region between mark and current position" 542 "Cut (kill) text in region between mark and current position"
543 :keys (lambda () 543 :keys ,(lambda ()
544 (if (and cua-mode mark-active) 544 (if (and cua-mode mark-active)
545 "\\[cua-cut-handler]" 545 "\\[cua-cut-handler]"
546 "\\[kill-region]")))) 546 "\\[kill-region]"))))
547 ;; ns-win.el said: Separate undo from cut/paste section. 547 ;; ns-win.el said: Separate undo from cut/paste section.
548 (if (featurep 'ns) 548 (if (featurep 'ns)
549 (bindings--define-key menu [separator-undo] menu-bar-separator)) 549 (bindings--define-key menu [separator-undo] menu-bar-separator))