diff options
| -rw-r--r-- | lisp/progmodes/sh-script.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 4fb58353b31..4f160e1ad6d 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -1225,9 +1225,10 @@ and command `sh-reset-indent-vars-to-global-values'." | |||
| 1225 | :type 'hook | 1225 | :type 'hook |
| 1226 | :group 'sh-script) | 1226 | :group 'sh-script) |
| 1227 | 1227 | ||
| 1228 | (defcustom sh-mode-hook nil | 1228 | (defcustom sh-mode-hook '(sh-electric-here-document-mode) |
| 1229 | "Hook run by `sh-mode'." | 1229 | "Hook run by `sh-mode'." |
| 1230 | :type 'hook | 1230 | :type 'hook |
| 1231 | :options '(sh-electric-here-document-mode) | ||
| 1231 | :group 'sh-script) | 1232 | :group 'sh-script) |
| 1232 | 1233 | ||
| 1233 | (defcustom sh-learn-basic-offset nil | 1234 | (defcustom sh-learn-basic-offset nil |
| @@ -1616,7 +1617,8 @@ buffer indents as it currently is indented. | |||
| 1616 | \\[sh-execute-region] Have optional header and region be executed in a subshell. | 1617 | \\[sh-execute-region] Have optional header and region be executed in a subshell. |
| 1617 | 1618 | ||
| 1618 | `sh-electric-here-document-mode' controls whether insertion of two | 1619 | `sh-electric-here-document-mode' controls whether insertion of two |
| 1619 | unquoted < insert a here document. | 1620 | unquoted < insert a here document. You can control this behavior by |
| 1621 | modifying `sh-mode-hook'. | ||
| 1620 | 1622 | ||
| 1621 | If you generally program a shell different from your login shell you can | 1623 | If you generally program a shell different from your login shell you can |
| 1622 | set `sh-shell-file' accordingly. If your shell's file name doesn't correctly | 1624 | set `sh-shell-file' accordingly. If your shell's file name doesn't correctly |
| @@ -1653,7 +1655,6 @@ with your script for an edit-interpret-debug cycle." | |||
| 1653 | (setq-local syntax-propertize-function #'sh-syntax-propertize-function) | 1655 | (setq-local syntax-propertize-function #'sh-syntax-propertize-function) |
| 1654 | (add-hook 'syntax-propertize-extend-region-functions | 1656 | (add-hook 'syntax-propertize-extend-region-functions |
| 1655 | #'syntax-propertize-multiline 'append 'local) | 1657 | #'syntax-propertize-multiline 'append 'local) |
| 1656 | (sh-electric-here-document-mode 1) | ||
| 1657 | (setq-local skeleton-pair-alist '((?` _ ?`))) | 1658 | (setq-local skeleton-pair-alist '((?` _ ?`))) |
| 1658 | (setq-local skeleton-pair-filter-function 'sh-quoted-p) | 1659 | (setq-local skeleton-pair-filter-function 'sh-quoted-p) |
| 1659 | (setq-local skeleton-further-elements | 1660 | (setq-local skeleton-further-elements |