From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Autoloads and subdirectories Date: Sun, 29 May 2016 11:39:01 -0400 Message-ID: <574B0D15.8090106@gmail.com> References: <57491DA5.4020002@gmail.com> <57492904.7050603@gmail.com> <5749E7C9.3030300@gmail.com> <5749EFAF.1010206@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0052ag1DOCXMw0gaVuAq9gvQI8S5pPg14" X-Trace: ger.gmane.org 1464536678 31750 80.91.229.3 (29 May 2016 15:44:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 May 2016 15:44:38 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 29 17:44:32 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b72tD-00088U-A8 for ged-emacs-devel@m.gmane.org; Sun, 29 May 2016 17:44:31 +0200 Original-Received: from localhost ([::1]:56261 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b72tC-0004OB-G9 for ged-emacs-devel@m.gmane.org; Sun, 29 May 2016 11:44:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b72t4-0004Ih-Oo for emacs-devel@gnu.org; Sun, 29 May 2016 11:44:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b72t0-0003dC-Mo for emacs-devel@gnu.org; Sun, 29 May 2016 11:44:21 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.135]:64673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b72t0-0003d8-Bq for emacs-devel@gnu.org; Sun, 29 May 2016 11:44:18 -0400 Original-Received: from [18.189.83.142] ([18.189.83.142]) by mrelayeu.kundenserver.de (mreue001) with ESMTPSA (Nemesis) id 0ME6qV-1bIMH72MOd-00HOCd for ; Sun, 29 May 2016 17:39:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 In-Reply-To: X-Provags-ID: V03:K0:p9aCCoGlwxbbUlZ+lsuFZ9W8RNCGbPv/Zz8glLxfPzS+6vZcD2t VSzVSvuFD1H6gtjtFCD1ns+SOsHuh+EjbfYQFLoxTN+5oDLEbqlEne1TK4GmhQkD6EzVwgK 4o+akl97v40WFNuhJHfX5eT1GEBKl2DwGLCNSbYGf8aZDryzdnp7dtVa2O2KsO7eSQepMJ6 HXcxBffVA2XfcwchljI+A== X-UI-Out-Filterresults: notjunk:1;V01:K0:qsck6/FZeKk=:StzhR89vWI56IMnJgWfM18 viAtHcZsMF8i5DBN6V/HqDlVyhOHpYFrp1Hj+ymLpCVeDn9Kf7gGYJ/wKCXHhtf3vMXPTSoZu uMt7uubTMTke2gskjZOZ+wX4wWEwLdal7Kct1LuAc8c/+f6S+2NiiEh1VsgOcJ0YTdf5luYQw uyeXhzdAl2hAKlfZ9Nzs2l4d3G7jy72UVSzcfTRlCFN3iu3Tvq+NQImb79N9zzh1p7jR1m7X2 UO72b4KjhqG/1gAXZoqR9PNtsRrJOV7v5+BuqvAUKEktjl886E3zWjrAFVV407wSKsoHMU2ss aJV0wb5YSqHZZiuV6LYKlTJiHMC5BNhyFjzKjPs+I3ijEPoqqnuRGcoEVZV1bfZKExpXy4VqI OJj3vPxnTk/78Spph3slS6YwTdc1vEl4WhBhnjGKPhQK0JYUkAKPYL9y9sfhMmcCo2qi0gM0m PY3ISV+AEB7NDPJ42ppkmHzjmQZ/I70eT6ZR4C1Y9QVUvNrz1BlxnB500wDt+GxKUeaCcQebQ 1fYSxcthhwy0w+kqazYtNOb+qAZF5zX6oHrfMKapJiipZhz93Y8lsCF1dckeQxj5Uct7q4JrW GGAgzPBKVU1liEocwChCLk8KgozFmiTnxxwoNqDo/HTBWIIwprN7IX2De2fJprchS7rV9mR68 I3pMQHLCGM9JHb5ii6oo3FlumvU+nN5HcnONhMK5UkKDoz6T+pxerQdoC84Wuz7husAw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.135 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:204131 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --0052ag1DOCXMw0gaVuAq9gvQI8S5pPg14 Content-Type: multipart/mixed; boundary="IOkvTDwVOWE9Rb1EViVRiuTJcr15k8ACF" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: emacs-devel@gnu.org Message-ID: <574B0D15.8090106@gmail.com> Subject: Re: Autoloads and subdirectories References: <57491DA5.4020002@gmail.com> <57492904.7050603@gmail.com> <5749E7C9.3030300@gmail.com> <5749EFAF.1010206@gmail.com> In-Reply-To: --IOkvTDwVOWE9Rb1EViVRiuTJcr15k8ACF Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2016-05-29 11:01, Stefan Monnier wrote: >> The docs of load-file-name don't say what this variable becomes when o= utside >> of load. It is always nil when load-in-progress is nil? >=20 > I believe so, yes. >=20 >>> And why do you need to fallback on byte-compile-current-file or >>> buffer-file-name? >> I'd like this code to work when the form is evaluated with C-M-x in an= Emacs >> buffer. Since this isn't in an eval-when-compile form, though, I gues= s it >> would work to remove the byte-compile-current-file part. >=20 > For C-M-x I guess you do need buffer-file-name. For M-x eval-buffer > you could use >=20 > ;;;###autoload (defconst realgud-subdir-autoloads-name "subdirector= y-autoloads.el") > ;;;###autoload (defconst realgud-content-dir) > ;;;###autoload (file-name-directory load-file-name)) > ;;;###autoload (with-demoted-errors "Error loading autoloads: %s" > ;;;###autoload (load (expand-file-name realgud-subdir-autoloads-n= ame realgud-content-dir) t t)) Got it, thanks! --IOkvTDwVOWE9Rb1EViVRiuTJcr15k8ACF-- --0052ag1DOCXMw0gaVuAq9gvQI8S5pPg14 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJXSw0fAAoJEPqg+cTm90wj3YkP/R8zKeGayRys8iDUoXQLPSeK 8U0oeDVSlwaa6mwx2XifFdOq/4FnMa7MmWQ+nAkPJM5wHARONhTKa0jUrgLhMDGb KB0Efxi4IbEec8hjiJO0cXa0cZn4mnlP706Jo8p16YFZxh/3/CVAemQtHk5/oTgR OEukPgUAu74IU5DVhVTNKDL4RXSHv1Z/0jO/WB0iqelzlCiFim7WHp3syMwyBe1r PX/oXxY5piwTRiwz4nfHR/GAjuZx6M5FvMJp9Vx46D+BJCaayIDhz4QJM6qVozjD 7JnrFqwrhQpwLzCooXCfbV8dNddceHrBzBS6TAcuqbHaA6rWC9wHbTOiwfMfYNQ0 JMKwIqxSz0TrGA5e9xzOBzQUtzUyAJ5+Qbkxx+DbU28ioSrFYiKBrrT3eDUZj5T9 n0bQAEW4eNEwtjLmti8o/NQXk8PdSjUZwNaBKp1oC9VULAoVvxnKBSIgaBAdNJT7 LgsWWGgnnvXSBfXQF89Fz3U3LdV6OB9k7tXeMdCLcpjUx7bdfNyBK3igELXkGxZO o3B3oMVzFVHadel08fB7NbQhvwVHUGYUhu1ohfV/KhknBrPErXogcddPk/m7reUH B888YN2bRp9LKzKAZQM31Lv56Vgs53/9xeyvK9YMSjOw5htCoO41hvsDj9hi5DuI r1ZeieZlW1B6z/0gMxh+ =nVr0 -----END PGP SIGNATURE----- --0052ag1DOCXMw0gaVuAq9gvQI8S5pPg14--