From: Eli Zaretskii <eliz@gnu.org>
To: Ulrich Mueller <ulm@gentoo.org>
Cc: emacs-devel@gnu.org
Subject: Re: lsh function documentation
Date: Wed, 31 Jan 2024 16:49:01 +0200 [thread overview]
Message-ID: <86y1c51rtu.fsf@gnu.org> (raw)
In-Reply-To: <umssnyrz0@gentoo.org> (message from Ulrich Mueller on Tue, 30 Jan 2024 12:34:59 +0100)
> From: Ulrich Mueller <ulm@gentoo.org>
> Date: Tue, 30 Jan 2024 12:34:59 +0100
>
> The function documentation of lsh says:
> | Most uses of this function turn out to be mistakes. We recommend
> | to use ‘ash’ instead, unless COUNT could ever be negative, and
> | if, when COUNT is negative, your program really needs the special
> | treatment of negative COUNT provided by this function.
>
> I understand that lsh has no useful semantics for negative bignums
> (bug #32463). However, old versions of the Lisp Reference Manual list
> lsh and ash in the same section, and don't prefer either function:
> https://git.savannah.gnu.org/cgit/emacs.git/tree/doc/lispref/numbers.texi?h=emacs-26.3#n811
>
> So why would programmers who had used something like (lsh x 8) in their
> code be called out for making a mistake?
>
> Couldn't lsh's documentation just say that the function is deprecated
> and that ash should be used instead?
We've been there, see bug#56641.
I'm not sure I understand the problem you have with the current text
in the manual and/or the doc string of lsh.
next prev parent reply other threads:[~2024-01-31 14:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 11:34 lsh function documentation Ulrich Mueller
2024-01-31 14:49 ` Eli Zaretskii [this message]
2024-01-31 16:15 ` Ulrich Mueller
2024-01-31 16:48 ` Eli Zaretskii
2024-01-31 17:01 ` Ulrich Mueller
2024-01-31 19:27 ` Eli Zaretskii
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=86y1c51rtu.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=ulm@gentoo.org \
/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 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).