Suppress byte-compiler warnings.
[elisp/epg.git] / epa.el
diff --git a/epa.el b/epa.el
index bc2938a..6a6b422 100644 (file)
--- a/epa.el
+++ b/epa.el
@@ -246,13 +246,15 @@ You should bind this variable with `let', but do not set it globally.")
          (epg-sub-key-id (car (epg-key-sub-key-list
                                (widget-get widget :value))))))
 
-(if (fboundp 'encode-coding-string)
-    (defalias 'epa--encode-coding-string 'encode-coding-string)
-  (defalias 'epa--encode-coding-string 'identity))
+(eval-and-compile
+  (if (fboundp 'encode-coding-string)
+      (defalias 'epa--encode-coding-string 'encode-coding-string)
+    (defalias 'epa--encode-coding-string 'identity)))
 
-(if (fboundp 'decode-coding-string)
-    (defalias 'epa--decode-coding-string 'decode-coding-string)
-  (defalias 'epa--decode-coding-string 'identity))
+(eval-and-compile
+  (if (fboundp 'decode-coding-string)
+      (defalias 'epa--decode-coding-string 'decode-coding-string)
+    (defalias 'epa--decode-coding-string 'identity)))
 
 (defun epa-key-list-mode ()
   "Major mode for `epa-list-keys'."
@@ -877,10 +879,11 @@ Don't use this command in Lisp programs!"
            (error "No cleartext tail"))
          (epa-verify-region cleartext-start cleartext-end))))))
 
-(if (fboundp 'select-safe-coding-system)
-    (defalias 'epa--select-safe-coding-system 'select-safe-coding-system)
-  (defun epa--select-safe-coding-system (from to)
-    buffer-file-coding-system))
+(eval-and-compile
+  (if (fboundp 'select-safe-coding-system)
+      (defalias 'epa--select-safe-coding-system 'select-safe-coding-system)
+    (defun epa--select-safe-coding-system (from to)
+      buffer-file-coding-system)))
 
 ;;;###autoload
 (defun epa-sign-region (start end signers mode)
@@ -938,15 +941,16 @@ If no one is selected, default secret key is used.  "
                                 'start-open t
                                 'end-open t)))))
 
-(if (fboundp 'derived-mode-p)
-    (defalias 'epa--derived-mode-p 'derived-mode-p)
-  (defun epa--derived-mode-p (&rest modes)
-    "Non-nil if the current major mode is derived from one of MODES.
+(eval-and-compile
+  (if (fboundp 'derived-mode-p)
+      (defalias 'epa--derived-mode-p 'derived-mode-p)
+    (defun epa--derived-mode-p (&rest modes)
+      "Non-nil if the current major mode is derived from one of MODES.
 Uses the `derived-mode-parent' property of the symbol to trace backwards."
-    (let ((parent major-mode))
-      (while (and (not (memq parent modes))
-                 (setq parent (get parent 'derived-mode-parent))))
-      parent)))
+      (let ((parent major-mode))
+       (while (and (not (memq parent modes))
+                   (setq parent (get parent 'derived-mode-parent))))
+       parent))))
 
 ;;;###autoload
 (defun epa-encrypt-region (start end recipients sign signers)