GNU bug report logs - #70555
[PATCH] comint.el: Add applicable modes to 'interactive' forms

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Augusto Stoffel <arstoffel@HIDDEN>; Keywords: patch; Done: Stefan Kangas <stefankangas@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug marked as fixed in version 30.1, send any further explanations to 70555 <at> debbugs.gnu.org and Augusto Stoffel <arstoffel@HIDDEN> Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 70555 <at> debbugs.gnu.org:


Received: (at 70555) by debbugs.gnu.org; 18 May 2024 22:34:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 18 18:34:34 2024
Received: from localhost ([127.0.0.1]:35577 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s8SdN-0006NR-Pn
	for submit <at> debbugs.gnu.org; Sat, 18 May 2024 18:34:34 -0400
Received: from mail-ed1-f45.google.com ([209.85.208.45]:57427)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1s8SdM-0006ND-6t
 for 70555 <at> debbugs.gnu.org; Sat, 18 May 2024 18:34:32 -0400
Received: by mail-ed1-f45.google.com with SMTP id
 4fb4d7f45d1cf-56e56ee8d5cso6927293a12.2
 for <70555 <at> debbugs.gnu.org>; Sat, 18 May 2024 15:34:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1716071603; x=1716676403; darn=debbugs.gnu.org;
 h=to:subject:message-id:date:mime-version:references:in-reply-to:from
 :from:to:cc:subject:date:message-id:reply-to;
 bh=61PlyYlb3r9ujTD4jRoQPe8ZIf82DrxcooP8OPmNfNw=;
 b=U9lN49MqSgkcv04mNy5Gd1Rz/5qZk//4t/k2IGWoet/wdcFotWY8rEyXMBT7OyGxtZ
 MYMoCWEHTnuIFm4oj+iq02c6OCcDHC+W35frlIVTymeiH87H33hV1Mb0RdWiSzVSpKCJ
 2AwFqbAT1P2sJQ1RzubVIc9a+zeFcGsIuuCMbnK3AGW3I002+iImTkKi5YbOHdqZjyW4
 byHu2ezVFGatCvCMlRIvS3KIJ0anqHn+p8nlmNSnLB078dpdkcnIilzzzy+8cgJRVw21
 s1Kr/GMBMblyGwdquGgz5IEKLwY7ZtZ3aiNv6n2MUxFHQL8dE7LbJZ/iWsXpRXmwKdk6
 gC7A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1716071603; x=1716676403;
 h=to:subject:message-id:date:mime-version:references:in-reply-to:from
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=61PlyYlb3r9ujTD4jRoQPe8ZIf82DrxcooP8OPmNfNw=;
 b=XPtvKJxo34G5EcsAeNCLyHQPTZXDpgRgjgxi/8bBFK46ZK2FY+PKNhaJlwDivWBAt2
 x3AsXq+nkv+ITiRyv2rBvq2Hn9Sh+CIKVFmg2i/CUhshqOllNf5rHWDno3B22bpafpsM
 zER/iMt2PjsUcM2cKTIDnIN1Fng0Ztc5QpsjMQNavSjuDVfcvsBf0dzDaaj4YwwAtbca
 zDEBfBnpOqoTLiybLGIXaDft63vowN2/uiiaRyHgeDFIav+Xbiuxqvrls1wdrJIU7Xzp
 f4wRI7u7bc/jKk1XC0ARfnxj/dKzueSgqfjmD7yOTtR8Zio1i6FODkMt/Yxiev0Dcitb
 A3lA==
X-Forwarded-Encrypted: i=1;
 AJvYcCW7f8c8I+oPdi5Yed55Oj3iRNcKvBDFWtlIDdb27HhMx69xqpBYD14AUtufKOcxgRmW8rXqLeqXAapG8B7E0CKXP7OttTU=
X-Gm-Message-State: AOJu0Yz6DcApsz0DrTm5j5tR5heSRA1TR0R70GvbEd1oqX2fuGV3tDFD
 CI8uo6tz45JxfERvXCvJGrSuXfN77qYK6vxpvem/+ke+scIvi0GMW8mrfFJEBWAwrmcw82tKxHj
 vDiCqqGSdlaRKV6IuyZqnBtHkB5M93y5r
X-Google-Smtp-Source: AGHT+IGAK13ApDQeglHwxFBw6pALeAFB5Sevo6sMH8eyXA3eUA46R1Lelr3pBjpMv9/ycGrh9BpWXV19WNNhVqYxubM=
X-Received: by 2002:a50:8d16:0:b0:568:1882:651f with SMTP id
 4fb4d7f45d1cf-5734d5cf95amr18775359a12.25.1716071602823; Sat, 18 May 2024
 15:33:22 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sat, 18 May 2024 22:33:22 +0000
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <87il06a97o.fsf@HIDDEN>
References: <87il06a97o.fsf@HIDDEN>
MIME-Version: 1.0
Date: Sat, 18 May 2024 22:33:22 +0000
Message-ID: <CADwFkmnBUsLwCdFjxJOZNi+0VQz7p-pbRDW=P=PH+cSWtvnaTw@HIDDEN>
Subject: Re: bug#70555: [PATCH] comint.el: Add applicable modes to
 'interactive' forms
To: Augusto Stoffel <arstoffel@HIDDEN>, 70555 <at> debbugs.gnu.org
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70555
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

close 70555 30.1
thanks

Augusto Stoffel <arstoffel@HIDDEN> writes:

> From 30a8a7172218257e94f13eaac65d1170c8238782 Mon Sep 17 00:00:00 2001
> From: Augusto Stoffel <arstoffel@HIDDEN>
> Date: Wed, 24 Apr 2024 18:13:36 +0200
> Subject: [PATCH] comint.el: Add applicable modes to 'interactive' forms

Thanks, pushed to master as commit e8feb04cc68.

I'm therefore closing this bug report.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70555; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 24 Apr 2024 18:49:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 24 14:49:08 2024
Received: from localhost ([127.0.0.1]:59879 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rzhfs-0006Dt-2a
	for submit <at> debbugs.gnu.org; Wed, 24 Apr 2024 14:49:08 -0400
Received: from lists.gnu.org ([2001:470:142::17]:33464)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arstoffel@HIDDEN>) id 1rzhfb-00069i-Rl
 for submit <at> debbugs.gnu.org; Wed, 24 Apr 2024 14:48:52 -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 <arstoffel@HIDDEN>)
 id 1rzhfF-0008M5-5q
 for bug-gnu-emacs@HIDDEN; Wed, 24 Apr 2024 14:48:17 -0400
Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <arstoffel@HIDDEN>)
 id 1rzhfB-0007L5-K7
 for bug-gnu-emacs@HIDDEN; Wed, 24 Apr 2024 14:48:16 -0400
