Skip to content

Commit

Permalink
Revert "cape-dabbrev-check-other-buffers: More defensive function che…
Browse files Browse the repository at this point in the history
…ck (Fix #127)"

This reverts commit 9476f6c.
  • Loading branch information
minad committed Aug 18, 2024
1 parent 9476f6c commit de5adc1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions cape.el
Original file line number Diff line number Diff line change
Expand Up @@ -567,13 +567,14 @@ If INTERACTIVE is nil the function acts like a Capf."
(defun cape--dabbrev-list (input)
"Find all Dabbrev expansions for INPUT."
(cape--silent
(dlet ((fun-p (and (not (memq cape-dabbrev-check-other-buffers '(nil t some)))
(functionp cape-dabbrev-check-other-buffers)))
(dabbrev-check-other-buffers
(and cape-dabbrev-check-other-buffers (not fun-p)))
(dabbrev-check-all-buffers (eq cape-dabbrev-check-other-buffers t))
(dlet ((dabbrev-check-other-buffers
(and cape-dabbrev-check-other-buffers
(not (functionp cape-dabbrev-check-other-buffers))))
(dabbrev-check-all-buffers
(eq cape-dabbrev-check-other-buffers t))
(dabbrev-search-these-buffers-only
(and fun-p (funcall cape-dabbrev-check-other-buffers))))
(and (functionp cape-dabbrev-check-other-buffers)
(funcall cape-dabbrev-check-other-buffers))))
(dabbrev--reset-global-variables)
(cons
(apply-partially #'string-prefix-p input)
Expand Down

0 comments on commit de5adc1

Please sign in to comment.