Emacs Bug: using universal argument to insert a unicode char with key defined by “key-translation-map” creates error and disables undo

Emacs Bug: C-u & key-translation-map disables undo.

This seems like a bug. Steps to reproduce:

  • Start GNU Emacs 23.2 with “-Q”. (so it doesn't load any custome init files.)
  • Evaluate this: (define-key key-translation-map (kbd "M--") (kbd "─")) (it lets you press 【Alt+-】 to insert a unicode char “BOX DRAWINGS LIGHT HORIZONTAL” (U+2500).)
  • Open a new buffer.
  • Type 【C-u 30 M--】. (insert the char 30 times.)
  • You get this error: universal-argument-other-key: Args out of range: " ─", 0, 7
  • Now, do Type 【C-u 30 M--】 again. This time, no problem.
  • The worst problem is this: Now, when you try to undo, emacs says “No further undo information”.

Popular posts from this blog

11 Years of Writing About Emacs

does md5 creates more randomness?

Google Code shutting down, future of ErgoEmacs