[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texmacs-dev] Wilcarding keymaps
From: |
Joris van der Hoeven |
Subject: |
Re: [Texmacs-dev] Wilcarding keymaps |
Date: |
Sun, 8 Dec 2002 18:16:01 +0100 (MET) |
> When I asked for "wildcarding keymaps" I did not clearly state my idea
> (probably because it was not very clear), but the idea was to allow
> shortcuts like "x |" "o |" (e.g.) and "| - >" to coexist.
>
> Also the described problem could be worked around in the current state
> by duplicating all shortcuts starting by "|" with 'variants' startings
> by "x |" which would insert "x" and the corresponding symbol.
>
> For example:
>
> (set-keymap (in-math?)
> ("x | tab" "<rtimes>")
> ("| -" "<vdash>")
> ("| - >" "<mapsto>")
> ; etc.
> ("x | -" "x<vdash>")
> ("x | - >" "x<mapsto>")
> ; etc
> )
>
> It might be possible to extend wildcarding to factor this:
>
> (set-keymap-regexen (in-math?)
> ("x \?" "x?"))
> (set-keymap (in-math?)
> ("x | tab" "<rtimes>")
> ("x? | -" (\1 "<vdash>"))
> ("x? | - >" (\1 "<mapsto>"))
> ; etc.
> )
>
> That in the spirit of what I was thinking when I asked for wildcarding
> keymaps. I know I did not explain my though, probably because it was
> (and is still) quite hazy.
Well, I won't have time to come back to this issue anyway.
It is possible that you can make the above the current system too,
but I don't have time to investigate this in detail.
As a general rule, it is probably better to avoid using
letters in shortcuts.