(hs-make-overlay): New function.
(hs-isearch-show-temporary): Handle `display' overlay prop specially.
(hs-flag-region): Delete function.
(hs-hide-comment-region): No longer use `hs-flag-region'.
Instead, use `hs-discard-overlays' and `hs-make-overlay'.
(hs-hide-block-at-point): Likewise.
(hs-hide-level-recursive): Use `hs-discard-overlays'.
(hs-hide-all, hs-show-all): Likewise.
(hs-show-block): Likewise.
Also, use overlay prop `hs-b-offset', not `hs-ofs'.
Remove XEmacs and Emacs 19 compatibility.
Use `dolist' and `add-to-list' for load-time actions.
(hs-discard-overlays): Use `dolist'.
(hs-show-block): Likewise.
Sync comments w/ maintainer version 5.31.
(hs-isearch-open): Default value now `code'.
Fix docstring to use "code blocks" vs "comment blocks",
as opposed to "block" vs "comment".
(hs-flag-region): Accept `hs-isearch-open' value
of `block' as synonymous w/ `code'.
(hs-hide-block-at-point): For code blocks, pass `code'
to `hs-flag-region' instead of `block'.
Generally, sync w/ maintainer version 5.22.
(hs-hide-all-non-comment-function): New var.
(hs-hide-hook, hs-show-hook, hs-minor-mode): Update docstrings.
(hs-hide-all): Use `hs-hide-all-non-comment-function'.
(hs-show-region): Delete this command.
(hs-minor-mode-map): Change bindings to leave "C-c LETTER" alone.
(hs-toggle-hiding): New command.
(hs-mouse-toggle-hiding): Use `hs-toggle-hiding'.
(hs-minor-mode): Move call to `hs-grok-mode-type' early on.
Fix omission bug: Run `hs-minor-mode-hook' for both activation
and deactivation.
(hs-isearch-open): New variable.
(hs-flag-region): Use that variable.
Changed the semantics of the FLAG parameter and updated the docs.
(hs-isearch-open-invisible): New function to be set as a
`isearch-pent-invisible' property for hidden overlays, so that
isearch can use it.
(hs-hide-block-at-point): Tell if we are hiding a comment or a block.
(hs-adjust-block-beginning): Likewise.
(hs-special-modes-alist): C and C++ should also use
hs-c-like-adjust-block-beginning.
(hs-find-block-beginning): If hs-adjust-block-beginning is t and
we apply hs-adjust-block-beginning and we reach the point means
that we found the block beginning.
(hs-c-like-adjust-block-beginning):
Renamed from java-hs-adjust-block-beginning.
(hs-show-hidden-short-form, hs-minor-mode-hook): Move definitions up.
Use defcustom.
(hs-find-block-beginning): Bind buffer-size, don't call it in a cycle.
(hs-hide-all): Likewise.
comment regexp in the alist. This is needed for modes like c++
where the comment beginning regexp is not easy to determine
from the syntax table.
Include ADJUST-BLOCK-BEGINNING in the alist.
(hs-hide-comments-when-hiding-all): Add autoload cookie.
(hs-show-hidden-short-form):
(hs-adjust-block-beginning): New variables.
Comment out `hs-menu-bar' as XEmacs support was removed.
(hs-c-end-regexp): Remove variable, obsoleted by the rewrite of
`hs-inside-comment-p'.
(hs-discard-overlays): No need to test if we are inside the
overlay, we surely are since we got the overlay using `overlays-at'.
(hs-hide-block-at-point): Rewritten to use the new variables.
Use only one parameter to specify the comment.
(hs-show-block-at-point): No need for the COMMENT-REG parameter.
(hs-safety-is-job-n): Correct typo.
(hs-hide-initial-comment-block): Add ^L to the chars to skip.
Take into account `hs-show-hidden-short-form' when testing.
(hs-inside-single-line-comment-p): Function deleted, obsoleted by
the rewrite of `hs-inside-comment-p'.
(hs-inside-comment-p): Rewritten from scratch. Semantics changed
when returning non-nil. We can be inside a comment, but that
comment might not be hidable (the car of the return value should
be non-nil to be hidable).
(hs-grok-mode-type): Rewrite to be more understandable.
`hs-c-end-regexp' does not exist any more.
Initialize `hs-c-start-regexp' from the alist if specified there.
Initialize `hs-adjust-block-beginning'.
(hs-find-block-beginning): Rewritten to be able to deal with the
situation when a block beginning spans multiple lines and the
point is on one of those lines.
(hs-already-hidden-p): Look first if we are inside a comment or a
block, go to their end and look there for the overlays.
(java-hs-adjust-block-beginning): New function.
(hs-hide-all): Hide a comment block only if `hs-inside-comment-p'
says is hidable.
(hs-hide-block): Simplify.
Handle properly the result of `hs-inside-comment-p'.
(hs-show-block): Likewise.
(hs-minor-mode): Doc string fixes.
Make `hs-adjust-block-beginning' buffer local.
Delete making `hs-c-end-regexp' buffer local as it was deleted.
Changed to use overlays for hiding instead of selective display.
Commented out the support for XEmacs because it doesn't support overlays.
(hs-special-modes-alist): Added support for java-mode.
(hs-minor-mode-hook): New variable.
(hs-c-start-regexp, hs-c-end-regexp, hs-forward-sexp-func)
(hs-block-start-regexp, hs-block-end-regexp)
(hs-find-block-beginning): Doc string fixes.
(hs-hide-comments-when-hiding-all): New variable.
(hs-safety-is-job-n, hs-minor-mode, hs-flag-region):
Use overlays for hiding.
(hs-inside-single-line-comment-p, hs-discard-overlays)
(hs-already-hidden-p): New internal functions.
(hs-hide-block-at-point, hs-hide-initial-comment-block)
(java-hs-forward-sexp, hs-mouse-toggle-hiding): New functions.
(hs-inside-comment-p, hs-hide-block)
(hs-show-block): Added support for single line comments.
(hs-hide-all): Added support for hiding comments.