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

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

Re: first steps in elisp


From: Marcin Borkowski
Subject: Re: first steps in elisp
Date: Fri, 25 Nov 2016 06:39:01 +0100
User-agent: mu4e 0.9.17; emacs 26.0.50.3

On 2016-11-25, at 00:00, Mark Piffer <address@hidden> wrote:

> I am trying to write some helper functions which should ease documentation of 
> C as per the method which my customers require (mostly repetition of 
> parameters as Doxygen-enabled comments - I don't think that that's a good 
> idea, but the customer wants it). I coudn't find a package that was primitive 
> enough to help me with the parsing - the code is embedded C and quite 
> non-standard with respect to compiler extensions. So I tried to walk the 
> extra mile and code a little elisp for fun. Which things are especially bad 
> or unusual concerning both, Lisp and emacs?

After just a quick glance:

(if CONDITION (progn THEN-CLAUSES...) nil) == (if CONDITION (progn 
THEN-CLAUSES...)) == (when CONDITION THEN-CLAUSES...)

(if CONDITION nil ELSE-CLAUSES...) == (unless CONDITION ELSE-CLAUSES...)

Also, instead of using setq and global variables, it's much better to
use let.

Keep up the good work of learning Elisp;-)!

-- 
Marcin Borkowski



reply via email to

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