branch: externals/embark commit 891aa297aa74478dc69865fd26daaeaeb4872260 Author: Omar Antolín <omar.anto...@gmail.com> Commit: Omar Antolín <omar.anto...@gmail.com>
Simplify some double negations --- embark.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/embark.el b/embark.el index 3d8619ea90..8f5cdd29a2 100644 --- a/embark.el +++ b/embark.el @@ -2141,7 +2141,7 @@ Return a plist with keys `:type', `:orig-type', `:candidates', and candidates)))) (append (list :orig-type type :orig-candidates candidates) - (or (unless (null candidates) + (or (when candidates (when-let ((transformer (alist-get type embark-transformer-alist))) (pcase-let* ((`(,new-type . ,first-cand) (funcall transformer type (car candidates)))) @@ -2567,7 +2567,7 @@ all buffers." ;; distinguished from the "single marked file" case by ;; returning (list t marked-file) in the latter (let ((marked (dired-get-marked-files t nil nil t))) - (and (not (null (cdr marked))) + (and (cdr marked) (if (eq (car marked) t) (cdr marked) marked))) (save-excursion (goto-char (point-min)) @@ -3818,7 +3818,7 @@ The advice is self-removing so it only affects ACTION once." (defun embark--allow-edit (&rest _) "Allow editing the target." - (remove-hook 'post-command-hook 'exit-minibuffer t) + (remove-hook 'post-command-hook #'exit-minibuffer t) (remove-hook 'post-command-hook 'ivy-immediate-done t)) (defun embark--ignore-target (&rest _)