summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/sh-script.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 622e63512d0..1c6994b1fc8 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -883,6 +883,7 @@ Else indexing follows an inheritance logic which works in two ways:
- Fall back on successive ancestors (see `sh-ancestor-alist') as long as
the alist contains no value for the current shell.
+ The ultimate default is always `sh'.
- If the value thus looked up is a list starting with `eval' its `cdr' is
first evaluated. If that is also a list and the first argument is a
@@ -906,6 +907,9 @@ in ALIST."
(while (and sh-shell
(not (setq elt (assq sh-shell list))))
(setq sh-shell (cdr (assq sh-shell sh-ancestor-alist))))
+ ;; If the shell is not known, treat it as sh.
+ (unless elt
+ (setq elt (assq 'sh list)))
(if (and (consp (setq val (cdr elt)))
(eq (car val) 'eval))
(setcdr elt