help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: A true challenge for Emac and Elisp hackers - at Least I think so


From: Slawomir Nowaczyk
Subject: Re: A true challenge for Emac and Elisp hackers - at Least I think so
Date: Wed, 12 Oct 2005 15:16:21 +0200

On Wed, 12 Oct 2005 04:48:25 -0700
Sune <sune_ahlgren@hotmail.com> wrote:

#> I have to admit that this is so far out there (at least for me) that I
#> would need more or less a ready-to-go implementation just to paste into
#> .emacs.

I don't think this is too far away for you :) Anyway, I somehow expect
somebody on this list to provide a more-or-less complete solution, but
the thing you should ultimately do is:

1) Learn basics of Lisp (and really, all you need here is the basics)

2) Write a function which does what you want and bind it to RET key
      *) the function should check if buffer name ends with *.c
      *) the function should get current line contents (think of
         functions buffer-substring, point, beginning-of-line, etc.)
      *) compare it with what do you want (string-match maybe?)
      *) either insert "\n" or "; DBG\n"

   And also, try "C-h i C-s elisp RET" :)

3) And that's it :)

No, seriously, after you are done with the above come back with your
solution and somebody will certainly provide you with a lot of
hints... but you will at least understand what is going on :)

-- 
 Best wishes,
   Slawomir Nowaczyk
     ( slawomir.nowaczyk.847@student.lu.se )

I'd love to change the world, but they won't give me the source code!





reply via email to

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