Function: sh-smie--newline-semi-p
sh-smie--newline-semi-p is a byte-compiled function defined in
sh-script.el.gz.
Signature
(sh-smie--newline-semi-p &optional TOK)
Documentation
Return non-nil if a newline should be treated as a semi-colon.
Here we assume that a newline should be treated as a semi-colon unless it comes right after a special keyword. This function does not pay attention to line-continuations. If TOK is nil, point should be before the newline; otherwise, TOK is the token before the newline and in that case point should be just before the token.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/sh-script.el.gz
(defun sh-smie--newline-semi-p (&optional tok)
"Return non-nil if a newline should be treated as a semi-colon.
Here we assume that a newline should be treated as a semi-colon unless it
comes right after a special keyword.
This function does not pay attention to line-continuations.
If TOK is nil, point should be before the newline; otherwise, TOK is the token
before the newline and in that case point should be just before the token."
(save-excursion
(unless tok
(setq tok (funcall smie-backward-token-function)))
(if (and (zerop (length tok))
(looking-back "\\s(" (1- (point))))
nil
(not (numberp (nth 2 (assoc tok smie-grammar)))))))