2006-04-20 Daiki Ueno <ueno@unixuser.org>
+ * epa.el (epa-list-keys-1): Add 'epa-list-keys property to keylist
+ region.
+
+2006-04-20 Daiki Ueno <ueno@unixuser.org>
+
* pgg-epg.el (pgg-epg-secret-key-id-list): New variable.
(pgg-epg-passphrase-callback): New function.
(setq epa-keys-buffer (generate-new-buffer "*Keys*")))
(set-buffer epa-keys-buffer)
(let ((inhibit-read-only t)
- buffer-read-only)
- (erase-buffer)
+ buffer-read-only
+ (point (point-min)))
+ (unless (get-text-property point 'epa-list-keys)
+ (setq point (next-single-property-change point 'epa-list-keys)))
+ (when point
+ (delete-region point
+ (or (next-single-property-change point 'epa-list-keys)
+ (point-max)))
+ (goto-char point))
(epa-list-keys-1 name mode)
(epa-keys-mode))
(make-local-variable 'epa-list-keys-arguments)
(pop-to-buffer (current-buffer)))
(defun epa-list-keys-1 (name mode)
- (let ((inhibit-read-only t)
- buffer-read-only
- (keys (epg-list-keys name mode))
- point)
- (while keys
- (setq point (point))
- (insert " ")
- (put-text-property point (point) 'epa-key (car keys))
- (widget-create 'epa-key :value (car keys))
- (insert "\n")
- (setq keys (cdr keys)))))
+ (save-restriction
+ (narrow-to-region (point) (point))
+ (let ((inhibit-read-only t)
+ buffer-read-only
+ (keys (epg-list-keys name mode))
+ point)
+ (while keys
+ (setq point (point))
+ (insert " ")
+ (put-text-property point (point) 'epa-key (car keys))
+ (widget-create 'epa-key :value (car keys))
+ (insert "\n")
+ (setq keys (cdr keys))))
+ (put-text-property (point-min) (point-max) 'epa-list-keys t)))
(defun epa-marked-keys ()
(or (save-excursion
(let ((cipher (concat file ".gpg"))
(context (epg-make-context)))
(message "Encrypting %s..." (file-name-nondirectory file))
- (epg-encrypt-file context
- file
- recipients
- cipher)
+ (epg-encrypt-file context file recipients cipher)
(message "Encrypting %s...done" (file-name-nondirectory file))))
(defun epa-delete-keys (keys)