unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#65876: 29.1.50; comint-*-prompt and sgml-skip-tag-* lack shift-selection marker in interactive spec
@ 2023-09-11 20:26 Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-09-12 11:11 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-11 20:26 UTC (permalink / raw)
  To: 65876

Not sure whether this is eligible for Emacs 29, and whether this is
an oversight or intention.

The functions

  comint-next-prompt
  comint-previous-prompt
  sgml-skip-tag-forward
  sgml-skip-tag-backward

all lack/could need a leading "^" (circumflex) in their interactive
specification to mark them so that they can be used with shift
translation.

If I should provide patch(es) for that, please let me know on what
version.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#65876: 29.1.50; comint-*-prompt and sgml-skip-tag-* lack shift-selection marker in interactive spec
  2023-09-11 20:26 bug#65876: 29.1.50; comint-*-prompt and sgml-skip-tag-* lack shift-selection marker in interactive spec Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-09-12 11:11 ` Eli Zaretskii
  2023-09-12 20:41   ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2023-09-12 11:11 UTC (permalink / raw)
  To: Jens Schmidt; +Cc: 65876

> Date: Mon, 11 Sep 2023 22:26:20 +0200
> From:  Jens Schmidt via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> Not sure whether this is eligible for Emacs 29, and whether this is
> an oversight or intention.
> 
> The functions
> 
>   comint-next-prompt
>   comint-previous-prompt
>   sgml-skip-tag-forward
>   sgml-skip-tag-backward
> 
> all lack/could need a leading "^" (circumflex) in their interactive
> specification to mark them so that they can be used with shift
> translation.

Agreed.

> If I should provide patch(es) for that, please let me know on what
> version.

This should be for master (Emacs 30), since it's an enhancement.
Thanks in advance.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#65876: 29.1.50; comint-*-prompt and sgml-skip-tag-* lack shift-selection marker in interactive spec
  2023-09-12 11:11 ` Eli Zaretskii
@ 2023-09-12 20:41   ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-09-16 10:09     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-12 20:41 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 65876

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

On 2023-09-12  13:11, Eli Zaretskii wrote:
>> Date: Mon, 11 Sep 2023 22:26:20 +0200
>> From:  Jens Schmidt via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>>
>> If I should provide patch(es) for that, please let me know on what
>> version.
> 
> This should be for master (Emacs 30), since it's an enhancement.
> Thanks in advance.

Patch attached.  Please review and consider for committing to master.

Thanks.

[-- Attachment #2: 0001-Declare-more-functions-as-shift-translatable-motion-.patch --]
[-- Type: text/x-patch, Size: 2437 bytes --]

From cd39da566d902bdb56d1d5e59cc931a492c73b60 Mon Sep 17 00:00:00 2001
From: Jens Schmidt <jschmidt4gnu@vodafonemail.de>
Date: Tue, 12 Sep 2023 22:35:13 +0200
Subject: [PATCH] Declare more functions as shift-translatable motion commands

* lisp/comint.el (comint-next-prompt, comint-previous-prompt): Declare
as shift-translatable motion commands.
* lisp/textmodes/sgml-mode.el (sgml-skip-tag-backward)
(sgml-skip-tag-forward): Declare as shift-translatable motion
commands.  (Bug#65876)
---
 lisp/comint.el              | 4 ++--
 lisp/textmodes/sgml-mode.el | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/comint.el b/lisp/comint.el
index 97b48371752..de7cc5b0e86 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -2810,7 +2810,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")
   (if comint-use-prompt-regexp
       ;; Use comint-prompt-regexp
       (let ((paragraph-start comint-prompt-regexp))
@@ -2847,7 +2847,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-next-prompt (- n)))
 
 ;; State used by `comint-insert-previous-argument' when cycling.
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 27f3b2acd1c..5c53716c3ac 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -923,7 +923,7 @@ sgml-skip-tag-backward
   "Skip to beginning of tag or matching opening tag if present.
 With prefix argument ARG, repeat this ARG times.
 Return non-nil if we skipped over matched tags."
-  (interactive "p")
+  (interactive "^p")
   ;; FIXME: use sgml-get-context or something similar.
   (let ((return t))
     (while (>= arg 1)
@@ -1036,7 +1036,7 @@ sgml-skip-tag-forward
   "Skip to end of tag or matching closing tag if present.
 With prefix argument ARG, repeat this ARG times.
 Return t if after a closing tag."
-  (interactive "p")
+  (interactive "^p")
   ;; FIXME: Use sgml-get-context or something similar.
   ;; It currently might jump to an unrelated </P> if the <P>
   ;; we're skipping has no matching </P>.
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#65876: 29.1.50; comint-*-prompt and sgml-skip-tag-* lack shift-selection marker in interactive spec
  2023-09-12 20:41   ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-09-16 10:09     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2023-09-16 10:09 UTC (permalink / raw)
  To: Jens Schmidt; +Cc: 65876-done

> Date: Tue, 12 Sep 2023 22:41:59 +0200
> Cc: 65876@debbugs.gnu.org
> From: Jens Schmidt <jschmidt4gnu@vodafonemail.de>
> 
> On 2023-09-12  13:11, Eli Zaretskii wrote:
> >> Date: Mon, 11 Sep 2023 22:26:20 +0200
> >> From:  Jens Schmidt via "Bug reports for GNU Emacs,
> >>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> >>
> >> If I should provide patch(es) for that, please let me know on what
> >> version.
> > 
> > This should be for master (Emacs 30), since it's an enhancement.
> > Thanks in advance.
> 
> Patch attached.  Please review and consider for committing to master.

Thanks, installed on master, and closing the bug.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-09-16 10:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11 20:26 bug#65876: 29.1.50; comint-*-prompt and sgml-skip-tag-* lack shift-selection marker in interactive spec Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-12 11:11 ` Eli Zaretskii
2023-09-12 20:41   ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-16 10:09     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).