From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: [PATCH] Don't override 'comint-prompt-read-only' by default Date: Fri, 13 Sep 2024 17:35:37 +0000 Message-ID: <87a5gb4fti.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4874"; mail-complaints-to="usenet@ciao.gmane.io" To: "Emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 13 19:36:31 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1spADe-00015Q-A3 for ged-emacs-devel@m.gmane-mx.org; Fri, 13 Sep 2024 19:36:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1spAD3-0007F5-L7; Fri, 13 Sep 2024 13:35:53 -0400 Original-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 1spACu-0006gG-Ve for Emacs-devel@gnu.org; Fri, 13 Sep 2024 13:35:46 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1spACs-0006wD-Cn for Emacs-devel@gnu.org; Fri, 13 Sep 2024 13:35:44 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 4D2FD240027 for ; Fri, 13 Sep 2024 19:35:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1726248939; bh=Ww6S0xoIADZ/tBCebzqEX01Po3NydRiWDt893oU0QRs=; h=From:To:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=UpZ4RTGCxtUh9naAuG/9LQMv7QWp/aGn8VTvf5G/t4zzE30jrA7B8pRSianBH//uu zLs0JATAW+MQMaWaDG327XsvhwZB+WWU2klrZbMF/z9Jti5hE+aCzdd40Z6ZHffiFB 8x+OFblgHU+sWQ4Mp7yC67b5uMbNxxrrE5bPXF3SuuzYkVvG+NoBMdRVke8moFDSoM PY5QrQ5hTEOTiQUL30mBttXjZ6gtBVOWra4vEYPtftVsX0yCVlR+DIJ5QnMUAm82Ch yM95I8etBmqMMDq5x5sv+1zkmH+aCEb5zMwXu61TSfPUByY4VFZ4jgidpGPvtO5rtL 9mtK8TEDqk3Qw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4X51fy69J7z6twK for ; Fri, 13 Sep 2024 19:35:38 +0200 (CEST) Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=philipk@posteo.net; url="https://keys.openpgp.org/vks/v1/by-email/philipk@posteo.net"; preference=signencrypt Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323602 Archived-At: --=-=-= Content-Type: text/plain I am proposing this change here, because I am aware it might be controversial. My motivation is to have more consistent inferior modes, and not have to be surprised that (as in my case right now, inferior-python-mode doesn't allow be to kill a prompt). I haven't written a NEWS entry yet, but it should probably mention that anyone interested in restoring the old behaviour should just set 'comint-prompt-read-only' directly. WDYT? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Don't-override-'comint-prompt-read-only'-by-defaul.patch Content-Description: [PATCH] Don't override 'comint-prompt-read-only' by default >From c6240fb0f0d9932fb0986ee2426162b90b99b633 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Fri, 13 Sep 2024 19:32:55 +0200 Subject: [PATCH] Don't override 'comint-prompt-read-only' by default * lisp/cmuscheme.el (inferior-scheme-mode): Remove 'setq-local'. * lisp/ielm.el (ielm-prompt-read-only): Inherit default from 'comint-prompt-read-only'. * lisp/progmodes/lua-ts-mode.el (lua-ts-inferior-lua): Remove 'setq-local'. * lisp/progmodes/php-ts-mode.el (inferior-php-ts-mode): Remove 'setq-local'. * lisp/progmodes/python.el (inferior-python-mode): Remove 'setq-local'. --- lisp/cmuscheme.el | 1 - lisp/ielm.el | 2 +- lisp/progmodes/lua-ts-mode.el | 1 - lisp/progmodes/php-ts-mode.el | 1 - lisp/progmodes/python.el | 1 - 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lisp/cmuscheme.el b/lisp/cmuscheme.el index d4316fb1175..912fe6b8eca 100644 --- a/lisp/cmuscheme.el +++ b/lisp/cmuscheme.el @@ -195,7 +195,6 @@ inferior-scheme-mode (scheme-mode-variables) (setq mode-line-process '(":%s")) (setq comint-input-filter (function scheme-input-filter)) - (setq-local comint-prompt-read-only t) (setq comint-get-old-input (function scheme-get-old-input))) (defcustom inferior-scheme-filter-regexp "\\`\\s *\\S ?\\S ?\\s *\\'" diff --git a/lisp/ielm.el b/lisp/ielm.el index e583e0fe32c..1b8702abc1f 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -46,7 +46,7 @@ ielm-noisy "If non-nil, IELM will beep on error." :type 'boolean) -(defcustom ielm-prompt-read-only t +(defcustom ielm-prompt-read-only comint-prompt-read-only "If non-nil, the IELM prompt is read only. The read only region includes the newline before the prompt. Setting this variable does not affect existing IELM runs. diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el index 06daadbc1fd..2d039424a2f 100644 --- a/lisp/progmodes/lua-ts-mode.el +++ b/lisp/progmodes/lua-ts-mode.el @@ -645,7 +645,6 @@ lua-ts-inferior-lua (with-current-buffer lua-ts-inferior-buffer (setq-local comint-input-ignoredups t comint-input-ring-file-name lua-ts-inferior-history - comint-prompt-read-only t comint-prompt-regexp (rx-to-string `(: bol ,lua-ts-inferior-prompt (1+ space)))) diff --git a/lisp/progmodes/php-ts-mode.el b/lisp/progmodes/php-ts-mode.el index 3f89de14075..e3d14bd563c 100644 --- a/lisp/progmodes/php-ts-mode.el +++ b/lisp/progmodes/php-ts-mode.el @@ -1563,7 +1563,6 @@ inferior-php-ts-mode (setq-local scroll-conservatively 1 comint-input-ring-file-name php-ts-mode-inferior-history comint-input-ignoredups t - comint-prompt-read-only t comint-use-prompt-regexp t comint-prompt-regexp (concat "^" php-ts-mode--inferior-prompt " ")) (comint-read-input-ring t)) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 669638544ce..17563d29c63 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -3672,7 +3672,6 @@ inferior-python-mode (setq-local python-shell--prompt-calculated-output-regexp nil) (python-shell-prompt-set-calculated-regexps) (setq comint-prompt-regexp python-shell--prompt-calculated-input-regexp) - (setq-local comint-prompt-read-only t) (setq mode-line-process '(":%s")) (setq-local comint-output-filter-functions '(ansi-color-process-output -- 2.45.2 --=-=-= Content-Type: text/plain -- Philip Kaludercic on siskin --=-=-=--