18 Jul 2012 22:54
bug#11983: 24.1; Electric-command-loop broken?
Roland Winkler <winkler <at> gnu.org>
2012-07-18 20:54:45 GMT
2012-07-18 20:54:45 GMT
I am trying to understand Electric-command-loop in electric.el
(this is used by BBDB 3):
Two things:
- The code contains a hard-coded
(setq universal-argument-num-events 0)
Apparently this is never reset, so exiting Electric-command-loop
leaves behind this binding.
- The doc string says
;; Given third argument non-nil, it
;; INHIBITS quitting unless the user types C-g at toplevel. This is
;; so user can do things like C-u C-g and not get thrown out.
Yet it appears to me, that even for C-u C-g the user gets thrown out.
Here is a slightly simplified version of the code from Electric-command-loop
It does not distinguish between C-g and C-u C-g.
Unfortunately, this hackery goes beyond my understanding of Emacs
internals.
(catch 'return-tag
(let (cmd (inhibit-quit t))
(while t
(setq cmd (read-key-sequence "Prompt: "))
(setq last-command-event (aref cmd (1- (length cmd)))
this-command (key-binding cmd t)
(Continue reading)
RSS Feed