From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#13841: 24.3.50; Regression - unreadable `C-h k' help Date: Wed, 09 Oct 2019 12:57:32 +0200 Message-ID: <878spu190j.fsf@web.de> References: <98E304F5436E487A91B33E89A04A5851@us.oracle.com> <87sirr1l0d.fsf@building.gnus.org> <87h9el2wcj.fsf@gnus.org> <87inyze2tq.fsf@web.de> <4e02c2a0-6e68-4091-a64d-131bcfc2fc49@default> <83wpnfnlf1.fsf@gnu.org> <87vb2x3n0q.fsf@web.de> <837ffdolve.fsf@gnu.org> <8737q1reua.fsf@gnus.org> <83wpndn5rp.fsf@gnu.org> <87tv8ivbqm.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="40006"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 20157@debbugs.gnu.org, 13841@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 09 19:22:24 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iIFfL-000ADk-UB for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Oct 2019 19:22:24 +0200 Original-Received: from localhost ([::1]:52988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIFfJ-0003Ex-7u for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Oct 2019 13:22:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59316) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iI9fP-00054g-Qj for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2019 06:58:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iI9fO-0001PD-Uf for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2019 06:58:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43394) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iI9fO-0001P9-Pa for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2019 06:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iI9fO-000651-Nz for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2019 06:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Oct 2019 10:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13841 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 13841-submit@debbugs.gnu.org id=B13841.157061867123332 (code B ref 13841); Wed, 09 Oct 2019 10:58:02 +0000 Original-Received: (at 13841) by debbugs.gnu.org; 9 Oct 2019 10:57:51 +0000 Original-Received: from localhost ([127.0.0.1]:52213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iI9fD-00064B-2o for submit@debbugs.gnu.org; Wed, 09 Oct 2019 06:57:51 -0400 Original-Received: from mout.web.de ([212.227.15.4]:33433) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iI9f9-00063s-OB; Wed, 09 Oct 2019 06:57:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1570618650; bh=kouyZ0HXochXg++2uEXrBImZZ0coaImQqmhZAfc3xT8=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=LAFDlhj2i4kmimcnvxyUlzYep6gaTm2LBalfLpFfgMdcMk+CzL6RPtRB6zOiGw88d aUbi/ykxK4v4anEQ34gOI76xuxquNlXq/MRE7GPmV6TJ8RNkHHFuCWXg4bUGEbQf/z YKcMHBnq2daSGcezFFm3I+Pc6L7xRVeIlDQsNEDc= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([92.208.91.33]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MLP5m-1iIhtA0NZi-000YcK; Wed, 09 Oct 2019 12:57:30 +0200 In-Reply-To: <87tv8ivbqm.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 09 Oct 2019 05:28:17 +0200") X-Provags-ID: V03:K1:cK1rdOLtqPkveEGMuWXPljJdTYZvnSxymZ7arXk6R1QZYOq/XkA kiKUVtvErEhfqVHSoqFLul/G+kNAdtW5ELQS9mB4na2IxDQR+BUEG76gbX5iwxhutHOU3HP zG5OLR01q05nhd1S5qF9I2q6sKawxIYMmfERCBw/lbpLHvbrwwlceXMa0VcFgkaZAC+gzHY IvoW94ZZ8NjKRKxRi1ldw== X-UI-Out-Filterresults: notjunk:1;V03:K0:V2AULLRlwmg=:2s1dfWYbxMOLVX58DqJGs4 V+tlh8P5CZsA2wsohC6rwrHlU1m75Wb5qm80Z65FQPA/0HDBYJsEPMakSM7Ujbwlpc3cyio0d yMFYrH9gnOlWg46F1UFqMZgzKwInzFd0zHrnMcl37Ptn8emwoCtmVLL+as1j35DN6Udf4C3iR w5nXhiXl3cjigeQx0InvmtwWVbycaGlv9BxVg6FLQnoNjqNDpQK+oNsV9FazcCWdcB1aqPgiV WagHpShGdJPbDEZc90i8aXU4rVXlXCadK9ENK6PVArMK6owf+UzRQB4OlbQSS46s25+huZDDG MSLAfTEqXCO0jvAUTiWlxsUTMLaXnzcoNi0+1tWGDpdUoFhsJPu3rnTpha5ri2wDw2Meiz8R4 UQ6duQbTWZWsLtJBPtGDLViGHap21QslPAGhZcOGrZmevbcX3fFVvGMhWiSX7eqIrbhWyxQRs VCZTn/QPpYU/VAKxzllBTYCUzMC4h0AcVFfdzIkR2VZpuAAOqQ3MvO1J4HeACluTg1LUrGVpf KujhNb2Ye+4G8pxrb8Wo1VWSTvSoNHsDB4hETXMUYv9jQT2/1esRpiazsUGRE3VYkSXAqkGrZ OLwY+iZ/okvO+lsOE4PW8jDA8KYCJzAc4jswxH22D1d87/tQsugMp2zKS9D8R9o0DERYXJMJs NlYfZgCebKXmZQ87ipYFrIND1Aa36r1pmz8C8W0rdfhU2z21oXELEQux2ABLs8nm8IBfiSTEj 3tSh4RUeJl7ZB/MjNKoch95tuqdUEyy8UOdT3+OdPjLVjoyWgG0OoZMHM4yjTVc05RxBtH5R X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:168727 Archived-At: --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > I have now fixed this in menu-bar.el for the original reported case (and > the ones in nearby menus). There may be more lurking other places, but > we can fix those if somebody reports them, I guess. Thanks. I don't recall: did we want to fix only compiled lambdas, or any anonymous functions (including quoted lambdas)? Attached a quick rough search for candidates (search for "-->") - is any of them problematic? Regards, Michael. --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=menu-bar-lambdas.el Content-Transfer-Encoding: quoted-printable ;;; * Wed Oct 9 12:27:17 2019 -*- mode: el-search-occur -*- ;;; ** Search the Emacs Elisp sources for: (l 'menu-item _ (contains 'lambda)) ;;; ** 32 matches in 12 files: ;;; *** /home/micha/software/emacs/lisp/abbrev.el (1 match) ;;;; Line 1021 (defun abbrev-table-menu (table &optional prompt sortfun) "Return a menu that shows all abbrevs in TABLE. Selecting an entry runs `abbrev-insert'. PROMPT is the prompt to use for the keymap. SORTFUN is passed to `sort' to change the default ordering." (unless sortfun (setq sortfun 'string-lessp)) (let ((entries ())) (obarray-map (lambda (abbrev) (when (symbol-value abbrev) (let ((name (symbol-name abbrev))) (push `--> (,(intern name) menu-item ,name (lambda () (interactive) (abbrev-insert ',abbrev))) <-- entries)))) table) (nconc (make-sparse-keymap prompt) (sort entries (lambda (x y) (funcall sortfun (nth 2 x) (nth 2 y))))))) ;;; *** /home/micha/software/emacs/lisp/info.el (1 match) ;;;; Line 4156 (defun Info-history-menu (e name history command) (let* ((i (length history)) (map (make-sparse-keymap name))) (mapc (lambda (history) (let ((file (nth 0 history)) (node (nth 1 history))) (when (stringp file) (setq file (file-name-sans-extension (file-name-nondirectory file)))) (define-key map (vector (intern (format "history-%i" i))) `--> (menu-item ,(format "(%s) %s" file node) (lambda () (interactive) (dotimes (_ ,i) (call-interactively ',command= )))) <--)) (setq i (1- i))) (reverse history)) (let* ((selection (x-popup-menu e map)) (binding (and selection (lookup-key map (vector (car selection))= )))) (if binding (call-interactively binding))))) ;;; *** /home/micha/software/emacs/lisp/ldefs-boot.el (4 matches) ;;;; Line 18479 (defconst ispell-menu-map (let ((map (make-sparse-keymap "Spell"))) (define= -key map [ispell-change-dictionary] `(menu-item ,(purecopy "Change Dictiona= ry...") ispell-change-dictionary :help ,(purecopy "Supply explicit dictiona= ry file name"))) (define-key map [ispell-kill-ispell] `--> (menu-item ,(pur= ecopy "Kill Process") (lambda nil (interactive) (ispell-kill-ispell nil 'cl= ear)) :enable (and (boundp 'ispell-process) ispell-process (eq (ispell-proc= ess-status) 'run)) :help ,(purecopy "Terminate Ispell subprocess")) <--) (d= efine-key map [ispell-pdict-save] `--> (menu-item ,(purecopy "Save Dictiona= ry") (lambda nil (interactive) (ispell-pdict-save t t)) :help ,(purecopy "S= ave personal dictionary")) <--) (define-key map [ispell-customize] `--> (me= nu-item ,(purecopy "Customize...") (lambda nil (interactive) (customize-gro= up 'ispell)) :help ,(purecopy "Customize spell checking options")) <--) (de= fine-key map [ispell-help] `--> (menu-item ,(purecopy "Help") (lambda nil (= interactive) (describe-function 'ispell-help)) :help ,(purecopy "Show stand= ard Ispell keybindings and commands")) <--) (define-key map [flyspell-mode]= `(menu-item ,(purecopy "Automatic spell checking (Flyspell)") flyspell-mod= e :help ,(purecopy "Check spelling while you edit the text") :button (:togg= le bound-and-true-p flyspell-mode))) (define-key map [ispell-complete-word]= `(menu-item ,(purecopy "Complete Word") ispell-complete-word :help ,(purec= opy "Complete word at cursor using dictionary"))) (define-key map [ispell-c= omplete-word-interior-frag] `(menu-item ,(purecopy "Complete Word Fragment"= ) ispell-complete-word-interior-frag :help ,(purecopy "Complete word fragme= nt at cursor"))) (define-key map [ispell-continue] `(menu-item ,(purecopy "= Continue Spell-Checking") ispell-continue :enable (and (boundp 'ispell-regi= on-end) (marker-position ispell-region-end) (equal (marker-buffer ispell-re= gion-end) (current-buffer))) :help ,(purecopy "Continue spell checking last= region"))) (define-key map [ispell-word] `(menu-item ,(purecopy "Spell-Che= ck Word") ispell-word :help ,(purecopy "Spell-check word at cursor"))) (def= ine-key map [ispell-comments-and-strings] `(menu-item ,(purecopy "Spell-Che= ck Comments") ispell-comments-and-strings :help ,(purecopy "Spell-check onl= y comments and strings"))) (define-key map [ispell-region] `(menu-item ,(pu= recopy "Spell-Check Region") ispell-region :enable mark-active :help ,(pure= copy "Spell-check text in marked region"))) (define-key map [ispell-message= ] `(menu-item ,(purecopy "Spell-Check Message") ispell-message :visible (eq= major-mode 'mail-mode) :help ,(purecopy "Skip headers and included message= text"))) (define-key map [ispell-buffer] `(menu-item ,(purecopy "Spell-Che= ck Buffer") ispell-buffer :help ,(purecopy "Check spelling of selected buff= er"))) map) "\ Key map for ispell menu.") ;;; *** /home/micha/software/emacs/lisp/loaddefs.el (4 matches) ;;;; Line 18504 (defconst ispell-menu-map (let ((map (make-sparse-keymap "Spell"))) (define= -key map [ispell-change-dictionary] `(menu-item ,(purecopy "Change Dictiona= ry...") ispell-change-dictionary :help ,(purecopy "Supply explicit dictiona= ry file name"))) (define-key map [ispell-kill-ispell] `--> (menu-item ,(pur= ecopy "Kill Process") (lambda nil (interactive) (ispell-kill-ispell nil 'cl= ear)) :enable (and (boundp 'ispell-process) ispell-process (eq (ispell-proc= ess-status) 'run)) :help ,(purecopy "Terminate Ispell subprocess")) <--) (d= efine-key map [ispell-pdict-save] `--> (menu-item ,(purecopy "Save Dictiona= ry") (lambda nil (interactive) (ispell-pdict-save t t)) :help ,(purecopy "S= ave personal dictionary")) <--) (define-key map [ispell-customize] `--> (me= nu-item ,(purecopy "Customize...") (lambda nil (interactive) (customize-gro= up 'ispell)) :help ,(purecopy "Customize spell checking options")) <--) (de= fine-key map [ispell-help] `--> (menu-item ,(purecopy "Help") (lambda nil (= interactive) (describe-function 'ispell-help)) :help ,(purecopy "Show stand= ard Ispell keybindings and commands")) <--) (define-key map [flyspell-mode]= `(menu-item ,(purecopy "Automatic spell checking (Flyspell)") flyspell-mod= e :help ,(purecopy "Check spelling while you edit the text") :button (:togg= le bound-and-true-p flyspell-mode))) (define-key map [ispell-complete-word]= `(menu-item ,(purecopy "Complete Word") ispell-complete-word :help ,(purec= opy "Complete word at cursor using dictionary"))) (define-key map [ispell-c= omplete-word-interior-frag] `(menu-item ,(purecopy "Complete Word Fragment"= ) ispell-complete-word-interior-frag :help ,(purecopy "Complete word fragme= nt at cursor"))) (define-key map [ispell-continue] `(menu-item ,(purecopy "= Continue Spell-Checking") ispell-continue :enable (and (boundp 'ispell-regi= on-end) (marker-position ispell-region-end) (equal (marker-buffer ispell-re= gion-end) (current-buffer))) :help ,(purecopy "Continue spell checking last= region"))) (define-key map [ispell-word] `(menu-item ,(purecopy "Spell-Che= ck Word") ispell-word :help ,(purecopy "Spell-check word at cursor"))) (def= ine-key map [ispell-comments-and-strings] `(menu-item ,(purecopy "Spell-Che= ck Comments") ispell-comments-and-strings :help ,(purecopy "Spell-check onl= y comments and strings"))) (define-key map [ispell-region] `(menu-item ,(pu= recopy "Spell-Check Region") ispell-region :enable mark-active :help ,(pure= copy "Spell-check text in marked region"))) (define-key map [ispell-message= ] `(menu-item ,(purecopy "Spell-Check Message") ispell-message :visible (eq= major-mode 'mail-mode) :help ,(purecopy "Skip headers and included message= text"))) (define-key map [ispell-buffer] `(menu-item ,(purecopy "Spell-Che= ck Buffer") ispell-buffer :help ,(purecopy "Check spelling of selected buff= er"))) map) "\ Key map for ispell menu.") ;;; *** /home/micha/software/emacs/lisp/menu-bar.el (3 matches) ;;;; Line 1336 (defvar menu-bar-search-options-menu (let ((menu (make-sparse-keymap "Search Options"))) (dolist (x '((char-fold-to-regexp "Fold Characters" "Character folding") (isearch-symbol-regexp "Whole Symbols" "Whole symbol") (word-search-regexp "Whole Words" "Whole word"))) (bindings--define-key menu (vector (nth 0 x)) `--> (menu-item ,(nth 1 x) (lambda () (interactive) (setq search-default-mode #',(nth 0 x)) (message ,(format "%s search enabled" (nth 2 x)))) :help ,(format "Enable %s search" (downcase (nth 2 x))) :button (:radio . (eq search-default-mode #',(nth 0 x))= )) <--)) (bindings--define-key menu [regexp-search] '--> (menu-item "Regular Expression" (lambda () (interactive) (setq search-default-mode t) (message "Regular-expression search enabled")) :help "Enable regular-expression search" :button (:radio . (eq search-default-mode t))) <--) (bindings--define-key menu [regular-search] '--> (menu-item "Literal Search" (lambda () (interactive) (when search-default-mode (setq search-default-mode nil) (when (symbolp search-default-mode) (message "Literal search enabled")))) :help "Disable special search modes" :button (:radio . (not search-default-mode))) <--) (bindings--define-key menu [custom-separator] menu-bar-separator) (bindings--define-key menu [case-fold-search] (menu-bar-make-toggle toggle-case-fold-search case-fold-search "Ignore Case" "Case-Insensitive Search %s" "Ignore letter-case in search commands")) menu)) ;;; *** /home/micha/software/emacs/lisp/mouse.el (2 matches) ;;;; Line 157 (defun minor-mode-menu-from-indicator (indicator) "Show menu for minor mode specified by INDICATOR. Interactively, INDICATOR is read using completion. If there is no menu defined for the minor mode, then create one with items `Turn Off' and `Help'." (interactive (list (completing-read "Minor mode indicator: " (describe-minor-mode-completion-table-for-indicator)))) (let* ((minor-mode (lookup-minor-mode-from-indicator indicator)) (mm-fun (or (get minor-mode :minor-mode-function) minor-mode))) (unless minor-mode (error "Cannot find minor mode for `%s'" indicator)) (let* ((map (cdr-safe (assq minor-mode minor-mode-map-alist))) (menu (and (keymapp map) (lookup-key map [menu-bar])))) (setq menu (if menu (mouse-menu-non-singleton menu) (if (fboundp mm-fun) ; bug#20201 `(keymap ,(format "%s - %s" indicator (capitalize (replace-regexp-in-string "-" " " (format "%S" minor-mode)))) (turn-off menu-item "Turn off minor mode" ,mm-fun) --> (help menu-item "Help for minor mode" (lambda () (interactive) (describe-function ',mm-fun))) <--)))) (if menu (popup-menu menu) (message "No menu available"))))) ;;;; Line 389 (defun mouse-drag-line (start-event line) "Drag a mode line, header line, or vertical line with the mouse. START-EVENT is the starting mouse event of the drag action. LINE must be one of the symbols `header', `mode', or `vertical'." ;; Give temporary modes such as isearch a chance to turn off. (run-hooks 'mouse-leave-buffer-hook) (let* ((echo-keystrokes 0) (start (event-start start-event)) (window (posn-window start)) (frame (window-frame window)) ;; `position' records the x- or y-coordinate of the last ;; sampled position. (position (if (eq line 'vertical) (+ (window-pixel-left window) (car (posn-x-y start))) (+ (window-pixel-top window) (cdr (posn-x-y start))))) ;; `last-position' records the x- or y-coordinate of the ;; previously sampled position. The difference of `position' ;; and `last-position' determines the size change of WINDOW. (last-position position) (draggable t) posn-window growth dragged) ;; Decide on whether we are allowed to track at all and whose ;; window's edge we drag. (cond ((eq line 'header) ;; Drag bottom edge of window above the header line. (setq window (window-in-direction 'above window t))) ((eq line 'mode)) ((eq line 'vertical) (let ((divider-width (frame-right-divider-width frame))) (when (and (or (not (numberp divider-width)) (zerop divider-width)) (eq (frame-parameter frame 'vertical-scroll-bars) 'left)) (setq window (window-in-direction 'left window t)))))) (let* ((exitfun nil) (move (lambda (event) (interactive "e") (cond ((not (consp event)) nil) ((eq line 'vertical) ;; Drag right edge of `window'. (setq start (event-start event)) (setq position (car (posn-x-y start))) ;; Set `posn-window' to the window where `event' was recorded. ;; This can be `window' or the window on the left or right of ;; `window'. (when (window-live-p (setq posn-window (posn-window start))) ;; Add left edge of `posn-window' to `position'. (setq position (+ (window-pixel-left posn-window) position)) (unless (nth 1 start) ;; Add width of objects on the left of the text area to ;; `position'. (when (eq (window-current-scroll-bars posn-window) 'left) (setq position (+ (window-scroll-bar-width posn-window) position))) (setq position (+ (car (window-fringes posn-window)) (or (car (window-margins posn-window)) 0) position)))) ;; When the cursor overshoots after shrinking a window to its ;; minimum size and the dragging direction changes, have the ;; cursor first catch up with the window edge. (unless (or (zerop (setq growth (- position last-position))) (and (> growth 0) (< position (+ (window-pixel-left window) (window-pixel-width window)))) (and (< growth 0) (> position (+ (window-pixel-left window) (window-pixel-width window))))) (setq dragged t) (adjust-window-trailing-edge window growth t t)) (setq last-position position)) (draggable ;; Drag bottom edge of `window'. (setq start (event-start event)) ;; Set `posn-window' to the window where `event' was recorded. ;; This can be either `window' or the window above or below of ;; `window'. (setq posn-window (posn-window start)) (setq position (cdr (posn-x-y start))) (when (window-live-p posn-window) ;; Add top edge of `posn-window' to `position'. (setq position (+ (window-pixel-top posn-window) position)) ;; If necessary, add height of header line to `position' (when (memq (posn-area start) '(nil left-fringe right-fringe left-margin right-margin)) (setq position (+ (window-header-line-height posn-window) position)))) ;; When the cursor overshoots after shrinking a window to its ;; minimum size and the dragging direction changes, have the ;; cursor first catch up with the window edge. (unless (or (zerop (setq growth (- position last-position))) (and (> growth 0) (< position (+ (window-pixel-top window) (window-pixel-height window)))) (and (< growth 0) (> position (+ (window-pixel-top window) (window-pixel-height window))))) (setq dragged t) (adjust-window-trailing-edge window growth nil t)) (setq last-position position))))) (old-track-mouse track-mouse)) ;; Start tracking. The special value 'dragging' signals the ;; display engine to freeze the mouse pointer shape for as long ;; as we drag. (setq track-mouse 'dragging) ;; Loop reading events and sampling the position of the mouse. (setq exitfun (set-transient-map (let ((map (make-sparse-keymap))) (define-key map [switch-frame] #'ignore) (define-key map [select-window] #'ignore) (define-key map [scroll-bar-movement] #'ignore) (define-key map [mouse-movement] move) ;; Swallow drag-mouse-1 events to avoid selecting some other window. (define-key map [drag-mouse-1] (lambda () (interactive) (funcall exitfun))) ;; For vertical line dragging swallow also a mouse-1 ;; event (but only if we dragged at least once to allow mouse-1 ;; clicks to get through). (when (eq line 'vertical) (define-key map [mouse-1] `--> (menu-item "" ,(lambda () (interactive) (funcall exitfun)) :filter ,(lambda (cmd) (if dragged cmd))) <--)) ;; Some of the events will of course end up looked up ;; with a mode-line, header-line or vertical-line prefix ... (define-key map [mode-line] map) (define-key map [header-line] map) (define-key map [vertical-line] map) ;; ... and some maybe even with a right- or bottom-divider ;; prefix. (define-key map [right-divider] map) (define-key map [bottom-divider] map) map) t (lambda () (setq track-mouse old-track-mouse))))))) ;;; *** /home/micha/software/emacs/lisp/tab-bar.el (2 matches) ;;;; Line 299 (defun tab-bar-make-keymap-1 () "Generate an actual keymap from `tab-bar-map', without caching." (let* ((separator (or tab-bar-separator (if window-system " " "|"))) (i 0) (tabs (funcall tab-bar-tabs-function)) (current-tab-name (assq 'name (assq 'current-tab tabs)))) (when current-tab-name (setf (cdr current-tab-name) (funcall tab-bar-tab-name-function))) (append '(keymap (mouse-1 . tab-bar-handle-mouse)) (mapcan (lambda (tab) (setq i (1+ i)) (append `((,(intern (format "sep-%i" i)) menu-item ,separator ignore)) (cond ((eq (car tab) 'current-tab) `((current-tab menu-item ,(propertize (concat (if tab-bar-tab-hints (format "%d " i) "= ") (cdr (assq 'name tab)) (or (and tab-bar-close-button-show (not (eq tab-bar-close-button-s= how 'non-selected)) tab-bar-close-button) "")) 'face 'tab-bar-tab) ignore :help "Current tab"))) (t `(--> (,(intern (format "tab-%i" i)) menu-item ,(propertize (concat (if tab-bar-tab-hints (format "%d " i) "= ") (cdr (assq 'name tab)) (or (and tab-bar-close-button-show (not (eq tab-bar-close-button-s= how 'selected)) tab-bar-close-button) "")) 'face 'tab-bar-tab-inactive) ,(or (cdr (assq 'binding tab)) `(lambda () (interactive) (tab-bar-select-tab ,i))) :help "Click to visit tab") <--))) `(--> (,(if (eq (car tab) 'current-tab) 'C-current-tab (intern (fo= rmat "C-tab-%i" i))) menu-item "" ,(or (cdr (assq 'close-binding tab)) `(lambda () (interactive) (tab-bar-close-tab ,i)))) <--))) tabs) (when tab-bar-new-button `((sep-add-tab menu-item ,separator ignore) (add-tab menu-item ,tab-bar-new-button tab-bar-new-tab :help "New tab")))))) ;;; *** /home/micha/software/emacs/lisp/term.el (3 matches) ;;;; Line 4423 (defun serial-update-speed-menu () (setq serial-mode-line-speed-menu (make-sparse-keymap "Speed (b/s)")) (define-key serial-mode-line-speed-menu [serial-mode-line-speed-menu-othe= r] '--> (menu-item "Other..." (lambda (event) (interactive "e") (let ((speed (serial-read-speed))) (serial-process-configure :speed speed) (term-update-mode-line) (message "Speed set to %d b/s" speed)))) <--) (dolist (str (serial-nice-speed-history)) (let ((num (or (and (stringp str) (string-to-number str)) 0))) (define-key serial-mode-line-speed-menu (vector (make-symbol (format "serial-mode-line-speed-menu-%s" str))) `--> (menu-item ,str (lambda (event) (interactive "e") (serial-process-configure :speed ,num) (term-update-mode-line) (message "Speed set to %d b/s" ,num)) :button (:toggle . (=3D (serial-speed) ,num))) <--)))) ;;;; Line 4458 (defun serial-update-config-menu () (setq serial-mode-line-config-menu (make-sparse-keymap "Configuration")) (let ((config (process-contact (get-buffer-process (current-buffer)) t))) (dolist (y '((:flowcontrol hw "Hardware flowcontrol (RTS/CTS)") (:flowcontrol sw "Software flowcontrol (XON/XOFF)") (:flowcontrol nil "No flowcontrol") (:stopbits 2 "2 stopbits") (:stopbits 1 "1 stopbit") (:parity odd "Odd parity") (:parity even "Even parity") (:parity nil "No parity") (:bytesize 7 "7 bits per byte") (:bytesize 8 "8 bits per byte"))) (define-key serial-mode-line-config-menu (vector (make-symbol (format "%s-%s" (nth 0 y) (nth 1 y)))) `--> (menu-item ,(nth 2 y) (lambda (event) (interactive "e") (serial-process-configure ,(nth 0 y) ',(nth 1 y)) (term-update-mode-line) (message "%s" ,(nth 2 y))) ;; Use :toggle instead of :radio because a non-standard port ;; configuration may not match any menu items. :button (:toggle . ,(equal (plist-get config (nth 0 y)) (nth 1 y)))) <--)))) ;;; *** /home/micha/software/emacs/lisp/progmodes/compile.el (3 matches) ;;;; Line 1879 (defvar compilation-menu-map (let ((map (make-sparse-keymap "Errors")) (opt-map (make-sparse-keymap "Skip"))) (define-key map [stop-subjob] '(menu-item "Stop Compilation" kill-compilation :help "Kill the process made by the M-x compile or M-x grep commands")) (define-key map [compilation-mode-separator3] '("----" . nil)) (define-key map [compilation-next-error-follow-minor-mode] '(menu-item "Auto Error Display" next-error-follow-minor-mode :help "Display the error under cursor when moving the cursor" :button (:toggle . next-error-follow-minor-mode))) (define-key map [compilation-skip] (cons "Skip Less Important Messages" opt-map)) (define-key opt-map [compilation-skip-none] '--> (menu-item "Don't Skip Any Messages" (lambda () (interactive) (customize-set-variable 'compilation-skip-threshold 0)) :help "Do not skip any type of messages" :button (:radio . (eq compilation-skip-threshold 0))) <--) (define-key opt-map [compilation-skip-info] '--> (menu-item "Skip Info" (lambda () (interactive) (customize-set-variable 'compilation-skip-threshold 1)) :help "Skip anything less than warning" :button (:radio . (eq compilation-skip-threshold 1))) <--) (define-key opt-map [compilation-skip-warning-and-info] '--> (menu-item "Skip Warnings and Info" (lambda () (interactive) (customize-set-variable 'compilation-skip-threshold 2)) :help "Skip over Warnings and Info, stop for errors" :button (:radio . (eq compilation-skip-threshold 2))) <--) (define-key map [compilation-mode-separator2] '("----" . nil)) (define-key map [compilation-first-error] '(menu-item "First Error" first-error :help "Restart at the first error, visit corresponding source code")) (define-key map [compilation-previous-error] '(menu-item "Previous Error" previous-error :help "Visit previous `next-error' message and corresponding source cod= e")) (define-key map [compilation-next-error] '(menu-item "Next Error" next-error :help "Visit next `next-error' message and corresponding source code")) map)) ;;; *** /home/micha/software/emacs/lisp/progmodes/gdb-mi.el (4 matches) ;;;; Line 4491 (let ((menu (make-sparse-keymap "GDB-MI"))) (define-key menu [gdb-customize] '--> (menu-item "Customize" (lambda () (interactive) (customize-group '= gdb)) :help "Customize Gdb Graphical Mode options.") <--) (define-key menu [gdb-many-windows] '(menu-item "Display Other Windows" gdb-many-windows :help "Toggle display of locals, stack and breakpoint infor= mation" :button (:toggle . gdb-many-windows))) (define-key menu [gdb-restore-windows] '(menu-item "Restore Window Layout" gdb-restore-windows :help "Restore standard layout for debug session.")) (define-key menu [sep1] '(menu-item "--")) (define-key menu [all-threads] '--> (menu-item "GUD controls all threads" (lambda () (interactive) (setq gdb-gud-control-all-threads t)) :help "GUD start/stop commands apply to all threads" :button (:radio . gdb-gud-control-all-threads)) <--) (define-key menu [current-thread] '--> (menu-item "GUD controls current thread" (lambda () (interactive) (setq gdb-gud-control-all-threads nil)) :help "GUD start/stop commands apply to current thread only" :button (:radio . (not gdb-gud-control-all-threads))) <--) (define-key menu [sep2] '(menu-item "--")) (define-key menu [gdb-customize-reasons] '--> (menu-item "Customize switching..." (lambda () (interactive) (customize-option 'gdb-switch-reasons))) <--) (define-key menu [gdb-switch-when-another-stopped] (menu-bar-make-toggle gdb-toggle-switch-when-another-stopped gdb-switch-when-another-stopped "Automatically switch to stopped thread" "GDB thread switching %s" "Switch to stopped thread")) (define-key gud-menu-map [mi] `(menu-item "GDB-MI" ,menu :visible (eq gud-minor-mode 'gdbmi)))) ;;; *** /home/micha/software/emacs/lisp/textmodes/bibtex.el (1 match) ;;;; Line 3511 ;; Entry commands and menus for BibTeX dialects ;; We do not use `easy-menu-define' here because this gets confused ;; if we want to have multiple versions of the "same" menu. (let ((select-map (make-sparse-keymap))) ;; Submenu for selecting the dialect (dolist (dialect (reverse bibtex-dialect-list)) (define-key select-map (vector dialect) `--> (menu-item ,(symbol-name dialect) (lambda () (interactive) (bibtex-set-dialect ',dialect t)) :button (:radio . (eq bibtex-dialect ',dialect))) <--)) ;; We define a menu for each dialect. ;; Then we select the menu we want via the :visible keyword (dolist (dialect bibtex-dialect-list) (let ((entry-alist (bibtex-entry-alist dialect)) (menu-map (make-sparse-keymap))) (define-key menu-map [select] `(menu-item "BibTeX dialect" ,select-map)) (define-key menu-map [nil-2] '(menu-item "--")) (define-key menu-map [bibtex-preamble] '(menu-item "Preamble" bibtex-Preamble)) (define-key menu-map [bibtex-String] '(menu-item "String" bibtex-String)) (define-key menu-map [nil-1] '(menu-item "--")) (dolist (elt (reverse entry-alist)) ;; Entry commands (let* ((entry (car elt)) (fname (intern (format "bibtex-%s" entry)))) (unless (fboundp fname) (eval (list 'defun fname nil (format "Insert a template for a @%s entry; see als= o `bibtex-entry'." entry) '(interactive "*") `(bibtex-entry ,entry)))) ;; Menu entries (define-key menu-map (vector fname) `(menu-item ,(or (nth 1 elt) (car elt)) ,fname)))) (define-key bibtex-mode-map (vector 'menu-bar dialect) `(menu-item "Entry-Types" ,menu-map :visible (eq bibtex-dialect ',dialect)))))) ;;; *** /home/micha/software/emacs/lisp/textmodes/ispell.el (4 matches) ;;;; Line 1434 ;;;###autoload (defconst ispell-menu-map ;; Use `defconst' so as to redo the menu when loading ispell, like the ;; previous code did. ;; Define commands in menu in opposite order you want them to appear. (let ((map (make-sparse-keymap "Spell"))) (define-key map [ispell-change-dictionary] `(menu-item ,(purecopy "Change Dictionary...") ispell-change-dictiona= ry :help ,(purecopy "Supply explicit dictionary file name"))) (define-key map [ispell-kill-ispell] `--> (menu-item ,(purecopy "Kill Process") (lambda () (interactive) (ispell-kill-ispell nil 'clear)) :enable (and (boundp 'ispell-process) ispell-process (eq (ispell-process-status) 'run)) :help ,(purecopy "Terminate Ispell subprocess")) <--) (define-key map [ispell-pdict-save] `--> (menu-item ,(purecopy "Save Dictionary") (lambda () (interactive) (ispell-pdict-save t t)) :help ,(purecopy "Save personal dictionary")) <--) (define-key map [ispell-customize] `--> (menu-item ,(purecopy "Customize...") (lambda () (interactive) (customize-group 'ispell)) :help ,(purecopy "Customize spell checking options")) <--) (define-key map [ispell-help] ;; use (x-popup-menu last-nonmenu-event(list "" ispell-help-list)) ? `--> (menu-item ,(purecopy "Help") (lambda () (interactive) (describe-function 'ispell-help)) :help ,(purecopy "Show standard Ispell keybindings and commands")) <--) (define-key map [flyspell-mode] `(menu-item ,(purecopy "Automatic spell checking (Flyspell)") flyspell-mode :help ,(purecopy "Check spelling while you edit the text") :button (:toggle . (bound-and-true-p flyspell-mode)))) (define-key map [ispell-complete-word] `(menu-item ,(purecopy "Complete Word") ispell-complete-word :help ,(purecopy "Complete word at cursor using dictionary"))) (define-key map [ispell-complete-word-interior-frag] `(menu-item ,(purecopy "Complete Word Fragment") ispell-complete-word-interior-frag :help ,(purecopy "Complete word fragment at cursor"))) (define-key map [ispell-continue] `(menu-item ,(purecopy "Continue Spell-Checking") ispell-continue :enable (and (boundp 'ispell-region-end) (marker-position ispell-region-end) (equal (marker-buffer ispell-region-end) (current-buffer))) :help ,(purecopy "Continue spell checking last region"))) (define-key map [ispell-word] `(menu-item ,(purecopy "Spell-Check Word") ispell-word :help ,(purecopy "Spell-check word at cursor"))) (define-key map [ispell-comments-and-strings] `(menu-item ,(purecopy "Spell-Check Comments") ispell-comments-and-strings :help ,(purecopy "Spell-check only comments and strings"))) (define-key map [ispell-region] `(menu-item ,(purecopy "Spell-Check Region") ispell-region :enable mark-active :help ,(purecopy "Spell-check text in marked region"))) (define-key map [ispell-message] `(menu-item ,(purecopy "Spell-Check Message") ispell-message :visible (eq major-mode 'mail-mode) :help ,(purecopy "Skip headers and included message text"))) (define-key map [ispell-buffer] `(menu-item ,(purecopy "Spell-Check Buffer") ispell-buffer :help ,(purecopy "Check spelling of selected buffer"))) map) "Key map for ispell menu.") --=-=-=--