From a23c02a21cddf3316f06e7be54e55385980a9c22 Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Fri, 28 Dec 2007 19:32:59 +0000 Subject: [PATCH] Simplify loading of password-cache or password. Suggested by Glenn Morris . --- lisp/ChangeLog | 11 +++++++++-- lisp/mml-sec.el | 10 +++------- lisp/sieve-manage.el | 10 +++------- lisp/smime.el | 10 +++------- 4 files changed, 18 insertions(+), 23 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c75990d85..bab9f2d74 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-12-28 Reiner Steib + + * mml-sec.el, sieve-manage.el, smime.el: Simplify loading of + password-cache or password. Suggested by Glenn Morris . + 2007-12-21 Teodor Zlatanov * imap.el (imap-authenticate): Use current-buffer instead of buffer, @@ -25,9 +30,11 @@ * 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. diff --git a/lisp/mml-sec.el b/lisp/mml-sec.el index a63e34186..c349631f9 100644 --- a/lisp/mml-sec.el +++ b/lisp/mml-sec.el @@ -28,13 +28,9 @@ (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") diff --git a/lisp/sieve-manage.el b/lisp/sieve-manage.el index 3fef97445..5e021c26e 100644 --- a/lisp/sieve-manage.el +++ b/lisp/sieve-manage.el @@ -80,13 +80,9 @@ (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) diff --git a/lisp/smime.el b/lisp/smime.el index d4b3a8f28..34c5b410b 100644 --- a/lisp/smime.el +++ b/lisp/smime.el @@ -126,13 +126,9 @@ (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)) -- 2.25.1