From 15c7f9fe3909707f1c818c251460e4c70eb06d9c Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Mon, 8 Jun 2015 13:05:38 +0200 Subject: [PATCH] targets/avy-init.el: Use the new checkdoc-file * targets/avy-init.el (checkdoc-file): This function is now available in trunk Emacs. --- targets/avy-init.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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)