all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* where-is-internal's firstonly
@ 2004-10-01  7:37 Kenichi Handa
  2004-10-01 12:40 ` Stefan
  0 siblings, 1 reply; 3+ messages in thread
From: Kenichi Handa @ 2004-10-01  7:37 UTC (permalink / raw)


It seems that where-is-internal handle the arg FIRSTONLY not
well.

Provided that the current active maps are MAP1 and MAP2
in this order, and we have these key bindings:
  MAP1: "1" -> func, "2" -> func
  MAP2: "A" -> func, "B" -> func
  
The function where_is_internal at first accumulates keys for
MAP1 in the variable SEQUENCES as ("2" "1") and then store
them in the variable FOUND as ("1" "2"), next accumulates keys
for MAP2 in SEQUENCES as ("B" "A") and then store them in
FOUND as ("A" "B" "1" "2").  Next FOUND is reversed to ("2"
"1" "B" "A").  So "2" is returned.  
 
In short, where-is-internal finds the last binding in the
first active map.

Is this a bug?  Or, is the important thing for
where-is-internal is to find a binding in first map, and
it's not important to find which binding in that map?

---
Ken'ichi HANDA
handa@m17n.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: where-is-internal's firstonly
  2004-10-01  7:37 where-is-internal's firstonly Kenichi Handa
@ 2004-10-01 12:40 ` Stefan
  2004-10-04  1:26   ` Kenichi Handa
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan @ 2004-10-01 12:40 UTC (permalink / raw)
  Cc: emacs-devel

> In short, where-is-internal finds the last binding in the
> first active map.

> Is this a bug?

It's not a bug in the sense that the documentation is silent about this part
of the behavior.  Usually the selection of "which binding to use" uses other
criterions such as "simple ascii char vs. mouse binding".

But that also means that changing the behavior such that "1" is returned in
your example would not introduce a bug either and it can be argued that it'd
be a better behavior.


        Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: where-is-internal's firstonly
  2004-10-01 12:40 ` Stefan
@ 2004-10-04  1:26   ` Kenichi Handa
  0 siblings, 0 replies; 3+ messages in thread
From: Kenichi Handa @ 2004-10-04  1:26 UTC (permalink / raw)
  Cc: emacs-devel

In article <m1fz4ylinv.fsf-monnier+emacs@gnu.org>, Stefan <monnier@iro.umontreal.ca> writes:

>>  In short, where-is-internal finds the last binding in the
>>  first active map.

>>  Is this a bug?

> It's not a bug in the sense that the documentation is silent about this part
> of the behavior.  Usually the selection of "which binding to use" uses other
> criterions such as "simple ascii char vs. mouse binding".

Thank you for the clarification.

> But that also means that changing the behavior such that "1" is returned in
> your example would not introduce a bug either and it can be argued that it'd
> be a better behavior.

I put this issue in my todo-list.  As it is not a bug, let's
fix it after the release.

---
Ken'ichi HANDA
handa@m17n.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-10-04  1:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-01  7:37 where-is-internal's firstonly Kenichi Handa
2004-10-01 12:40 ` Stefan
2004-10-04  1:26   ` Kenichi Handa

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.