GNU bug report logs - #20625
25.0.50; doc of `define-error` is incorrect

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Thu, 21 May 2015 21:05:02 UTC

Severity: minor

Tags: notabug

Found in version 25.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 20625 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 20625 <at> debbugs.gnu.org
Subject: Re: bug#20625: 25.0.50; doc of `define-error` is incorrect
Date: Sat, 23 May 2015 13:17:14 +0300
> Date: Thu, 21 May 2015 14:04:31 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
> 
> >From `C-h f':
> 
>  (define-error NAME MESSAGE &optional PARENT)
> 
>  Define NAME as a new error signal.
>  MESSAGE is a string that will be output to the echo area if such an error
>  is signaled without being caught by a `condition-case'.
>  PARENT is either a signal or a list of signals from which it inherits.
>  Defaults to `error'.
> 
> No, MESSAGE is not necessarily a string. It is a required argument, but
> the code explicitly makes use of the case where it is nil.  And existing
> code delivered with Emacs (e.g. bookmark.el) makes use of a nil MESSAGE.
> That case should be documented.

AFAICS, users of this property will yield strange messages if MESSAGE
is nil.  So shouldn't we at least advise that it's a string?

Also, what exactly is the purpose of bookmark.el's using nil there?




This bug report was last modified 9 years and 27 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.