[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 ac00a92: Make sh-electric-here-document-mode acce
From: |
Mark Oteiza |
Subject: |
[Emacs-diffs] emacs-25 ac00a92: Make sh-electric-here-document-mode accessible in sh-mode-hook. (Bug#3226) |
Date: |
Sat, 16 Apr 2016 18:47:52 +0000 |
branch: emacs-25
commit ac00a92e3df7111c0eb2c6456ae7df5850bfd8fa
Author: Mark Oteiza <address@hidden>
Commit: Mark Oteiza <address@hidden>
Make sh-electric-here-document-mode accessible in sh-mode-hook. (Bug#3226)
* lisp/progmodes/sh-script.el (sh-mode-hook): Add
sh-electric-here-document-mode as an option and the default value.
(sh-mode): Mention sh-mode-hook in docstring.
(sh-mode): Remove sh-electric-here-document-mode invocation.
---
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 4fb5835..4f160e1 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'."
:type 'hook
:group 'sh-script)
-(defcustom sh-mode-hook nil
+(defcustom sh-mode-hook '(sh-electric-here-document-mode)
"Hook run by `sh-mode'."
:type 'hook
+ :options '(sh-electric-here-document-mode)
:group 'sh-script)
(defcustom sh-learn-basic-offset nil
@@ -1616,7 +1617,8 @@ buffer indents as it currently is indented.
\\[sh-execute-region] Have optional header and region be executed in a
subshell.
`sh-electric-here-document-mode' controls whether insertion of two
-unquoted < insert a here document.
+unquoted < insert a here document. You can control this behavior by
+modifying `sh-mode-hook'.
If you generally program a shell different from your login shell you can
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."
(setq-local syntax-propertize-function #'sh-syntax-propertize-function)
(add-hook 'syntax-propertize-extend-region-functions
#'syntax-propertize-multiline 'append 'local)
- (sh-electric-here-document-mode 1)
(setq-local skeleton-pair-alist '((?` _ ?`)))
(setq-local skeleton-pair-filter-function 'sh-quoted-p)
(setq-local skeleton-further-elements
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 ac00a92: Make sh-electric-here-document-mode accessible in sh-mode-hook. (Bug#3226),
Mark Oteiza <=