From unknown Sun Jun 22 07:52:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73675: [PATCH] Clean up tmm.el Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Oct 2024 09:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73675 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 73675@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.172829158125277 (code B ref -1); Mon, 07 Oct 2024 09:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Oct 2024 08:59:41 +0000 Received: from localhost ([127.0.0.1]:44747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sxjae-0006Zc-BT for submit@debbugs.gnu.org; Mon, 07 Oct 2024 04:59:40 -0400 Received: from lists.gnu.org ([209.51.188.17]:42322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sxjaY-0006ZQ-3u for submit@debbugs.gnu.org; Mon, 07 Oct 2024 04:59:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sxjaQ-0004fH-3z for bug-gnu-emacs@gnu.org; Mon, 07 Oct 2024 04:59:26 -0400 Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sxjaM-0000Uu-Re for bug-gnu-emacs@gnu.org; Mon, 07 Oct 2024 04:59:25 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=vIh6OKJc lmeVFxKMtSd4BTLoSQ49SkchKmZqHCWbWV4=; h=date:subject:to:from; d=ledu-giraud.fr; b=aZwtYFYx7Mm6qrrK6aDzbGW4YutqYbFj7xjkLBZp3gJLmWFIaa aNFDqgjuXpgCvmFsHS0qDj6nkbGN9fffWGAw== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=vIh6OKJclmeVFxKM tSd4BTLoSQ49SkchKmZqHCWbWV4=; h=date:subject:to:from; d=ledu-giraud.fr; b=f0vwZLpdt9CaDrgF/sog2VNcbzXMmSGdnSYzPjZhvCEN5T2LTw oG5QJrjBm5GNgbcePJxN42+q9P3t1/P8Yhc406/fj8S+NjpKCobWshWR4a1IklVYQVdCD8 9I1qYIn7ykijuwfChYcZBNB+08LoHXreXJeABgUItvI3Ju8psY20paSCeWb8efzp609eWy aCRYrokIkg/vGJuNyShEcLdeeGtVWXYi2aftCMFoY745AUxx4Cn3APTaIVVNMt2ln8UEbl kegDDEnMjAZ6cYbuXB0vnr0/LVMp7+lIbflgAeDTOTIuryaK70Bipi8Uh3r7VY2JAHG9Zn rKs7A8VTlRlg== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id d8610e21 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Mon, 7 Oct 2024 10:59:17 +0200 (CEST) From: Manuel Giraud Date: Mon, 07 Oct 2024 10:59:16 +0200 Message-ID: <87set8e1az.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Tags: patch Hi, Here is a patch with some clean up in "tmm.el". Best regards, In GNU Emacs 31.0.50 (build 15, x86_64-unknown-openbsd7.6, X toolkit) of 2024-10-07 built on computer Repository revision: 8c5d69998e65d3ecf5f599bd828bf3330f4f118a Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101013 System Description: OpenBSD computer 7.6 GENERIC.MP#344 amd64 Configured using: 'configure CC=egcc CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib MAKEINFO=gmakeinfo --prefix=/home/manuel/emacs --bindir=/home/manuel/bin --with-x-toolkit=lucid --with-toolkit-scroll-bars=no --without-cairo --without-compress-install' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Clean-up-tmm.el.patch >From 2acf1e10828b760b87be3791014451cb666336c3 Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Mon, 7 Oct 2024 10:52:03 +0200 Subject: [PATCH] Clean up tmm.el * lisp/tmm.el (tmm-old-mb-map, tmm-mb-map, tmm-prompt): Remove unused keymap variables. (tmm-define-keys, tmm-add-prompt): Remove always true parameter. --- lisp/tmm.el | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/lisp/tmm.el b/lisp/tmm.el index ed74c307009..46919a08b96 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -37,7 +37,6 @@ tmm ;;; The following will be localized, added only to pacify the compiler. (defvar tmm-short-cuts) -(defvar tmm-old-mb-map nil) (defvar tmm-c-prompt nil) (defvar tmm-km-list) (defvar tmm-next-shortcut-digit) @@ -82,9 +81,6 @@ tmm-mid-prompt :type '(choice (const :tag "No shortcuts" nil) string)) -(defvar tmm-mb-map nil - "A place to store minibuffer map.") - (defcustom tmm-completion-prompt "Press PageUp key to reach this buffer from the minibuffer. Alternatively, you can use Up/Down keys (or your History keys) to change @@ -146,7 +142,7 @@ tmm-prompt (let ((gl-str "Menu bar") ;; The menu bar itself is not a menu keymap ; so it doesn't have a name. tmm-km-list out history-len tmm-table-undef tmm-c-prompt - tmm-old-mb-map tmm-short-cuts + tmm-short-cuts chosen-string choice (not-menu (not (keymapp menu)))) (run-hooks 'activate-menubar-hook) @@ -314,8 +310,7 @@ tmm-add-one-shortcut str) (cdr elt)))))) -;; This returns the old map. -(defun tmm-define-keys (minibuffer) +(defun tmm-define-keys () (let ((map (make-sparse-keymap))) (suppress-keymap map t) (dolist (c tmm-short-cuts) @@ -325,16 +320,14 @@ tmm-define-keys ;; downcase input to the same (define-key map (char-to-string (downcase c)) 'tmm-shortcut) (define-key map (char-to-string (upcase c)) 'tmm-shortcut))) - (if minibuffer - (progn - (define-key map [pageup] 'tmm-goto-completions) - (define-key map [prior] 'tmm-goto-completions) - (define-key map "\ev" 'tmm-goto-completions) - (define-key map "\C-n" 'next-history-element) - (define-key map "\C-p" 'previous-history-element) - (define-key map "^" 'self-insert-and-exit))) - (prog1 (current-local-map) - (use-local-map (append map (current-local-map)))))) + (define-key map "\C-p" 'previous-history-element) + (define-key map "\C-n" 'next-history-element) + (define-key map "\ev" 'tmm-goto-completions) + (define-key map [prior] 'tmm-goto-completions) + (define-key map [pageup] 'tmm-goto-completions) + ;; Previous menu shortcut (see `tmm-prompt') + (define-key map "^" 'self-insert-and-exit) + (use-local-map (append map (current-local-map))))) (defun tmm-completion-delete-prompt () (with-current-buffer standard-output @@ -374,7 +367,7 @@ tmm-remove-inactive-mouse-face (defun tmm-add-prompt () (unless tmm-c-prompt (error "No active menu entries")) - (setq tmm-old-mb-map (tmm-define-keys t)) + (tmm-define-keys) (or tmm-completion-prompt (add-hook 'completion-setup-hook #'tmm-completion-delete-prompt 'append)) -- 2.46.1 --=-=-= Content-Type: text/plain -- Manuel Giraud --=-=-=-- From unknown Sun Jun 22 07:52:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73675: [PATCH] Clean up tmm.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Oct 2024 11:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73675 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Manuel Giraud Cc: 73675@debbugs.gnu.org Received: via spool by 73675-submit@debbugs.gnu.org id=B73675.172830122926588 (code B ref 73675); Mon, 07 Oct 2024 11:41:01 +0000 Received: (at 73675) by debbugs.gnu.org; 7 Oct 2024 11:40:29 +0000 Received: from localhost ([127.0.0.1]:45220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sxm6G-0006um-Lr for submit@debbugs.gnu.org; Mon, 07 Oct 2024 07:40:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sxm6F-0006ua-Kp for 73675@debbugs.gnu.org; Mon, 07 Oct 2024 07:40:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sxm61-0003YM-W9; Mon, 07 Oct 2024 07:40:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=z51Q1hg6TDRlIfdeCTVk4OAFo67g9xY9IFt5g5tf9Tw=; b=HNB0hOif2zD5 ieLNDl0eI9Uf2HK772nhlc0N2HXssBcWQQdvE1P+nyztIXc7Ji6IRlSl8hwpvKWyv+wynXLA11mnd PQsa9fkZ3qnJw5PcHFqDlGkXxzgMbxMQFwXJhBzD05l7ZTxPsbSIMfr/d4dWJP7JdkEUiemzyo38S aoqAsIaiyt1+j8WE7pPnHSJLPOAE+n83Jl2H+5ibeqZoAJVe2Ozk0o3yZs5v8Qkm6H1XmbcZ8oAEk E9luIEAjRw6+boqHoN14jyUu63/4pUsbMMY175Qfhjh6t7K527BUmUTi5TtQVxnOAQF0kLY21PX3Y WaHvVE7RGWh+4xW9eMWT4A==; Date: Mon, 07 Oct 2024 14:40:10 +0300 Message-Id: <86plocta3p.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87set8e1az.fsf@ledu-giraud.fr> (bug-gnu-emacs@gnu.org) References: <87set8e1az.fsf@ledu-giraud.fr> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Mon, 07 Oct 2024 10:59:16 +0200 > From: Manuel Giraud via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Here is a patch with some clean up in "tmm.el". Thanks, but these are public symbols, how do we know no one out there uses them? I'd leave them alone, TBH. From unknown Sun Jun 22 07:52:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73675: [PATCH] Clean up tmm.el Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Oct 2024 12:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73675 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 73675@debbugs.gnu.org Received: via spool by 73675-submit@debbugs.gnu.org id=B73675.172830273931706 (code B ref 73675); Mon, 07 Oct 2024 12:06:02 +0000 Received: (at 73675) by debbugs.gnu.org; 7 Oct 2024 12:05:39 +0000 Received: from localhost ([127.0.0.1]:45291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sxmUd-0008FJ-4n for submit@debbugs.gnu.org; Mon, 07 Oct 2024 08:05:39 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:16794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sxmUZ-0008FA-Qf for 73675@debbugs.gnu.org; Mon, 07 Oct 2024 08:05:37 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=kd4gEuqT y9EFzFuHJUUFVN940KG6JnCELItq2NetUCc=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=qNxECZOVCb3rPBn4/XAHHSqKWbpNxN DlKI5qOtDRF0EtRHRGpRw5KnhHkzj8e3THxBZrREaquVDNrvm+g4OvDw== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=kd4gEuqTy9EFzFuH JUUFVN940KG6JnCELItq2NetUCc=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=2R4cA4Mb3Cn2fwOFSpGyPh9FWwfvKMaOLZSsNH ZbdCyY6oKTaWERl2VdhTExM8HYThr1mvSVADeLWWZU28tt1cc/tjRqaLpsytIRaIzP7bA1 /m5msjF1xIvu3rT5HfqyxryU4Mfz21+955GoUhvtlShpPRpmE2brdNOnCMGAHXQTbdzFJ6 GtwpeZbmpnAX+0vO8OM5o+yOzBXrN1Q7dZRvYccSty27tCI9t4SquBtFeVwosiT+31sL5/ myFY0sS7Wa6LTSqkW2/9494rbVNvpfSiuoVzIrVbiym0x/Oqv9Iiwwn9apNvNRAKy1swpl LZ7FYFEdcupuvKowQdCayQZg== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id d113be3f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 7 Oct 2024 14:05:24 +0200 (CEST) From: Manuel Giraud In-Reply-To: <86plocta3p.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 07 Oct 2024 14:40:10 +0300") References: <87set8e1az.fsf@ledu-giraud.fr> <86plocta3p.fsf@gnu.org> Date: Mon, 07 Oct 2024 14:05:24 +0200 Message-ID: <87frp8dsor.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> Date: Mon, 07 Oct 2024 10:59:16 +0200 >> From: Manuel Giraud via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> Here is a patch with some clean up in "tmm.el". > > Thanks, but these are public symbols, how do we know no one out there > uses them? I'd leave them alone, TBH. Ok. What about the following one? `tmm-mb-map' is not even set anywhere. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Clean-up-tmm.el.patch >From dc27a84ef0f387566966fbbe2c9ccc41d1f639cd Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Mon, 7 Oct 2024 10:52:03 +0200 Subject: [PATCH] Clean up tmm.el * lisp/tmm.el (tmm-mb-map): Remove unused keymap variable. --- lisp/tmm.el | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/lisp/tmm.el b/lisp/tmm.el index ed74c307009..582551cfb87 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -82,9 +82,6 @@ tmm-mid-prompt :type '(choice (const :tag "No shortcuts" nil) string)) -(defvar tmm-mb-map nil - "A place to store minibuffer map.") - (defcustom tmm-completion-prompt "Press PageUp key to reach this buffer from the minibuffer. Alternatively, you can use Up/Down keys (or your History keys) to change @@ -325,14 +322,14 @@ tmm-define-keys ;; downcase input to the same (define-key map (char-to-string (downcase c)) 'tmm-shortcut) (define-key map (char-to-string (upcase c)) 'tmm-shortcut))) - (if minibuffer - (progn - (define-key map [pageup] 'tmm-goto-completions) - (define-key map [prior] 'tmm-goto-completions) - (define-key map "\ev" 'tmm-goto-completions) - (define-key map "\C-n" 'next-history-element) - (define-key map "\C-p" 'previous-history-element) - (define-key map "^" 'self-insert-and-exit))) + (when minibuffer + (define-key map [pageup] 'tmm-goto-completions) + (define-key map [prior] 'tmm-goto-completions) + (define-key map "\ev" 'tmm-goto-completions) + (define-key map "\C-n" 'next-history-element) + (define-key map "\C-p" 'previous-history-element) + ;; Previous menu shortcut (see `tmm-prompt') + (define-key map "^" 'self-insert-and-exit)) (prog1 (current-local-map) (use-local-map (append map (current-local-map)))))) -- 2.46.1 --=-=-= Content-Type: text/plain -- Manuel Giraud --=-=-=-- From unknown Sun Jun 22 07:52:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#73675: [PATCH] Clean up tmm.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Oct 2024 18:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73675 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Manuel Giraud Cc: 73675@debbugs.gnu.org Received: via spool by 73675-submit@debbugs.gnu.org id=B73675.172832630218187 (code B ref 73675); Mon, 07 Oct 2024 18:39:02 +0000 Received: (at 73675) by debbugs.gnu.org; 7 Oct 2024 18:38:22 +0000 Received: from localhost ([127.0.0.1]:48071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sxscg-0004jG-D9 for submit@debbugs.gnu.org; Mon, 07 Oct 2024 14:38:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sxsce-0004iy-Ks for 73675@debbugs.gnu.org; Mon, 07 Oct 2024 14:38:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sxscR-0008MN-DH; Mon, 07 Oct 2024 14:38:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=4iwLCZImgexJsDMlkDKbMnm7kkIwoPN2deEN4n02xM4=; b=V+VSLO5dvLE0 4WYAV6NxPBPsH9XHAL76v+zQChebwZ2hvNR8r/Lu22iZx8Ew2J4s6i/fr+A7K2xskTjWEliBua16x e3Ge7sTRQgWphvXG1/7rGR+djuFRh7x269DRRR48YA2dbpNFkG6xXLaG6dziFSPfKV3mIlRxpSUB5 G3iZXMfMl+W5Jgo8Sp/7YiQv4d9NHXEcuKbffDZEfUelRqaDfv5ldynLt0rvCCgKb+XyWELQ6XJxw OHqLI/7LxzZ31654VT447CkvVET4jaAAqevl9IzNiIq+v+75FWngtcG4P5o1BPkYNpoDkF73rCqjM YYvMXY3snk3MPYQrxIlhww==; Date: Mon, 07 Oct 2024 21:38:05 +0300 Message-Id: <86jzeju5bm.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87frp8dsor.fsf@ledu-giraud.fr> (message from Manuel Giraud on Mon, 07 Oct 2024 14:05:24 +0200) References: <87set8e1az.fsf@ledu-giraud.fr> <86plocta3p.fsf@gnu.org> <87frp8dsor.fsf@ledu-giraud.fr> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Manuel Giraud > Cc: 73675@debbugs.gnu.org > Date: Mon, 07 Oct 2024 14:05:24 +0200 > > Eli Zaretskii writes: > > > Thanks, but these are public symbols, how do we know no one out there > > uses them? I'd leave them alone, TBH. > > Ok. What about the following one? `tmm-mb-map' is not even set > anywhere. That's okay, but if you intend to work on improving and developing tmm.el (which is always welcome), we prefer that such cleanup changes be done as part of larger, significant changesets, not as separate changes that modify the code without adding any new or improved functionality. In a nutshell, this is like fixing whitespace: we prefer to do it as part of real changes, not separately. So if you intend to work on tmm.el, I suggest to install this with whatever other changes you are planning. Thanks. From unknown Sun Jun 22 07:52:23 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Manuel Giraud Subject: bug#73675: closed (Re: bug#73675: [PATCH] Clean up tmm.el) Message-ID: References: <87ed4rc8rl.fsf@ledu-giraud.fr> <87set8e1az.fsf@ledu-giraud.fr> X-Gnu-PR-Message: they-closed 73675 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 73675@debbugs.gnu.org Date: Tue, 08 Oct 2024 08:14:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1728375242-25815-1" This is a multi-part message in MIME format... ------------=_1728375242-25815-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #73675: [PATCH] Clean up tmm.el which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 73675@debbugs.gnu.org. --=20 73675: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D73675 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1728375242-25815-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 73675-done) by debbugs.gnu.org; 8 Oct 2024 08:13:32 +0000 Received: from localhost ([127.0.0.1]:50749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sy5LX-0006hJ-RH for submit@debbugs.gnu.org; Tue, 08 Oct 2024 04:13:32 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:15751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sy5LV-0006h8-70 for 73675-done@debbugs.gnu.org; Tue, 08 Oct 2024 04:13:30 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=xGXDbsXE x+8pLPevHaSJCQs3zAdc7vDqtzXxa6WUem0=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=xaIb7iR4/GSlz1742e8bHLTO7Tn4l0 C5gN2VLfIxZsRStXHKl+y5BCGpikiUTUabcx7b6YLAYKBKOz6h0MkYCg== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=xGXDbsXEx+8pLPev HaSJCQs3zAdc7vDqtzXxa6WUem0=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=pCxOBx39Og2g+pygLNyAgQd2ExdrZEK14jt8LT GufJDq20Y49Jvjnzx9kK8LE48kYGJpek+HDMV1eYxnej2SqcB29pe3ibiP7M4cLaed9Oqk D7WrteRIdrvIrm5g2S/7H8H6ejzG0xBAmbweBDVlPH/fRQ7Ovaz9opk/GBjaDETjRctKbW kHBfgHtsdZqRqfop86ryPt6QbzrlWq6GVplpIo04Pv4zlHvTpyErdtg2sbONzK0UT9ZX4s 9gRWnlSM4aqTtZpb+Pqckkd/ldt+mHMxKfLrOAgPTU+xN5SsGQI1iwuWFtCQG0lkt6tK7G u7+LaF5riKquPPJLdlmhvI0A== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id e9d6b19b (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 8 Oct 2024 10:13:19 +0200 (CEST) From: Manuel Giraud To: Eli Zaretskii Subject: Re: bug#73675: [PATCH] Clean up tmm.el In-Reply-To: <86jzeju5bm.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 07 Oct 2024 21:38:05 +0300") References: <87set8e1az.fsf@ledu-giraud.fr> <86plocta3p.fsf@gnu.org> <87frp8dsor.fsf@ledu-giraud.fr> <86jzeju5bm.fsf@gnu.org> Date: Tue, 08 Oct 2024 10:13:18 +0200 Message-ID: <87ed4rc8rl.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73675-done Cc: 73675-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Manuel Giraud >> Cc: 73675@debbugs.gnu.org >> Date: Mon, 07 Oct 2024 14:05:24 +0200 >> >> Eli Zaretskii writes: >> >> > Thanks, but these are public symbols, how do we know no one out there >> > uses them? I'd leave them alone, TBH. >> >> Ok. What about the following one? `tmm-mb-map' is not even set >> anywhere. > > That's okay, but if you intend to work on improving and developing > tmm.el (which is always welcome), we prefer that such cleanup changes > be done as part of larger, significant changesets, not as separate > changes that modify the code without adding any new or improved > functionality. Ok. I should have done this in my previous patch :-) I may still have some work on tmm.el. Anyway, I'm closing this one. -- Manuel Giraud ------------=_1728375242-25815-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 7 Oct 2024 08:59:41 +0000 Received: from localhost ([127.0.0.1]:44747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sxjae-0006Zc-BT for submit@debbugs.gnu.org; Mon, 07 Oct 2024 04:59:40 -0400 Received: from lists.gnu.org ([209.51.188.17]:42322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sxjaY-0006ZQ-3u for submit@debbugs.gnu.org; Mon, 07 Oct 2024 04:59:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sxjaQ-0004fH-3z for bug-gnu-emacs@gnu.org; Mon, 07 Oct 2024 04:59:26 -0400 Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sxjaM-0000Uu-Re for bug-gnu-emacs@gnu.org; Mon, 07 Oct 2024 04:59:25 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=vIh6OKJc lmeVFxKMtSd4BTLoSQ49SkchKmZqHCWbWV4=; h=date:subject:to:from; d=ledu-giraud.fr; b=aZwtYFYx7Mm6qrrK6aDzbGW4YutqYbFj7xjkLBZp3gJLmWFIaa aNFDqgjuXpgCvmFsHS0qDj6nkbGN9fffWGAw== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=vIh6OKJclmeVFxKM tSd4BTLoSQ49SkchKmZqHCWbWV4=; h=date:subject:to:from; d=ledu-giraud.fr; b=f0vwZLpdt9CaDrgF/sog2VNcbzXMmSGdnSYzPjZhvCEN5T2LTw oG5QJrjBm5GNgbcePJxN42+q9P3t1/P8Yhc406/fj8S+NjpKCobWshWR4a1IklVYQVdCD8 9I1qYIn7ykijuwfChYcZBNB+08LoHXreXJeABgUItvI3Ju8psY20paSCeWb8efzp609eWy aCRYrokIkg/vGJuNyShEcLdeeGtVWXYi2aftCMFoY745AUxx4Cn3APTaIVVNMt2ln8UEbl kegDDEnMjAZ6cYbuXB0vnr0/LVMp7+lIbflgAeDTOTIuryaK70Bipi8Uh3r7VY2JAHG9Zn rKs7A8VTlRlg== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id d8610e21 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Mon, 7 Oct 2024 10:59:17 +0200 (CEST) From: Manuel Giraud To: bug-gnu-emacs@gnu.org Subject: [PATCH] Clean up tmm.el X-Debbugs-Cc: Date: Mon, 07 Oct 2024 10:59:16 +0200 Message-ID: <87set8e1az.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Tags: patch Hi, Here is a patch with some clean up in "tmm.el". Best regards, In GNU Emacs 31.0.50 (build 15, x86_64-unknown-openbsd7.6, X toolkit) of 2024-10-07 built on computer Repository revision: 8c5d69998e65d3ecf5f599bd828bf3330f4f118a Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101013 System Description: OpenBSD computer 7.6 GENERIC.MP#344 amd64 Configured using: 'configure CC=egcc CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib MAKEINFO=gmakeinfo --prefix=/home/manuel/emacs --bindir=/home/manuel/bin --with-x-toolkit=lucid --with-toolkit-scroll-bars=no --without-cairo --without-compress-install' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Clean-up-tmm.el.patch >From 2acf1e10828b760b87be3791014451cb666336c3 Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Mon, 7 Oct 2024 10:52:03 +0200 Subject: [PATCH] Clean up tmm.el * lisp/tmm.el (tmm-old-mb-map, tmm-mb-map, tmm-prompt): Remove unused keymap variables. (tmm-define-keys, tmm-add-prompt): Remove always true parameter. --- lisp/tmm.el | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/lisp/tmm.el b/lisp/tmm.el index ed74c307009..46919a08b96 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -37,7 +37,6 @@ tmm ;;; The following will be localized, added only to pacify the compiler. (defvar tmm-short-cuts) -(defvar tmm-old-mb-map nil) (defvar tmm-c-prompt nil) (defvar tmm-km-list) (defvar tmm-next-shortcut-digit) @@ -82,9 +81,6 @@ tmm-mid-prompt :type '(choice (const :tag "No shortcuts" nil) string)) -(defvar tmm-mb-map nil - "A place to store minibuffer map.") - (defcustom tmm-completion-prompt "Press PageUp key to reach this buffer from the minibuffer. Alternatively, you can use Up/Down keys (or your History keys) to change @@ -146,7 +142,7 @@ tmm-prompt (let ((gl-str "Menu bar") ;; The menu bar itself is not a menu keymap ; so it doesn't have a name. tmm-km-list out history-len tmm-table-undef tmm-c-prompt - tmm-old-mb-map tmm-short-cuts + tmm-short-cuts chosen-string choice (not-menu (not (keymapp menu)))) (run-hooks 'activate-menubar-hook) @@ -314,8 +310,7 @@ tmm-add-one-shortcut str) (cdr elt)))))) -;; This returns the old map. -(defun tmm-define-keys (minibuffer) +(defun tmm-define-keys () (let ((map (make-sparse-keymap))) (suppress-keymap map t) (dolist (c tmm-short-cuts) @@ -325,16 +320,14 @@ tmm-define-keys ;; downcase input to the same (define-key map (char-to-string (downcase c)) 'tmm-shortcut) (define-key map (char-to-string (upcase c)) 'tmm-shortcut))) - (if minibuffer - (progn - (define-key map [pageup] 'tmm-goto-completions) - (define-key map [prior] 'tmm-goto-completions) - (define-key map "\ev" 'tmm-goto-completions) - (define-key map "\C-n" 'next-history-element) - (define-key map "\C-p" 'previous-history-element) - (define-key map "^" 'self-insert-and-exit))) - (prog1 (current-local-map) - (use-local-map (append map (current-local-map)))))) + (define-key map "\C-p" 'previous-history-element) + (define-key map "\C-n" 'next-history-element) + (define-key map "\ev" 'tmm-goto-completions) + (define-key map [prior] 'tmm-goto-completions) + (define-key map [pageup] 'tmm-goto-completions) + ;; Previous menu shortcut (see `tmm-prompt') + (define-key map "^" 'self-insert-and-exit) + (use-local-map (append map (current-local-map))))) (defun tmm-completion-delete-prompt () (with-current-buffer standard-output @@ -374,7 +367,7 @@ tmm-remove-inactive-mouse-face (defun tmm-add-prompt () (unless tmm-c-prompt (error "No active menu entries")) - (setq tmm-old-mb-map (tmm-define-keys t)) + (tmm-define-keys) (or tmm-completion-prompt (add-hook 'completion-setup-hook #'tmm-completion-delete-prompt 'append)) -- 2.46.1 --=-=-= Content-Type: text/plain -- Manuel Giraud --=-=-=-- ------------=_1728375242-25815-1--