unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alex Branham <alex.branham@gmail.com>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 30452@debbugs.gnu.org
Subject: bug#30452: [PATCH] Use 'make-sparse-keymap' rather than 'copy-keymap'
Date: Sat, 19 Jan 2019 10:05:17 +0200	[thread overview]
Message-ID: <83lg3hax8i.fsf@gnu.org> (raw)
In-Reply-To: <8736ptiz1b.fsf@gmail.com> (message from Alex Branham on Tue, 15 Jan 2019 11:57:52 -0600)

> From: Alex Branham <alex.branham@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@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





  reply	other threads:[~2019-01-19  8:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14  3:52 bug#30452: 25.3; tabulated-list-mode-map should inherit from special-mode-map Stephen Jung
2019-01-15 17:57 ` bug#30452: [PATCH] Use 'make-sparse-keymap' rather than 'copy-keymap' Alex Branham
2019-01-19  8:05   ` Eli Zaretskii [this message]
2019-01-19 15:33     ` Stefan Monnier
2019-01-21 15:53       ` Alex Branham
2019-01-25  8:50         ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83lg3hax8i.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=30452@debbugs.gnu.org \
    --cc=alex.branham@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /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 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).