# HG changeset patch # User Richard M. Stallman # Date 1005509266 0 # Node ID d8cd2ee4b10c900ad415a934418061338022141b # Parent 14c471312660c06544b1df124d9a3881831d5249 (sh-must-be-shell-mode): Allow modes derived from sh-mode. diff -r 14c471312660 -r d8cd2ee4b10c lisp/progmodes/sh-script.el --- a/lisp/progmodes/sh-script.el Sun Nov 11 20:06:58 2001 +0000 +++ b/lisp/progmodes/sh-script.el Sun Nov 11 20:07:46 2001 +0000 @@ -1662,7 +1662,7 @@ ;; 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 @@ 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.