emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/setup 4c73517 2/4: Improve :load-form shorthand


From: Stefan Monnier
Subject: [elpa] externals/setup 4c73517 2/4: Improve :load-form shorthand
Date: Wed, 2 Jun 2021 18:28:49 -0400 (EDT)

branch: externals/setup
commit 4c735174a29f923a20bce15179d3d116d97fd19b
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Improve :load-form shorthand
    
    The previous version would have issues with load-paths that end with a
    path separator.
---
 setup.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/setup.el b/setup.el
index 8840d03..55e12ba 100644
--- a/setup.el
+++ b/setup.el
@@ -521,7 +521,9 @@ the first PACKAGE."
 This macro can be used as HEAD, and it will replace itself with
 the nondirectory part of PATH.
 If PATH does not exist, abort the evaluation."
-  :shorthand (lambda (args) (intern (file-name-nondirectory (cadr args)))))
+  :shorthand (lambda (args) (intern
+                             (file-name-nondirectory
+                              (directory-file-name (cadr args))))))
 
 (setup-define :file-match
   (lambda (pat)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]