From unknown Sun Jun 22 17:13:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25823: 26.0.50; describe-function: Don't require cl-lib at runtime Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: monnier@iro.umontreal.ca, bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Feb 2017 03:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25823 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 25823@debbugs.gnu.org Cc: tino.calancha@gmail.com, stefan monnier X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: stefan monnier Received: via spool by submit@debbugs.gnu.org id=B.148764839227240 (code B ref -1); Tue, 21 Feb 2017 03:40:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Feb 2017 03:39:52 +0000 Received: from localhost ([127.0.0.1]:48031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cg1Iu-00075H-0x for submit@debbugs.gnu.org; Mon, 20 Feb 2017 22:39:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cg1Is-000753-LE for submit@debbugs.gnu.org; Mon, 20 Feb 2017 22:39:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cg1Im-0002GN-62 for submit@debbugs.gnu.org; Mon, 20 Feb 2017 22:39:45 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53155) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cg1Im-0002GI-31 for submit@debbugs.gnu.org; Mon, 20 Feb 2017 22:39:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53771) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cg1Ik-0008Rl-FC for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2017 22:39:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cg1If-0002CK-Fk for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2017 22:39:42 -0500 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]:35993) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cg1If-0002BR-8X for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2017 22:39:37 -0500 Received: by mail-pg0-x242.google.com with SMTP id a123so13044350pgc.3 for ; Mon, 20 Feb 2017 19:39:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version; bh=pAQw15vL3Ecl0PlXChGMQPv2AmRFv94T7Vc4hNcuiOc=; b=o1U7vY9vodAj26FZS3QCk0gOc59yb/joWRG2plLJv0urNpOKTvSGXi3HftWMPi6Oap O3Ba3za4Ls8ws02DmCiS1/Yx+L9FvlE2yXYT8OOuUhcD7lehydfLU9QW1cj8FDEpNoaG mjkM8V3v2ZyclzuIzZeAVhunMl1qIlrcn1LCw7YHfLqjvrlAG9cIwW/uTDnPxTBs2KmV E5J0zpc3pW0Y3PPyeaZgzqnnFrk3GSzLwEZbvVLhCOISP/W3d9cLwc3A+bfIfTDjCqls pRYQxtGbIEKt4Mt6r4AfD/EkgkaYHpZtNraeJU6Dw+dJIUHJUYqHR7o3ZO+j+yup1RE+ K9IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=pAQw15vL3Ecl0PlXChGMQPv2AmRFv94T7Vc4hNcuiOc=; b=oS87hCznSXum/msR//8EBwQyXXqqURkq/b7Tn+JC/g6sNuxOPzADTJIfPp9H9MCGe5 /Rslub3c/xsbL27D0IP0El3/BaHVKNRTenHTWyAqtyz3l8rPitTYUW5ViyoDKUdrkA3p impQJAzORuf39ydjLD7hdtnYKxWkxFWj9PdSXIeyTyq1miq8PA9ewFWLximtaapVWU38 saCVzSBiN45O0kRIE072ASF9hn5Y4wHlp840HYEcXnLh/DUu3LkUuW9lz/xXTssB03UJ 1Rb9DdgjaA4SZg28iLA7cuY9ytn3iODc2aaKxti9qjUXRYzEzvD71eLomxKqNzfGzOcM JS4g== X-Gm-Message-State: AMke39mcaXmFanN7WXT/yO5AQbc4ioUBsUXc13AMr2bnek4e9+4WnjZmZqYkdV5I7YqYBA== X-Received: by 10.84.247.23 with SMTP id n23mr3282844pll.39.1487648376060; Mon, 20 Feb 2017 19:39:36 -0800 (PST) Received: from calancha-pc (104.81.147.124.dy.bbexcite.jp. [124.147.81.104]) by smtp.gmail.com with ESMTPSA id p15sm37474385pfk.58.2017.02.20.19.39.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2017 19:39:35 -0800 (PST) From: Tino Calancha Date: Tue, 21 Feb 2017 12:39:29 +0900 Message-ID: <87mvdgdxfy.fsf@calancha-pc> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) X-Debbugs-CC: Stefan Monnier emacs -Q: I) (progn (describe-function 'dolist) (delete-other-windows) (featurep 'cl-lib)) => t The patch below prevent to load cl-lib in this case. II) After the patch, we still load extra libs in _interactive_ calls. ;; (Applied patch below) (progn (describe-function 'mapc) (delete-other-windows) (featurep 'cl-lib)) => nil ;; Now interactively. M-x describe-function RET mapc RET M-: (featurep 'cl-lib) RET => t ;; Becase it loads map.el which depends on seq.el, and ;; this one depends on cl-lib. ;; ;; IMO, an input "mapc" should not load map.el, ;; because "mapc" doesn't match a prefix "map-". ;; Does it have sense for you? ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >From ff83f7b3d8f48eeef037f6e7606ba3c3be3fb3c2 Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Tue, 21 Feb 2017 12:20:35 +0900 Subject: [PATCH] help-mode: Don't require cl-lib at run-time * lisp/help-mode.el: Require cl-lib at compile time (Bug#25823). (help--find-symbol): New defun. (help-make-xrefs): Use it instead of cl-some. * lisp/help-fns.el: Require cl-lib at compile time. (describe-symbol): Use help--find-symbol. --- lisp/help-fns.el | 8 +++----- lisp/help-mode.el | 10 +++++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 742c66919a..479d109ce9 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -32,7 +32,7 @@ ;;; Code: -(require 'cl-lib) +(eval-when-compile (require 'cl-lib)) (require 'help-mode) (require 'radix-tree) @@ -1089,8 +1089,7 @@ describe-symbol current buffer and the selected frame, respectively." (interactive (let* ((v-or-f (symbol-at-point)) - (found (cl-some (lambda (x) (funcall (nth 1 x) v-or-f)) - describe-symbol-backends)) + (found (help--find-symbol v-or-f)) (v-or-f (if found v-or-f (function-called-at-point))) (found (or found v-or-f)) (enable-recursive-minibuffers t) @@ -1100,8 +1099,7 @@ describe-symbol "Describe symbol: ") obarray (lambda (vv) - (cl-some (lambda (x) (funcall (nth 1 x) vv)) - describe-symbol-backends)) + (help--find-symbol vv)) t nil nil (if found (symbol-name v-or-f))))) (list (if (equal val "") diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 3fb793e7aa..0196577206 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -30,7 +30,7 @@ ;;; Code: (require 'button) -(require 'cl-lib) +(eval-when-compile (require 'cl-lib)) (eval-when-compile (require 'easymenu)) (defvar help-mode-map @@ -400,6 +400,11 @@ describe-symbol-backends (get symbol 'variable-documentation))) ,#'describe-variable))) +(defun help--find-symbol (sym) + (catch 'found + (cl-loop for seq the elements of describe-symbol-backends + do (when (funcall (nth 1 seq) sym) + (throw 'found t))))) ;;;###autoload (defun help-make-xrefs (&optional buffer) "Parse and hyperlink documentation cross-references in the given BUFFER. @@ -502,8 +507,7 @@ help-make-xrefs ;; (pop-to-buffer (car location)) ;; (goto-char (cdr location)))) (help-xref-button 8 'help-function-def sym)) - ((cl-some (lambda (x) (funcall (nth 1 x) sym)) - describe-symbol-backends) + ((help--find-symbol sym) (help-xref-button 8 'help-symbol sym))))))) ;; An obvious case of a key substitution: (save-excursion -- 2.11.0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.7) of 2017-02-21 Repository revision: 96cea19842b577eb4f2e057d702aea54d736233e From unknown Sun Jun 22 17:13:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25823: 26.0.50; describe-function: Don't require cl-lib at runtime Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Feb 2017 13:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25823 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: 25823@debbugs.gnu.org Received: via spool by 25823-submit@debbugs.gnu.org id=B25823.14876831351890 (code B ref 25823); Tue, 21 Feb 2017 13:19:02 +0000 Received: (at 25823) by debbugs.gnu.org; 21 Feb 2017 13:18:55 +0000 Received: from localhost ([127.0.0.1]:48382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgALF-0000UP-T5 for submit@debbugs.gnu.org; Tue, 21 Feb 2017 08:18:55 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:41521) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgALE-0000UB-2s for 25823@debbugs.gnu.org; Tue, 21 Feb 2017 08:18:52 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BBDADcPaxY/1aKs2teGwEBAQMBAQEJAQEBg1GEd4VWhXKRTQGXFxqFfwMEAgKCZEQUAQIBAQEBAQEBYiiEcQZWIxALNBIUGA0kigGwTItYAQEBAQEFAgElizuKOQWQR4tBlAABiFCGWpMkNiGBACAUCCyHJCKLRQEBAQ X-IPAS-Result: A0BBDADcPaxY/1aKs2teGwEBAQMBAQEJAQEBg1GEd4VWhXKRTQGXFxqFfwMEAgKCZEQUAQIBAQEBAQEBYiiEcQZWIxALNBIUGA0kigGwTItYAQEBAQEFAgElizuKOQWQR4tBlAABiFCGWpMkNiGBACAUCCyHJCKLRQEBAQ X-IronPort-AV: E=Sophos;i="5.35,189,1484024400"; d="scan'208";a="293419240" Received: from 107-179-138-86.cpe.teksavvy.com (HELO pastel.home) ([107.179.138.86]) by smtp.teksavvy.com with ESMTP; 21 Feb 2017 08:18:46 -0500 Received: by pastel.home (Postfix, from userid 20848) id 5A10E6595B; Tue, 21 Feb 2017 08:18:45 -0500 (EST) From: Stefan Monnier Message-ID: References: <87mvdgdxfy.fsf@calancha-pc> Date: Tue, 21 Feb 2017 08:18:45 -0500 In-Reply-To: <87mvdgdxfy.fsf@calancha-pc> (Tino Calancha's message of "Tue, 21 Feb 2017 12:39:29 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > (progn > (describe-function 'dolist) > (delete-other-windows) > (featurep 'cl-lib)) > => t FWIW, cl-lib is a library that can be loaded at runtime just fine. Moreover, it's likely that cl-lib will end up pre-loaded from loadup.el at some point in the (somewhat distant) future. So I don't think we should worry too much about the above result. But don't take that to mean I don't like your patch. Stefan From unknown Sun Jun 22 17:13:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25823: 26.0.50; describe-function: Don't require cl-lib at runtime Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Feb 2017 03:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25823 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: 25823@debbugs.gnu.org, Tino Calancha Received: via spool by 25823-submit@debbugs.gnu.org id=B25823.148773381414023 (code B ref 25823); Wed, 22 Feb 2017 03:24:01 +0000 Received: (at 25823) by debbugs.gnu.org; 22 Feb 2017 03:23:34 +0000 Received: from localhost ([127.0.0.1]:49486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgNWg-0003e7-Nx for submit@debbugs.gnu.org; Tue, 21 Feb 2017 22:23:34 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:33765) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgNWf-0003du-5R for 25823@debbugs.gnu.org; Tue, 21 Feb 2017 22:23:33 -0500 Received: by mail-pg0-f67.google.com with SMTP id 5so21402952pgj.0 for <25823@debbugs.gnu.org>; Tue, 21 Feb 2017 19:23:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=UNH8FfkNFmApiLVdCggkbht/jNVS4PqpTR1s2EM9BLs=; b=MoJzPbpBqf4z428wZVzRZxQ9PXNOvxeGCz1sdgkPdjppDPyd8BS5j6Zgt7w1OVySCk WuTtxBHSA5h3zdvEwENu6pGQt25rX3x4YWVw/GXG/mxcM80VqpbFI5LxlOmEJf/uMzId SIG3v+y1BvwQ4uq9O69oUB4WpwK4ASRhEI7asCAYZCf4eXKwtAgDnrUWvQpNQ8P8bREY iYZyCM9vdaltiy2iRU+ZNwOWg7urtHmvdtTHWpulIC3obU0hMO7hZ73fqohKyIL/DUVb eCcjNtX0sJWfRPKTGej7HgQix+mVmksvNVFIBk16xzz/c4HOPE3TPO5S3xf46cQkvc36 R9DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=UNH8FfkNFmApiLVdCggkbht/jNVS4PqpTR1s2EM9BLs=; b=jAa3pLkiskWoaVQRdGJcFA/sLCaujmFx9K5mI6eVIejwGBYIMda6F2uiUOc0N+W1If InyMnXumd8Ubd2q6TojDMjrOTDVwXuWGRiktj92YJ5lTjS4HZCDe0CO43scg6Yn8Tt3+ SbF3FSGbu40HbB4CA7Xv/DbZ1cXE0NowST2VhviWEuS6e5EeP65TDaHarBQYeT42at5i aWJF96B/w3nYuiJ88dncU4uC9CNfGydh+TGRDuQlhHyNejZOOUpEpYMAYSQblA8gx70o 2bRPsQYuIfxrn0vA5AkCBa3QdE033DUGVe0MLhXs4SnN/CSdGwlQ1W+ZDqPftu25OkB/ +xgA== X-Gm-Message-State: AMke39nsPE83aWYrxjuwcR1xNACrouawslPsYLbrEN+7qoN1Mwk8hCi+JDSYYtXEU93z4w== X-Received: by 10.99.166.17 with SMTP id t17mr39560121pge.196.1487733807344; Tue, 21 Feb 2017 19:23:27 -0800 (PST) Received: from calancha-pc (104.81.147.124.dy.bbexcite.jp. [124.147.81.104]) by smtp.gmail.com with ESMTPSA id t133sm43732639pgc.24.2017.02.21.19.23.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Feb 2017 19:23:26 -0800 (PST) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Wed, 22 Feb 2017 12:23:23 +0900 (JST) X-X-Sender: calancha@calancha-pc In-Reply-To: Message-ID: References: <87mvdgdxfy.fsf@calancha-pc> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On Tue, 21 Feb 2017, Stefan Monnier wrote: >> (progn >> (describe-function 'dolist) >> (delete-other-windows) >> (featurep 'cl-lib)) >> => t > > FWIW, cl-lib is a library that can be loaded at runtime just fine. > Moreover, it's likely that cl-lib will end up pre-loaded from loadup.el > at some point in the (somewhat distant) future. I see, i guess prince Hamlet would ask this somehow differently: "To load, or not to load cl-lib- that is the question". But i lack of his talent for the lyrics... so i just sent a patch :-( > So I don't think we should worry too much about the above result. I often worry about things that most of the people even ignore they do exist :-S From unknown Sun Jun 22 17:13:52 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Tino Calancha Subject: bug#25823: closed (Re: bug#25823: 26.0.50; describe-function: Don't require cl-lib at runtime) Message-ID: References: <87poex169z.fsf@calancha-pc> <87mvdgdxfy.fsf@calancha-pc> X-Gnu-PR-Message: they-closed 25823 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 25823@debbugs.gnu.org Date: Thu, 25 May 2017 12:17:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1495714622-16249-1" This is a multi-part message in MIME format... ------------=_1495714622-16249-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #25823: 26.0.50; describe-function: Don't require cl-lib at runtime which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 25823@debbugs.gnu.org. --=20 25823: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D25823 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1495714622-16249-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 25823-done) by debbugs.gnu.org; 25 May 2017 12:16:06 +0000 Received: from localhost ([127.0.0.1]:37033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDrgS-0003XP-W7 for submit@debbugs.gnu.org; Thu, 25 May 2017 08:16:06 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:32996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDrgQ-0003Qe-TF for 25823-done@debbugs.gnu.org; Thu, 25 May 2017 08:16:03 -0400 Received: by mail-pf0-f178.google.com with SMTP id e193so165916261pfh.0 for <25823-done@debbugs.gnu.org>; Thu, 25 May 2017 05:16:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=P2OJB5of8DqeAWsJxtoYK98FUA+CBiM6/ZZoCrZe2P4=; b=jBiSzu/1Ix7LQEc140qjJVUYrznBcp1tOQC9WSbAmK2yWNPGWthsdnTXDSomPc9YYd bWl4DpPnvsHsg8zjrnLg5NwVVCcrhhV836cbw3jtzMfnpe23um3xcE4KhMrFxK9q76WX iNxcA0jrRHEoBJ9TEJXwFTGpDJAEdRNrPxI2Y7rgD+jd5uTWo/HPu0JaisN1rAi9FvdK yIMdy2FEIOyTkECttS7aZwh89qw9iHuRMoMdwL2/9xzxIxYZyYpdWtqRyMNeYJjv8TfV mVpLrVbZQoHgYJIkudkK17PGbwesL+a1ZwXj90p+q7j6lmj/ojYafV3MejoZOv21SMm5 lXSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=P2OJB5of8DqeAWsJxtoYK98FUA+CBiM6/ZZoCrZe2P4=; b=BW4AsvqmJQ0Ym/GFAesY+o6lPqXzeQpD7yjoP7H/bxQuE4blu11SpemxA2DItObV3c iCelAAx+qoklcw/dEztHwg7mfu7UlQ1tHkmabI3wLj54C0AY9nlQL9fUxPchatnL8tW9 Cm7YVXYwdp7cLNeeaX+hjTZs74Bh+3dUgoB/6GziuagBzx5HGwnDn8NmjMeHZxYU5yGv 9ddnqJSgr7SvMtz7jro8hSKaJVPF+WprD1vWIbvVg6mTdksWNVeEAnp/XfznKZ2P3TsH bkCsc0VQSwaoY9raQ3ACubUkvVqu8ujb/hFmOo4vyn9+yyd4MOqQEStFdrEMJ6rqei+O 9Mcg== X-Gm-Message-State: AODbwcBNK9WwTBr2sGut07Dhxo8sGfmJsf18w1WbPl1+OrC2WDn3kgrj fub79GOd3d8FUxRa X-Received: by 10.99.3.3 with SMTP id 3mr15655283pgd.73.1495714557254; Thu, 25 May 2017 05:15:57 -0700 (PDT) Received: from calancha-pc (222.139.137.133.dy.bbexcite.jp. [133.137.139.222]) by smtp.gmail.com with ESMTPSA id d123sm12086594pga.61.2017.05.25.05.15.54 for <25823-done@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 May 2017 05:15:56 -0700 (PDT) From: Tino Calancha To: 25823-done@debbugs.gnu.org Subject: Re: bug#25823: 26.0.50; describe-function: Don't require cl-lib at runtime References: <87mvdgdxfy.fsf@calancha-pc> Date: Thu, 25 May 2017 21:15:52 +0900 In-Reply-To: (Stefan Monnier's message of "Tue, 21 Feb 2017 08:18:45 -0500") Message-ID: <87poex169z.fsf@calancha-pc> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25823-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Stefan Monnier writes: >> (progn >> (describe-function 'dolist) >> (delete-other-windows) >> (featurep 'cl-lib)) >> => t > > FWIW, cl-lib is a library that can be loaded at runtime just fine. > Moreover, it's likely that cl-lib will end up pre-loaded from loadup.el > at some point in the (somewhat distant) future. > > So I don't think we should worry too much about the above result. OK, i will not worry about it. ------------=_1495714622-16249-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 21 Feb 2017 03:39:52 +0000 Received: from localhost ([127.0.0.1]:48031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cg1Iu-00075H-0x for submit@debbugs.gnu.org; Mon, 20 Feb 2017 22:39:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cg1Is-000753-LE for submit@debbugs.gnu.org; Mon, 20 Feb 2017 22:39:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cg1Im-0002GN-62 for submit@debbugs.gnu.org; Mon, 20 Feb 2017 22:39:45 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53155) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cg1Im-0002GI-31 for submit@debbugs.gnu.org; Mon, 20 Feb 2017 22:39:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53771) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cg1Ik-0008Rl-FC for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2017 22:39:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cg1If-0002CK-Fk for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2017 22:39:42 -0500 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]:35993) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cg1If-0002BR-8X for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2017 22:39:37 -0500 Received: by mail-pg0-x242.google.com with SMTP id a123so13044350pgc.3 for ; Mon, 20 Feb 2017 19:39:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version; bh=pAQw15vL3Ecl0PlXChGMQPv2AmRFv94T7Vc4hNcuiOc=; b=o1U7vY9vodAj26FZS3QCk0gOc59yb/joWRG2plLJv0urNpOKTvSGXi3HftWMPi6Oap O3Ba3za4Ls8ws02DmCiS1/Yx+L9FvlE2yXYT8OOuUhcD7lehydfLU9QW1cj8FDEpNoaG mjkM8V3v2ZyclzuIzZeAVhunMl1qIlrcn1LCw7YHfLqjvrlAG9cIwW/uTDnPxTBs2KmV E5J0zpc3pW0Y3PPyeaZgzqnnFrk3GSzLwEZbvVLhCOISP/W3d9cLwc3A+bfIfTDjCqls pRYQxtGbIEKt4Mt6r4AfD/EkgkaYHpZtNraeJU6Dw+dJIUHJUYqHR7o3ZO+j+yup1RE+ K9IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=pAQw15vL3Ecl0PlXChGMQPv2AmRFv94T7Vc4hNcuiOc=; b=oS87hCznSXum/msR//8EBwQyXXqqURkq/b7Tn+JC/g6sNuxOPzADTJIfPp9H9MCGe5 /Rslub3c/xsbL27D0IP0El3/BaHVKNRTenHTWyAqtyz3l8rPitTYUW5ViyoDKUdrkA3p impQJAzORuf39ydjLD7hdtnYKxWkxFWj9PdSXIeyTyq1miq8PA9ewFWLximtaapVWU38 saCVzSBiN45O0kRIE072ASF9hn5Y4wHlp840HYEcXnLh/DUu3LkUuW9lz/xXTssB03UJ 1Rb9DdgjaA4SZg28iLA7cuY9ytn3iODc2aaKxti9qjUXRYzEzvD71eLomxKqNzfGzOcM JS4g== X-Gm-Message-State: AMke39mcaXmFanN7WXT/yO5AQbc4ioUBsUXc13AMr2bnek4e9+4WnjZmZqYkdV5I7YqYBA== X-Received: by 10.84.247.23 with SMTP id n23mr3282844pll.39.1487648376060; Mon, 20 Feb 2017 19:39:36 -0800 (PST) Received: from calancha-pc (104.81.147.124.dy.bbexcite.jp. [124.147.81.104]) by smtp.gmail.com with ESMTPSA id p15sm37474385pfk.58.2017.02.20.19.39.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2017 19:39:35 -0800 (PST) From: Tino Calancha To: bug-gnu-emacs@gnu.org Subject: 26.0.50; describe-function: Don't require cl-lib at runtime Date: Tue, 21 Feb 2017 12:39:29 +0900 Message-ID: <87mvdgdxfy.fsf@calancha-pc> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: tino.calancha@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) X-Debbugs-CC: Stefan Monnier emacs -Q: I) (progn (describe-function 'dolist) (delete-other-windows) (featurep 'cl-lib)) => t The patch below prevent to load cl-lib in this case. II) After the patch, we still load extra libs in _interactive_ calls. ;; (Applied patch below) (progn (describe-function 'mapc) (delete-other-windows) (featurep 'cl-lib)) => nil ;; Now interactively. M-x describe-function RET mapc RET M-: (featurep 'cl-lib) RET => t ;; Becase it loads map.el which depends on seq.el, and ;; this one depends on cl-lib. ;; ;; IMO, an input "mapc" should not load map.el, ;; because "mapc" doesn't match a prefix "map-". ;; Does it have sense for you? ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >From ff83f7b3d8f48eeef037f6e7606ba3c3be3fb3c2 Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Tue, 21 Feb 2017 12:20:35 +0900 Subject: [PATCH] help-mode: Don't require cl-lib at run-time * lisp/help-mode.el: Require cl-lib at compile time (Bug#25823). (help--find-symbol): New defun. (help-make-xrefs): Use it instead of cl-some. * lisp/help-fns.el: Require cl-lib at compile time. (describe-symbol): Use help--find-symbol. --- lisp/help-fns.el | 8 +++----- lisp/help-mode.el | 10 +++++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 742c66919a..479d109ce9 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -32,7 +32,7 @@ ;;; Code: -(require 'cl-lib) +(eval-when-compile (require 'cl-lib)) (require 'help-mode) (require 'radix-tree) @@ -1089,8 +1089,7 @@ describe-symbol current buffer and the selected frame, respectively." (interactive (let* ((v-or-f (symbol-at-point)) - (found (cl-some (lambda (x) (funcall (nth 1 x) v-or-f)) - describe-symbol-backends)) + (found (help--find-symbol v-or-f)) (v-or-f (if found v-or-f (function-called-at-point))) (found (or found v-or-f)) (enable-recursive-minibuffers t) @@ -1100,8 +1099,7 @@ describe-symbol "Describe symbol: ") obarray (lambda (vv) - (cl-some (lambda (x) (funcall (nth 1 x) vv)) - describe-symbol-backends)) + (help--find-symbol vv)) t nil nil (if found (symbol-name v-or-f))))) (list (if (equal val "") diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 3fb793e7aa..0196577206 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -30,7 +30,7 @@ ;;; Code: (require 'button) -(require 'cl-lib) +(eval-when-compile (require 'cl-lib)) (eval-when-compile (require 'easymenu)) (defvar help-mode-map @@ -400,6 +400,11 @@ describe-symbol-backends (get symbol 'variable-documentation))) ,#'describe-variable))) +(defun help--find-symbol (sym) + (catch 'found + (cl-loop for seq the elements of describe-symbol-backends + do (when (funcall (nth 1 seq) sym) + (throw 'found t))))) ;;;###autoload (defun help-make-xrefs (&optional buffer) "Parse and hyperlink documentation cross-references in the given BUFFER. @@ -502,8 +507,7 @@ help-make-xrefs ;; (pop-to-buffer (car location)) ;; (goto-char (cdr location)))) (help-xref-button 8 'help-function-def sym)) - ((cl-some (lambda (x) (funcall (nth 1 x) sym)) - describe-symbol-backends) + ((help--find-symbol sym) (help-xref-button 8 'help-symbol sym))))))) ;; An obvious case of a key substitution: (save-excursion -- 2.11.0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.7) of 2017-02-21 Repository revision: 96cea19842b577eb4f2e057d702aea54d736233e ------------=_1495714622-16249-1--