-Return RESULT if non-nil or the result of evaluation of the
-form.
-
-\(fn (VAR MAP [RESULT]) &rest ARGS)"
- (declare (debug t) (indent 1))
- (unless (listp spec)
- (setq spec `(,spec ,spec)))
- (let ((map-var (car spec))
- (result-var (make-symbol "result")))
- `(let ((,map-var ,(cadr spec))
- ,result-var)
- (setq ,result-var
- (cond ((listp ,map-var) ,(plist-get args :list))
- ((hash-table-p ,map-var) ,(plist-get args :hash-table))
- ((arrayp ,map-var) ,(plist-get args :array))
- (t (error "Unsupported map: %s" ,map-var))))
- ,@(when (cddr spec)
- `((setq ,result-var ,@(cddr spec))))
- ,result-var)))
+Return RESULT if non-nil or the result of evaluation of the form."
+ (declare (debug t) (indent 1))
+ `(cond ((listp ,map-var) ,(plist-get args :list))
+ ((hash-table-p ,map-var) ,(plist-get args :hash-table))
+ ((arrayp ,map-var) ,(plist-get args :array))
+ (t (error "Unsupported map: %s" ,map-var)))))