Skip to content

Commit

Permalink
* anything.el (anything-empty-buffer-p): Fix, it was always returning…
Browse files Browse the repository at this point in the history
… nothing.
  • Loading branch information
thierryvolpiatto committed Aug 23, 2011
1 parent 618184f commit 24b6018
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion anything.el
Expand Up @@ -1370,7 +1370,9 @@ Otherwise, return VALUE itself."
(push spec anything-once-called-functions))))

;; (@* "Core: API helper")
(defun anything-empty-buffer-p (&optional buffer)
(defun* anything-empty-buffer-p (&optional (buffer anything-buffer))
"Check if BUFFER have candidates.
Default value for BUFFER is `anything-buffer'."
(zerop (buffer-size (and buffer (get-buffer buffer)))))

(defun anything-let-eval-varlist (varlist)
Expand All @@ -1379,6 +1381,7 @@ Otherwise, return VALUE itself."
(cons (car pair) (eval (cadr pair)))
(cons pair nil)))
varlist))

(defun anything-let*-eval-varlist (varlist)
(let ((vars (mapcar (lambda (pair) (or (car-safe pair) pair)) varlist)))
(eval `(let ,vars
Expand All @@ -1388,6 +1391,7 @@ Otherwise, return VALUE itself."
`(setq ,pair nil)))
varlist)
(mapcar (lambda (v) (cons v (symbol-value v))) ',vars)))))

(defun anything-let-internal (binding bodyfunc)
"Evaluate BODYFUNC and Set BINDING to anything buffer-local variables.
BINDING is a list of (VARNAME . VALUE) pair."
Expand Down

0 comments on commit 24b6018

Please sign in to comment.