This patch is to fix a problem reported by Miles Nordin <carton@Ivy.NET> in
PR27034.  SEMI development also had addressed the same problem and solved
another way than Miles Nordin reported.  According to Katsumi Yamaoka
<yamaoka@jpl.org> this ``regexp'' fix, already done in the SEMI repository,
is more generic, can avoid problems across Emacs versions , so I (uebayasi@)
decided to adopt this.  This patch follows the original file's license.

;; Copyright (C) 1999,2000 Daiki Ueno

;; Author: Daiki Ueno <ueno@unixuser.org>
;; Created: 1999/10/28
;; Keywords: PGP, OpenPGP, GnuPG

;; This file is part of SEMI (Secure Emacs MIME Interface).

;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 2, or (at
;; your option) any later version.

;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING.  If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.

----------------------------
revision 1.1.4.5.2.8
date: 2004/09/27 00:09:44;  author: yamaoka;  state: Exp;  lines: +3 -6
2003-11-15  Simon Josefsson  <jas@extundo.com>
* pgg-gpg.el (pgg-gpg-lookup-key): Use regexp match instead of
split-string (split-string is different between emacs 21.2 and
21.4).  Reported by ultrasoul@ultrasoul.com (David D. Smith).

--- pgg-gpg.el.orig	Thu Dec 18 12:23:43 2003
+++ pgg-gpg.el
@@ -138,12 +138,9 @@
     (with-temp-buffer
       (apply #'call-process pgg-gpg-program nil t nil args)
       (goto-char (point-min))
-      (if (re-search-forward "^\\(sec\\|pub\\):"  nil t)
-	  (substring
-	   (nth 3 (split-string
-		   (buffer-substring (match-end 0)
-				     (progn (end-of-line)(point)))
-		   ":")) 8)))))
+      (if (re-search-forward "^\\(sec\\|pub\\):[^:]*:[^:]*:[^:]*:\\([^:]*\\)"
+			     nil t)
+	  (substring (match-string 2) 8)))))
 
 (luna-define-method pgg-scheme-encrypt-region ((scheme pgg-scheme-gpg)
 					       start end recipients)
