GNU bug report logs -
#30452
25.3; tabulated-list-mode-map should inherit from special-mode-map
Previous Next
Reported by: Stephen Jung <tummychow511 <at> gmail.com>
Date: Wed, 14 Feb 2018 04:27:01 UTC
Severity: minor
Found in version 25.3
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Alex Branham <alex.branham <at> gmail.com>
> Date: Tue, 15 Jan 2019 11:57:52 -0600
>
> Here's a tiny patch that changes the call from copy-keymap to make-sparse-keymap.
>
> Thanks,
> Alex
>
> >From c7f6db630f720fd26f0f1cc45631326bdcec136c Mon Sep 17 00:00:00 2001
> From: Alex Branham <alex.branham <at> gmail.com>
> Date: Tue, 15 Jan 2019 11:50:55 -0600
> Subject: [PATCH] Make tabulated-list-mode-map inherit from special-mode-map
>
> * lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode-map): Use
> 'make-sparse-keymap' rather than copying 'special-mode-map'.
>
> Bug #30452
Maybe I'm missing something, but I thought the original bug report
said it should inherit from special-mode's keymap? Your patch doesn't
seem to be doing that, or did I miss something?
More generally, I wonder why we don't say in the ELisp manual that a
derived mode should do this with its keymap. Should we?
Thanks.
> lisp/emacs-lisp/tabulated-list.el | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
> index 6fdca2cd08..8c99728fd4 100644
> --- a/lisp/emacs-lisp/tabulated-list.el
> +++ b/lisp/emacs-lisp/tabulated-list.el
> @@ -151,7 +151,7 @@ tabulated-list-put-tag
> (forward-line)))
>
> (defvar tabulated-list-mode-map
> - (let ((map (copy-keymap special-mode-map)))
> + (let ((map (make-sparse-keymap)))
> (set-keymap-parent map button-buffer-map)
> (define-key map "n" 'next-line)
> (define-key map "p" 'previous-line)
> --
> 2.19.2
This bug report was last modified 6 years and 171 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.