Received: by mail-ej1-x629.google.com with SMTP id
 a640c23a62f3a-a55ab922260so26100066b.3
 for <bug-gnu-emacs@HIDDEN>; Wed, 24 Apr 2024 11:48:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1713984491; x=1714589291; darn=gnu.org;
 h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc
 :subject:date:message-id:reply-to;
 bh=K4JscgGoeEL9S4ZEumwqmfrtfpQmUZ6aMbLs2G2RCeM=;
 b=Nye32TlM39QM4j0VkgJN7w+8V+DiotCpU8E4IaDSjDb1nste3z0V+iRU8fvZuf0uQo
 3lyGnb3Qz3f1ZH/mThqdyPGitQsVL0yBOlAdYRQxLABc6ZivymmWmFr1QUOZsxRP747z
 N99FqIvvCACAZVTafeAD6oxKyGSDKf32yPkwC4vKsmTmhFDLfD36yoNqw2A/8o2Axr03
 AaUnGD9fu3x0EOcxf5SF3i5lReL47hQqzhTONjMPYmmokOMlAh/dTRoXqrROHT++8or6
 Fed9LP8OiksG3uuU5g9Klvf03DbpnWTtsc7S/In41DTcODt1TZ8RAJ4OWZueh9fHHRmR
 8sgA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1713984491; x=1714589291;
 h=mime-version:user-agent:message-id:date:subject:to:from
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=K4JscgGoeEL9S4ZEumwqmfrtfpQmUZ6aMbLs2G2RCeM=;
 b=v7KEC64elYMELnyMxcMGvK1kPXHJxLzTFEX826EiT2vnH21WUu36iqKPT3NM6LC8bS
 TibR/AGs67AWUNivDtlypjZDvDYN6+4n1YhOmggH/UVdmKR6JhLL3w0Qh/5a3KRW/FqK
 l1vAqFRAgiRUZqwaeablml0XBZIOggveVmKCjprCCBaDvucIqdiBHJ/D9Ys+h+x796M2
 +5zXe6twB1t4iBj8t4g1seMPHOCWSuzMlNdy54qUsuA0cca16oXiD0KFjnPrW/joLM3k
 So/+5tmTfxlHMymhBj+SXYWpQodLMABG8unDv/g5fRU+1Rg114HvK0PdkiMX84K7X83F
 dLEw==
