all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 11325@debbugs.gnu.org
Subject: bug#11325: 24.1.50; regression: bad order for `substitute-command-keys' with keymap
Date: Wed, 20 Oct 2021 14:32:58 -0700	[thread overview]
Message-ID: <CADwFkmnsY9pGbGBzCLgJVDZYc39JMLzdf2uNDHCgV_C2DUFEtQ@mail.gmail.com> (raw)
In-Reply-To: <87a9dza7gl.fsf@building.gnus.org> (Lars Ingebrigtsen's message of "Sun, 09 Feb 2014 20:59:38 -0800")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> "Drew Adams" <drew.adams@oracle.com> writes:
>
>> Then it was broken differently in Emacs 24, which puts `e..f'
>> first in the list, but restores `0..9' to its rightful place.
>
> Isn't the main problem here that it even tries to do a two-letter range?
> Seems awfully odd to me:

This could be easily fixed using:

diff --git a/src/keymap.c b/src/keymap.c
index ca1dbe368e..1c6f75a767 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -3101,10 +3101,13 @@ describe_vector (Lisp_Object vector,
Lisp_Object prefix, Lisp_Object args,
 	    }
 	}

-      /* If we have a range of more than one character,
-	 print where the range reaches to.  */
+      /* If we have a range of more than two characters, print where
+	 the range reaches to.  We specifically avoid printing two
+	 character ranges, as they aren't very easy on the reader.  */

-      if (i != starting_i)
+      if ((i - starting_i) < 2)
+	i = starting_i;
+      else
 	{
 	  insert (" .. ", 4);

> (substitute-command-keys "\\{dired-mode-map}")
> "key             binding
> ---             -------
>
> e .. f		dired-find-file
>
> C-c		Prefix Command
> RET		dired-find-file
> C-o		dired-display-file
> C-t		Prefix Command
> ESC		Prefix Command
> SPC		dired-next-line
> !		dired-do-shell-command
> #		dired-flag-auto-save-files
> $		dired-hide-subdir
> %		Prefix Command
> &		dired-do-async-shell-command
> (		dired-hide-details-mode
> *		Prefix Command
> +		dired-create-directory
> -		negative-argument
> .		dired-clean-directory
> 0 .. 9		digit-argument





  parent reply	other threads:[~2021-10-20 21:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24 15:11 bug#11325: 24.1.50; regression: bad order for `substitute-command-keys' with keymap Drew Adams
2012-09-17  0:02 ` Drew Adams
2014-02-10  4:59 ` Lars Ingebrigtsen
2014-02-10  5:09   ` Drew Adams
2016-04-28 14:43   ` Lars Ingebrigtsen
2016-04-28 15:00     ` Lars Ingebrigtsen
2016-04-29 16:35       ` Lars Ingebrigtsen
2022-01-31 16:32         ` Lars Ingebrigtsen
2022-01-31 16:38           ` bug#11325: [External] : " Drew Adams
2021-10-20 21:32   ` Stefan Kangas [this message]
2021-10-21  3:11     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADwFkmnsY9pGbGBzCLgJVDZYc39JMLzdf2uNDHCgV_C2DUFEtQ@mail.gmail.com \
    --to=stefan@marxist.se \
    --cc=11325@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.