diff options
| author | Daiki Ueno | 2015-08-19 11:40:17 +0900 |
|---|---|---|
| committer | Daiki Ueno | 2015-08-19 11:40:44 +0900 |
| commit | 85bc107458601e305445d7ec6f5b209c01f5db0c (patch) | |
| tree | a19d17b6ca3d4cf2ec4e3ed0ae98a7d252370c0b | |
| parent | 93fb1783a98ca31046f551ba1d33d67aa01e58b7 (diff) | |
| download | emacs-85bc107458601e305445d7ec6f5b209c01f5db0c.tar.gz emacs-85bc107458601e305445d7ec6f5b209c01f5db0c.zip | |
pinentry.el: Add debugging support
* lisp/net/pinentry.el (pinentry-debug): New variable.
(pinentry-debug-buffer): New variable.
(pinentry--process-filter): Send input to the debug buffer, if
`pinentry-debug' is set.
| -rw-r--r-- | lisp/net/pinentry.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/net/pinentry.el b/lisp/net/pinentry.el index d7161bbf44d..eaa9fa40b12 100644 --- a/lisp/net/pinentry.el +++ b/lisp/net/pinentry.el | |||
| @@ -63,6 +63,8 @@ | |||
| 63 | :type 'integer | 63 | :type 'integer |
| 64 | :group 'pinentry) | 64 | :group 'pinentry) |
| 65 | 65 | ||
| 66 | (defvar pinentry-debug nil) | ||
| 67 | (defvar pinentry-debug-buffer nil) | ||
| 66 | (defvar pinentry--server-process nil) | 68 | (defvar pinentry--server-process nil) |
| 67 | (defvar pinentry--connection-process-list nil) | 69 | (defvar pinentry--connection-process-list nil) |
| 68 | 70 | ||
| @@ -293,6 +295,13 @@ Assuan protocol." | |||
| 293 | (setq pinentry--read-point (point-min)) | 295 | (setq pinentry--read-point (point-min)) |
| 294 | (make-local-variable 'pinentry--labels)))) | 296 | (make-local-variable 'pinentry--labels)))) |
| 295 | (with-current-buffer (process-buffer process) | 297 | (with-current-buffer (process-buffer process) |
| 298 | (when pinentry-debug | ||
| 299 | (with-current-buffer | ||
| 300 | (or pinentry-debug-buffer | ||
| 301 | (setq pinentry-debug-buffer (generate-new-buffer | ||
| 302 | " *pinentry-debug*"))) | ||
| 303 | (goto-char (point-max)) | ||
| 304 | (insert input))) | ||
| 296 | (save-excursion | 305 | (save-excursion |
| 297 | (goto-char (point-max)) | 306 | (goto-char (point-max)) |
| 298 | (insert input) | 307 | (insert input) |