(define-widget 'epa-key 'push-button
"Button for representing a epg-key object."
:format "%[%v%]"
- :button-face-get 'epa-key-widget-button-face-get
- :value-create 'epa-key-widget-value-create
- :action 'epa-key-widget-action
- :help-echo 'epa-key-widget-help-echo)
+ :button-face-get 'epa--key-widget-button-face-get
+ :value-create 'epa--key-widget-value-create
+ :action 'epa--key-widget-action
+ :help-echo 'epa--key-widget-help-echo)
-(defun epa-key-widget-action (widget &optional event)
- (epa-show-key (widget-get widget :value)))
+(defun epa--key-widget-action (widget &optional event)
+ (epa--show-key (widget-get widget :value)))
-(defun epa-key-widget-value-create (widget)
+(defun epa--key-widget-value-create (widget)
(let* ((key (widget-get widget :value))
(primary-sub-key (car (epg-key-sub-key-list key)))
(primary-user-id (car (epg-key-user-id-list key))))
(epg-user-id-string primary-user-id)
(epg-decode-dn (epg-user-id-string primary-user-id))))))
-(defun epa-key-widget-button-face-get (widget)
+(defun epa--key-widget-button-face-get (widget)
(let ((validity (epg-sub-key-validity (car (epg-key-sub-key-list
(widget-get widget :value))))))
(if validity
(cdr (assq validity epa-validity-face-alist))
'default)))
-(defun epa-key-widget-help-echo (widget)
+(defun epa--key-widget-help-echo (widget)
(format "Show %s"
(epg-sub-key-id (car (epg-key-sub-key-list
(widget-get widget :value))))))
(run-hooks 'epa-keys-mode-hook))
(defun epa-key-mode ()
- "Major mode for `epa-show-key'."
+ "Major mode for a key description."
(kill-all-local-variables)
(buffer-disable-undo)
(setq major-mode 'epa-key-mode
'start-open t
'end-open t)))))
-(defun epa-marked-keys ()
+(defun epa--marked-keys ()
(or (save-excursion
(set-buffer epa-keys-buffer)
(goto-char (point-min))
(unwind-protect
(progn
(recursive-edit)
- (epa-marked-keys))
+ (epa--marked-keys))
(if (get-buffer-window epa-keys-buffer)
(delete-window (get-buffer-window epa-keys-buffer)))
(kill-buffer epa-keys-buffer))))
-(defun epa-show-key (key)
+(defun epa--show-key (key)
(let* ((primary-sub-key (car (epg-key-sub-key-list key)))
(entry (assoc (epg-sub-key-id primary-sub-key)
epa-key-buffer-alist))
(pop-to-buffer (current-buffer))
(epa-key-mode)))
-(defun epa-show-key-notify (widget &rest ignore)
- (epa-show-key (widget-get widget :value)))
-
(defun epa-display-verify-result (verify-result)
(if epa-popup-info-window
(progn
(defun epa-delete-keys (keys &optional allow-secret)
"Delete selected KEYS."
(interactive
- (let ((keys (epa-marked-keys)))
+ (let ((keys (epa--marked-keys)))
(unless keys
(error "No keys selected"))
(list keys
(defun epa-export-keys (keys file)
"Export selected KEYS to FILE."
(interactive
- (let ((keys (epa-marked-keys))
+ (let ((keys (epa--marked-keys))
default-name)
(unless keys
(error "No keys selected"))
"Sign selected KEYS.
If LOCAL is non-nil, the signature is marked as non exportable."
(interactive
- (let ((keys (epa-marked-keys)))
+ (let ((keys (epa--marked-keys)))
(unless keys
(error "No keys selected"))
(list keys current-prefix-arg)))