(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'."
(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)
'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)