branch: elpa/anzu
commit e4c2728734fba74a521a3296aa9c0443992da18a
Author: Neil Okamoto <[email protected]>
Commit: Neil Okamoto <[email protected]>
fix check-declare error by eliminating declare-function
The declare-function statement was probably intended to silence the
byte compiler about the use of 'migemo-forward' from the optional
'migemo' package. However, the syntax of the declare-function was
invalid, so rather than solving the byte compile error this code
created a check-declare error as well.
This change drops the declare-function line from the file. Instead, we
wrap 'with-no-warnings' around the call to 'migemo-foward'. This is
sufficient to silence the byte-compiler. At runtime, the predicate
'anzu--use-migemo-p' ensures this line is never called unless the
'migemo' package is actually present.
---
anzu.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/anzu.el b/anzu.el
index e88d09d52e..7a58dd4dd4 100644
--- a/anzu.el
+++ b/anzu.el
@@ -40,8 +40,6 @@
(require 'cl-lib)
(require 'thingatpt)
-(declare-function migemo-forward 'migemo)
-
(defgroup anzu nil
"Show searched position in mode-line"
:group 'isearch)
@@ -205,7 +203,7 @@
(finish nil)
(search-func (if (anzu--use-migemo-p)
(lambda (word &optional bound noerror count)
- (ignore-errors
+ (with-no-warnings
(migemo-forward word bound noerror count)))
#'re-search-forward))
(case-fold-search (anzu--case-fold-search input)))
@@ -868,8 +866,10 @@
(anzu--isearch-query-replace-common t arg))
(provide 'anzu)
+
;; Local Variables:
;; indent-tabs-mode: nil
;; fill-column: 85
;; End:
+
;;; anzu.el ends here