Next: Replace with-maybe-gpg-file with Next's internal macro.

master
Pierre Neidhardt 2020-05-02 18:03:08 +02:00
parent 5847711c19
commit 0b59407a3c
1 changed files with 1 additions and 12 deletions

View File

@ -117,17 +117,6 @@ Videos are downloaded with `+youtube-dl-command+'."
;; :initial-value %slot-default))
))
(defmacro with-maybe-gpg-file ((stream filespec) &body body)
"Evaluate BODY with STREAM bound to FILESPEC.
FILESPEC may be a GPG-encrypted file."
`(let ((clear-data (handler-case
(with-output-to-string (out)
(uiop:run-program (list "gpg" "-d" ,filespec) :output out))
(error ()
(alexandria:read-file-into-string ,filespec)))))
(with-input-from-string (,stream clear-data)
,@body)))
(defun format-c->lisp (s)
"Incomplete substitution of C format string to Lisp format string.
Recognized formats:
@ -148,7 +137,7 @@ Recognized formats:
(defvar my-search-engines
(loop for file in '("~/.emacs.d/lisp/init-engine.el"
"~/personal/bookmarks/engines.el")
append (with-maybe-gpg-file (s file)
append (next::with-maybe-gpg-file (s file)
(read-emacs-engines s))))
(define-configuration browser