unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Stefan Monnier <foo@acm.com>" <monnier+gnu.emacs.help/news/@flint.cs.yale.edu>
Subject: Re: Journal package for Emacs?
Date: 09 Sep 2002 10:49:53 -0400	[thread overview]
Message-ID: <5ln0qrtdym.fsf@rum.cs.yale.edu> (raw)
In-Reply-To: mailman.1031541847.25738.help-gnu-emacs@gnu.org

>>>>> "David" == David Forrest <drf5n@mug.sys.virginia.edu> writes:
> Is this good elisp?

Hmm... I'm sorry to say I've seen better:

> (defun my-journal-hook ()
>   "Go to the bottom and insert a timestamp on journal files
> Identified with the is-journal local variable thus:
>              -*- is-journal : t -*- "

The first line of a docstring should stand on its own (i.e. end with
a period, basically) so that it makes sense when displayed by M-x apropos.

>   (if (local-variable-p 'is-journal)

What for exactly ?  `local-variable-p' should basically never be used,
except for very unusual circumstances.

>     (progn (end-of-buffer) ( insert-current-time))

(if a (progn b c)) can be advantageously replaced with (when a b c).

>   ))

This is a clear mark of bad Lisp.

> ;where insert-current-time is:

If you indent this, it'll jump to column 40.  Use `;;' instead.


        Stefan

       reply	other threads:[~2002-09-09 14:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1031541847.25738.help-gnu-emacs@gnu.org>
2002-09-09 14:49 ` Stefan Monnier <foo@acm.com> [this message]
2002-09-09 15:53   ` Journal package for Emacs? David Forrest
     [not found] <mailman.1031586979.16781.help-gnu-emacs@gnu.org>
2002-09-09 16:40 ` Jochen Küpper
2002-09-09 17:05   ` David Forrest
2002-09-09 21:25 ` Kevin Rodgers
2002-09-09 22:10   ` Alex Schroeder
2002-09-10 16:07     ` Kevin Rodgers
2002-09-07 14:20 mike hardy
2002-09-07 15:45 ` F. Xavier Noria
2002-09-07 16:02 ` David Forrest
2002-09-07 17:42 ` Thien-Thi Nguyen
2002-09-07 19:30 ` Kai Großjohann
2002-09-07 22:04   ` mike hardy
2002-09-08 20:26     ` Kai Großjohann
2002-09-09  0:17       ` mike hardy
2002-09-09  9:48         ` Francesco Scaglioni
2002-09-09 11:18     ` Galen Boyer
2002-09-09 22:23       ` mike hardy
2002-09-08  6:49   ` Sacha Chua
     [not found]   ` <mailman.1031467986.16594.help-gnu-emacs@gnu.org>
2002-09-08 20:26     ` Kai Großjohann
2002-09-09  0:22     ` mike hardy
2002-09-09  3:22       ` David Forrest

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=5ln0qrtdym.fsf@rum.cs.yale.edu \
    --to=monnier+gnu.emacs.help/news/@flint.cs.yale.edu \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).