*** 1.37 1994/08/25 00:37:47 --- npgp.el 1994/09/02 15:04:37 *************** *** 1084,1095 **** (npgp:delete-file signature-file))))) ;;; ;;; Function definition: npgp:temporary-pathname ;;; (defun npgp:temporary-pathname (&optional suffix) ! (let ((base (concat (npgp:path) "npgp-message-" (prin1-to-string (emacs-pid)) ! "-")) (index 0) (searching-p t) (result nil)) --- 1084,1109 ---- (npgp:delete-file signature-file))))) ;;; + ;;; Function definition: npgp:temporary-directory + ;;; + + (defvar npgp:*temporary-directory* nil + "Don't mess with this. If emacs lisp had closures, this wouldn't exist.") + + (defun npgp:temporary-directory () + (or npgp:*temporary-directory* + (setq npgp:*temporary-directory* + (or (getenv "PEMTEMP") + (npgp:path) + (error "Can't determine temporary directory."))))) + + ;;; ;;; Function definition: npgp:temporary-pathname ;;; (defun npgp:temporary-pathname (&optional suffix) ! (let ((base (concat (npgp:temporary-directory) "npgp-message-" ! (prin1-to-string (emacs-pid)) "-")) (index 0) (searching-p t) (result nil))