all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sebastian Tennant <sebyte@smolny.plus.com>
Subject: Re: Evaluation of hooks
Date: Mon, 26 Dec 2005 22:41:40 +0000	[thread overview]
Message-ID: <87mzin4h23.fsf@smolny.plus.com> (raw)
In-Reply-To: 20051226223235.GI9520@setzer.hsd1.tx.comcast.net

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	other threads:[~2005-12-26 22:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.20359.1135455656.20277.help-gnu-emacs@gnu.org>
2005-12-25  2:36 ` Evaluation of hooks Tom Breton
2005-12-25 22:26   ` Sebastian Tennant
2005-12-26 22:07     ` Sebastian Tennant
2005-12-26 22:32       ` Cameron Desautels
2005-12-26 22:41         ` Sebastian Tennant [this message]
2005-12-24 19:22 Sebastian Tennant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mzin4h23.fsf@smolny.plus.com \
    --to=sebyte@smolny.plus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.