From 4aa3ba0a8176610c937321dabd11f1b116742742 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 11 Nov 2001 20:07:46 +0000 Subject: [PATCH] (sh-must-be-shell-mode): Allow modes derived from sh-mode. --- lisp/progmodes/sh-script.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 5dbd40e76e3..d467ed7074f 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1662,7 +1662,7 @@ region, clear header." ;; Indentation stuff. (defun sh-must-be-shell-mode () "Signal an error if not in Shell-script mode." - (unless (eq major-mode 'sh-mode) + (unless (derived-mode-p 'sh-mode) (error "This buffer is not in Shell-script mode"))) (defun sh-must-support-indent () @@ -1670,7 +1670,7 @@ region, clear header." Also, the buffer must be in Shell-script mode." (sh-must-be-shell-mode) (unless sh-indent-supported-here - (error "This buffer's shell type is not supported for this command"))) + (error "This buffer's shell does not support indentation through Emacs"))) (defun sh-make-vars-local () "Make the indentation variables local to this buffer. -- 2.39.5