branch: externals/company
commit 2b76e26299edca25df0f4da247d74e7ea20a9110
Author: Leuven65 <[email protected]>
Commit: Leuven65 <[email protected]>
Fix issue of "all" in 'company-dabbrev-other-buffers' for Emacs 31
In latest Emacs 31, "all" is added as a new function.
d1b3eb7eec64ffb9f2d89efda21660cab92bcf0c "Add any and all (bug#79611)"
** New functions 'any' and 'all'.
These return non-nil for lists where any and all elements, respectively,
satisfy a given predicate.
---
company-dabbrev.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/company-dabbrev.el b/company-dabbrev.el
index 2bd8e8d780..148726c7af 100644
--- a/company-dabbrev.el
+++ b/company-dabbrev.el
@@ -198,9 +198,11 @@ This variable affects both `company-dabbrev' and
`company-dabbrev-code'."
(company-dabbrev--search (company-dabbrev--make-regexp)
company-dabbrev-time-limit
(pcase company-dabbrev-other-buffers
- (`t (list major-mode))
+ ('t (list major-mode))
+ ; in emacs 31, 'all' is defined as a new
function, make sure to let it before '(pred functionp)'.
+ ('all 'all)
((pred functionp) (funcall
company-dabbrev-other-buffers (current-buffer)))
- (`all `all))))
+ )))
;;;###autoload
(defun company-dabbrev (command &optional arg &rest _ignored)