emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 293bd4f: Document changes in Shell-script mode


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-25 293bd4f: Document changes in Shell-script mode
Date: Sat, 26 Dec 2015 11:48:11 +0000

branch: emacs-25
commit 293bd4f6329a112e5c14ae863e963dd0eefb1330
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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'.
---
 etc/NEWS                    |    7 +++++--
 lisp/progmodes/sh-script.el |   10 ++++++++--
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 95f440b..efcc33e 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -742,12 +742,15 @@ you can no longer use commas to separate regular 
expressions.
 +++
 ** SES now supports local printer functions; see `ses-define-local-printer'.
 
-** sh-script
+** Shell-script Mode
+---
 *** In sh-mode you can now use `sh-shell' as a file-local variable to
 specify the type of shell in use (bash, csh, etc).
 
-*** New value `always' for sh-indent-after-continuation.
+---
+*** New value `always' for `sh-indent-after-continuation'.
 This provides old-style ("dumb") indentation of continued lines.
+See the doc string of `sh-indent-after-continuation' for details.
 
 ** TLS
 ---
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index ac512f6..394e9ca 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -204,6 +204,7 @@
 
 (autoload 'comint-completion-at-point "comint")
 (autoload 'comint-filename-completion "comint")
+(autoload 'comint-send-string "comint")
 (autoload 'shell-command-completion "shell")
 (autoload 'shell-environment-variable-completion "shell")
 
@@ -1580,7 +1581,8 @@ assumed.  Since filenames rarely give a clue, they are 
not further analyzed.
 This mode adapts to the variations between shells (see `sh-set-shell') by
 means of an inheritance based feature lookup (see `sh-feature').  This
 mechanism applies to all variables (including skeletons) that pertain to
-shell-specific features.
+shell-specific features.  Shell script files can use the `sh-shell' local
+variable to indicate the shell variant to be used for the file.
 
 The default style of this mode is that of Rosenblatt's Korn shell book.
 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
 the visited file executable, and NO-QUERY-FLAG (the second argument)
 controls whether to query about making the visited file executable.
 
-Calls the value of `sh-set-shell-hook' if set."
+Calls the value of `sh-set-shell-hook' if set.
+
+Shell script files can cause this function be called automatically
+when the file is visited by having a `sh-shell' file-local variable
+whose value is the shell name (don't quote it)."
   (interactive (list (completing-read
                       (format "Shell (default %s): "
                               sh-shell-file)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]