+2000-11-30 22:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gpg.el: (gpg-make-temp-file): Use expand-file-name.
+ (gpg-point-at-eol): New function.
+ (gpg-call-process): Use it.
+ (gpg-key-list-keys-parse-line): Ditto.
+ (gpg-with-passphrase-env): edebug-form-spec.
+ (gpg-with-temp-files): Ditto.
+ (gpg-show-result): Ditto.
+
2000-11-08 Bj\e,Av\e(Brn Torkelsson <torkel@hpc2n.umu.se>
* gpg.el: In Xemacs it is called point-at-eol, not
* gpg.el (gpg-command-verify-cleartext): New variable.
(gpg-verify-cleartext): New function.
+2000-10-31 17:32:02 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gpg.el (gpg-verify): The last argument of apply is a list.
+ (gpg-encrypt): Add passphrase as a parameter.
+
;; Local Variables:
;; coding: iso-2022-7bit
;; End:
(eval-when-compile
(require 'cl))
-
-(if (featurep 'xemacs)
- (defalias 'line-end-position 'point-at-eol))
+(defalias 'gpg-point-at-eol
+ (if (fboundp 'point-at-eol)
+ 'point-at-eol
+ 'line-end-position))
;;;; Customization:
(when gpg-command-passphrase-env
;; This will clear the variable if it wasn't set before.
(setenv (car gpg-command-passphrase-env) ,env-value))))))
+(put 'gpg-with-passphrase-env 'lisp-indent-function 0)
+(put 'gpg-with-passphrase-env 'edebug-form-spec '(body))
;;; Temporary files:
(defun gpg-make-temp-file ()
"Create a temporary file in a safe way"
- (let ((name (concat gpg-temp-directory "/gnupg")))
+ (let ((name ;; User may use "~/"
+ (expand-file-name "gnupg" gpg-temp-directory)))
(if (fboundp 'make-temp-file)
;; If we've got make-temp-file, we are on the save side.
(make-temp-file name)
(gpg-with-temp-files-create ,count)
,@body)
(gpg-with-temp-files-delete))))
+(put 'gpg-with-temp-files 'lisp-indent-function 1)
+(put 'gpg-with-temp-files 'edebug-form-spec '(body))
;;; Making subprocesses:
(apply 'call-process-region (point-min) (point-max) cpr-args)
;; Wipe out passphrase.
(goto-char (point-min))
- (translate-region (point) (line-end-position)
+ (translate-region (point) (gpg-point-at-eol)
(make-string 256 ? )))
(if (listp stdin)
(with-current-buffer (car stdin)
(unwind-protect
(gpg-show-result-buffer ,always-show (progn ,@body))
(kill-buffer gpg-result-buffer))))
+(put 'gpg-show-result 'lisp-indent-function 1)
+(put 'gpg-show-result 'edebug-form-spec '(body))
;;; Passphrase handling:
(defun gpg-key-list-keys-parse-line ()
"Parse the line in the current buffer and return a vector of fields."
- (let* ((eol (line-end-position))
+ (let* ((eol (gpg-point-at-eol))
(v (if (eolp)
nil
(vector