[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/setup 646ed6f 01/10: Check if PATH exists for :load-fro
From: |
Stefan Monnier |
Subject: |
[elpa] externals/setup 646ed6f 01/10: Check if PATH exists for :load-from |
Date: |
Wed, 12 May 2021 18:45:54 -0400 (EDT) |
branch: externals/setup
commit 646ed6f60cfd723ae78186e8cf36afbca779ff09
Author: Philip K <philipk@posteo.net>
Commit: Philip K <philipk@posteo.net>
Check if PATH exists for :load-from
---
setup.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/setup.el b/setup.el
index a92b691..c564083 100644
--- a/setup.el
+++ b/setup.el
@@ -498,10 +498,13 @@ the first PACKAGE."
(setup-define :load-from
(lambda (path)
- `(add-to-list 'load-path (expand-file-name ,path)))
+ `(if (file-exists-p ,path)
+ (add-to-list 'load-path (expand-file-name ,path))
+ (throw 'setup-exit t)))
:documentation "Add PATH to load path.
This macro can be used as HEAD, and it will replace itself with
-the nondirectory part of PATH."
+the nondirectory part of PATH.
+If PATH does not exist, abort the evaluation."
:shorthand (lambda (args) (intern (file-name-nondirectory (cadr args)))))
(setup-define :file-match
- [elpa] externals/setup updated (86b968f -> f15c902), Stefan Monnier, 2021/05/12
- [elpa] externals/setup fe21e39 02/10: Mention GPL3 instead of CC0 as license in README, Stefan Monnier, 2021/05/12
- [elpa] externals/setup c144c5f 03/10: Mention that setup operating using local macros, Stefan Monnier, 2021/05/12
- [elpa] externals/setup 646ed6f 01/10: Check if PATH exists for :load-from,
Stefan Monnier <=
- [elpa] externals/setup 36e2602 04/10: Remove :name mention in setup-define, Stefan Monnier, 2021/05/12
- [elpa] externals/setup 1925ed2 06/10: Mention defsetup macro in tips section, Stefan Monnier, 2021/05/12
- [elpa] externals/setup f86d9f4 07/10: Add support for xref jump-to-definition for local macros, Stefan Monnier, 2021/05/12
- [elpa] externals/setup f15c902 10/10: Allow xref to find setup-defines outside of setup.el, Stefan Monnier, 2021/05/12
- [elpa] externals/setup ce1e0e3 08/10: Prevent overriding all elisp xref requests, Stefan Monnier, 2021/05/12
- [elpa] externals/setup 6da3894 09/10: Elaborate on comments, Stefan Monnier, 2021/05/12
- [elpa] externals/setup 4137cd0 05/10: Give an example of setup-based macros, Stefan Monnier, 2021/05/12