"Drew Adams" <[EMAIL PROTECTED]> writes:

>     If remapping works for self-insert-command, why can't you use it for
>     other commands?
>
> ... because I cannot pass an OLDMAP arg for command
> remapping. I want to pick up all of the global-map bindings for the
> remapping, but some are shadowed (so, missing) locally, so they are not
> taken into account by remapping. 

That is correct.  There is no way command remapping can handle the OLDMAP
functionality of substitute-key-definition.

In your case with substitute-key-definition and self-insert-command,
did you create the NEWMAP using make-keymap or make-sparse-keymap ?

Does it make a difference to use either of these?

Does any of the following expressions run significantly slower
than others?  What value does the first expression return?

(let ((n 0))
  (map-keymap
    (lambda (char defn)
      (if (eq defn 'self-insert-command)
          (setq n (1+ n))))
    global-map)
  n)

(let ((map (make-keymap)))
  (map-keymap
    (lambda (char defn)
      (when (eq defn 'self-insert-command)
        (define-key map (vector char) defn)))
    global-map)
  map)

(let ((map (make-sparse-keymap)))
  (map-keymap
    (lambda (char defn)
      (when (eq defn 'self-insert-command)
        (define-key map (vector char) defn)))
    global-map)
  map)


-- 
Kim F. Storm <[EMAIL PROTECTED]> http://www.cua.dk



_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to