Skip to content

Commit

Permalink
Merge pull request #710 from minad/multi-category-buffer
Browse files Browse the repository at this point in the history
embark--refine-multi-category: Handle buffer objects
  • Loading branch information
oantolin authored Mar 23, 2024
2 parents c4d492a + d8ae99c commit 15c95ae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion embark.el
Original file line number Diff line number Diff line change
Expand Up @@ -2107,7 +2107,12 @@ minibuffer before executing the action."

(defun embark--refine-multi-category (_type target)
"Refine `multi-category' TARGET to its actual type."
(or (get-text-property 0 'multi-category target)
(or (let ((mc (get-text-property 0 'multi-category target)))
(cond
;; The `cdr' of the `multi-category' property can be a buffer object.
((and (eq (car mc) 'buffer) (buffer-live-p (cdr mc)))
(cons 'buffer (buffer-name (cdr mc))))
((stringp (cdr mc)) mc)))
(cons 'general target)))

(defun embark--simplify-path (_type target)
Expand Down

0 comments on commit 15c95ae

Please sign in to comment.