[plt-scheme] stopping doubleclick selection breaking for hyphens and colons when editing scheme

From: Robby Findler (robby at cs.uchicago.edu)
Date: Thu Sep 13 14:38:09 EDT 2007

Thanks! Looks right to me (and Matthew concurs) so I've checked it in to SVN.

That code is *very* old, so I'm not sure how that binding of v crept
in there. Probably a PEBCAK some 10 years ago ;)

Robby

On 9/13/07, Stephen De Gabrielle <spdegabrielle at gmail.com> wrote:
> Hi,
>
> I've been editing stuff, and was finding it frustrating that compound
> scheme keywords were note selected with a double click - the selection
> broke at the hypen(s)
>
> So I edited framework/private/scheme.ss:
>
>   (define init-wordbreak-map
>     (λ (map)
>       (let ([v (send map get-map #\-)])
>         (send map set-map
>               #\-
>               '(line selection)))))
>
> Adding 'selection' to the list of things that hyphen (#\-) did not break.
>
> Is this the right way to do it?  I could not find an alternative -
> like a configuration file.
>
> I can't immediately see why v is assigned in the let?
>         [v (send map get-map #\-)]
> it doesn't seem to be used or passed?
>
> I do the following for the same effect with colons ;
>   (define init-wordbreak-map
>     (λ (map)
>       (send map set-map  #\- '(line selection))
>       (send map set-map  #\: '(line selection))))
>
> It doesn't seem to break anything (yet)
>
> Cheers,
>
> Stephen
>
>
>
> --
> Stephen De Gabrielle
> s.degabrielle at ucl.ac.uk
> Telephone +44 (0)20 7679 5242 (x45242)
> Mobile                  079 851 890 45
> http://www.uclic.ucl.ac.uk/annb/MaSI.html
> University College London Interaction Centre
> Remax House - 31/32 Alfred Place
> London - WC1E 7DP
>
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
>

Posted on the users mailing list.