X-Gm-Message-State: AOJu0YzDQhhDVP21PYRPtv1he96cpiT7xyRLZ6OGsSJBEKYH6fRcTDGT
 fznQtb5yBclHdbomj6tuwX3fQV6An+wLZogj8wBibNaoVrc483BT1qwSBA==
X-Google-Smtp-Source: AGHT+IF/0UKxgPuA6sN5BpNhx8GKE3TxZSBtRP5GYSIbx3qAhrgWdKgOyUG+6eUvejuQphxE5AUp2A==
X-Received: by 2002:a17:906:f74d:b0:a4e:5137:9969 with SMTP id
 jp13-20020a170906f74d00b00a4e51379969mr2234468ejb.32.1713984478095; 
 Wed, 24 Apr 2024 11:47:58 -0700 (PDT)
Received: from ars3 ([2a02:8109:8a87:ff00::6223])
 by smtp.gmail.com with ESMTPSA id
 hg7-20020a170906f34700b00a4e5a6b57a2sm8613555ejb.163.2024.04.24.11.47.56
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 24 Apr 2024 11:47:56 -0700 (PDT)
From: Augusto Stoffel <arstoffel@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] comint.el: Add applicable modes to 'interactive' forms
Date: Wed, 24 Apr 2024 20:47:55 +0200
Message-ID: <87il06a97o.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=2a00:1450:4864:20::629;
 envelope-from=arstoffel@HIDDEN; helo=mail-ej1-x629.google.com
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, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--=-=-=
Content-Type: text/plain

Tags: patch

See attachment.


--=-=-=
Content-Type: text/patch
Content-Disposition: attachment;
 filename=0001-comint.el-Add-interactive-modes-to-all-commands.patch

From 30a8a7172218257e94f13eaac65d1170c8238782 Mon Sep 17 00:00:00 2001
From: Augusto Stoffel <arstoffel@HIDDEN>
Date: Wed, 24 Apr 2024 18:13:36 +0200
Subject: [PATCH] comint.el: Add applicable modes to 'interactive' forms

* lisp/comint.el (comint-dynamic-list-input-ring-select)
(comint-dynamic-list-input-ring, comint-restore-input)
(comint-previous-input, comint-next-input)
(comint-previous-matching-input, comint-next-matching-input)
(comint-previous-matching-input-from-input)
(comint-next-matching-input-from-input)
(comint-replace-by-expanded-history, comint-magic-space)
(comint-history-isearch-backward)
(comint-history-isearch-backward-regexp, comint-send-input)
(comint-truncate-buffer, comint-strip-ctrl-m)
(comint-show-maximum-output, comint-copy-old-input, comint-bol)
(comint-send-invisible, comint-delete-output, comint-write-output)
(comint-append-output-to-file, comint-show-output)
(comint-clear-buffer, comint-interrupt-subjob, comint-kill-subjob)
(comint-quit-subjob, comint-stop-subjob, comint-continue-subjob)
(comint-kill-input, comint-delchar-or-maybe-eof, comint-send-eof)
(comint-backward-matching-input, comint-forward-matching-input)
(comint-next-prompt, comint-previous-prompt)
(comint-insert-previous-argument, comint-kill-whole-line)
(comint-kill-region, comint-dynamic-complete-filename)
(comint-replace-by-expanded-filename)
(comint-dynamic-list-filename-completions)
(comint-get-next-from-history, comint-accumulate)
(comint-goto-process-mark, comint-bol-or-process-mark)
(comint-set-process-mark, comint-redirect-cleanup)
(comint-redirect-send-command)
(comint-redirect-send-command-to-process, comint-fontify-input-mode):
Add mode to interactive form.
---
 lisp/comint.el | 104 +++++++++++++++++++++++++------------------------
 1 file changed, 53 insertions(+), 51 deletions(-)

