See also `and-let*'."
(declare (indent 1) (debug if-let*))
- (list 'if-let* varlist (macroexp-progn body)))
+ (let ((res (list 'if-let* varlist (macroexp-progn body))))
+ (if body res
+ (macroexp-warn-and-return "Avoid `when-let*' with empty body"
+ res 'empty-body))))
(defmacro and-let* (varlist &rest body)
"Bind variables according to VARLIST and conditionally evaluate BODY.
(seq-union amalist extlist #'string-match-p))))
(setq tex--buffers-list bufs)
(dolist (buf bufs)
- (when-let ((fbuf (buffer-file-name buf))
- (ext (file-name-extension fbuf))
- (finext (concat "*." ext))
- ((not (seq-find (lambda (elt) (string-match-p elt finext))
- extlist-new)))
- ((push finext extlist-new)))))
+ (when-let* ((fbuf (buffer-file-name buf))
+ (ext (file-name-extension fbuf))
+ (finext (concat "*." ext))
+ ((not (seq-find (lambda (elt) (string-match-p elt finext))
+ extlist-new))))
+ (push finext extlist-new)))
(unless (seq-set-equal-p extlist-new extlist)
(alist-set mode grep-filepattern-alist extlist-new))))
(let* (setsyntax