+(defun epa-info-mode ()
+ "Major mode for `epa-info-buffer'."
+ (kill-all-local-variables)
+ (buffer-disable-undo)
+ (setq major-mode 'epa-info-mode
+ mode-name "Info"
+ truncate-lines t
+ buffer-read-only t)
+ (use-local-map epa-info-mode-map)
+ (run-hooks 'epa-info-mode-hook))
+
+(defun epa-mark (&optional arg)
+ "Mark the current line.
+If ARG is non-nil, unmark the current line."
+ (interactive "P")
+ (let ((inhibit-read-only t)
+ buffer-read-only
+ properties)
+ (beginning-of-line)
+ (setq properties (text-properties-at (point)))
+ (delete-char 1)
+ (insert (if arg " " "*"))
+ (set-text-properties (1- (point)) (point) properties)
+ (forward-line)))
+
+(defun epa-unmark (&optional arg)
+ "Unmark the current line.
+If ARG is non-nil, mark the current line."
+ (interactive "P")
+ (epa-mark (not arg)))
+
+(defun epa-toggle-mark ()
+ "Toggle the mark the current line."
+ (interactive)
+ (epa-mark (eq (char-after (save-excursion (beginning-of-line) (point))) ?*)))
+
+(defun epa-exit-buffer ()
+ "Exit the current buffer.
+`epa-exit-buffer-function' is called if it is set."
+ (interactive)
+ (funcall epa-exit-buffer-function))
+