From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: lsh function documentation Date: Wed, 31 Jan 2024 16:49:01 +0200 Message-ID: <86y1c51rtu.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25140"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Ulrich Mueller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 31 15:49:56 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rVBuW-0006Gi-E3 for ged-emacs-devel@m.gmane-mx.org; Wed, 31 Jan 2024 15:49:56 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVBti-0008EP-WE; Wed, 31 Jan 2024 09:49:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rVBth-0008Ds-1H for emacs-devel@gnu.org; Wed, 31 Jan 2024 09:49:05 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rVBtg-0000Bb-DT; Wed, 31 Jan 2024 09:49:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=UmNUPUZFNH1pkLYolyu8gUrHUoXmZ182nJrXk6lThls=; b=jmNcGDm/ZEGCFThesDrP d4vQKsZkHqGDclNgCBsP0TdRPQPIvB9i/zIfyj9pI/cevmdOncBpUQLv/zNZ043G9SjswiGT0SMts iWyQ2hmxIJT5INFn1Pe9D48VcmBkpCk2a/yFLCSaADzg9HPTkYjy26nW1eh7/pTBoQG9c8NOjwG2K DHFw+nFHsufG8qhJzF/OT2WAqF3KhcLjGhAwi3n6pKy0M9SYcBvBmgJNGz0ve6WbqX84CroH7BJxh RO61cIK+p+HBiM3JYzbY9huWSWZ2D87x/xYCloLSh5b43lpCiHcuOjqgFRez/7Rbfep2qGUvo87uA y/EEL0oWJSCQHw==; In-Reply-To: (message from Ulrich Mueller on Tue, 30 Jan 2024 12:34:59 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:315669 Archived-At: > From: Ulrich Mueller > 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.