Skip to content

Commit

Permalink
Fix indentations
Browse files Browse the repository at this point in the history
  • Loading branch information
10sr committed Dec 20, 2018
1 parent 5d193ed commit 15586cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Execute BODY with Python virtual environment activated with `with-venv-dir` macr

``` emacs-lisp
(with-venv-dir (expand-file-name ".venv" default-directory)
(executable-find "python"))
(executable-find "python"))
```


Expand All @@ -24,7 +24,7 @@ with `with-venv`:

``` emacs-lisp
(with-venv
(executable-find "python"))
(executable-find "python"))
```


Expand Down
12 changes: 6 additions & 6 deletions with-venv.el
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
;; Execute BODY with Python virtual environment activated with `with-venv-dir' macro:

;; (with-venv-dir (expand-file-name ".venv" default-directory)
;; (executable-find "python"))
;; (executable-find "python"))


;; Alternatively, make this package try to find venv directory automatically
;; with `with-venv':

;; (with-venv
;; (executable-find "python"))
;; (executable-find "python"))


;; This macro uses `with-venv-find-venv-dir' to find suitable venv directory:
Expand Down Expand Up @@ -71,7 +71,7 @@ python environment.")
This macro does not check if DIR is a valid python environemnt.
If dir is nil, execute BODY as usual."
(declare (indent 2) (debug t))
(declare (indent 1) (debug t))
`(let ((--with-venv-process-environment-orig (cl-copy-list process-environment))
(--with-venv-exec-path-orig (cl-copy-list exec-path)))
(unwind-protect
Expand Down Expand Up @@ -102,14 +102,14 @@ If dir is nil, execute BODY as usual."
This function tries to find suitable venv dir, or run BODY as usual when no
suitable environment was found."
(declare (indent 1) (debug t))
(declare (indent 0) (debug t))
`(with-venv-dir
;; If set explicitly use it
(or with-venv-venv-dir
;; Check previously used directory
(with-venv-check-exists with-venv-previously-used)
(setq with-venv-previously-used (with-venv-find-venv-dir)))
,@body))
,@body))

(defun with-venv-find-venv-dir (&optional dir)
"Try to find venv dir for DIR.
Expand Down Expand Up @@ -180,7 +180,7 @@ When a function is adviced with this function, it is wrapped with `with-venv'.
ORIG-FUNC is the target function, and ARGS is the argument when it was called."
(with-venv
(apply orig-func args)))
(apply orig-func args)))

(provide 'with-venv)

Expand Down

0 comments on commit 15586cd

Please sign in to comment.