[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/projectile f7eba5e164 6/9: Fix emacs 25 incompat in projec
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/projectile f7eba5e164 6/9: Fix emacs 25 incompat in projectile--complementary-file |
Date: |
Mon, 27 Dec 2021 07:58:01 -0500 (EST) |
branch: elpa/projectile
commit f7eba5e16477d46ed36066b381f2f7073f777c1c
Author: lWarne <laurencewarne@gmail.com>
Commit: Bozhidar Batsov <bozhidar@batsov.dev>
Fix emacs 25 incompat in projectile--complementary-file
---
projectile.el | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/projectile.el b/projectile.el
index 75e5b8da77..89e1610e4b 100644
--- a/projectile.el
+++ b/projectile.el
@@ -3442,17 +3442,17 @@ test file."
"No matching source file found for project type `%s'"
(projectile-project-type))))
;; find the matching test file
- (if-let* ((error-msg (format
- "No matching test file found for project type `%s'"
- (projectile-project-type)))
- (test-file (projectile-find-matching-test file-name))
- (expanded-test-file (projectile-expand-root test-file)))
- (cond ((file-exists-p expanded-test-file) expanded-test-file)
- (projectile-create-missing-test-files
- (projectile--create-directories-for expanded-test-file)
- expanded-test-file)
- (t (progn (error error-msg))))
- (error error-msg))))
+ (let* ((error-msg (format
+ "No matching test file found for project type `%s'"
+ (projectile-project-type)))
+ (test-file (or (projectile-find-matching-test file-name)
+ (error error-msg)))
+ (expanded-test-file (projectile-expand-root test-file)))
+ (cond ((file-exists-p expanded-test-file) expanded-test-file)
+ (projectile-create-missing-test-files
+ (projectile--create-directories-for expanded-test-file)
+ expanded-test-file)
+ (t (progn (error error-msg)))))))
;;;###autoload
(defun projectile-find-implementation-or-test-other-window ()
@@ -3554,10 +3554,10 @@ More specifically, return DIR-FN applied to the
directory of FILE-PATH
concatenated with FILENAME-FN applied to the file name of FILE-PATH.
If either function returns nil, return nil."
- (when-let* ((filename (file-name-nondirectory file-path))
- (complementary-filename (funcall filename-fn filename))
- (dir (funcall dir-fn (file-name-directory file-path))))
- (concat (file-name-as-directory dir) complementary-filename)))
+ (let ((filename (file-name-nondirectory file-path)))
+ (when-let ((complementary-filename (funcall filename-fn filename))
+ (dir (funcall dir-fn (file-name-directory file-path))))
+ (concat (file-name-as-directory dir) complementary-filename))))
(defun projectile--impl-file-from-src-dir-str (file-name)
"Return a path relative to the project root for the impl file of FILE-NAME
using the src-dir and test-dir properties of the current project type which
should be strings, nil returned if this is not the case."
- [nongnu] elpa/projectile updated (ac60885f2a -> 24de2940a8), ELPA Syncer, 2021/12/27
- [nongnu] elpa/projectile fab2c546fd 8/9: Tweak a changelog entry, ELPA Syncer, 2021/12/27
- [nongnu] elpa/projectile f753cdbcf8 5/9: Update documentation around test/src-dir and update sbt project type, ELPA Syncer, 2021/12/27
- [nongnu] elpa/projectile cd8bcbcb15 2/9: Merge pull request #1735 from eggert/timestamp, ELPA Syncer, 2021/12/27
- [nongnu] elpa/projectile f7eba5e164 6/9: Fix emacs 25 incompat in projectile--complementary-file,
ELPA Syncer <=
- [nongnu] elpa/projectile 24de2940a8 9/9: Merge commit 'ac60885f2a', ELPA Syncer, 2021/12/27
- [nongnu] elpa/projectile b7937e212d 7/9: [#1734] Add a changelog entry, ELPA Syncer, 2021/12/27
- [nongnu] elpa/projectile 43decc573b 1/9: Port projectile-time-seconds to future Emacs, ELPA Syncer, 2021/12/27
- [nongnu] elpa/projectile fad389aecf 3/9: Make src/test-dir as strings take priority over fallback, ELPA Syncer, 2021/12/27
- [nongnu] elpa/projectile 139cb02e20 4/9: Fix tests, ELPA Syncer, 2021/12/27