Function: wisent-python-forward-line
wisent-python-forward-line is a byte-compiled function defined in
python.el.gz.
Signature
(wisent-python-forward-line)
Documentation
Move point to the beginning of the next logical line.
Usually this is simply the next physical line unless strings, implicit/explicit line continuation, blank lines, or comment lines are encountered. This function skips over such items so that the point is at the beginning of the next logical line. If the current logical line ends at the end of the buffer, leave the point there.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/wisent/python.el.gz
(defun wisent-python-forward-line ()
"Move point to the beginning of the next logical line.
Usually this is simply the next physical line unless strings,
implicit/explicit line continuation, blank lines, or comment lines are
encountered. This function skips over such items so that the point is
at the beginning of the next logical line. If the current logical
line ends at the end of the buffer, leave the point there."
(while (not (eolp))
(when (= (point)
(progn
(cond
;; Skip over python strings.
((looking-at wisent-python-string-start-re)
(wisent-python-forward-string))
;; At a comment start just goto end of line.
((looking-at "\\s<")
(end-of-line))
;; Skip over balanced expressions.
((looking-at "\\s(")
(wisent-python-forward-balanced-expression))
;; At the explicit line continuation character
;; (backslash) move to next line.
((looking-at "\\s\\")
(forward-line 1))
;; Skip over white space, word, symbol, punctuation,
;; and paired delimiter (backquote) characters.
((skip-syntax-forward "-w_.$)")))
(point)))
(error "python-forward-line endless loop detected")))
;; The point is at eol, skip blank and comment lines.
(forward-comment (point-max))
;; Goto the beginning of the next line.
(or (eobp) (beginning-of-line)))