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

From: Stephen De Gabrielle (spdegabrielle at gmail.com)
Date: Thu Sep 13 11:25:34 EDT 2007


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)



Stephen De Gabrielle
s.degabrielle at ucl.ac.uk
Telephone +44 (0)20 7679 5242 (x45242)
Mobile                  079 851 890 45
University College London Interaction Centre
Remax House - 31/32 Alfred Place
London - WC1E 7DP

Posted on the users mailing list.