;;; sh-script.el --- shell-script editing commands for Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 1993-1997, 1999, 2001-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1997, 1999, 2001-2014 Free Software Foundation,
+;; Inc.
;; Author: Daniel Pfeiffer <occitan@esperanto.org>
;; Version: 2.0f
(defun sh-shell-process (force)
"Get a shell process for interaction.
If FORCE is non-nil and no process found, create one."
- (if (and sh-shell-process (process-live-p sh-shell-process))
+ (if (process-live-p sh-shell-process)
sh-shell-process
(setq sh-shell-process
(let ((found nil) proc
(lambda () (or (eolp) (newline) (indent-relative))))
(setq-local paragraph-start (concat page-delimiter "\\|$"))
- (setq-local paragraph-separate paragraph-start)
+ (setq-local paragraph-separate (concat paragraph-start "\\|#!/"))
(setq-local comment-start "# ")
(setq-local comment-start-skip "#+[\t ]*")
(setq-local local-abbrev-table sh-mode-abbrev-table)
";")
(let ((semi (sh-smie--newline-semi-p)))
(forward-line 1)
- (if semi ";"
+ (if (or semi (eobp)) ";"
(sh-smie-sh-forward-token))))
(forward-comment (point-max))
(cond
";")
(let ((semi (sh-smie--rc-newline-semi-p)))
(forward-line 1)
- (if semi ";"
+ (if (or semi (eobp)) ";"
(sh-smie-rc-forward-token))))
(forward-comment (point-max))
(cond