unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#39627: [PATCH] Skip shell prompt on current line even if it's protected
@ 2020-02-15 23:13 Steven Allen
  2020-02-21  8:56 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Steven Allen @ 2020-02-15 23:13 UTC (permalink / raw)
  To: 39627

* lisp/eshell/em-prompt.el (eshell-previous-prompt): Really go to the
beginning of the line, even if it's protected.

When the eshell prompt is protected (e.g., with rear non-sticky,
inhibited movements, etc.), `beginning-of-line' won't move to the
actual beginning of the line and therefore won't skip over the
prompt.  This change simply switches to (forward-line 0).
---
 lisp/eshell/em-prompt.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/eshell/em-prompt.el b/lisp/eshell/em-prompt.el
index 25b8ccaba17..9ae5ae12816 100644
--- a/lisp/eshell/em-prompt.el
+++ b/lisp/eshell/em-prompt.el
@@ -187,7 +187,7 @@ See `eshell-prompt-regexp'."
   "Move to end of Nth previous prompt in the buffer.
 See `eshell-prompt-regexp'."
   (interactive "p")
-  (beginning-of-line)            ; Don't count prompt on current line.
+  (forward-line 0)            ; Don't count prompt on current line.
   (eshell-next-prompt (- n)))
 
 (defun eshell-skip-prompt ()
-- 
2.25.0






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

* bug#39627: [PATCH] Skip shell prompt on current line even if it's protected
  2020-02-15 23:13 bug#39627: [PATCH] Skip shell prompt on current line even if it's protected Steven Allen
@ 2020-02-21  8:56 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2020-02-21  8:56 UTC (permalink / raw)
  To: Steven Allen; +Cc: 39627-done

> From: Steven Allen <steven@stebalien.com>
> Date: Sat, 15 Feb 2020 15:13:59 -0800
> 
> * lisp/eshell/em-prompt.el (eshell-previous-prompt): Really go to the
> beginning of the line, even if it's protected.
> 
> When the eshell prompt is protected (e.g., with rear non-sticky,
> inhibited movements, etc.), `beginning-of-line' won't move to the
> actual beginning of the line and therefore won't skip over the
> prompt.  This change simply switches to (forward-line 0).

Thanks, pushed to the emacs-27 branch.

Please note that I needed to massage your log message a little, to
make it more according to our conventions (described in CONTRIBUTE).
Please study the changes I made and try to follow this style in the
future.





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

end of thread, other threads:[~2020-02-21  8:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-15 23:13 bug#39627: [PATCH] Skip shell prompt on current line even if it's protected Steven Allen
2020-02-21  8:56 ` 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).