GNU bug report logs -
#48695
python.el *-backspace functionality behavior
Previous Next
Full log
View this message in rfc822 format
> Cc: mikpom <at> fastmail.com,
> Jakub Ječmínek <kuba <at> kubajecminek.cz>,
> 48695 <at> debbugs.gnu.org
> Date: Mon, 30 Jun 2025 00:19:53 +0200
> From: Jakub Ječmínek via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> * lisp/progmodes/python.el (python-indent-dedent-line-backspace):
> Check for an active region when deciding whether to perform a
> backward delete. (Bug#48695)
>
> * test/lisp/progmodes/python-tests.el: Add regression test
> `python-indent-dedent-line-backspace-4'.
> ---
> lisp/progmodes/python.el | 4 +++-
> test/lisp/progmodes/python-tests.el | 15 +++++++++++++++
> 2 files changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
> index f4f0518dbfd..17fabc322fa 100644
> --- a/lisp/progmodes/python.el
> +++ b/lisp/progmodes/python.el
> @@ -1970,7 +1970,9 @@ python-indent-dedent-line-backspace
> Argument ARG is passed to `backward-delete-char-untabify' when
> point is not in between the indentation."
> (interactive "*p")
> - (unless (python-indent-dedent-line)
> + (unless (and
> + (not (region-active-p))
> + (python-indent-dedent-line))
> (backward-delete-char-untabify arg)))
>
> (put 'python-indent-dedent-line-backspace 'delete-selection 'supersede)
This is an incompatible change in behavior. I wonder whether we can
do this unconditionally. Maybe some user option is in order to
control this behavior?
kobarity, any comments or suggestions?
This bug report was last modified 13 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.