emacs-pretest-bug
[Top][All Lists]
Advanced

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

Weired side-effect of using the remap feature in keymaps


From: Carsten Dominik
Subject: Weired side-effect of using the remap feature in keymaps
Date: Thu, 29 Mar 2007 13:30:20 +0200


Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the address@hidden mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

I would like to report a weired bug that looks like a side effect of
using the remap feature for keymaps.  This bug waas discovered
by Thomas Baumann (cc on this email) while using Org-mode, but
as I show below it is not related to Org-mode but to the
internalremapping feature for keymaps.

Here is what you need to do in order to reproduce the bug:

1. Start Emacs with emacs -Q

2. Evaluate the following Lisp code:

        ;; Define a keymap
        (defvar my-dummy-map (make-keymap))

        ;; Now use the remap feature to remap delete-backward-char
        (define-key my-dummy-map
          (vector 'remap 'delete-backward-char) 'backward-char)

        ;; Create a buffer and actually install that map.  This step
        ;; seems to be necessary for the bug to occcur.
        (switch-to-buffer (get-buffer-create "foo"))
        (use-local-map my-dummy-map)

3. Now, start calc with `M-x calc RET'.

4. If you now check the definition of the DEL key, for example with
   `C-h k DEL', you will see that in calc-mode, this key is now bound
   to `backward-char', even though the remapping was done in
   `my-dummy-map'.  When calc binds the DEL key, it actually scans the
   global map for any key bound to `delete-backward-char' using

     (where-is-internal 'delete-backward-char global-map)

   This search seems to fail after the code above, i.e. something
   seems to have changed in global map which should not have changed.


I hope this is enough to put someone on the trail of this bug.

Thanks!

- Carsten Dominik


In GNU Emacs 22.0.95.1 (powerpc-apple-darwin7.9.0, X toolkit)
 of 2007-03-19 on nb-dominik2.science.uva.nl
Windowing system distributor `The XFree86 Project, Inc', version 11.0.40300000
configured using `configure  '--with-x''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <menu-bar> <help-menu> <report-emacs-b
ug>

Recent messages:
(ne -Q testcalc.el)
For information about the GNU Project and its goals, type C-h C-p.
Loading vc-svn...done
Loading vc...
Loading easymenu...done
Loading vc...done
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done





reply via email to

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