Function: hs-already-hidden-p

hs-already-hidden-p is a byte-compiled function defined in hideshow.el.gz.

Signature

(hs-already-hidden-p)

Documentation

Return non-nil if point is in an already-hidden block, otherwise nil.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/hideshow.el.gz
(defun hs-already-hidden-p ()
  "Return non-nil if point is in an already-hidden block, otherwise nil."
  (save-excursion
    (let ((c-reg (hs-inside-comment-p)))
      (if (and c-reg (nth 0 c-reg))
          ;; point is inside a comment, and that comment is hideable
          (goto-char (nth 0 c-reg))
        (when (not c-reg)
          (end-of-line)
          (when (not (hs-find-block-beginning-match))
            ;; We should also consider ourselves "in" a hidden block when
            ;; point is right at the edge after a hidden block (bug#52092).
            (beginning-of-line)
            (hs-find-block-beginning-match)))))
    (end-of-line)
    (hs-overlay-at (point))))