- (unless epg-pgp50i-status
- (goto-char epg-read-point)
- (while (not (eobp))
- (save-excursion
- (if (looking-at
- "\\(PRI\\|INF\\|QRY\\|STA\\|WRN\\|ERR\\): \\(.*\\)")
- (let ((message (match-string 2))
- (pointer epg-pgp50i-message-alist)
- status symbol)
- (while pointer
- (if (string-match (car (car pointer)) message)
- (setq status (cdr (car pointer))
- pointer nil))
- (setq pointer (cdr pointer)))
- (when status
- (unless (looking-at ".*\n")
- (end-of-line)
- (insert "\n"))
- (if (member status epg-pending-status-list)
- (setq epg-pending-status-list nil))
- (setq symbol (intern-soft (concat "epg-pgp50i--status-"
- status)))
- (if (and symbol
- (fboundp symbol))
- (unwind-protect
- (progn
- (setq epg-pgp50i-status status)
- (funcall symbol epg-context message))
- (setq epg-pgp50i-status nil)))))))
- (forward-line)
- (setq epg-read-point (point)))))))
-
-(defun epg-pgp50i--wait-for-line (context)
+ (unless epg-process-filter-running
+ (unwind-protect
+ (progn
+ (setq epg-process-filter-running t)
+ (goto-char epg-read-point)
+ (while (not (eobp))
+ (if (looking-at
+ "^\\(PRI\\|INF\\|QRY\\|STA\\|WRN\\|ERR\\): \\(.*\\)")
+ (let ((message (match-string 2))
+ (pointer epg-pgp50i-message-alist)
+ status symbol)
+ (while pointer
+ (if (string-match (car (car pointer)) message)
+ (setq status (cdr (car pointer))
+ pointer nil))
+ (setq pointer (cdr pointer)))
+ (when status
+ (unless (looking-at ".*\n")
+ (end-of-line)
+ (insert "\n"))
+ (if (member status epg-pending-status-list)
+ (setq epg-pending-status-list nil))
+ (setq symbol (intern-soft (concat
+ "epg-pgp50i--status-"
+ status)))
+ (if (and symbol
+ (fboundp symbol))
+ (funcall symbol epg-context message)))))
+ (forward-line)
+ (setq epg-read-point (point))))
+ (setq epg-process-filter-running nil))))))
+
+(defun epg-pgp50i--read-line (context)