* Why does where-is-internal return nil?
@ 2004-04-24 22:13 Juanma Barranquero
2004-04-25 0:10 ` Andreas Schwab
0 siblings, 1 reply; 4+ messages in thread
From: Juanma Barranquero @ 2004-04-24 22:13 UTC (permalink / raw)
A question about where-is-internal and keymaps.
I'm trying to do the following:
;;;; .emacs.el contains:
(global-set-key [f12] 'ielm)
(add-hook 'ielm-mode-hook
(lambda ()
(define-key ielm-map
(where-is-internal 'ielm nil t)
'ignore)))
;;; end of .emacs.el
According to docs, `where-is-internal' should be searching in "all the
currently active keymaps", because KEYMAP is nil.
Now:
emacs => we're on *scratch*
f12 => ielm starts
C-x k RET => ielm buffer deleted, we're back on *scratch*
f12 => "Wrong type argument: arrayp, nil"
Somehow, on the second call, `where-is-internal' is returning nil. It
doesn't happen if I pass `global-map' to KEYMAP instead of nil, but that
means that, on the second call, `where-is-internal' is looking... where?
/L/e/k/t/u
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Why does where-is-internal return nil?
2004-04-24 22:13 Why does where-is-internal return nil? Juanma Barranquero
@ 2004-04-25 0:10 ` Andreas Schwab
2004-04-25 0:44 ` Juanma Barranquero
2004-08-20 22:18 ` Stefan Monnier
0 siblings, 2 replies; 4+ messages in thread
From: Andreas Schwab @ 2004-04-25 0:10 UTC (permalink / raw)
Cc: emacs-devel
Juanma Barranquero <lektu@mi.madritel.es> writes:
> Somehow, on the second call, `where-is-internal' is returning nil. It
> doesn't happen if I pass `global-map' to KEYMAP instead of nil, but that
> means that, on the second call, `where-is-internal' is looking... where?
The problem appears to be in current-active-maps, it returns a list that
includes ielm-map even though it is not active anymore.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Why does where-is-internal return nil?
2004-04-25 0:10 ` Andreas Schwab
@ 2004-04-25 0:44 ` Juanma Barranquero
2004-08-20 22:18 ` Stefan Monnier
1 sibling, 0 replies; 4+ messages in thread
From: Juanma Barranquero @ 2004-04-25 0:44 UTC (permalink / raw)
On Sun, 25 Apr 2004 02:10:07 +0200, Andreas Schwab <schwab@suse.de> wrote:
> The problem appears to be in current-active-maps, it returns a list that
> includes ielm-map even though it is not active anymore.
Interesting (I didn't know about `current-active-maps').
BTW, it doesn't happen only with ielm-map. I did the test with
re-builder and it failed too.
Weird is, with ielm there's a flip-flop effect (you can run ielm, get
the error, run ielm, get the error), but with re-builder it was more
like: run, error, error, error...
Anyway, I'll take a look, but I think this is one for keyboard code
experts.
/L/e/k/t/u
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Why does where-is-internal return nil?
2004-04-25 0:10 ` Andreas Schwab
2004-04-25 0:44 ` Juanma Barranquero
@ 2004-08-20 22:18 ` Stefan Monnier
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2004-08-20 22:18 UTC (permalink / raw)
Cc: Juanma Barranquero, emacs-devel
>> Somehow, on the second call, `where-is-internal' is returning nil. It
>> doesn't happen if I pass `global-map' to KEYMAP instead of nil, but that
>> means that, on the second call, `where-is-internal' is looking... where?
> The problem appears to be in current-active-maps, it returns a list that
> includes ielm-map even though it is not active anymore.
What makes you think it's not active any more?
ielm-mode-hook is run in the ielm buffer with the ielm-map very
active indeed. The first time around, the binding is found
in global-map, whereas the second time around the global binding is hidden
by ielm-map's nil binding.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-08-20 22:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-24 22:13 Why does where-is-internal return nil? Juanma Barranquero
2004-04-25 0:10 ` Andreas Schwab
2004-04-25 0:44 ` Juanma Barranquero
2004-08-20 22:18 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).