From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: Byte-compilation of custom themes Date: Sun, 03 Jun 2018 12:21:07 +0100 Message-ID: <87muwc9kv0.fsf@tcd.ie> References: <87efmk2qk0.fsf@tcd.ie> <87vafjhu04.fsf@tcd.ie> <87po5po7ul.fsf@tcd.ie> <87o9hoxm0w.fsf@tcd.ie> <83fu2ynvda.fsf@gnu.org> <87zi169q9y.fsf@tcd.ie> <83a7t6nlmf.fsf@gnu.org> <877eo9kjnl.fsf@tcd.ie> <831sehnymt.fsf@gnu.org> <874lim2pyi.fsf@tcd.ie> <83d0x9e8iu.fsf@gnu.org> <87vab110mi.fsf@tcd.ie> <83y3fxc7c4.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1528024759 23387 195.159.176.226 (3 Jun 2018 11:19:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 3 Jun 2018 11:19:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 03 13:19:15 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPR2V-0005t5-Be for ged-emacs-devel@m.gmane.org; Sun, 03 Jun 2018 13:19:11 +0200 Original-Received: from localhost ([::1]:34527 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPR4c-0001hN-4M for ged-emacs-devel@m.gmane.org; Sun, 03 Jun 2018 07:21:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPR4S-0001hC-HN for emacs-devel@gnu.org; Sun, 03 Jun 2018 07:21:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPR4R-0006qm-LU for emacs-devel@gnu.org; Sun, 03 Jun 2018 07:21:12 -0400 Original-Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:55421) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPR4R-0006pV-AX for emacs-devel@gnu.org; Sun, 03 Jun 2018 07:21:11 -0400 Original-Received: by mail-wm0-x22a.google.com with SMTP id v16-v6so3865232wmh.5 for ; Sun, 03 Jun 2018 04:21:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Xw36bvoNpSIDCP3tfSCkijezhi2OYkZnfiO1TkbC6nI=; b=FMgCxucbgW+1p9XGKnoUOVpYsE1DBfeHNQRIJBGQixy6tAVY1EYKVcrNQvtOvihfzy lAktccXyEIXqPm/lIbUVAxKmKb63U1wRPiI/L4ynGMKE59B+bFCZrvX8UJkLf+hB6K1F B+2MtfPqQZoGiVtNKLR1Xjf6Xm8ogWqcYg0woNBWbLZ2Hzgpya5xbpy46Tqo80pK0p5v lRms77w7gC70ol2i+oaPH0DtTV7WDnhd45KmmisNLAz6VMhbbmoe6XvKazs4sJ3kJoaH HGQyHFGfQcJ6a3FJpDp/b9aLOtX/UhI8KpVu/0lV/eqwibkEhE7rAMdxYhZp2N89YmAg jnEQ== 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:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Xw36bvoNpSIDCP3tfSCkijezhi2OYkZnfiO1TkbC6nI=; b=iIxmngssZWYB8+87D33nkXZ8wqLYrm2W/FKkmq15JchZC1Zyu7NOpb8rzVeW1vqVjX EosEqnwhgAbtDAfhjpfc26DyxwIrjjp/SZtXubIF2Kt0QuuSctNn9hWo6fq7sfTKkr1F EO3tk3GuvNawJ5yJthWVdmiLQaBADWxh4lZ09FJWcvbrL6N2d9uSYOWOAGmEbmUlJKpe ahLzbxaiUivtNnNj5cLBKIvdwxmo5sEqev3qTKxrlTNEJwF4CuD7UH0paNE8hDjpuAZM zcvuvU1V0KOrABGJRSE902bhA3rguvOI56sgxp/wmNY6NWgHvcq603sT8wJTTn97b4W6 wsTQ== X-Gm-Message-State: ALKqPwcup3LrXUT9aMDBK7fm8B4KJjHBXPNAtW9K4Zx9A092PS/bwb9E hGHJvfsaPwj6HPMN1a7bVA2DqA== X-Google-Smtp-Source: ADUXVKJKirNUSInYTgSgGrcDOxyjR2htk/I3L+QzQ9u/Iii+JS1/zcazzjtiErHsXxsqScN9+NcMvA== X-Received: by 2002:a50:caca:: with SMTP id f10-v6mr20388161edi.89.1528024869401; Sun, 03 Jun 2018 04:21:09 -0700 (PDT) Original-Received: from localhost ([2a02:8084:4f41:8c80:9c34:da08:a010:edfc]) by smtp.gmail.com with ESMTPSA id e6-v6sm23249886edr.23.2018.06.03.04.21.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 03 Jun 2018 04:21:08 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sat, 2 Jun 2018 23:52:22 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:225951 Archived-At: --=-=-= Content-Type: text/plain Stefan Monnier writes: >> I meant featurep, but since cl-assert is autoloaded, that shouldn't be > > AFAICT it's not autoloaded. You're right, emacs -Q followed by (fboundp 'cl-assert) returns nil. > I think the confusing comes from help-fns.el which does (require > 'cl-lib), so if you do `C-h f cl-assert RET` it will indeed tell you > it's autoloaded, but it's just because `C-h f` ended up requiring > cl-lib. No, the confusion comes from looking at the source of cl-macs.el, in which cl-assert is given an ;;;###autoload cookie. I see now that there are some comments in cl-lib.el that suggest loading cl-loaddefs.el involves some trickery, so I guess I don't get to eat the cake here. In that case, I don't see how Eli's suggestion to predicate the cl-assert call on (featurep 'cl-lib) will help, as feauturep is not going to load the library for us. Do we want the following instead? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=assert.diff diff --git a/lisp/custom.el b/lisp/custom.el index 076790b661..e55c9db1ac 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1288,10 +1288,13 @@ custom-available-themes loaded, and no effort is made to check that the files contain valid Custom themes. For a list of loaded themes, check the variable `custom-known-themes'." + (eval-when-compile (require 'cl-lib)) (let ((suffix "-theme\\.el\\'") themes) (dolist (dir (custom-theme--load-path)) - ;; `custom-theme--load-path' promises DIR exists and is a directory. + (cl-assert + (file-directory-p dir) t + "Non-existent directory in `custom-theme-load-path' expansion: %s") (dolist (file (directory-files dir nil suffix)) (let ((theme (intern (substring file 0 (string-match-p suffix file))))) (and (custom-theme-name-valid-p theme) --=-=-= Content-Type: text/plain -- Basil --=-=-=--