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
    ;; Reposition point if it is inside a comment, and if that comment
    ;; is hideable
    (when-let* ((c-reg (funcall hs-inside-comment-predicate)))
      (goto-char (car c-reg)))
    ;; Search for a hidden block at EOL ...
    (eq 'hs
        (or (get-char-property (pos-eol) 'invisible)
            ;; ... or behind the current cursor position
            (get-char-property (if (bobp) (point) (1- (point)))
                               'invisible)))))