Re: howto extend "window-ops-menu"?



Christopher Roy Bratusek wrote:

> Am Fri, 15 Oct 2010 16:23:06 +0200
> schrieb clemens fischer <ino-news spotteswoode dnsalias org>:
>
> ;; extra window-ops
>
> (nconc window-ops-menu `(()
>                         (,(_ "_Destroy Window") destroy-window)
>                         (,(_ "_Kill Client") kill-client)))
>
> will work.

It sure does!  Thank you!

> (_ ) marks "Text" as translatable, so either use (_ "Text" ) or "Text".
> ( "Text" ) is incomplete.
>
> The second, optional _ inside "Text" is the hotkey. Say "_Destroy
> Window" will allow you to press "d" to execute it, rather than using
> the mouse.
>
> If everything is correct, kill-client will be correctly executed.

I thought as much about "_" being for translations.  I still wonder why

(nconc window-ops-menu (list '() (cons "destroy" destroy-window)))

doesn't work.  In the value of window-ops-menu the format of an entry
seems to be a cons, ie. a dotted item where the car is text and the cdr
is a command to execute.


clemens



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]