1227 |
(put 'sh-mode 'mode-class 'special) |
(put 'sh-mode 'mode-class 'special) |
1228 |
|
|
1229 |
;;;###autoload |
;;;###autoload |
1230 |
(define-derived-mode sh-mode nil "Shell-script" |
(defun sh-mode () |
1231 |
"Major mode for editing shell scripts. |
"Major mode for editing shell scripts. |
1232 |
This mode works for many shells, since they all have roughly the same syntax, |
This mode works for many shells, since they all have roughly the same syntax, |
1233 |
as far as commands, arguments, variables, pipes, comments etc. are concerned. |
as far as commands, arguments, variables, pipes, comments etc. are concerned. |
1280 |
|
|
1281 |
If your shell gives error messages with line numbers, you can use \\[executable-interpret] |
If your shell gives error messages with line numbers, you can use \\[executable-interpret] |
1282 |
with your script for an edit-interpret-debug cycle." |
with your script for an edit-interpret-debug cycle." |
1283 |
|
(interactive) |
1284 |
|
(kill-all-local-variables) |
1285 |
|
(setq major-mode 'sh-mode |
1286 |
|
mode-name "Shell-script") |
1287 |
|
(use-local-map sh-mode-map) |
1288 |
(make-local-variable 'skeleton-end-hook) |
(make-local-variable 'skeleton-end-hook) |
1289 |
(make-local-variable 'paragraph-start) |
(make-local-variable 'paragraph-start) |
1290 |
(make-local-variable 'paragraph-separate) |
(make-local-variable 'paragraph-separate) |