1662 |
;; Indentation stuff. |
;; Indentation stuff. |
1663 |
(defun sh-must-be-shell-mode () |
(defun sh-must-be-shell-mode () |
1664 |
"Signal an error if not in Shell-script mode." |
"Signal an error if not in Shell-script mode." |
1665 |
(unless (eq major-mode 'sh-mode) |
(unless (derived-mode-p 'sh-mode) |
1666 |
(error "This buffer is not in Shell-script mode"))) |
(error "This buffer is not in Shell-script mode"))) |
1667 |
|
|
1668 |
(defun sh-must-support-indent () |
(defun sh-must-support-indent () |
1670 |
Also, the buffer must be in Shell-script mode." |
Also, the buffer must be in Shell-script mode." |
1671 |
(sh-must-be-shell-mode) |
(sh-must-be-shell-mode) |
1672 |
(unless sh-indent-supported-here |
(unless sh-indent-supported-here |
1673 |
(error "This buffer's shell type is not supported for this command"))) |
(error "This buffer's shell does not support indentation through Emacs"))) |
1674 |
|
|
1675 |
(defun sh-make-vars-local () |
(defun sh-make-vars-local () |
1676 |
"Make the indentation variables local to this buffer. |
"Make the indentation variables local to this buffer. |