;;; sieve-manage.el --- Implementation of the managesive protocol in elisp
;; Copyright (C) 2001, 2002, 2003, 2004, 2005,
-;; 2006, 2007 Free Software Foundation, Inc.
+;; 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;;; Code:
-(or (require 'password-cache nil t)
- (require 'password))
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
+(if (locate-library "password-cache")
+ (require 'password-cache)
+ (require 'password))
+
(eval-when-compile
(require 'sasl)
(require 'starttls))
(when (fboundp 'set-buffer-multibyte)
(set-buffer-multibyte nil)))
+(declare-function password-read "password-cache" (prompt &optional key))
+(declare-function password-cache-add "password-cache" (key password))
+(declare-function password-cache-remove "password-cache" (key))
+
;; Uses the dynamically bound `reason' variable.
(defvar reason)
(defun sieve-manage-interactive-login (buffer loginfunc)