emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Updated Patch for command remapping through keymaps


From: Richard Stallman
Subject: Re: Updated Patch for command remapping through keymaps
Date: Mon, 4 Feb 2002 02:26:57 -0700 (MST)

    + For example, if kill-line is bound to C-k, and kill-line is remapped

Please say "if C-k is bound to kill-line".  That is the normal ordering
for that word.

I don't think tha global-set-key and local-set-key should
accept a symbol.  They cannot read a symbol interactively anyway.

    !       /* It would probably be more correct to use is_command_symbol
    !    above and below instead of SYMBOLP, since remapping only
    !    works for sych symbols.

You proceed after this to explain why that would NOT be more correct.
So don't say it would "probably be more correct"--that is not true.
Instead, say "I thought of using ..."

    +   if (SYMBOLP (key))
    +     {
    +       GCPRO1 (key);
    +       cmd = access_keymap (keymap, key, t_ok, 0, 1);
    +       RETURN_UNGCPRO (cmd);
    +     }

No GCPRO is necessary here.

    !   if (NILP (no_remap) && is_command_symbol (value))
    !     {
    !       Lisp_Object value1;
    ! 
    !       value1 = Fkey_binding(value, accept_default, Qt);

Please put a space before the open-paren.
That is our convention.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]