diff --git a/esv.el b/esv.el index cc13932..ebd157f 100644 --- a/esv.el +++ b/esv.el @@ -56,6 +56,9 @@ :type 'string :group 'esv) +(defvar esv-arguments '() + "List of additional arguments passed to `esv-program'.") + (define-derived-mode esv-mode text-mode "ESV-Bible" "Major mode used for reading the Bible with `esv'." :group 'esv @@ -69,13 +72,16 @@ The result will be redirected to a buffer specified by `esv-buffer'. Requires the esv command line tool to be in the system's PATH. esv can be acquired at ." (interactive "MBook: \nMVerses: ") - (let ((buffer (concat book " " verses))) + (let + ((buffer (concat book " " verses)) + (arg-list (append esv-arguments + (list (format "-l%d" esv-columns))))) (catch 'buffer-exists (when (get-buffer buffer) (message "Buffer `%s' already exists" buffer) (throw 'buffer-exists nil)) - (call-process esv-program nil buffer t - (format "-l%d" esv-columns) book verses) + (apply #'call-process esv-program nil buffer t + (append arg-list (list book) (list verses))) (display-buffer buffer) (with-current-buffer buffer (esv-mode)