Function: beginning-of-defun--in-emptyish-line-p

beginning-of-defun--in-emptyish-line-p is a byte-compiled function defined in lisp.el.gz.

Signature

(beginning-of-defun--in-emptyish-line-p)

Documentation

Return non-nil if the point is in an "emptyish" line.

This means a line that consists entirely of comments and/or whitespace.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/lisp.el.gz
(defun beginning-of-defun--in-emptyish-line-p ()
  "Return non-nil if the point is in an \"emptyish\" line.
This means a line that consists entirely of comments and/or
whitespace."
;; See https://lists.gnu.org/r/help-gnu-emacs/2016-08/msg00141.html
  (save-excursion
    (forward-line 0)
    (let ((ppss (syntax-ppss)))
      (and (null (nth 3 ppss))
           (< (line-end-position)
              (progn (when (nth 4 ppss)
                       (goto-char (nth 8 ppss)))
                     (forward-comment (point-max))
                     (point)))))))