From a8da92d1fc797d521cfba08c4dde409fdb1c852a Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Sun, 20 Sep 2020 16:16:00 -0700 Subject: [PATCH] Point byte-compiler to functions external to dumb-jump `declare-function` should be used to tell the byte-compiler where to look. --- Makefile | 3 +++ dumb-jump.el | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/Makefile b/Makefile index c3cd7d8..d955ac8 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/dumb-jump.el b/dumb-jump.el index e151906..e35bd6b 100644 --- a/dumb-jump.el +++ b/dumb-jump.el @@ -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." @@ -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." @@ -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."