diff --git a/targets/avy-init.el b/targets/avy-init.el index 21dd0ab..9ce46bb 100644 --- a/targets/avy-init.el +++ b/targets/avy-init.el @@ -22,8 +22,11 @@ (add-to-list 'load-path default-directory) (mapc #'byte-compile-file '("avy.el")) (require 'avy) -(require 'checkdoc) -(with-current-buffer (find-file "avy.el") - (checkdoc-current-buffer t)) +(if (fboundp 'checkdoc-file) + (checkdoc-file "avy.el") + (require 'checkdoc) + (with-current-buffer (find-file "avy.el") + (checkdoc-current-buffer t))) + (global-set-key (kbd "C-c j") 'avy-goto-char) (global-set-key (kbd "C-'") 'avy-goto-char-2)