[plt-scheme] Re: Useful Emacs code when working with PLT Scheme

From: Bill Clementson (bill_clementson at yahoo.com)
Date: Mon Dec 8 01:39:21 EST 2003

--- Eli Barzilay <eli at barzilay.org> wrote:
> On Dec  7, Bill Clementson wrote:
> > 
> > Although it is true that the "#;" syntax does the
> same
> > thing as "#|...|#" (but without a closing comment
> > delimiter), the insert-balanced-comment function
> > allows you to comment out an enclosing
> s-expression
> > without moving to the start of the s-expression
> (or
> > comment out a higher-level enclosing s-expression
> with
> > a prefix arg or a repeat of the command). If one
> > prefered the "#;" syntax over the "#|...|#"
> syntax,
> > the function could be easily modified to use that
> > instead.
> 
> I think it is preferable, but over the years I found
> that learning new
> keys for new tricks is really expensive -- so I
> settle for a good
> keyboard macro when repetitious tasks are involved,
> otherwise, I'd
> just go to the beginning of the expression...

I find that I use the comment code quite frequently.
Generally, if I create a new key binding, I force
myself to use it a number of times during several
consecutive edit sessions to train my fingers. 
 
> > A minor issue if one chose to do this would
> > be that they would have to add a font-lock regexp
> to
> > cater for "#;" style comments. 
> 
> Well, that would be hard, since it's not a simple
> regexp...

I should have put a smiley after "minor" :)

> > Are there any snippets that are Scheme (or PLT)
> > specific that you would like to share? I am always
> on
> > the lookout for things that make my life easier.
> :-)
> 
> Well, below I have something that might be useful --
> I use it to edit
> Swindle documentation comments.  If you're in a line
> with a ";;>"
> prefix and use it, it will copy the ";;>" region to
> a new buffer
> (linked to the old one via hooks) that lets you edit
> the comment text
> in text mode.
> 
> 
> > Incidentally, I thought that your electric-not.el
> code
> > was very time-saving; however, I am most
> interested in
> > Scheme-specific code snippets.
> 
> (If you're looking at these things, then you should
> see macro-keys for
> something really useful.)


Thanks, I'll check them out.

- Bill


__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/


Posted on the users mailing list.