Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target highlight #279

Merged
merged 8 commits into from
Jul 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions embark-consult.el
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@
(apply #'concat (nreverse chunks)))
string))

(defun embark-consult--location-transform (target)
"Remove the unicode suffix character from a `consult-location' TARGET."
(cons 'consult-location (embark-consult--strip target)))
(defun embark-consult--target-strip (type target)
"Remove the unicode suffix character from a TARGET of TYPE."
(cons type (embark-consult--strip target)))

(setf (alist-get 'consult-location embark-transformer-alist)
#'embark-consult--location-transform)
#'embark-consult--target-strip)

(defun embark-consult-export-occur (lines)
"Create an occur mode buffer listing LINES.
Expand Down Expand Up @@ -201,7 +201,7 @@ The elements of LINES are assumed to be values of category `consult-line'."

;;; Support for consult-multi

(defun embark-consult--multi-transform (target)
(defun embark-consult--multi-transform (_type target)
"Refine `consult-multi' TARGET to its real type.
This function takes a target of type `consult-multi' (from
Consult's `consult-multi' category) and transforms it to its
Expand All @@ -214,12 +214,8 @@ actual type."

;;; Support for consult-isearch

(defun embark-consult--isearch-transform (target)
"Remove the unicode suffix character from a `consult-isearch' TARGET."
(cons 'consult-isearch (embark-consult--strip target)))

(setf (alist-get 'consult-isearch embark-transformer-alist)
#'embark-consult--isearch-transform)
#'embark-consult--target-strip)

;;; Support for consult-register

Expand Down
Loading