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

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

Re: Evaluation of hooks


From: Sebastian Tennant
Subject: Re: Evaluation of hooks
Date: Mon, 26 Dec 2005 22:41:40 +0000
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Cameron Desautels <cam@apt2324.com> wrote:

> On Mon, Dec 26, 2005 at 10:07:16PM +0000, Sebastian Tennant wrote:
>> Adding the following line before the (when ...) condition fixes this and the
>> hook is now functioning perfectly.
>> 
>>   (unless (not (buffer-file-name))
>>     ...)
>
> I suppose this is a bit nit-picky, but you may as well make it
>
>   (if (buffer-file-name)
>     ...)
>
> instead of using both ``unless'' and ``not''.

I suppose so, but should code be compact or human readable?
In this context, where the hook is written with file visiting buffers in mind,
I think it is clearer to say "unless the buffer is not visiting a file..."

sdt





reply via email to

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