tools/eval: minor refactors
This commit is contained in:
parent
7f44774c43
commit
a940d07e4b
1 changed files with 2 additions and 2 deletions
|
@ -6,14 +6,14 @@
|
|||
(interactive)
|
||||
(cond ((assq major-mode +eval-runners)
|
||||
(+eval/region (point-min) (point-max)))
|
||||
(t (quickrun))))
|
||||
((quickrun))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +eval/region (beg end)
|
||||
"Evaluate a region between BEG and END and display the output."
|
||||
(interactive "r")
|
||||
(let ((load-file-name buffer-file-name))
|
||||
(if-let* ((runner (cdr (assq major-mode +eval-runners))))
|
||||
(if-let (runner (cdr (assq major-mode +eval-runners)))
|
||||
(funcall runner beg end)
|
||||
(quickrun-region beg end))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue