Lisp HUG Maillist Archive

Syntax for key sequences

Hi everybody,

I guess somewhere in the LW documentation one can find a section
explaining which syntax for key sequences a command like
EDITOR:BIND-KEY will accept, but I haven't found it yet.  It seems
that LispWorks up to 6.1 would accept something like

  (editor:bind-key "Compile Defun" #(#\control-\c #\control-\c) :mode "Lisp")

while LispWorks 7 chokes on it.  Any pointers?

Thanks,
Edi.

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Syntax for key sequences

Hi,

It’s something like this now: (LW6+ uses strings to describe combined keys)

  #+(and lispworks5 lw-editor)
  (bind-key "Compile and Load Buffer File"
	    #(#\control-\c #\control-\k) :mode "Lisp")

  #+(and (or lispworks6 lispworks7) lw-editor)
  (bind-key "Compile and Load Buffer File"
	    #("Control-c" "Control-k") :mode "Lisp”)

I found LW Editor manual didn’t mention this change explicitly, but all sample code in the manual has changed to use the new format [1].

Hope this helps,

Chun

[1] http://www.lispworks.com/documentation/lw70/EDUG-M/html/eduser-m-73.htm#32041

Il giorno 17/mag/2015, alle ore 19:08, Edi Weitz <edi@weitz.de> ha scritto:

> 
> Hi everybody,
> 
> I guess somewhere in the LW documentation one can find a section
> explaining which syntax for key sequences a command like
> EDITOR:BIND-KEY will accept, but I haven't found it yet.  It seems
> that LispWorks up to 6.1 would accept something like
> 
>  (editor:bind-key "Compile Defun" #(#\control-\c #\control-\c) :mode "Lisp")
> 
> while LispWorks 7 chokes on it.  Any pointers?
> 
> Thanks,
> Edi.
> 
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
> 


Re: Syntax for key sequences

>From reading the release notes, this probably has to do with the change to unicode. Check the release notes for what you need to do to specify bits now.
— 
Bradford Miller
6 Callaghan Blvd
Malta, NY 12020

bradfordmiller@mac.com




> On May 17, 2015, at 1:08 PM, Edi Weitz <edi@weitz.de> wrote:
> 
> 
> Hi everybody,
> 
> I guess somewhere in the LW documentation one can find a section
> explaining which syntax for key sequences a command like
> EDITOR:BIND-KEY will accept, but I haven't found it yet.  It seems
> that LispWorks up to 6.1 would accept something like
> 
>  (editor:bind-key "Compile Defun" #(#\control-\c #\control-\c) :mode "Lisp")
> 
> while LispWorks 7 chokes on it.  Any pointers?
> 
> Thanks,
> Edi.
> 
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
> 


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Syntax for key sequences

Edi Weitz <edi@weitz.de> writes:

> I guess somewhere in the LW documentation one can find a section
> explaining which syntax for key sequences a command like
> EDITOR:BIND-KEY will accept, but I haven't found it yet.  It seems
> that LispWorks up to 6.1 would accept something like
>
>   (editor:bind-key "Compile Defun" #(#\control-\c #\control-\c) :mode "Lisp")
>
> while LispWorks 7 chokes on it.  Any pointers?

See:

http://www.lispworks.com/documentation/lw70/RNIG/html/readme-142.htm#pgfId-980610

and

http://www.lispworks.com/documentation/lw70/RNIG/html/readme-140.htm#pgfId-979459

Regards.
Nico

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Syntax for key sequences

"Dmitry Ivanov" <ystok-systema@rambler.ru> writes:

> | See:
> | http://www.lispworks.com/documentation/lw70/RNIG/html/readme-142.htm#pgfId-980610
> | and
> | http://www.lispworks.com/documentation/lw70/RNIG/html/readme-140.htm#pgfId-979459
>
> I realize that supporting a separate Japanese/Chinese version of LW would
> need more effort but storing every character in 32 bits ...

Note that the user can change the default character type with
lw:set-default-character-element-type in her configuration file. See:

http://www.lispworks.com/documentation/lw70/LW/html/lw-684.htm#59860
http://www.lispworks.com/documentation/lw70/LW/html/lw-755.htm#30578
http://www.lispworks.com/documentation/lw70/LW/html/lw-191.htm#pgfId-890566

By default, LispWorks still use 8-bit characters (at least on Linux):

$ /usr/local/lib64/LispWorks/lispworks-7-0-0-amd64-linux -init -

CL-USER 1 > lw:*default-character-element-type*
BASE-CHAR

Regards.
Nico

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Syntax for key sequences

On Mon, May 18, 2015 at 9:25 AM, Martin Simmons <martin@lispworks.com> wrote:
>
>>>>>> On Mon, 18 May 2015 11:33:26 +0300, Dmitry Ivanov said:
>>
>> Hello lispworkers,
>>
>> | See:
>> | http://www.lispworks.com/documentation/lw70/RNIG/html/readme-142.htm#pgfId-980610
>> | and
>> | http://www.lispworks.com/documentation/lw70/RNIG/html/readme-140.htm#pgfId-979459
>>
>> I realize that supporting a separate Japanese/Chinese version of LW would
>> need more effort but storing every character in 32 bits and getting rid of
>> character bits is not the improvement I could ever appreciate :-(
>
> LispWorks 7.0 provides a 16-bit character type (lw:bmp-char) if you wish to
> avoid 32-bit characters.
>
> See http://www.lispworks.com/documentation/lw70/LW/html/lw-191.htm for more
> details.
>
What is the recommended #+ predicate to use to detect the existence of
lw:bmp-char ? #+lispworks7 ?

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
A new poll indicates that if the presidential election were held tomorrow
nobody would vote, because they think the election is in November."
        — Dennis Miller

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Syntax for key sequences

Unable to parse email body. Email id is 13404

Re: Syntax for key sequences

On 6/11/15 Jun 11 -7:16 AM, Dave Fox wrote:
>  > On Mon, May 18, 2015 at 9:25 AM, Martin Simmons <martin@lispworks.com> wrote:
>  > >
>  > >>>>>> On Mon, 18 May 2015 11:33:26 +0300, Dmitry Ivanov said:
>  > >>
>  > >> Hello lispworkers,
>  > >>
>  > >> | See:
>  > >> | http://www.lispworks.com/documentation/lw70/RNIG/html/readme-142.htm#pgfId-980610
>  > >> | and
>  > >> | http://www.lispworks.com/documentation/lw70/RNIG/html/readme-140.htm#pgfId-979459
>  > >>
>  > >> I realize that supporting a separate Japanese/Chinese version of LW would
>  > >> need more effort but storing every character in 32 bits and getting rid of
>  > >> character bits is not the improvement I could ever appreciate :-(
>  > >
>  > > LispWorks 7.0 provides a 16-bit character type (lw:bmp-char) if you wish to
>  > > avoid 32-bit characters.
>  > >
>  > > See http://www.lispworks.com/documentation/lw70/LW/html/lw-191.htm for more
>  > > details.
>  > >
>  > What is the recommended #+ predicate to use to detect the existence of
>  > lw:bmp-char ? #+lispworks7 ?
> 
> It's much better to use #-(or lispworks4 lispworks5 lispworks6) so as
> to future-proof your code.
> 
> This is because functionality added in LispWorks 7.0 will generally
> also be in LispWorks 7.1, LispWorks 8.0 and all later versions.
> 
> See "Conditionalization for LispWorks versions" at
> 
>  http://www.lispworks.com/documentation/lw70/LW/html/lw-373.htm
> 
> 

Fixed and pushed.

Cheers,
r

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Updated at: 2020-12-10 08:33 UTC