branch: elpa/go-mode
commit 40555619f2fbd648a0fbb083f32ab6be34280cbd
Author: Dominik Honnef <[email protected]>
Commit: Dominik Honnef <[email protected]>
Don't break on emacsen that don't have declare-function macro
apparently we care about emacs 22.1 now.
---
go-mode.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/go-mode.el b/go-mode.el
index 732ba1d..af5d6b3 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -65,8 +65,11 @@
(kill-new (s) ()))
(go--kill-whole-line arg)))
-
-(declare-function go--position-bytes "go-mode" (point))
+;; declare-function is an empty macro that only byte-compile cares
+;; about. Wrap in always false if to satisfy Emacsen without that
+;; macro.
+(if nil
+ (declare-function go--position-bytes "go-mode" (point)))
;; XEmacs unfortunately does not offer position-bytes. We can fall
;; back to just using (point), but it will be incorrect as soon as
;; multibyte characters are being used.