Simplify loading of password-cache or password.
authorReiner Steib <Reiner.Steib@gmx.de>
Fri, 28 Dec 2007 19:32:59 +0000 (19:32 +0000)
committerReiner Steib <Reiner.Steib@gmx.de>
Fri, 28 Dec 2007 19:32:59 +0000 (19:32 +0000)
Suggested by Glenn Morris <rgm@gnu.org>.

lisp/ChangeLog
lisp/mml-sec.el
lisp/sieve-manage.el
lisp/smime.el

index c75990d..bab9f2d 100644 (file)
@@ -1,3 +1,8 @@
+2007-12-28  Reiner Steib  <Reiner.Steib@gmx.de>
+
+       * mml-sec.el, sieve-manage.el, smime.el: Simplify loading of
+       password-cache or password.  Suggested by Glenn Morris <rgm@gnu.org>.
+
 2007-12-21  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * imap.el (imap-authenticate): Use current-buffer instead of buffer,
        * encrypt.el: Clarify documentation for the new pgg method.
        (encrypt-file-alist): Add PGG option.
        (encrypt-insert-file-contents, encrypt-write-file-contents): Use PGG
-       functionality.  Abstract password key and messaging to external functions.
+       functionality.  Abstract password key and messaging to external
+       functions.
        (encrypt-password-key, encrypt-get-passphrase-if-needed)
-       (encrypt-message-method-and-cipher): Add new convenience external functions.
+       (encrypt-message-method-and-cipher): Add new convenience external
+       functions.
        (encrypt-pgg-encode-buffer, encrypt-pgg-decode-buffer)
        (encrypt-pgg-process-buffer): Add PGG functionality glue.
 
index a63e341..c349631 100644 (file)
 
 (eval-when-compile (require 'cl))
 
-(if (featurep 'xemacs)
-    ;; Not all XEmacs versions support `noerror' arg of `require'.
-    (or (featurep 'password-cache)
-       (load "password-cache" t)
-       (require 'password))
-  (or (require 'password-cache nil t)
-      (require 'password)))
+(if (locate-library "password-cache")
+    (require 'password-cache)
+  (require 'password))
 
 (autoload 'mml2015-sign "mml2015")
 (autoload 'mml2015-encrypt "mml2015")
index 3fef974..5e021c2 100644 (file)
 (eval-and-compile
   (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
 
-(if (featurep 'xemacs)
-    ;; Not all XEmacs versions support `noerror' arg of `require'.
-    (or (featurep 'password-cache)
-       (load "password-cache" t)
-       (require 'password))
-  (or (require 'password-cache nil t)
-      (require 'password)))
+(if (locate-library "password-cache")
+    (require 'password-cache)
+  (require 'password))
 
 (eval-when-compile
   (require 'sasl)
index d4b3a8f..34c5b41 100644 (file)
   (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
 (require 'dig)
 
-(if (featurep 'xemacs)
-    ;; Not all XEmacs versions support `noerror' arg of `require'.
-    (or (featurep 'password-cache)
-       (load "password-cache" t)
-       (require 'password))
-  (or (require 'password-cache nil t)
-      (require 'password)))
+(if (locate-library "password-cache")
+    (require 'password-cache)
+  (require 'password))
 
 (eval-when-compile (require 'cl))