summaryrefslogtreecommitdiff
path: root/lisp/eshell/em-script.el
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2021-04-05 21:00:18 +0200
committerAndrea Corallo <akrl@sdf.org>2021-04-05 21:00:18 +0200
commit74b58f28ecbc6fe9d7a60c96c79acfdf2329ff73 (patch)
treeb1e99508f836a1d12d17eb3072e14b0cfb2ba407 /lisp/eshell/em-script.el
parent0a3e715e1f5e13874139b4678375b8f5704b800b (diff)
parent14d295871a93c37a33d558ec4e8d49a93b787d8e (diff)
downloademacs-74b58f28ecbc6fe9d7a60c96c79acfdf2329ff73.tar.gz
emacs-74b58f28ecbc6fe9d7a60c96c79acfdf2329ff73.tar.bz2
emacs-74b58f28ecbc6fe9d7a60c96c79acfdf2329ff73.zip
Merge remote-tracking branch 'savannah/master' into native-comp
Diffstat (limited to 'lisp/eshell/em-script.el')
-rw-r--r--lisp/eshell/em-script.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/eshell/em-script.el b/lisp/eshell/em-script.el
index aecc48610f7..1f08e891919 100644
--- a/lisp/eshell/em-script.el
+++ b/lisp/eshell/em-script.el
@@ -59,11 +59,12 @@ This includes when running `eshell-command'."
(defun eshell-script-initialize () ;Called from `eshell-mode' via intern-soft!
"Initialize the script parsing code."
(setq-local eshell-interpreter-alist
- (cons (cons #'(lambda (file _args)
- (string= (file-name-nondirectory file)
- "eshell"))
- 'eshell/source)
- eshell-interpreter-alist))
+ (cons (cons (lambda (file _args)
+ (and (file-regular-p file)
+ (string= (file-name-nondirectory file)
+ "eshell")))
+ 'eshell/source)
+ eshell-interpreter-alist))
(setq-local eshell-complex-commands
(append '("source" ".") eshell-complex-commands))
;; these two variables are changed through usage, but we don't want