diff --git a/lisp/comint.el b/lisp/comint.el
index e856038b0f7..3804932e01c 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1122,7 +1122,7 @@ comint-dynamic-list-input-ring-window-conf
 
 (defun comint-dynamic-list-input-ring-select ()
   "Choose the input history entry that point is in or next to."
-  (interactive)
+  (interactive nil completion-list-mode)
   (let ((buffer completion-reference-buffer)
         beg end completion)
     (if (and (not (eobp)) (get-text-property (point) 'mouse-face))
@@ -1139,7 +1139,7 @@ comint-dynamic-list-input-ring-select
 
 (defun comint-dynamic-list-input-ring ()
   "Display a list of recent inputs entered into the current buffer."
-  (interactive)
+  (interactive nil comint-mode)
   (if (or (not (ring-p comint-input-ring))
 	  (ring-empty-p comint-input-ring))
       (message "No history")
@@ -1203,7 +1203,7 @@ comint-search-arg
 
 (defun comint-restore-input ()
   "Restore unfinished input."
-  (interactive)
+  (interactive nil comint)
   (when comint-input-ring-index
     (comint-delete-input)
     (when (> (length comint-stored-incomplete-input) 0)
@@ -1232,7 +1232,7 @@ comint-previous-input-string
 
 (defun comint-previous-input (arg)
   "Cycle backwards through input history, saving input."
-  (interactive "*p")
+  (interactive "*p" comint-mode)
   (if (and comint-input-ring-index
 	   (or		       ;; leaving the "end" of the ring
 	    (and (< arg 0)		; going down
@@ -1246,7 +1246,7 @@ comint-previous-input
 
 (defun comint-next-input (arg)
   "Cycle forwards through input history."
-  (interactive "*p")
+  (interactive "*p" comint-mode)
   (comint-previous-input (- arg)))
 
 (defun comint-previous-matching-input-string (regexp arg)
@@ -1295,7 +1295,7 @@ comint-previous-matching-input
 \(Previous history elements are earlier commands.)
 With prefix argument N, search for Nth previous match.
 If N is negative, find the next or Nth next match."
-  (interactive (comint-regexp-arg "Previous input matching (regexp): "))
+  (interactive (comint-regexp-arg "Previous input matching (regexp): ") comint-mode)
   (setq n (comint-search-arg n))
   (let ((pos (comint-previous-matching-input-string-position regexp n)))
     ;; Has a match been found?
@@ -1325,7 +1325,7 @@ comint-next-matching-input
 \(Later history elements are more recent commands.)
 With prefix argument N, search for Nth following match.
 If N is negative, find the previous or Nth previous match."
-  (interactive (comint-regexp-arg "Next input matching (regexp): "))
+  (interactive (comint-regexp-arg "Next input matching (regexp): ") comint-mode)
   (comint-previous-matching-input regexp (- n)))
 
 (defun comint-previous-matching-input-from-input (n)
@@ -1333,7 +1333,7 @@ comint-previous-matching-input-from-input
 \(Previous history elements are earlier commands.)
 With prefix argument N, search for Nth previous match.
 If N is negative, search forwards for the -Nth following match."
-  (interactive "p")
+  (interactive "p" comint-mode)
   (let ((opoint (point)))
     (unless (memq last-command '(comint-previous-matching-input-from-input
 				 comint-next-matching-input-from-input))
@@ -1355,7 +1355,7 @@ comint-next-matching-input-from-input
 \(Following history elements are more recent commands.)
 With prefix argument N, search for Nth following match.
 If N is negative, search backwards for the -Nth previous match."
-  (interactive "p")
+  (interactive "p" comint-mode)
   (comint-previous-matching-input-from-input (- n)))
 
 
@@ -1380,7 +1380,7 @@ comint-replace-by-expanded-history
 See `comint-magic-space' and `comint-replace-by-expanded-history-before-point'.
 
 Returns t if successful."
-  (interactive)
+  (interactive nil comint-mode)
   (let ((f (comint-c-a-p-replace-by-expanded-history silent start)))
     (if f (funcall f))))
 
@@ -1510,7 +1510,7 @@ comint-replace-by-expanded-history-before-point
 (defun comint-magic-space (arg)
   "Expand input history references before point and insert ARG spaces.
 A useful command to bind to SPC.  See `comint-replace-by-expanded-history'."
-  (interactive "p")
+  (interactive "p" comint-mode)
   (comint-replace-by-expanded-history)
   (self-insert-command arg))
 
@@ -1532,13 +1532,13 @@ comint-history-isearch
 
 (defun comint-history-isearch-backward ()
   "Search for a string backward in input history using Isearch."
-  (interactive)
+  (interactive nil comint-mode)
   (setq comint-history-isearch t)
   (isearch-backward nil t))
 
 (defun comint-history-isearch-backward-regexp ()
   "Search for a regular expression backward in input history using Isearch."
-  (interactive)
+  (interactive nil comint-mode)
   (setq comint-history-isearch t)
   (isearch-backward-regexp nil t))
 
@@ -1927,7 +1927,7 @@ comint-send-input
 	which matches (1) all whitespace (2) :a, :c, etc.
 
 Similarly for Soar, Scheme, etc."
-  (interactive)
+  (interactive nil comint-mode)
   ;; If we're currently completing, stop.  We're definitely done
   ;; completing, and by sending the input, we might cause side effects
   ;; that will confuse the code running in the completion
@@ -2376,7 +2376,7 @@ comint-adjust-point
 (defun comint-truncate-buffer (&optional _string)
   "Truncate the buffer to `comint-buffer-maximum-size'.
 This function could be on `comint-output-filter-functions' or bound to a key."
-  (interactive)
+  (interactive nil comint-mode)
   (save-excursion
     (goto-char (process-mark (get-buffer-process (current-buffer))))
     (forward-line (- comint-buffer-maximum-size))
@@ -2387,7 +2387,7 @@ comint-truncate-buffer
 (defun comint-strip-ctrl-m (&optional _string interactive)
   "Strip trailing `^M' characters from the current output group.
 This function could be on `comint-output-filter-functions' or bound to a key."
-  (interactive (list nil t))
+  (interactive (list nil t) comint-mode)
   (let ((process (get-buffer-process (current-buffer))))
     (if (not process)
         ;; This function may be used in
@@ -2409,7 +2409,7 @@ 'shell-strip-ctrl-m
 
 (defun comint-show-maximum-output ()
   "Put the end of the buffer at the bottom of the window."
-  (interactive)
+  (interactive nil comint-mode)
   (goto-char (point-max))
   (recenter (- -1 scroll-margin)))
 
@@ -2437,7 +2437,7 @@ comint-get-old-input-default
 (defun comint-copy-old-input ()
   "Insert after prompt old input at point as new input to be edited.
 Calls `comint-get-old-input' to get old input."
-  (interactive)
+  (interactive nil comint-mode)
   (let ((input (funcall comint-get-old-input))
 	(process (get-buffer-process (current-buffer))))
     (if (not process)
@@ -2503,7 +2503,7 @@ comint-bol
 If `comint-use-prompt-regexp' is non-nil, then the prompt skip is done
 by skipping text matching the regular expression `comint-prompt-regexp',
 a buffer local variable."
-  (interactive "P")
+  (interactive "P" comint-mode)
   (if arg
       ;; Unlike `beginning-of-line', forward-line ignores field boundaries
       (forward-line 0)
@@ -2530,7 +2530,7 @@ comint-send-invisible
 The string is sent using `comint-input-sender'.
 Security bug: your string can still be temporarily recovered with
 \\[view-lossage]; `clear-this-command-keys' can fix that."
-  (interactive "P")			; Defeat snooping via C-x ESC ESC
+  (interactive "P" comint-mode)			; Defeat snooping via C-x ESC ESC
   (let ((proc (get-buffer-process (current-buffer)))
 	(prefix
 	 (if (eq (window-buffer) (current-buffer))
@@ -2612,7 +2612,7 @@ comint-delete-output
 kill ring.
 
 This command does not delete the prompt."
-  (interactive "P")
+  (interactive "P" comint-mode)
   (let ((proc (get-buffer-process (current-buffer)))
 	(replacement nil)
 	(inhibit-read-only t))
@@ -2650,7 +2650,8 @@ comint-write-output
 	      "Append output to file: "
 	    "Write output to file: "))
 	 current-prefix-arg
-	 (not current-prefix-arg)))
+	 (not current-prefix-arg))
+   comint-mode)
   (save-excursion
     (goto-char (process-mark (get-buffer-process (current-buffer))))
     (forward-line 0)
@@ -2662,13 +2663,13 @@ comint-write-output
 (defun comint-append-output-to-file (filename)
   "Append output from interpreter since last input to FILENAME.
 Any prompt at the end of the output is not written."
-  (interactive "fAppend output to file: ")
+  (interactive "fAppend output to file: " comint-mode)
   (comint-write-output filename t))
 
 (defun comint-show-output ()
   "Display start of this batch of interpreter output at top of window.
 Sets mark to the value of point when this command is run."
-  (interactive)
+  (interactive nil comint-mode)
   (push-mark)
   (let ((pos (or (marker-position comint-last-input-end) (point-max))))
     (cond (comint-use-prompt-regexp
@@ -2682,13 +2683,13 @@ comint-show-output
 
 (defun comint-clear-buffer ()
   "Clear the comint buffer."
-  (interactive)
+  (interactive nil comint-mode)
   (let ((comint-buffer-maximum-size 0))
     (comint-truncate-buffer)))
 
 (defun comint-interrupt-subjob ()
   "Interrupt the current subjob."
-  (interactive)
+  (interactive nil comint-mode)
   (comint-skip-input)
   (interrupt-process nil comint-ptyp)
   ;; (process-send-string nil "\n")
@@ -2696,13 +2697,13 @@ comint-interrupt-subjob
 
 (defun comint-kill-subjob ()
   "Send kill signal to the current subjob."
-  (interactive)
+  (interactive nil comint-mode)
   (comint-skip-input)
   (kill-process nil comint-ptyp))
 
 (defun comint-quit-subjob ()
   "Send quit signal to the current subjob."
-  (interactive)
+  (interactive nil comint-mode)
   (comint-skip-input)
   (quit-process nil comint-ptyp))
 
@@ -2713,14 +2714,14 @@ comint-stop-subjob
 the top-level process running in the buffer.  If you accidentally do
 this, use \\[comint-continue-subjob] to resume the process.  (This
 is not a problem with most shells, since they ignore this signal.)"
-  (interactive)
+  (interactive nil comint-mode)
   (comint-skip-input)
   (stop-process nil comint-ptyp))
 
 (defun comint-continue-subjob ()
   "Send CONT signal to process buffer's process group.
 Useful if you accidentally suspend the top-level process."
-  (interactive)
+  (interactive nil comint-mode)
   (continue-process nil comint-ptyp))
 
 (defun comint-skip-input ()
@@ -2741,7 +2742,7 @@ comint-skip-input
 
 (defun comint-kill-input ()
   "Kill all text from last stuff output by interpreter to point."
-  (interactive)
+  (interactive nil comint-mode)
   (let ((pmark (process-mark (get-buffer-process (current-buffer)))))
     (if (> (point) (marker-position pmark))
 	(kill-region pmark (point)))))
@@ -2749,7 +2750,7 @@ comint-kill-input
 (defun comint-delchar-or-maybe-eof (arg)
   "Delete ARG characters forward or send an EOF to subprocess.
 Sends an EOF only if point is at the end of the buffer and there is no input."
-  (interactive "p")
+  (interactive "p" comint-mode)
   (let ((proc (get-buffer-process (current-buffer))))
     (if (and (eobp) proc (= (point) (marker-position (process-mark proc))))
 	(comint-send-eof)
@@ -2757,7 +2758,7 @@ comint-delchar-or-maybe-eof
 
 (defun comint-send-eof ()
   "Send an EOF to the current buffer's process."
-  (interactive)
+  (interactive nil comint-mode)
   (comint-send-input t t)
   (process-send-eof))
 
@@ -2769,7 +2770,7 @@ comint-backward-matching-input
 
 With prefix argument N, search for Nth previous match.
 If N is negative, find the next or Nth next match."
-  (interactive (comint-regexp-arg "Backward input matching (regexp): "))
+  (interactive (comint-regexp-arg "Backward input matching (regexp): ") comint-mode)
   (if comint-use-prompt-regexp
       ;; Use comint-prompt-regexp
       (let* ((re (concat comint-prompt-regexp ".*" regexp))
@@ -2801,7 +2802,7 @@ comint-forward-matching-input
 
 With prefix argument N, search for Nth following match.
 If N is negative, find the previous or Nth previous match."
-  (interactive (comint-regexp-arg "Forward input matching (regexp): "))
+  (interactive (comint-regexp-arg "Forward input matching (regexp): ") comint-mode)
   (comint-backward-matching-input regexp (- n)))
 
 
@@ -2810,7 +2811,7 @@ comint-next-prompt
 If `comint-use-prompt-regexp' is nil, then this means the beginning of
 the Nth next `input' field, otherwise, it means the Nth occurrence of
 text matching `comint-prompt-regexp'."
-  (interactive "^p")
+  (interactive "^p" comint-mode)
   (if comint-use-prompt-regexp
       ;; Use comint-prompt-regexp
       (let ((paragraph-start comint-prompt-regexp))
@@ -2847,7 +2848,7 @@ comint-previous-prompt
 If `comint-use-prompt-regexp' is nil, then this means the beginning of
 the Nth previous `input' field, otherwise, it means the Nth occurrence of
 text matching `comint-prompt-regexp'."
-  (interactive "^p")
+  (interactive "^p" comint-mode)
   (comint-next-prompt (- n)))
 
 ;; State used by `comint-insert-previous-argument' when cycling.
@@ -2875,7 +2876,7 @@ comint-insert-previous-argument
 with the first command).  Values of INDEX < 0 count from the end, so
 INDEX = -1 is the last argument.  This command is like \"M-.\" in
 Bash and zsh."
-  (interactive "P")
+  (interactive "P" comint-mode)
   (unless (null index)
     (setq index (prefix-numeric-value index)))
   (cond ((eq last-command this-command)
@@ -2949,7 +2950,7 @@ comint-kill-whole-line
 If COUNT is zero, kill current line but exclude the trailing newline.
 The read-only status of newlines is updated with `comint-update-fence',
 if necessary."
-  (interactive "p")
+  (interactive "p" comint-mode)
   (let ((inhibit-read-only t) (inhibit-field-text-motion t))
     (kill-whole-line count)
     (when (>= count 0) (comint-update-fence))))
@@ -2968,7 +2969,7 @@ comint-kill-region
 the case, this command just calls `kill-region' with all
 read-only properties intact.  The read-only status of newlines is
 updated using `comint-update-fence', if necessary."
-  (interactive "r")
+  (interactive "r" comint-mode)
   (save-excursion
     (let* ((true-beg (min beg end))
 	   (true-end (max beg end))
@@ -3363,7 +3364,7 @@ comint-dynamic-complete-filename
 completions listing is dependent on the value of `comint-completion-autolist'.
 
 Returns t if successful."
-  (interactive)
+  (interactive nil comint-mode)
   (when (comint--match-partial-filename)
     (unless (window-minibuffer-p)
       (message "Completing file name..."))
@@ -3438,7 +3439,7 @@ comint-replace-by-expanded-filename
 filename absolute.  For expansion see `expand-file-name' and
 `substitute-in-file-name'.  For completion see
 `comint-dynamic-complete-filename'."
-  (interactive)
+  (interactive nil comint-mode)
   (let ((filename (comint-match-partial-filename)))
     (when filename
       (replace-match (expand-file-name filename) t t)
@@ -3446,7 +3447,7 @@ comint-replace-by-expanded-filename
 
 (defun comint-dynamic-list-filename-completions ()
   "Display a list of possible completions for the filename at point."
-  (interactive)
+  (interactive nil comint-mode)
   (let* ((data (comint--complete-file-name-data))
          (minibuffer-completion-table (nth 2 data))
          (minibuffer-completion-predicate nil)
@@ -3534,7 +3535,7 @@ comint-get-next-from-history
   "After fetching a line from input history, this fetches the following line.
 In other words, this recalls the input line after the line you recalled last.
 You can use this to repeat a sequence of input lines."
-  (interactive)
+  (interactive nil comint-mode)
   (if comint-save-input-ring-index
       (progn
 	(setq comint-input-ring-index (1+ comint-save-input-ring-index))
@@ -3548,7 +3549,7 @@ comint-accumulate
 to send all the accumulated input, at once.
 The entire accumulated text becomes one item in the input history
 when you send it."
-  (interactive)
+  (interactive nil comint-mode)
   (when-let* ((proc (get-buffer-process (current-buffer)))
               (pmark (process-mark proc))
               ((or (marker-position comint-accum-marker)
@@ -3573,7 +3574,7 @@ comint-goto-process-mark
   "Move point to the process mark.
 The process mark separates output, and input already sent,
 from input that has not yet been sent."
-  (interactive)
+  (interactive nil comint-mode)
   (let ((proc (or (get-buffer-process (current-buffer))
 		  (user-error "Current buffer has no process"))))
     (goto-char (process-mark proc))
@@ -3591,14 +3592,14 @@ comint-bol-or-process-mark
 is at the beginning of the current input line; but if you have
 used \\[comint-accumulate] to send multiple lines at once,
 the process mark is at the beginning of the accumulated input."
-  (interactive)
+  (interactive nil comint-mode)
   (if (not (eq last-command 'comint-bol-or-process-mark))
       (comint-bol nil)
     (comint-goto-process-mark)))
 
 (defun comint-set-process-mark ()
   "Set the process mark at point."
-  (interactive)
+  (interactive nil comint-mode)
   (let ((proc (or (get-buffer-process (current-buffer))
 		  (user-error "Current buffer has no process"))))
     (set-marker (process-mark proc) (point))
@@ -3755,7 +3756,7 @@ comint-redirect-setup
 
 (defun comint-redirect-cleanup ()
   "End a Comint redirection.  See `comint-redirect-send-command'."
-  (interactive)
+  (interactive nil comint-mode)
   ;; Release the last redirected string
   (setq comint-redirect-previous-input-string nil)
   ;; Restore the process filter
@@ -3864,7 +3865,7 @@ comint-redirect-send-command
 With prefix arg ECHO, echo output in process buffer.
 
 If NO-DISPLAY is non-nil, do not show the output buffer."
-  (interactive "sCommand: \nBOutput Buffer: \nP")
+  (interactive "sCommand: \nBOutput Buffer: \nP" comint-mode)
   (let ((process (get-buffer-process (current-buffer))))
     (if process
 	(comint-redirect-send-command-to-process
@@ -3878,7 +3879,7 @@ comint-redirect-send-command-to-process
 With prefix arg, echo output in process buffer.
 
 If NO-DISPLAY is non-nil, do not show the output buffer."
-  (interactive "sCommand: \nBOutput Buffer: \nbProcess Buffer: \nP")
+  (interactive "sCommand: \nBOutput Buffer: \nbProcess Buffer: \nP" comint-mode)
   (let* (;; The process buffer
 	 (process-buffer (if (processp process)
 			     (process-buffer process)
@@ -4047,6 +4048,7 @@ comint-fontify-input-mode
 non-nil.  Input fontification isn't compatible with this
 setting."
   :lighter nil
+  :interactive (comint-mode)
   (if comint-fontify-input-mode
       (let ((success nil))
         (unwind-protect
-- 
2.44.0


--=-=-=--




Acknowledgement sent to Augusto Stoffel <arstoffel@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#70555; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 18 May 2024 22:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.