[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: x-popup-menu - window object
From: |
martin rudalics |
Subject: |
Re: x-popup-menu - window object |
Date: |
Thu, 28 Sep 2006 09:00:40 +0200 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
> I guess I have a larger question:
> When should one use 'list?
At the very moment, evaluating
'((50 50) (selected-window))
in buffer *scratch* gets me
((50 50) (selected-window))
while evaluating
(list '(50 50) (selected-window))
gets me
((50 50) #<window 42 on *scratch*>)
because in Elisp "cons evaluates its arguments" and `list' is based on
`cons'.
`x-popup-menu' expects, according to its doc-string, as first argument
something like "list ((XOFFSET YOFFSET) WINDOW)" where WINDOW denotes an
object of type window. In practice, this means that you have to find a
function (like `selected-window') that returns a window object and feed
`x-popup-menu' with the _return value_ of that function. It's not
sufficient to feed `x-popup-menu' just with the reference to a function
that would tell it how to find such a window.