From 31a7c2ff1f7c3addb7c945f688bcb37d893d761a Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 7 Sep 2006 05:58:54 +0000 Subject: [PATCH] Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 134-135) - Merge from emacs--devo--0 - Update from CVS 2006-09-06 Daiki Ueno * lisp/pgg-gpg.el (pgg-gpg-process-region): Encode passphrase with pgg-passphrase-coding-system rather than locale-coding-system. * lisp/pgg-def.el (pgg-passphrase-coding-system): New user option. Revision: emacs@sv.gnu.org/emacs--devo--0--patch-428 --- lisp/ChangeLog | 6 ++++++ lisp/gnus/ChangeLog | 2 +- lisp/pgg-def.el | 7 +++++++ lisp/pgg-gpg.el | 4 ++-- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aa2fb64ad60..df7050f30a5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2006-09-06 Daiki Ueno + + * pgg-gpg.el (pgg-gpg-process-region): Encode passphrase with + pgg-passphrase-coding-system rather than locale-coding-system. + * pgg-def.el (pgg-passphrase-coding-system): New user option. + 2006-09-06 Stefan Monnier * progmodes/prolog.el: Remove * in docstrings. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 142bb93bef4..312d822e375 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -2873,7 +2873,7 @@ * gnus.el (gnus-group-startup-message): Search for gnus images in etc/images/gnus. - * mm-util.el (mm-find-charset-region): Likewise. + * mm-util.el (mm-image-load-path): Likewise. * smiley.el (smiley-data-directory): Search for smilies in etc/images/smilies. diff --git a/lisp/pgg-def.el b/lisp/pgg-def.el index 6481a433423..790b6bd1e6b 100644 --- a/lisp/pgg-def.el +++ b/lisp/pgg-def.el @@ -71,6 +71,13 @@ Whether the passphrase is cached at all is controlled by :group 'pgg :type 'integer) +(defcustom pgg-passphrase-coding-system + (if (boundp 'locale-coding-system) + locale-coding-system) + "Coding system to encode passphrase." + :group 'pgg + :type 'coding-system) + (defvar pgg-messages-coding-system nil "Coding system used when reading from a PGP external process.") diff --git a/lisp/pgg-gpg.el b/lisp/pgg-gpg.el index 07be6c47f61..4b8b79b068e 100644 --- a/lisp/pgg-gpg.el +++ b/lisp/pgg-gpg.el @@ -91,11 +91,11 @@ (set-process-sentinel process #'ignore) (when passphrase (setq passphrase-with-newline (concat passphrase "\n")) - (if (boundp 'locale-coding-system) + (if pgg-passphrase-coding-system (progn (setq encoded-passphrase-with-new-line (encode-coding-string passphrase-with-newline - locale-coding-system)) + pgg-passphrase-coding-system)) (pgg-clear-string passphrase-with-newline)) (setq encoded-passphrase-with-new-line passphrase-with-newline passphrase-with-newline nil)) -- 2.39.2