diff --git a/README.md b/README.md index 073d528..6cc3162 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ You can choose the engine (e.g. to fall back to the Emacs regexp engine) with `v (define-key esc-map (kbd "C-r") 'vr/isearch-backward) ;; C-M-r (define-key esc-map (kbd "C-s") 'vr/isearch-forward) ;; C-M-s ``` -To customize, use `M-x customize-group [RET] visual-regexp`. You can specify which engine to use by modifying `vr/engine` (defaults to Python), and how the Python interpreter is invoked by modifying the `vr/command-python` variable. The default is `python /path/to/visual-regexp-steroids/regexp.py`. +To customize, use `M-x customize-group [RET] visual-regexp`. You can specify which engine to use by modifying `vr/engine` (defaults to Python), and how the Python interpreter is invoked by modifying the `vr--python-interpreter` variable. The default is `python`. ## Examples diff --git a/visual-regexp-steroids.el b/visual-regexp-steroids.el index 83105a7..b806685 100644 --- a/visual-regexp-steroids.el +++ b/visual-regexp-steroids.el @@ -44,9 +44,13 @@ (require 'visual-regexp) ;;; variables +(defcustom vr/python-interpreter "python3" + "Name of current python interpreter on current machine." + :type 'string + :group 'visual-regexp) (defvar vr--command-python-default - (format "python %s" (expand-file-name "regexp.py" (file-name-directory load-file-name)))) + (format "%s %s" vr/python-interpreter (expand-file-name "regexp.py" (file-name-directory load-file-name)))) (defcustom vr/command-python vr--command-python-default "External command used for the Python engine."