unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21225: 25.0.50; doc strings of `define-obsolete-*'
@ 2015-08-09 17:28 Drew Adams
  2015-08-09 17:35 ` Drew Adams
  2016-04-30 21:52 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 5+ messages in thread
From: Drew Adams @ 2015-08-09 17:28 UTC (permalink / raw)
  To: 21225

Argument WHEN is not described at all for some of these macros.  For
others it is described incorrectly or only via an example.  It needs to
be described clearly.

The correct description is, in all cases, what is said in the Elisp
manual for `make-obsolete':

   If provided, WHEN should be a string indicating when the function
   was first made obsolete=81\for example, a date or a release number.

(with "function" replaced by "face" or "variable", as appropriate),
except that "version number" is preferable to "release number".

These macros are used by users and 3rd-party libraries too, not just by
core Emacs development, and in such contexts "release" is not
necessarily appropriate.  The most important remark, however, is that "a
date" should be offered as an example of a WHEN value, in addition to "a
version number".

The same change should be made for the Elisp manual, node `Variable
Aliases'.  It is better to say "for example, a date or a version number"
than just "(usually a version number string)".

In GNU Emacs 25.0.50.1 (i686-pc-mingw32)
 of 2015-07-03 on LEG570
Repository revision: 2b848fadd51e805b2f46da64c5958ea7f009048a
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --host=3Di686-pc-mingw32 --enable-checking=3Dyes,glyphs'





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#21225: 25.0.50; doc strings of `define-obsolete-*'
  2015-08-09 17:28 bug#21225: 25.0.50; doc strings of `define-obsolete-*' Drew Adams
@ 2015-08-09 17:35 ` Drew Adams
  2015-08-11 12:50   ` Artur Malabarba
  2016-04-30 21:52 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 5+ messages in thread
From: Drew Adams @ 2015-08-09 17:35 UTC (permalink / raw)
  To: 21225

I forgot to add:

The doc (doc strings and manual) should make clear that the args
are evaluated.  This is not obvious, as these are macros.

For example, this is needed:

(define-obsolete-variable-alias 'last-input-char 'last-input-event
  "at least 19.34")

This is no good:

(define-obsolete-variable-alias last-input-char last-input-event
  "at least 19.34")

The current doc is quite unclear about this, especially by just
referring to the args as "*-NAME".  (Nothing wrong with those
parameter names, as long as you make clear that the args are
evaluated.)





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#21225: 25.0.50; doc strings of `define-obsolete-*'
  2015-08-09 17:35 ` Drew Adams
@ 2015-08-11 12:50   ` Artur Malabarba
  2015-08-11 16:07     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Artur Malabarba @ 2015-08-11 12:50 UTC (permalink / raw)
  To: Drew Adams; +Cc: 21225

> The doc (doc strings and manual) should make clear that the args
> are evaluated.  This is not obvious, as these are macros.

Yes please. Everytime I use these I have to manually check their
behavior because I'm never sure just by reading the docstring.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#21225: 25.0.50; doc strings of `define-obsolete-*'
  2015-08-11 12:50   ` Artur Malabarba
@ 2015-08-11 16:07     ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2015-08-11 16:07 UTC (permalink / raw)
  To: Artur Malabarba; +Cc: 21225

>> The doc (doc strings and manual) should make clear that the args
>> are evaluated.  This is not obvious, as these are macros.
> Yes please. Everytime I use these I have to manually check their
> behavior because I'm never sure just by reading the docstring.

Maybe a better fix is to turn them into functions (which basically
means, to add special support for them in the byte-compiler, since
that's the only reason they're defined as macros, AFAIK).


        Stefan





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#21225: 25.0.50; doc strings of `define-obsolete-*'
  2015-08-09 17:28 bug#21225: 25.0.50; doc strings of `define-obsolete-*' Drew Adams
  2015-08-09 17:35 ` Drew Adams
@ 2016-04-30 21:52 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-30 21:52 UTC (permalink / raw)
  To: Drew Adams; +Cc: 21225

Drew Adams <drew.adams@oracle.com> writes:

> Argument WHEN is not described at all for some of these macros.  For
> others it is described incorrectly or only via an example.  It needs to
> be described clearly.
>
> The correct description is, in all cases, what is said in the Elisp
> manual for `make-obsolete':
>
>    If provided, WHEN should be a string indicating when the function
>    was first made obsolete=81\for example, a date or a release number.
>
> (with "function" replaced by "face" or "variable", as appropriate),
> except that "version number" is preferable to "release number".

I've now done so.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-30 21:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-09 17:28 bug#21225: 25.0.50; doc strings of `define-obsolete-*' Drew Adams
2015-08-09 17:35 ` Drew Adams
2015-08-11 12:50   ` Artur Malabarba
2015-08-11 16:07     ` Stefan Monnier
2016-04-30 21:52 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

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).