Server IP : 111.118.215.189 / Your IP : 18.117.158.174 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/emacs/24.3/lisp/progmodes/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:09:25 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/progmodes/hideshow.el ;;; in Emacs version 24.3.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301\302\303\304\305\306\307&\210\310\311\312\313\314\315\306\301&\210\310\316\302\317\314\320\306\301\321\322& \210\310\323\324\325\314\326\306\301&\207" [custom-declare-group hideshow nil "Minor mode for hiding and showing program and comment blocks." :prefix "hs-" :group languages custom-declare-variable hs-hide-comments-when-hiding-all t "Hide the comments too when you do an `hs-hide-all'." :type boolean hs-minor-mode-hook "Hook called when hideshow minor mode is activated or deactivated." hook :version "21.1" hs-isearch-open 'code "What kind of hidden blocks to open when doing `isearch'.\nOne of the following symbols:\n\n code -- open only code blocks\n comment -- open only comment blocks\n t -- open both code and comment blocks\n nil -- open neither code nor comment blocks\n\nThis has effect only if `search-invisible' is set to `open'." (choice (const :tag "open only code blocks" code) (const :tag "open only comment blocks" comment) (const :tag "open both code and comment blocks" t) (const :tag "don't open any of them" nil))] 10) #@1214 Alist for initializing the hideshow variables for different modes. Each element has the form (MODE START END COMMENT-START FORWARD-SEXP-FUNC ADJUST-BEG-FUNC). If non-nil, hideshow will use these values as regexps to define blocks and comments, respectively for major mode MODE. START, END and COMMENT-START are regular expressions. A block is defined as text surrounded by START and END. As a special case, START may be a list of the form (COMPLEX-START MDATA-SELECTOR), where COMPLEX-START is a regexp w/ multiple parts and MDATA-SELECTOR an integer that specifies which sub-match is the proper place to adjust point, before calling `hs-forward-sexp-func'. Point is adjusted to the beginning of the specified match. For example, see the `hs-special-modes-alist' entry for `bibtex-mode'. For some major modes, `forward-sexp' does not work properly. In those cases, FORWARD-SEXP-FUNC specifies another function to use instead. See the documentation for `hs-adjust-block-beginning' to see what is the use of ADJUST-BEG-FUNC. If any of the elements is left nil or omitted, hideshow tries to guess appropriate values. The regexps should not contain leading or trailing whitespace. Case does not matter. (defvar hs-special-modes-alist (mapcar 'purecopy '((c-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) (bibtex-mode ("@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil nil) (js-mode "{" "}" "/[*/]" nil))) (#$ . 1651)) #@71 Function called if non-nil when doing `hs-hide-all' for non-comments. (defvar hs-hide-all-non-comment-function nil (#$ . 3107)) #@153 If non-nil, hiding remembers internal blocks. This means that when the outer block is shown again, any previously hidden internal blocks remain hidden. (defvar hs-allow-nesting nil (#$ . 3242)) #@204 Hook called (with `run-hooks') at the end of commands to hide text. These commands include the toggling commands (when the result is to hide a block), `hs-hide-all', `hs-hide-block' and `hs-hide-level'. (defvar hs-hide-hook nil (#$ . 3443)) #@187 Hook called (with `run-hooks') at the end of commands to show text. These commands include the toggling commands (when the result is to show a block), `hs-show-all' and `hs-show-block'. (defvar hs-show-hook nil (#$ . 3691)) #@688 Function called with one arg, OV, a newly initialized overlay. Hideshow puts a unique overlay on each range of text to be hidden in the buffer. Here is a simple example of how to use this variable: (defun display-code-line-counts (ov) (when (eq 'code (overlay-get ov 'hs)) (overlay-put ov 'display (format "... / %d" (count-lines (overlay-start ov) (overlay-end ov)))))) (setq hs-set-up-overlay 'display-code-line-counts) This example shows how to get information from the overlay as well as how to set its `display' property. See `hs-make-overlay' and info node `(elisp)Overlays'. (defvar hs-set-up-overlay nil (#$ . 3922)) #@132 Non-nil if using hideshow mode as a minor mode of some other mode. Use the command `hs-minor-mode' to toggle or set this variable. (defvar hs-minor-mode nil (#$ . 4659)) #@33 Keymap for hideshow minor mode. (defvar hs-minor-mode-map (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\312#\210\302\313\314#\210\302\315\316#\210\302\317\320#\210)\207" [map make-sparse-keymap define-key "@" hs-hide-block "@" hs-show-block "@\210" hs-hide-all "@\223" hs-show-all "@\f" hs-hide-level "@" hs-toggle-hiding [(shift mouse-2)] hs-mouse-toggle-hiding] 4) (#$ . 4835)) #@47 Menu used when hideshow minor mode is active. (defvar hs-minor-mode-menu nil (#$ . 5270)) (easy-menu-do-define 'hs-minor-mode-menu hs-minor-mode-map "Menu used when hideshow minor mode is active." '("Hide/Show" ["Hide Block" hs-hide-block :help "Hide the code or comment block at point"] ["Show Block" hs-show-block :help "Show the code or comment block at point"] ["Hide All" hs-hide-all :help "Hide all the blocks in the buffer"] ["Show All" hs-show-all :help "Show all the blocks in the buffer"] ["Hide Level" hs-hide-level :help "Hide all block at levels below the current block"] ["Toggle Hiding" hs-toggle-hiding :help "Toggle the hiding state of the current block"] "----" ["Hide comments when hiding all" (setq hs-hide-comments-when-hiding-all (not hs-hide-comments-when-hiding-all)) :help "If t also hide comment blocks when doing `hs-hide-all'" :style toggle :selected hs-hide-comments-when-hiding-all] ("Reveal on isearch" ["Code blocks" (setq hs-isearch-open 'code) :help "Show hidden code blocks when isearch matches inside them" :active t :style radio :selected (eq hs-isearch-open 'code)] ["Comment blocks" (setq hs-isearch-open 'comment) :help "Show hidden comment blocks when isearch matches inside them" :active t :style radio :selected (eq hs-isearch-open 'comment)] ["Code and Comment blocks" (setq hs-isearch-open t) :help "Show both hidden code and comment blocks when isearch matches inside them" :active t :style radio :selected (eq hs-isearch-open t)] ["None" (setq hs-isearch-open nil) :help "Do not hidden code or comment blocks when isearch matches inside them" :active t :style radio :selected (eq hs-isearch-open nil)]))) #@122 Regexp for beginning of comments. Differs from mode-specific comment regexps in that surrounding whitespace is stripped. (defvar hs-c-start-regexp nil (#$ . 6929)) (make-variable-buffer-local 'hs-c-start-regexp) #@32 Regexp for beginning of block. (defvar hs-block-start-regexp nil (#$ . 7147)) (make-variable-buffer-local 'hs-block-start-regexp) #@225 Element in `hs-block-start-regexp' match data to consider as block start. The internal function `hs-forward-sexp' moves point to the beginning of this element (using `match-beginning') before calling `hs-forward-sexp-func'. (defvar hs-block-start-mdata-select nil (#$ . 7284)) (make-variable-buffer-local 'hs-block-start-mdata-select) #@26 Regexp for end of block. (defvar hs-block-end-regexp nil (#$ . 7625)) (make-variable-buffer-local 'hs-block-end-regexp) #@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 (#$ . 7752)) (make-variable-buffer-local 'hs-forward-sexp-func) #@691 Function used to tweak the block beginning. The block is hidden from the position returned by this function, as opposed to hiding it from the position returned when searching for `hs-block-start-regexp'. For example, 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 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 (#$ . 8179)) (make-variable-buffer-local 'hs-adjust-block-beginning) #@369 Text of the line where a hidden block begins, set during isearch. You can display this in the mode line by adding the symbol `hs-headline' to the variable `mode-line-format'. For example, (unless (memq 'hs-headline mode-line-format) (setq mode-line-format (append '("-" hs-headline) mode-line-format))) Note that `mode-line-format' is buffer-local. (defvar hs-headline nil (#$ . 8983)) #@119 Delete hideshow overlays in region defined by FROM and TO. Skip "internal" overlays if `hs-allow-nesting' is non-nil. (defalias 'hs-discard-overlays #[(from to) " W\203\n \n\203/ \305\306 !\211V\205- \307 !\211\203 \310!\311!\210\202 )\207\312 \"\305\211\205P \f@\313\314\"\203H \311!\210\fA\211\204: \305*\207" [to from hs-allow-nesting ov --dolist-tail-- nil next-overlay-change hs-overlay-at overlay-end delete-overlay overlays-in overlay-get hs] 4 (#$ . 9395)]) #@656 Return a new overlay in region defined by B and E with type KIND. KIND is either `code' or `comment'. Optional fourth arg B-OFFSET when added to B specifies the actual buffer position where the block begins. Likewise for optional fifth arg E-OFFSET. If unspecified they are taken to be 0 (zero). The following properties are set in the overlay: 'invisible 'hs 'hs-b-offset 'hs-e-offset. Also, depending on variable `hs-isearch-open', the following properties may be present: 'isearch-open-invisible 'isearch-open-invisible-temporary. If variable `hs-set-up-overlay' is non-nil it should specify a function to call with the newly initialized overlay. (defalias 'hs-make-overlay #[(b e kind &optional b-offset e-offset) "\204 \306 \204\f \306\307\n\"\f\310=\203 \311\202 \f\312\313\314#\210\312\314#\210\312\315#\210\312\316 #\210 \317=\204H =\203V \312\320\321#\210\312\322\323#\210\203a !\210*\207" [b-offset e-offset b e hs-isearch-open io 0 make-overlay block code overlay-put invisible hs hs-b-offset hs-e-offset t isearch-open-invisible hs-isearch-show isearch-open-invisible-temporary hs-isearch-show-temporary ov kind hs-set-up-overlay] 4 (#$ . 9889)]) #@141 Delete overlay OV, and set `hs-headline' to nil. This function is meant to be used as the `isearch-open-invisible' property of an overlay. (defalias 'hs-isearch-show #[(ov) "\302\303 !\207" [hs-headline ov nil delete-overlay] 2 (#$ . 11096)]) #@339 Hide or show overlay OV, and set `hs-headline', all depending on HIDE-P. If HIDE-P is non-nil, `hs-headline' is set to nil and overlay OV is hidden. Otherwise, `hs-headline' is set to the line of text at the head of OV, and OV is shown. This function is meant to be used as the `isearch-open-invisible-temporary' property of an overlay. (defalias 'hs-isearch-show-temporary #[(ov hide-p) "?\205 \206 \305\n!\212b\210\306 \210\307\310w\210`){)\311 \210\310\203? \312\n\313\"\211\203T \314\n\315\f#\210\314\n\313\310#\210\202T \312\n\315\"\211\203T \314\n\313\f#\210\314\n\315\310#\210)\314\n\316\205] \317#\207" [hide-p hs-headline ov start value overlay-start beginning-of-line " " nil force-mode-line-update overlay-get hs-isearch-display overlay-put display invisible hs] 4 (#$ . 11348)]) #@52 Return non-nil if the point is at the block start. (defalias 'hs-looking-at-block-start-p #[nil "\302!\205 \303 \304\216\305\306 8*?\207" [hs-block-start-regexp save-match-data-internal looking-at match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) 8 syntax-ppss] 2 (#$ . 12160)]) #@119 Adjust point based on MATCH-DATA and call `hs-forward-sexp-func' w/ ARG. Original match data is restored upon return. (defalias 'hs-forward-sexp #[(match-data arg) "\301 \305\216\306 !\210\n\224b\210\f!*\207" [save-match-data-internal match-data hs-block-start-mdata-select hs-forward-sexp-func arg ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) set-match-data] 2 (#$ . 12496)]) #@105 Hide a region from BEG to END, marking it as a comment. Optional arg REPOS-END means reposition at end. (defalias 'hs-hide-comment-region #[(beg end &optional repos-end) "b\210\305 b\210\305 \306\n\"\210\307\n\310 %\210*\f\203\"