From 1c64011b787b44a4bb67d86c9f049b6b118da21f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 1 Jul 1999 01:00:42 +0000 Subject: [PATCH] (sh-feature): If nothing is known about the given shell, use the values for `sh'. --- lisp/progmodes/sh-script.el | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.39.2