From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matt Armstrong Newsgroups: gmane.emacs.bugs Subject: bug#58801: [PATCH] Autoload the `calc-eval-error' variable Date: Sat, 26 Nov 2022 08:58:53 -0800 Message-ID: <87o7std54i.fsf@rfc20.org> References: <87fsfaa56t.fsf@rfc20.org> <8735ak6pq7.fsf@rfc20.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30796"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58801@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 26 18:00:55 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1oyyXu-0007qC-NC for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Nov 2022 18:00:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyyX9-0006I3-4v; Sat, 26 Nov 2022 12:00: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 1oyyX5-0006H8-QH for bug-gnu-emacs@gnu.org; Sat, 26 Nov 2022 12:00:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oyyX4-0007HW-TU for bug-gnu-emacs@gnu.org; Sat, 26 Nov 2022 12:00:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oyyX4-0002gW-HV for bug-gnu-emacs@gnu.org; Sat, 26 Nov 2022 12:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Matt Armstrong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Nov 2022 17:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58801 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 58801-submit@debbugs.gnu.org id=B58801.166948194810282 (code B ref 58801); Sat, 26 Nov 2022 17:00:02 +0000 Original-Received: (at 58801) by debbugs.gnu.org; 26 Nov 2022 16:59:08 +0000 Original-Received: from localhost ([127.0.0.1]:41319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyyWB-0002fm-Pl for submit@debbugs.gnu.org; Sat, 26 Nov 2022 11:59:08 -0500 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:52745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyyW9-0002fP-AL for 58801@debbugs.gnu.org; Sat, 26 Nov 2022 11:59:06 -0500 Original-Received: (Authenticated sender: matt@rfc20.org) by mail.gandi.net (Postfix) with ESMTPSA id 7A42F60003; Sat, 26 Nov 2022 16:58:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rfc20.org; s=gm1; t=1669481938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qe0Mkxr2SbtbwGCGkY4CMKl4C12X2OaEUEQL761fSsU=; b=CJmtjFR3ala00u0qy+EmEMPgmyNcg89L++u6rAu2o3GGy5FWfr8Zz2fO62CBweViNW2l41 AVcdyFrrSyQurS69m1wncuSiOsrN9E1QbNMl5nboecsDHgM9XMbnIVW/yJ7kuqjh7YGxwf 6S69zlnY32eIPgE4n5atdNy9nCbdgwtpozOnUhcL8NAEcwTwvvLux/90a0EDGMqInNfWym u7rRvvWPk3ygkdOVpqOzFqwAUEAYfOurywIZ0hgRFtpDkIFYV1d1wUPSO+VfEGY5NInEJX 1KSNzqct68oM4fIhYyxcggpJNWaHOeVwON/p4otdteuSrolekbWTmMDebeNinQ== Original-Received: by mac-mini.lan (Postfix) with ESMTPS id 4005B3BCC6; Sat, 26 Nov 2022 08:58:54 -0800 (PST) Original-Received: by naz.lan (Postfix, from userid 1000) id 15B0043CAC30; Sat, 26 Nov 2022 08:58:54 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:249115 Archived-At: Stefan Kangas writes: > Matt Armstrong writes: > >> Note that in my case I had (require 'calc) in the file that used the >> `calc-eval-error' symbol. The info docs for calc state that (require >> 'calc) loads nearly everything you need from calc. I may not understand >> something about the design constraints here, but it seems strange to >> refrain from autoloading this symbol, since (require 'calc) already >> (auto)loads a *lot* of stuff. > > So you are saying that if you have a file foo.el, that requires calc, > and then tries to use calc-eval-error variable (documented as part of > the external API), you get a byte-compiler warning? > > I agree that this doesn't sound very intuitive. I regret typing about `require' at all, as my line of argument is simpler than that. Running "emacs -Q" comes with `calc-eval' autoloaded. Since calc documentation mentions `calc-eval-error' as a configuration variable for the `calc-eval' behavior, it is makes most sense to autoload either neither of them or both of them. (In the particular case of the Calc package, dozens of functions and variables are already autoloaded. The omission of `calc-eval-error' also seems more an oversight than intentional.) > So I think we could install your patch. Me too. ;-)