unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: Enhancements to "minor-mode-map-alist" functionality.
Date: 16 Apr 2002 01:55:20 +0200	[thread overview]
Message-ID: <5xvgash5zr.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <200204152154.g3FLsjP23687@aztec.santafe.edu>

Richard Stallman <rms@gnu.org> writes:

>     > I am surprised that the present facilities can't be used more easily.
>     > Could you explain WHY you think this is necessary?  Perhaps there
>     > is already a better way.
> 
>     I'm pretty confiden that there isn't a _better_ way already.
> 
> Would you please explain to me why not?
> Before I agree that we need a new feature,
> I want to make sure we have not overlooked an
> existing good solution.  Please show the reasons
> why (you believe) these 7 keymaps are the only way.

They are not the only way!

In the CUA mode I've been promoting for the last few years I use
(only) three keymaps, a pretty complicated pre-command-hook to select
the proper keymap (to emulate the equivalent to the new command
remapping feature!), and a very ugly/messy piece of code bound to C-c
and C-x in the key-translation-map.

In addition, most functions are pretty overloaded with conditionals
to select the "proper action" for the current state.

With the new code I've written to use the new command remapping, and
the 7 keymaps, the code is _much_ simpler, as all the conditional code
is now moved out of the functions and centralized around selecting the
proper keymaps based on the current state.

I know for sure that using 7 keymaps is a vast improvement to the
old code which has been increasingly complex to maintain, so I definitely
didn't want to include that code with the emacs base.

> 
>     E.g. for cua, I need to ensure that those 7 keymaps are in the front
>     of minor-mode-map-alist after every command,
> 
> The first question is why you need 7 keymaps at all.  Why isn't one
> enough?  Why can't one key binding for a given key sequence handle all
> the various different circumstances, through conditionals in the code?

I did that to some extent in the old version of CUA.  I don't want
to repeat that mistake (in this context), as it contributed significantly
to the complexity of the old code.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

      reply	other threads:[~2002-04-15 23:55 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-11 22:56 Enhancements to "minor-mode-map-alist" functionality Kim F. Storm
2002-04-11 22:43 ` Stefan Monnier
2002-04-12  9:31   ` Kim F. Storm
2002-04-12 13:20     ` Kim F. Storm
2002-04-12 18:46       ` Stefan Monnier
     [not found]         ` <5xofgoobzr.fsf@kfs2.cua.dk>
     [not found]           ` <200204122021.g3CKLh217680@rum.cs.yale.edu>
2002-04-14 22:32             ` Kim F. Storm
2002-04-16 20:18               ` Richard Stallman
2002-04-16 22:34                 ` Kim F. Storm
2002-04-18 18:46                   ` Richard Stallman
2002-04-18 23:07                     ` Kim F. Storm
2002-04-19 13:43                       ` Stefan Monnier
2002-04-19 15:36                         ` Kim F. Storm
2002-04-19 14:46                           ` Stefan Monnier
2002-04-21 17:46                             ` Kim F. Storm
2002-04-22  9:28                               ` Stefan Monnier
2002-04-22 15:15                                 ` Kim F. Storm
2002-04-19 18:42                       ` Richard Stallman
2002-04-19 22:05                         ` Kim F. Storm
2002-04-20 17:27                           ` Richard Stallman
2002-04-21 11:08                             ` Kim F. Storm
2002-04-22  7:47                               ` Richard Stallman
2002-04-22 13:53                                 ` Kim F. Storm
2002-04-22 22:36                               ` Richard Stallman
2002-04-23 10:58                                 ` Kim F. Storm
2002-04-22 22:36                               ` Richard Stallman
2002-04-23 11:02                                 ` Kim F. Storm
2002-04-24 17:55                                   ` Richard Stallman
2002-04-26 13:44                                     ` Kim F. Storm
2002-04-27 22:41                                       ` Richard Stallman
2002-04-29  9:17                                         ` Kai Großjohann
2002-04-30  5:18                                           ` Richard Stallman
2002-04-30 21:25                                             ` Kim F. Storm
2002-05-01  7:14                                               ` Richard Stallman
2002-05-01 17:37                                                 ` Kim F. Storm
2002-04-14 23:11         ` Kim F. Storm
2002-04-12 18:20     ` Stefan Monnier
2002-04-12 21:05       ` Kim F. Storm
2002-04-12 20:30         ` Stefan Monnier
2002-04-12 22:08           ` Kim F. Storm
2002-04-13 19:05     ` Richard Stallman
2002-04-13 19:05 ` Richard Stallman
2002-04-13 23:30   ` Kim F. Storm
2002-04-15 12:34     ` Stefan Monnier
2002-04-17 16:03       ` Richard Stallman
2002-04-15 21:54     ` Richard Stallman
2002-04-15 23:55       ` Kim F. Storm [this message]

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=5xvgash5zr.fsf@kfs2.cua.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.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 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).