From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Lisp files that load cl-lib in problematical ways Date: Thu, 19 Oct 2023 13:28:28 +0000 Message-ID: References: <83fs3dgxv8.fsf@gnu.org> <835y38qvlg.fsf@gnu.org> <87bkcx6eci.fsf@dataswamp.org> <83ttqnm4ti.fsf@gnu.org> <83lebyu5yx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21055"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rms@gnu.org, incal@dataswamp.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 19 15:30:20 2023 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 1qtT6R-0005N8-PA for ged-emacs-devel@m.gmane-mx.org; Thu, 19 Oct 2023 15:30:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtT4z-0005AO-QY; Thu, 19 Oct 2023 09:28:50 -0400 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 1qtT4m-0004uy-AP for emacs-devel@gnu.org; Thu, 19 Oct 2023 09:28:38 -0400 Original-Received: from mail.muc.de ([193.149.48.3]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtT4i-000768-PV for emacs-devel@gnu.org; Thu, 19 Oct 2023 09:28:35 -0400 Original-Received: (qmail 20028 invoked by uid 3782); 19 Oct 2023 15:28:29 +0200 Original-Received: from acm.muc.de (pd953a45c.dip0.t-ipconnect.de [217.83.164.92]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 19 Oct 2023 15:28:28 +0200 Original-Received: (qmail 4687 invoked by uid 1000); 19 Oct 2023 13:28:28 -0000 Content-Disposition: inline In-Reply-To: <83lebyu5yx.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.3; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:311593 Archived-At: Hello, Eli. On Thu, Oct 19, 2023 at 15:55:34 +0300, Eli Zaretskii wrote: > > Date: Thu, 19 Oct 2023 12:34:42 +0000 > > Cc: rms@gnu.org, incal@dataswamp.org, emacs-devel@gnu.org > > From: Alan Mackenzie > > So, I counted all the occurrences of "cl-" not inside an > > eval-when-compile, by piping all the dumped .el files through the > > following script: [ .... ] > > and got the following results: > > abbrev.el:2 [ .... ] > > vc/vc-hooks.el:1 > If the above is correct, then how do you explain that in "emacs -Q" I > don't see the cl-lib feature present? Because the files that use cl- don't have a (require 'cl-lib) in them. Quite a lot of the function calls are things like cl-assert, cl-incf, or cl-defgeneric, which won't cause the loading of cl- until they are actually run. > My conclusion is that your program has a bug. Maybe, but there are definitely run time uses of cl- in our dumped .el files, such as a cl-incf in font-lock.el which creates the gradually increasing row of dots which are displayed for large files (or, at least, used to be). > > That may not be 541 occurrences, but it's still 239. Incidentally, when > > I start emacs -Q, cl-lib isn't yet loaded for me, either. > Exactly. How come, if all of the above-mentioned files load it? See above. > > > We cannot possibly expect people to contribute code if we force them > > > not to use the macros they are used to. If cl-lib is not loaded as > > > result, that is good enough for us, I think. > > We "force" them to use Emacs Lisp, but they still contribute. The > > problem is that use of cl- makes maintenance of other people's code much > > harder, at least for me. I'm sure I'm not alone. > I'm sorry, but the above is how I feel we should treat our > contributors, if we want to keep the existing ones and attract new > ones. I'm not urging you to change anything; merely expressing regret at the existing state of affairs, and possibly inviting contributors in general to use cl-lib a little less. -- Alan Mackenzie (Nuremberg, Germany).