diff options
| author | Eli Zaretskii | 2015-12-26 13:48:00 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-12-26 13:48:00 +0200 |
| commit | 293bd4f6329a112e5c14ae863e963dd0eefb1330 (patch) | |
| tree | 0ba6a7860407a756d69d8820ac50168c1d351e33 | |
| parent | 297e558c56d1538106373a5e9b33a07828cc504b (diff) | |
| download | emacs-293bd4f6329a112e5c14ae863e963dd0eefb1330.tar.gz emacs-293bd4f6329a112e5c14ae863e963dd0eefb1330.zip | |
Document changes in Shell-script mode
* lisp/progmodes/sh-script.el (sh-mode, sh-set-shell): Document
the 'sh-shell' file-local variable.
(top level): Add an auto-load form to avoid byte-compiler warning
about 'comint-send-string'.
| -rw-r--r-- | etc/NEWS | 7 | ||||
| -rw-r--r-- | lisp/progmodes/sh-script.el | 10 |
2 files changed, 13 insertions, 4 deletions
| @@ -742,12 +742,15 @@ you can no longer use commas to separate regular expressions. | |||
| 742 | +++ | 742 | +++ |
| 743 | ** SES now supports local printer functions; see `ses-define-local-printer'. | 743 | ** SES now supports local printer functions; see `ses-define-local-printer'. |
| 744 | 744 | ||
| 745 | ** sh-script | 745 | ** Shell-script Mode |
| 746 | --- | ||
| 746 | *** In sh-mode you can now use `sh-shell' as a file-local variable to | 747 | *** In sh-mode you can now use `sh-shell' as a file-local variable to |
| 747 | specify the type of shell in use (bash, csh, etc). | 748 | specify the type of shell in use (bash, csh, etc). |
| 748 | 749 | ||
| 749 | *** New value `always' for sh-indent-after-continuation. | 750 | --- |
| 751 | *** New value `always' for `sh-indent-after-continuation'. | ||
| 750 | This provides old-style ("dumb") indentation of continued lines. | 752 | This provides old-style ("dumb") indentation of continued lines. |
| 753 | See the doc string of `sh-indent-after-continuation' for details. | ||
| 751 | 754 | ||
| 752 | ** TLS | 755 | ** TLS |
| 753 | --- | 756 | --- |
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index ac512f607aa..394e9ca48c6 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -204,6 +204,7 @@ | |||
| 204 | 204 | ||
| 205 | (autoload 'comint-completion-at-point "comint") | 205 | (autoload 'comint-completion-at-point "comint") |
| 206 | (autoload 'comint-filename-completion "comint") | 206 | (autoload 'comint-filename-completion "comint") |
| 207 | (autoload 'comint-send-string "comint") | ||
| 207 | (autoload 'shell-command-completion "shell") | 208 | (autoload 'shell-command-completion "shell") |
| 208 | (autoload 'shell-environment-variable-completion "shell") | 209 | (autoload 'shell-environment-variable-completion "shell") |
| 209 | 210 | ||
| @@ -1580,7 +1581,8 @@ assumed. Since filenames rarely give a clue, they are not further analyzed. | |||
| 1580 | This mode adapts to the variations between shells (see `sh-set-shell') by | 1581 | This mode adapts to the variations between shells (see `sh-set-shell') by |
| 1581 | means of an inheritance based feature lookup (see `sh-feature'). This | 1582 | means of an inheritance based feature lookup (see `sh-feature'). This |
| 1582 | mechanism applies to all variables (including skeletons) that pertain to | 1583 | mechanism applies to all variables (including skeletons) that pertain to |
| 1583 | shell-specific features. | 1584 | shell-specific features. Shell script files can use the `sh-shell' local |
| 1585 | variable to indicate the shell variant to be used for the file. | ||
| 1584 | 1586 | ||
| 1585 | The default style of this mode is that of Rosenblatt's Korn shell book. | 1587 | The default style of this mode is that of Rosenblatt's Korn shell book. |
| 1586 | The syntax of the statements varies with the shell being used. The | 1588 | The syntax of the statements varies with the shell being used. The |
| @@ -2364,7 +2366,11 @@ argument) controls whether to insert a #!-line and think about making | |||
| 2364 | the visited file executable, and NO-QUERY-FLAG (the second argument) | 2366 | the visited file executable, and NO-QUERY-FLAG (the second argument) |
| 2365 | controls whether to query about making the visited file executable. | 2367 | controls whether to query about making the visited file executable. |
| 2366 | 2368 | ||
| 2367 | Calls the value of `sh-set-shell-hook' if set." | 2369 | Calls the value of `sh-set-shell-hook' if set. |
| 2370 | |||
| 2371 | Shell script files can cause this function be called automatically | ||
| 2372 | when the file is visited by having a `sh-shell' file-local variable | ||
| 2373 | whose value is the shell name (don't quote it)." | ||
| 2368 | (interactive (list (completing-read | 2374 | (interactive (list (completing-read |
| 2369 | (format "Shell (default %s): " | 2375 | (format "Shell (default %s): " |
| 2370 | sh-shell-file) | 2376 | sh-shell-file) |