Minor refactors across the board

- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
This commit is contained in:
Henrik Lissner 2019-06-25 21:38:16 +02:00
parent 4ecf6c9414
commit 9a02bd8ac8
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
42 changed files with 114 additions and 110 deletions

View file

@ -10,15 +10,15 @@ ignore the cache."
(or (and (not refresh-p)
(gethash project-root +javascript-npm-conf))
(let ((package-file (expand-file-name "package.json" project-root)))
(when-let* ((json (and (file-exists-p package-file)
(require 'json)
(json-read-file package-file))))
(when-let (json (and (file-exists-p package-file)
(require 'json)
(json-read-file package-file)))
(puthash project-root json +javascript-npm-conf))))))
;;;###autoload
(defun +javascript-npm-dep-p (packages &optional project-root refresh-p)
(when-let* ((data (and (bound-and-true-p +javascript-npm-mode)
(+javascript-npm-conf project-root refresh-p))))
(when-let (data (and (bound-and-true-p +javascript-npm-mode)
(+javascript-npm-conf project-root refresh-p)))
(let ((deps (append (cdr (assq 'dependencies data))
(cdr (assq 'devDependencies data)))))
(cond ((listp packages)