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

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

Re: compile-command customisation


From: Thien-Thi Nguyen
Subject: Re: compile-command customisation
Date: Wed, 23 Feb 2005 16:44:05 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

Daniel Wright <daniel.d.wright@gmail.com> writes:

> how it could be done better :)

some standard tips:

(if CONDITION (progn EXP ...))
=> (when CONDITION EXP ...)

(unless CONDITION (progn EXP ...))
=> (unless CONDITION EXP ...)

you can lift `file-name-sans-extension', like so:

(... (file-name-sans-extension file)
 ... (file-name-sans-extension file) ...)
=> (let ((fn-noext (file-name-sans-extension file)))
     (... fn-noext
      ... fn-noext ...))

generally, these transforms do not change your algorithm,
so it is only better in the sense that it is more easy to
read.  improving the algorithm is your sack of joy to haul.

thi

reply via email to

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