Skip to content

Commit

Permalink
Merge pull request #17 from shipmints/make-pulsar-resolve-function-al…
Browse files Browse the repository at this point in the history
…iases-public

Make pulsar-resolve-function-aliases public.
  • Loading branch information
protesilaos authored Oct 4, 2024
2 parents f9d5c9c + 93e53e1 commit 00c03ae
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pulsar.el
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ This is a buffer-local mode. Also check `pulsar-global-mode'."
(if pulsar-mode
(progn
(when pulsar-resolve-pulse-function-aliases
(pulsar--resolve-function-aliases))
(pulsar-resolve-function-aliases))
(add-hook 'post-command-hook #'pulsar--post-command-pulse nil 'local))
(remove-hook 'post-command-hook #'pulsar--post-command-pulse 'local)))

Expand Down Expand Up @@ -536,8 +536,14 @@ If FUNC is a function alias, return the function alias chain."
(push sym aliases))))
aliases))

(defun pulsar--resolve-function-aliases ()
"Amend `pulsar-pulse-functions' to respect function aliases."
(defun pulsar-resolve-function-aliases ()
"Amend `pulsar-pulse-functions' to respect function aliases.
This is called automatically when
`pulsar-resolve-pulse-function-aliases' is non-nil.
You may also call this manually in your configuration after
setting `pulsar-pulse-functions'. In that case, you would prefer
`pulsar-resolve-pulse-function-aliases' to be nil."
(setq pulsar-pulse-functions
(seq-union pulsar-pulse-functions
(seq-union (pulsar--find-fn-aliases pulsar-pulse-functions)
Expand Down

0 comments on commit 00c03ae

Please sign in to comment.