emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Last call for lua-mode contributors


From: Ken Raeburn
Subject: Re: Last call for lua-mode contributors
Date: Fri, 20 Jan 2012 02:12:05 -0500

On Jan 20, 2012, at 00:12, Miles Bader wrote:
> Emacs contains convenient commands to do exactly those things
> regardless of word-syntax:  C-M-f (forward-sexp), C-M-k (kill-sexp)
> etc.  Obviously these commands are even _more_ "reliable" in that
> sense because they work the same in _all_ programming modes, and don't
> depend on user-customization.

I actually use some of them frequently when dealing with parenthesized lists 
like argument lists… but I guess for some reason I don't think of them when I'm 
working with a single identifier or keyword.  Without the parens or some 
opening delimiter, I guess it just doesn't say "s-expression" to me; time to do 
some retraining I guess….

It's not immediately obvious looking at the description of forward-sexp, 
though, that it's really suitable for other modes.  For example, it refers to a 
"balanced expression (sexp)", which doesn't tell me very well what to expect if 
the cursor is pointing at "int" or "return" (which aren't expressions) or 
"sizeof x" (which is an expression only if you include both words).  The help 
message says it comes out of lisp.el, which is not encouraging if I'm in C 
mode; I'd half expect it to assume Lisp comment syntax or not work with braces. 
 (I'm not saying it doesn't work; I know it does.  I'm saying the description 
could be improved.  But not by me at this hour.)

And now that I'm taking a fresh look at the s-expression bindings I should be 
using more, I want eval-last-sexp in C mode to evaluate C expressions. :-)

> [There are actually modes which make word-commands respect
> "STuDlyCapS" though…]

If they're minor modes suitable for use in conjunction with programming modes, 
that might be suitable, yes.

>> I realize I'm much closer to the power-user end of the spectrum than
>> most typical users, but among those heavily using programming modes,
>> is this such a strange mind-set?
> 
> Wellllllll.... it does seem like a "power-user," and especially a
> programmer, would be most likely to know about and use Emacs'
> programming-specialized movement commands ..... :]

*ahem*  Yeah, I guess you got me there… I do use some of them, but after 20+ 
years I guess I've developed some habits that give me blind spots to some 
places where I should be using them.  Okay, I'm convinced....

Ken


reply via email to

[Prev in Thread] Current Thread [Next in Thread]