;ELC   
;;; Compiled by rms@psilocin.ai.mit.edu on Sat Jun 13 00:51:23 1998
;;; from file /gd/gnu/emacs/lisp/progmodes/hideshow.el
;;; in Emacs version 20.2.95.2
;;; with bytecomp version 2.46
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`hideshow.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\302\303!\210\304\305\306\307\310	\311&\207" [:prefix :group require easymenu custom-declare-group hideshow nil "Minor mode for hiding and showing program and comment blocks." "hs-" languages] 8)
#@53 Hide the comments too when you do an `hs-hide-all'.
(custom-declare-variable 'hs-hide-comments-when-hiding-all 't '(#$ . 824) :type 'boolean :group 'hideshow)
#@714 Leave only the first line visible in a hidden block.
If non-nil only the first line is visible when a block is in the
hidden state, else both the first line and the last line are shown.
A nil value disables `hs-adjust-block-beginning', which see.

An example of how this works: (in C mode)
original:

  /* My function main
     some more stuff about main
  */
  int
  main(void)
  {
    int x=0;
    return 0;
  }


hidden and `hs-show-hidden-short-form' is nil
  /* My function main...
  */
  int
  main(void)
  {...
  }

hidden and `hs-show-hidden-short-form' is t
  /* My function main...
  int
  main(void)...

For the last case you have to be on the line containing the
ellipsis when you do `hs-show-block'.
(custom-declare-variable 'hs-show-hidden-short-form 't '(#$ . 990) :type 'boolean :group 'hideshow)
#@166 Hook called when `hs-minor-mode' is installed.
A good value for this would be `hs-hide-initial-comment-block' to
hide all the comments at the beginning of the file.
(custom-declare-variable 'hs-minor-mode-hook ''hs-hide-initial-comment-block '(#$ . 1810) :type 'hook :group 'hideshow)
#@297 What kind of hidden blocks to open when doing `isearch'.
One of the following values:

  block   -- open only blocks
  comment -- open only comments
  t       -- open both blocks and comments
  nil     -- open neither blocks nor comments

This has effect iff `search-invisible' is set to `open'.
(custom-declare-variable 'hs-isearch-open ''block '(#$ . 2102) :type '(choice (const :tag "open only blocks" block) (const :tag "open only comments" comment) (const :tag "open both blocks and comments" t) (const :tag "don't open any of them" nil)) :group 'hideshow)
#@788 *Alist for initializing the hideshow variables for different modes.
It has the form
  (MODE START END COMMENT-START FORWARD-SEXP-FUNC ADJUST-BEG-FUNC).
If present, hideshow will use these values as regexps for start, end
and comment-start, respectively.  Since Algol-ish languages do not have
single-character block delimiters, the function `forward-sexp' used
by hideshow doesn't work.  In this case, if a similar function is
available, you can register it and have hideshow use it instead of
`forward-sexp'.  See the documentation for `hs-adjust-block-beginning'
to see what is the use of ADJUST-BEG-FUNC.

If any of those is left nil, hideshow will try to guess some values
using function `hs-grok-mode-type'.

Note that the regexps should not contain leading or trailing whitespace.
(defvar hs-special-modes-alist '((c-mode "{" "}" nil nil hs-c-like-adjust-block-beginning) (c++-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning) (java-mode "\\(\\(\\([ 	]*\\(\\(abstract\\|final\\|native\\|p\\(r\\(ivate\\|otected\\)\\|ublic\\)\\|s\\(tatic\\|ynchronized\\)\\)[ 	\n]+\\)*[.a-zA-Z0-9_:]+[ 	\n]*\\(\\[[ 	\n]*\\][ 	\n]*\\)?\\([a-zA-Z0-9_:]+[ 	\n]*\\)([^)]*)\\([ \n	]+throws[ 	\n][^{]+\\)?\\)\\|\\([ 	]*static[^{]*\\)\\)[ 	\n]*{\\)" "}" "/[*/]" java-hs-forward-sexp hs-c-like-adjust-block-beginning)) (#$ . -2671))
#@127 *Hooks called at the end of commands to hide text.
These commands include `hs-hide-all', `hs-hide-block' and `hs-hide-level'.
(defvar hs-hide-hook nil (#$ . -4000))
#@128 *Hooks called at the end of commands to show text.
These commands include `hs-show-all', `hs-show-block' and `hs-show-region'.
(defvar hs-show-hook nil (#$ . -4172))
#@66 *Prefix key to use for hideshow commands in hideshow minor mode.
(defvar hs-minor-mode-prefix "" (#$ . -4344))
#@125 Non-nil if using hideshow mode as a minor mode of some other mode.
Use the command `hs-minor-mode' to toggle this variable.
(defvar hs-minor-mode nil (#$ . 4463))
#@35 Mode map for hideshow minor mode.
(defvar hs-minor-mode-map nil (#$ . 4632))
#@122 Regexp for beginning of comments.
Differs from mode-specific comment regexps in that
surrounding whitespace is stripped.
(defvar hs-c-start-regexp nil (#$ . 4716))
#@32 Regexp for beginning of block.
(defvar hs-block-start-regexp nil (#$ . 4886))
#@26 Regexp for end of block.
(defvar hs-block-end-regexp nil (#$ . 4970))
#@314 Function used to do a `forward-sexp'.
Should change for Algol-ish modes.  For single-character block
delimiters -- ie, the syntax table regexp for the character is
either `(' or `)' -- `hs-forward-sexp-func' would just be
`forward-sexp'.  For other modes such as simula, a more specialized
function is necessary.
(defvar hs-forward-sexp-func 'forward-sexp (#$ . 5047))
#@737 Function used to tweak the block beginning.
It has effect only if `hs-show-hidden-short-form' is non-nil.
The block it is hidden from the point returned by this function,
as opposed to hiding it from the point returned when searching
`hs-block-start-regexp'.  In c-like modes, if we wish to also hide the
curly braces (if you think they occupy too much space on the screen),
this function should return the starting point (at the end of line) of
the hidden region.

It is called with a single argument ARG which is the the position in
buffer after the block beginning.

It should return the position from where we should start hiding.

It should not move the point.

See `hs-c-like-adjust-block-beginning' for an example of using this.
(defvar hs-adjust-block-beginning nil (#$ . 5423))
#@244 Hide or show lines from FROM to TO, according to FLAG.
If FLAG is nil then text is shown, while if FLAG is non-nil the text
is hidden.  Actually flag is really either `comment' or `block'
depending on what kind of block it is suppose to hide.
(defalias 'hs-flag-region #[(from to flag) "\212b\210\305\210\306`	\307\310$\210\n\205; \311`	\"\312\307\310#\210\312\310\313#\210\f\313=\204/ \f\n=\2035 \312\314\315#\210\312\316\313#))\207" [from to flag overlay hs-isearch-open nil hs-discard-overlays invisible hs make-overlay overlay-put t isearch-open-invisible hs-isearch-open-invisible intangible] 5 (#$ . 6217)])
(defalias 'hs-isearch-open-invisible #[(ov) "\212\301!b\210\302 )\207" [ov overlay-start hs-show-block] 2])
(defalias 'hs-discard-overlays #[(beg end prop value) "	W\203\n 	\212	b\210\306	\"\307\211\2051 @\310\n\f\"=\203) \311\n!\210A\211\204 \307+\207" [end beg o overlays prop value overlays-in nil overlay-get delete-overlay] 4])
#@218 Hide block iff on block beginning.
Optional arg END means reposition at end.
Optional arg COMMENT-REG is a list of the form (BEGIN . END) and
specifies the limits of the comment, or nil if the block is not
a comment.
(defalias 'hs-hide-block-at-point #[(&optional end comment-reg) "\203( A@b\210	\204 \306y\210\307\210\310@`\311#\210\n\203$ A@\202& @b\207\312!\205| 	\203= \f\203= \f\313\225!\202? \313\225\314!\210`	\204O \306y\210\307\210`W\203p \315\"	\203e \314\202f \316V\203p \310`\317#\210\n\203y \202z b*\207" [comment-reg hs-show-hidden-short-form end hs-block-start-regexp hs-adjust-block-beginning p -1 nil hs-flag-region comment looking-at 0 1 count-lines 2 block hs-forward-sexp-func q] 4 (#$ . 7192)])
#@219 Show block iff on block beginning.
Optional arg END means reposition at end.
Optional arg COMMENT-REG is a list of the forme (BEGIN . END) and
specifies the limits of the comment. It should be nil when hiding
a block.
(defalias 'hs-show-block-at-point #[(&optional end comment-reg) "\203  @\205? \305@A@\306#\210	\203 A@\202 @b\207\307\n!\205? `\310\311\312\217\305\f\306#\210	\203< `T\202= b*\207" [comment-reg end hs-block-start-regexp p q hs-flag-region nil looking-at error (byte-code "\301!\210`\207" [hs-forward-sexp-func 1] 2) ((error (byte-code "i\302U\204	 \303 \210`\304\305	Pd\306\307$\210`\207" [p hs-block-start-regexp 0 beginning-of-defun re-search-forward "^" t 2] 5)))] 4 (#$ . 7937)])
#@57 Warn if `buffer-invisibility-spec' does not contain hs.
(defalias 'hs-safety-is-job-n #[nil "\206 \301\236?\205 \302\303!\210\304\305!\207" [buffer-invisibility-spec hs message "Warning: `buffer-invisibility-spec' does not contain hs!!" sit-for 2] 2 (#$ . 8659)])
(defalias 'hs-hide-initial-comment-block #[nil "`\303eb\210\304\303w\210\305 \211\203+ \306@A@\"\n\203! \307\202\" \310V\203+ \311 \202- 	b*\207" [c-reg p hs-show-hidden-short-form nil " 	\n^L" hs-inside-comment-p count-lines 1 2 hs-hide-block] 4 nil nil])
#@426 Return non-nil if point is inside a comment, otherwise nil.
Actually, returns a list containing the buffer position of the start
and the end of the comment.  A comment block can be hidden only if on
its starting line there is only whitespace preceding the actual comment
beginning.  If we are inside of a comment but this condition is not met,
we return a list having a nil as its car and the end of comment position
as cdr.
(defalias 'hs-inside-comment-p #[nil "\212`\304	!\204 \305	e\306#\205 \307\310 [!\210\311\312w\210`\312\313y\210\304\314	P!\204d b\210\307\315!\210\311\312w\210``W\203V `V\203V \304	!\204V `\307\315!\210\311\312w\210\2027 \304	!\203b `V\203d \306\307\310 !\210\311\312x\210\312\210`Y\205~ \n?\205| `D**\207" [q hs-c-start-regexp not-hidable p looking-at re-search-backward t forward-comment buffer-size " 	\n\f" nil 0 "[ 	]*" 1] 4 (#$ . 9196)])
#@262 Set up hideshow variables for new buffers.
If `hs-special-modes-alist' has information associated with the
current buffer's major mode, use that.
Otherwise, guess start, end and comment-start regexps; forward-sexp
function; and adjust-block-beginning function.
(defalias 'hs-grok-mode-type #[nil "\306\305!\205S \306\307!\205S \310	\"\211A@\206 \311\312\n8\206  \313\314\n8\206A \315!\316\317\"\203> \320\211\225SO\202@ )\321\n8\206J \322\323\n8\211)\207" [major-mode hs-special-modes-alist lookup hs-block-start-regexp hs-block-end-regexp comment-start boundp comment-end assoc "\\s(" 2 "\\s)" 3 regexp-quote string-match " +$" 0 4 forward-sexp 5 c-start-regexp hs-c-start-regexp hs-forward-sexp-func hs-adjust-block-beginning] 4 (#$ . 10088)])
#@69 Reposition point at block-start.
Return point, or nil if top-level.
(defalias 'hs-find-block-beginning #[nil "\306\307`\310\311	\312\260\313 \314y\210\203| \306\315e\307#\203A \316\224\203A \317 \320\216\321 *\203: \307\211\202 \314\224\202 \322d\307#\203 \f\314\224Y\203W \f\314\225W\204u \203 \203 \317 \323\216\324\314\225!\f\"\316U*\203 \314\224\202 \fb\210\204\252 \325\n[!\210\315e\307#\203\252 \316\224\203\236 \314\224\211\202\201 \314\225b\210\326!\210\202 \206\260 \fb\210-\207" [hs-block-start-regexp hs-block-end-regexp buf-size both-regexps here try-again nil t "\\(" "\\)\\|\\(" "\\)" buffer-size 0 re-search-backward 1 match-data ((set-match-data save-match-data-internal)) hs-inside-comment-p re-search-forward ((set-match-data save-match-data-internal)) count-lines forward-comment -1 done save-match-data-internal hs-show-hidden-short-form hs-adjust-block-beginning hs-forward-sexp-func] 9 (#$ . 10860)])
#@54 Hide blocks ARG levels below this block recursively.
(defalias 'hs-hide-level-recursive #[(arg minp maxp) "\304 \203 `T\305 \210`S\306	\307#\210b\210\310\311 !\210\312\n	\313#\203? \314V\2034 \315S	#\210\202 \316\224b\210\317\313!\210\202 \320 \210	b\207" [minp maxp hs-block-start-regexp arg hs-find-block-beginning forward-sexp hs-flag-region 10 forward-comment buffer-size re-search-forward t 1 hs-hide-level-recursive 0 hs-hide-block-at-point hs-safety-is-job-n] 4 (#$ . 11835)])
#@64 Execute optional BODY iff variable `hs-minor-mode' is non-nil.
(defalias 'hs-life-goes-on '(macro . #[(&rest body) "\301\302\303\304BBE\207" [body let ((inhibit-point-motion-hooks t)) when hs-minor-mode] 5 (#$ . 12335)]))
(put 'hs-life-goes-on 'edebug-form-spec '(&rest form))
#@71 Return non-nil if point is in an already-hidden block, otherwise nil.
(defalias 'hs-already-hidden-p #[nil "\212\304 \211\203 @\203 @b\210\202' \204' \305 \203' \306	!\203' \307\225b\210)\310\210\311`!\310\n\204H \312@!\203H \313@\314\"A\2021 \n+\207" [c-reg hs-block-start-regexp found overlays hs-inside-comment-p hs-find-block-beginning looking-at 0 nil overlays-at overlayp overlay-get hs] 4 (#$ . 12619)])
#@67 Function used by `hs-minor-mode' for `forward-sexp' in Java mode.
(defalias 'java-hs-forward-sexp #[(arg) "\302W\203\n \303\304!\207\305	!\203 \302\225b\210\306u\210\307\304!\207\307\304!\207" [arg hs-block-start-regexp 0 backward-sexp 1 looking-at -1 forward-sexp] 2 (#$ . 13050)])
#@247 Function to be assigned to `hs-adjust-block-beginning' for C-like modes.
Arg is a position in buffer just after {.  This goes back to the end of
the function header.  The purpose is to save some space on the screen
when displaying hidden blocks.
(defalias 'hs-c-like-adjust-block-beginning #[(arg) "\212b\210\301u\210\302\303 [!\210`)\207" [arg -1 forward-comment buffer-size] 2 (#$ . 13342)])
#@254 Hide all top-level blocks, displaying only first and last lines.
Move point to the beginning of the line, and it run the normal hook
`hs-hide-hook'.  See documentation for `run-hooks'.
If `hs-hide-comments-when-hiding-all' is t, also hide the comments.
(defalias 'hs-hide-all #[nil "\306	\205\313 \307\310!\210\212\311ed\312#\210eb\210\n\203\215 \312\313\314\315\f\316\260\317d\306#\203\211 \320\224\203H \320\224b\210\321\306!\210\307\322T\211\"\210\202& \323 \211\203& @\203& \324@A@\"\203h \320\202i \325V\203\200 \321\306\"\210\307\322T\211\"\210\202& A@b\210\202& +\202\275 \313\326P\327  !\330 !\210\317!d\306#\203\274 \313\224b\210\321\306!\210\307\322T\211\"\210\202\231 +\331 \210)\313y\210\307\332!\210\333\334!)\207" [inhibit-point-motion-hooks hs-minor-mode hs-hide-comments-when-hiding-all hs-block-start-regexp hs-c-start-regexp block-and-comment-re t message "Hiding all blocks ..." hs-flag-region nil 0 "\\(^" "\\)\\|\\(" "\\)" re-search-forward 1 hs-hide-block-at-point "Hiding ... %d" hs-inside-comment-p count-lines 2 "^" buffer-size forward-comment hs-safety-is-job-n "Hiding all blocks ... done" run-hooks hs-hide-hook count c-reg hs-show-hidden-short-form buf-size top-level-re] 8 (#$ . 13744) nil])
#@119 Show all top-level blocks.
Point is unchanged; run the normal hook `hs-show-hook'.
See documentation for `run-hooks'.
(defalias 'hs-show-all #[nil "\302	\205 \303\304!\210\305ed\306#\210\303\307!\210\310\311!)\207" [inhibit-point-motion-hooks hs-minor-mode t message "Showing all blocks ..." hs-flag-region nil "Showing all blocks ... done" run-hooks hs-show-hook] 4 (#$ . 15015) nil])
#@282 Select a block and hide it.
With prefix arg, reposition at end.  Block is defined as a sexp for
Lispish modes, mode-specific otherwise.  Comments are blocks, too.
Upon completion, point is repositioned and the normal hook
`hs-hide-hook' is run.  See documentation for `run-hooks'.
(defalias 'hs-hide-block #[(&optional end) "\306	\205G \307 \211\203, \n@\203& \310\n@\nA@\"\203! \311\202\" \312X\203, \313\314!\202F \n\204; \315\f!\204; \316 \205F \317\n\"\210\320 \210\321\322!))\207" [inhibit-point-motion-hooks hs-minor-mode c-reg hs-show-hidden-short-form hs-block-start-regexp end t hs-inside-comment-p count-lines 1 2 message "Not enough comment lines to hide!" looking-at hs-find-block-beginning hs-hide-block-at-point hs-safety-is-job-n run-hooks hs-hide-hook] 4 (#$ . 15410) "P"])
#@203 Select a block and show it.
With prefix arg, reposition at end.  Upon completion, point is
repositioned and the normal hook `hs-show-hook' is run.
See documentation for `hs-hide-block' and `run-hooks'.
(defalias 'hs-show-block #[(&optional end) "\305	\205$ \306 \211\204 \307!\204 \310 \205# \311\f\n\"\210\312 \210\313\314!))\207" [inhibit-point-motion-hooks hs-minor-mode c-reg hs-block-start-regexp end t hs-inside-comment-p looking-at hs-find-block-beginning hs-show-block-at-point hs-safety-is-job-n run-hooks hs-show-hook] 4 (#$ . 16211) "P"])
#@273 Show all lines from BEG to END, without doing any block analysis.
Note: `hs-show-region' is intended for use when `hs-show-block' signals
"unbalanced parentheses" and so is an emergency measure only.  You may
become very confused if you use this command indiscriminately.
(defalias 'hs-show-region #[(beg end) "\304	\205 \305\n\306#\210\307 \210\310\311!)\207" [inhibit-point-motion-hooks hs-minor-mode beg end t hs-flag-region nil hs-safety-is-job-n run-hooks hs-show-hook] 4 (#$ . 16773) "r"])
#@46 Hide all blocks ARG levels below this block.
(defalias 'hs-hide-level #[(arg) "\303	\205 \212\304\305!\210\306\ned#\210\304\307!\210)\310 \210\311\312!)\207" [inhibit-point-motion-hooks hs-minor-mode arg t message "Hiding blocks ..." hs-hide-level-recursive "Hiding blocks ... done" hs-safety-is-job-n run-hooks hs-hide-hook] 4 (#$ . 17278) "p"])
#@67 Toggle hiding/showing of a block.
Should be bound to a mouse key.
(defalias 'hs-mouse-toggle-hiding #[(e) "\301!\210\302 \203\f \303 \207\304 \207" [e mouse-set-point hs-already-hidden-p hs-show-block hs-hide-block] 2 (#$ . 17633) "@e"])
#@723 Toggle hideshow minor mode.
With ARG, turn hideshow minor mode on if ARG is positive, off otherwise.
When hideshow minor mode is on, the menu bar is augmented with hideshow
commands and the hideshow commands are enabled.
The value '(hs . t) is added to `buffer-invisibility-spec'.
Last, the normal hook `hs-minor-mode-hook' is run; see the doc
for `run-hooks'.

The main commands are: `hs-hide-all', `hs-show-all', `hs-hide-block',
`hs-show-block', `hs-hide-level' and `hs-show-region'.
Also see the documentation for the variable `hs-show-hidden-short-form'.

Turning hideshow minor mode off reverts the menu bar and the
variables to default values and disables the hideshow commands.

Key bindings:
\{hs-minor-mode-map}
(defalias 'hs-minor-mode #[(&optional arg) "\204	 	?\202 \303!\304V\211\203$ \305\302!\210\306\307\310!\210\311 \210\312\313!\207\314\315!\207" [arg hs-minor-mode line-move-ignore-invisible prefix-numeric-value 0 make-local-variable t add-to-invisibility-spec (hs . t) hs-grok-mode-type run-hooks hs-minor-mode-hook remove-from-invisibility-spec (hs . t)] 3 (#$ . 17879) "P"])
(byte-code "\204% \305 \306\301!\204 \307\301\nB\310\301\311\312#\210\313\301\312\314\315\316\317\"B$\210\320\236\2041 \320BB\320\f\236\204= \321\f\322C\"\315\323\324\"\210\325\326!\207" [hs-minor-mode-map hs-minor-mode-menu current-load-list minor-mode-map-alist minor-mode-alist make-sparse-keymap boundp nil put variable-documentation "Menu used when hideshow minor mode is active." easy-menu-do-define "Hide/Show" mapcar #[(ent) "\302	\303H	\304H#\210	\303\305	\303H!?I\210	\207" [hs-minor-mode-map ent define-key 2 1 vectorp] 5] (["Hide Block" hs-hide-block "h"] ["Show Block" hs-show-block "s"] ["Hide All" hs-hide-all "H"] ["Show All" hs-show-all "S"] ["Hide Level" hs-hide-level "L"] ["Show Region" hs-show-region "R"] ["Toggle Hiding" hs-mouse-toggle-hiding [S-mouse-2]]) hs-minor-mode append (hs-minor-mode " hs") #[(var) "\301!\210\302\303\304#\207" [var make-variable-buffer-local put permanent-local t] 4] (hs-minor-mode hs-c-start-regexp hs-block-start-regexp hs-block-end-regexp hs-forward-sexp-func hs-adjust-block-beginning) provide hideshow] 8)
