summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--orderless-kwd.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/orderless-kwd.el b/orderless-kwd.el
index 0b92ef7..686afa1 100644
--- a/orderless-kwd.el
+++ b/orderless-kwd.el
@@ -72,7 +72,9 @@
(defsubst orderless-kwd--buffer (str)
"Return buffer from candidate STR."
- (get-buffer (or (cdr (get-text-property 0 'multi-category str)) str)))
+ (when-let ((cat (get-text-property 0 'multi-category str)))
+ (setq str (and (eq (car cat) 'buffer) (cdr cat))))
+ (and str (get-buffer str)))
(defun orderless-kwd-category (pred regexp)
"Match candidate category against PRED and REGEXP."