Skip to content

Commit

Permalink
Point byte-compiler to functions external to dumb-jump
Browse files Browse the repository at this point in the history
`declare-function` should be used to tell the byte-compiler where to look.
  • Loading branch information
leungbk committed Sep 20, 2020
1 parent fbbe6b0 commit a8da92d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ test: unit
unit:
${CASK} exec ert-runner

compile:
${CASK} exec emacs -batch -L . -f batch-byte-compile dumb-jump.el

install:
${CASK} install

Expand Down
8 changes: 8 additions & 0 deletions dumb-jump.el
Original file line number Diff line number Diff line change
Expand Up @@ -1961,6 +1961,8 @@ This is the persistent action (\\[helm-execute-persistent-action]) for helm."
(plist-get result :line)
(s-trim (plist-get result :context))))

(declare-function ivy-read "ext:ivy")

(defun dumb-jump-ivy-jump-to-selected (results choices _proj)
"Offer CHOICES as candidates through `ivy-read', then execute
`dumb-jump-result-follow' on the selected choice. Ignore _PROJ."
Expand All @@ -1969,6 +1971,9 @@ This is the persistent action (\\[helm-execute-persistent-action]) for helm."
(dumb-jump-result-follow (cdr cand)))
:caller 'dumb-jump-ivy-jump-to-selected))

(declare-function helm "ext:helm")
(declare-function helm-build-sync-source "ext:helm-source" nil t)

(defun dumb-jump-prompt-user-for-choice (proj results)
"Put a PROJ's list of RESULTS in a 'popup-menu' (or helm/ivy)
for user to select. Filters PROJ path from files for display."
Expand Down Expand Up @@ -2445,6 +2450,9 @@ PREFER-EXTERNAL will sort current file last."
:var-to-jump var-to-jump
:match-cur-file-front match-cur-file-front)))

(declare-function tramp-dissect-file-name "tramp")
(declare-function tramp-file-name-localname "tramp" nil t)

(defun dumb-jump-read-config (root config-file)
"Load and return options (exclusions, inclusions, etc).
Ffrom the ROOT project CONFIG-FILE."
Expand Down

0 comments on commit a8da92d

Please sign in to comment.