Function: js--find-newline-backward
js--find-newline-backward is a byte-compiled function defined in
js.el.gz.
Signature
(js--find-newline-backward)
Documentation
Move backward to the nearest newline that is not in a block comment.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/js.el.gz
(defun js--find-newline-backward ()
"Move backward to the nearest newline that is not in a block comment."
(let ((continue t)
(result t))
(while continue
(setq continue nil)
(if (search-backward "\n" nil t)
(let ((parse (syntax-ppss)))
;; We match the end of a // comment but not a newline in a
;; block comment.
(when (nth 4 parse)
(goto-char (nth 8 parse))
;; If we saw a block comment, keep trying.
(unless (nth 7 parse)
(setq continue t))))
(setq result nil)))
result))