;ELC ;;; compiled by jimb@geech.gnu.ai.mit.edu on Mon Jul 5 22:10:28 1993 ;;; from file /gd/gnu/emacs/19.0/lisp/allout.el ;;; emacs version 19.15.16. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19")) (provide (quote outline)) (defvar outline-header-prefix "." "\ * Leading string for greater than level 0 topic headers.") (make-variable-buffer-local (quote outline-header-prefix)) (defvar outline-header-subtraction (byte-code "GS" [outline-header-prefix] 1) "\ * Leading string for greater than level 0 topic headers.") (byte-code "!! !" [make-variable-buffer-local outline-header-subtraction boundp outline-primary-bullet "*"] 2) (defvar outline-plain-bullets-string "" "\ * The bullets normally used in outline topic prefixes. See 'outline-distinctive-bullets-string' for the other kind of bullets. DO NOT include the close-square-bracket, ']', among any bullets. You must run 'set-outline-regexp' in order for changes to the value of this var to effect outline-mode operation.") (byte-code "P!" [outline-primary-bullet "+-:.;," outline-plain-bullets-string make-variable-buffer-local] 2) (defvar outline-distinctive-bullets-string "" "\ * The bullets used for distinguishing outline topics. These bullets are not offered among the regular rotation, and are not changed when automatically rebulleting, as when shifting the level of a topic. See 'outline-plain-bullets-string' for the other kind of bullets. DO NOT include the close-square-bracket, ']', among any bullets. You must run 'set-outline-regexp' in order for changes to the value of this var to effect outline-mode operation.") (byte-code "!" ["=>([{}&!?#%\"X@$~" outline-distinctive-bullets-string make-variable-buffer-local] 2) (defvar outline-numbered-bullet nil "\ * Bullet signifying outline prefixes which are to be numbered. Leave it nil if you don't want any numbering, or set it to a string with the bullet you want to be used.") (byte-code "!" ["#" outline-numbered-bullet make-variable-buffer-local] 2) (defvar outline-file-xref-bullet "@" "\ * Set this var to the bullet you want to use for file cross-references. Set it 'nil' if you want to inhibit this capability.") (defvar outline-stylish-prefixes t "\ *A true value for this var makes the topic-prefix creation and modification functions vary the prefix bullet char according to level. Otherwise, only asterisks ('*') and distinctive bullets are used. This is how an outline can look with stylish prefixes: * Top level .* A topic . + One level 3 subtopic . . One level 4 subtopic . + Another level 3 subtopic . . A level 4 subtopic . #2 A distinguished, numbered level 4 subtopic . ! A distinguished ('!') level 4 subtopic . #4 Another numbered level 4 subtopic This would be an outline with stylish prefixes inhibited: * Top level .* A topic .! A distinctive (but measly) subtopic . * A sub-subtopic - no bullets from outline-plain-bullets-string but '*' Stylish and constant prefixes (as well as old-style prefixes) are always respected by the topic maneuvering functions, regardless of this variable setting. The setting of this var is not relevant when outline-old-style-prefixes is t.") (make-variable-buffer-local (quote outline-stylish-prefixes)) (defvar outline-old-style-prefixes nil "\ *Setting this var causes the topic-prefix creation and modification functions to make only asterix-padded prefixes, so they look exactly like the old style prefixes. Both old and new style prefixes are always respected by the topic maneuvering functions.") (make-variable-buffer-local (quote outline-old-style-prefixes)) (defvar outline-enwrap-isearch-mode "isearch-mode.el" "\ * Set this var to the name of the (non-compiled) elisp code for isearch-mode, if you have Dan LaLiberte's 'isearch-mode' stuff and want isearches to reveal hidden stuff encountered in the course of a search, and reconceal it if you go past. Set it nil if you don't have the package, or don't want to use this feature.") (defvar outline-use-hanging-indents t "\ * Set this var non-nil if you have Kyle E Jones' filladapt stuff, and you want outline to fill topics as hanging indents to the bullets.") (make-variable-buffer-local (quote outline-use-hanging-indents)) (defvar outline-reindent-bodies t "\ * Set this var non-nil if you want topic depth adjustments to reindent hanging bodies (ie, bodies lines indented to beginning of heading text). The performance hit is small. Avoid this strenuously when using outline mode on program code. It's great for text, though.") (make-variable-buffer-local (quote outline-reindent-bodies)) (defvar outline-mode-keys nil "\ Assoc list of outline-mode-keybindings, for common reference in setting up major and minor-mode keybindings.") (byte-code "‡" [(("" outline-next-visible-heading) ("" outline-previous-visible-heading) ("" outline-up-current-level) ("" outline-forward-current-level) ("" outline-backward-current-level) ("" outline-beginning-of-current-entry) ("" outline-end-of-current-entry) (" " outline-show-current-children) ("" outline-show-current-subtree) ("" outline-hide-current-subtree) ("" outline-show-current-entry) ("!" outline-show-all) (" " open-sibtopic) ("." open-subtopic) ("," open-supertopic) ("'" outline-shift-in) (">" outline-shift-in) ("<" outline-shift-out) (" " outline-rebullet-topic) ("b" outline-rebullet-current-heading) ("#" outline-number-siblings) (" " outline-kill-line) ("" outline-yank) ("" outline-yank-pop) (" " outline-kill-topic) ("@" outline-resolve-xref) ("c" outline-copy-exposed)) outline-mode-keys nil] 1) (defvar outline-regexp "" "\ * Regular expression to match the beginning of a heading line. Any line whose beginning matches this regexp is considered a heading. This var is set according to the user configuration vars by set-outline-regexp.") (make-variable-buffer-local (quote outline-regexp)) (defvar outline-bullets-string "" "\ A string dictating the valid set of outline topic bullets. This var should *not* be set by the user - it is set by 'set-outline-regexp', and is composed from the elements of 'outline-plain-bullets-string' and 'outline-distinctive-bullets-string'.") (make-variable-buffer-local (quote outline-bullets-string)) (defvar outline-line-boundary-regexp nil "\ outline-regexp with outline-style beginning of line anchor (ie, C-j, *or* C-m, for prefixes of hidden topics). This is properly set when outline-regexp is produced by 'set-outline-regexp', so that (match-beginning 2) and (match-end 2) delimit the prefix.") (make-variable-buffer-local (quote outline-line-boundary-regexp)) (defvar outline-bob-regexp nil "\ Like outline-line-boundary-regexp, this is an outline-regexp for outline headers at the beginning of the buffer. (match-beginning 2) and (match-end 2) delimit the prefix.") (make-variable-buffer-local (quote outline-line-bob-regexp)) (defalias 'outline-reset-header-lead #[(header-lead) "GS " [header-lead outline-header-prefix outline-header-subtraction set-outline-regexp] 2 "\ * Reset the leading string used to identify topic headers." "sNew lead string: "]) (defalias 'outline-lead-with-comment-string #[(&optional header-lead) "; !!" [header-lead read-string "String prefix for topic headers: " nil outline-reindent-bodies outline-reset-header-lead] 2 "\ * Set the topic-header leading string to specified string. Useful when for encapsulating outline structure in programming language comments. Returns the leading string." "P"]) (defalias 'set-outline-regexp #[nil "Dĉ \nh\n@J GW_ H  =C΂T =NT !!PT*\nA\n.\nGGS ٰQQ" ["" outline-bullets-string outline-plain-bullets-string outline-distinctive-bullets-string nil new-string index cur-char-string cur-len cur-string strings 0 cur-char 45 "--" 93 regexp-quote char-to-string outline-plain-bullets-string-len outline-header-prefix outline-header-subtraction "\\(\\" "[ ]*[" "]\\)\\|\\" outline-primary-bullet "+\\| " outline-regexp "\\([\n ]\\)\\(" "\\)" outline-line-boundary-regexp "\\(\\`\\)\\(" outline-bob-regexp] 8 "\ Generate proper topic-header regexp form for outline functions, from outline-plain-bullets-string and outline-distinctive-bullets-string." nil]) (defvar outline-mode-map nil "\ ") (byte-code "9 \n########" [outline-mode-map make-sparse-keymap text-mode-map define-key "" outline-next-visible-heading "" outline-previous-visible-heading " " show-children "" show-subtree "" hide-subtree "" outline-up-heading "" outline-forward-same-level "" outline-backward-same-level] 4) (defvar outline-minor-mode nil "\ Non-nil if using Outline mode as a minor mode of some other mode.") (byte-code "!#C\"!  /   \"#? BBʇ" [make-variable-buffer-local outline-minor-mode put permanent-local t append minor-mode-alist (outline-minor-mode " Outl") boundp outline-minor-mode-map nil make-sparse-keymap define-key "" lookup-key outline-mode-map minor-mode-map-alist] 6) (defalias 'outline-minor-mode #[(&optional arg) " ?!V!ȉ" [arg outline-minor-mode prefix-numeric-value 0 t selective-display run-hooks outline-minor-mode-hook nil] 3 "\ Toggle Outline minor mode. With arg, turn Outline minor mode on if arg is positive, off otherwise. See the command `outline-mode' for more information on this mode." "P"]) (defalias 'minor-bind-keys #[(keys-assoc) "  ‰K@@ @A@ !9/  ! E B #A! -" [current-local-map make-sparse-keymap nil prevailing-func unbinding-registry new-func key local-map keys-assoc curr-key local-key-binding define-key use-local-map] 6 "\ Establish BINDINGS assoc list in current buffer, returning a list for subsequent use by minor-unbind-keys to resume overloaded local bindings." nil]) (defalias 'minor-relinquish-keys #[(unbinding-registry) "G@@ A@ AA@ ! :\n3 \n\"> !> BA -" [nil curr-relinquish curr-resume curr-key curr-item residue unbinding-registry local-key-binding local-set-key local-unset-key] 6 "\ Given registry of MODAL-BINDINGS, as produced by minor-bind-keys, resume the former local keybindings of those keys that retain the local bindings set by minor-bind-keys. Changed local bindings are left alone, so other minor (user or modal) bindings are not disrupted. Returns a list of those registrations which were not, because of tampering subsequent to the registration by minor-bind-keys, resumed." nil]) (defvar outline-minor-prior-keys nil "\ Former key bindings assoc-list, for resumption from outline minor-mode.") (make-variable-buffer-local (quote outline-minor-prior-keys)) (defalias 'outline-minor-bind-keys #[nil " !" [minor-bind-keys outline-mode-keys outline-minor-prior-keys] 2 "\ Establish outline-mode keybindings as MINOR modality of current buffer."]) (defalias 'outline-minor-relinquish-keys #[nil " !" [minor-relinquish-keys outline-minor-prior-keys] 2 "\ Resurrect local keybindings as they were before outline-minor-bind-keys."]) (defvar outline-mode-prior-settings nil "\ For internal use by outline mode, registers settings to be resumed on mode deactivation.") (make-variable-buffer-local (quote outline-mode-prior-settings)) (defalias 'outline-resumptions #[(name &optional value) "  # !JCD B @L^ ??^ A@9 @L=! Y @ =R @B AD)*" [name outline-mode-prior-settings nil prior-capsule on-list value boundp makunbound rebuild] 4 "\ Registers information for later reference, or performs resumption of outline-mode specific values. First arg is NAME of variable affected. optional second arg is list containing outline-mode-specific VALUE to be impose on named variable, and to be registered. (It's a list so you can specify registrations of null values.) If no value is specified, the registered value is returned (encapsulated in the list, so the caller can distinguish nil vs no value), and the registration is popped from the list."]) (defvar outline-mode nil "\ Allout outline mode minor-mode flag.") (make-variable-buffer-local (quote outline-mode)) (defalias 'outline-mode #[(&optional toggle) "!   < @ + 9+ !+ U?R\n9 R !!!!͉\n? \"\"qB ! RC\"! RC\" !QBBB!+" [boundp outline-mode active toggle natnump 0 explicit-activation outline-minor-relinquish-keys outline-resumptions selective-display indent-tabs-mode paragraph-start paragraph-separate nil outline-minor-bind-keys (t) (nil) minor-mode-alist (outline-mode " Outline") set-outline-regexp make-local-variable "\\|^\\(" outline-regexp "\\)" outline-enwrap-isearch-mode outline-enwrap-isearch outline-use-hanging-indents filladapt-prefix-table "\\(" "\\) " filladapt-hanging-list filladapt-hanging-list-prefixes run-hooks outline-mode-hook t] 7 "\ Set minor mode for editing outlines with selective display. Look below the description of the bindings for explanation of the terminology use in outline-mode commands. (Note - this is not a proper minor mode, because it does affect key bindings. It's not too improper, however, because it does resurrect any bindings which have not been tampered with since it changed them.) Exposure Commands Movement Commands C-c C-h outline-hide-current-subtree C-c C-n outline-next-visible-heading C-c C-i outline-show-current-children C-c C-p outline-previous-visible-heading C-c C-s outline-show-current-subtree C-c C-u outline-up-current-level C-c C-o outline-show-current-entry C-c C-f outline-forward-current-level C-c ! outline-show-all C-c C-b outline-backward-current-level outline-hide-current-leaves C-c C-e outline-end-of-current-entry C-c C-a outline-beginning-of-current-entry Topic Header Generation Commands C-c open-sibtopic Create a new sibling after current topic C-c . open-subtopic ... an offspring of current topic C-c , open-supertopic ... a sibling of the current topic's parent Level and Prefix Adjustment Commands C-c > outline-shift-in Shift current topic and all offspring deeper C-c < outline-shift-out ... less deep C-c outline-rebullet-topic Reconcile bullets of topic and its offspring - distinctive bullets are not changed, all others set suitable according to depth C-c b outline-rebullet-current-heading Prompt for alternate bullet for current topic C-c # outline-number-siblings Number bullets of topic and siblings - the offspring are not affected. With repeat count, revoke numbering. Killing and Yanking - all keep siblings numbering reconciled as appropriate C-k outline-kill-line Regular kill line, but respects numbering ,etc C-c C-k outline-kill-topic Kill current topic, including offspring C-y outline-yank Yank, adjusting depth of yanked topic to depth of heading if yanking into bare topic heading (ie, prefix sans text) M-y outline-yank-pop Is to outline-yank as yank-pop is to yank Misc commands C-c @ outline-resolve-xref pop-to-buffer named by xref (cf outline-file-xref-bullet) C-c c outline-copy-exposed Copy outline sans all hidden stuff to another buffer whose name is derived from the current one - \"XXX exposed\" M-x outlinify-sticky Activate outline mode for current buffer and establish -*- outline -*- mode specifier as well as file local vars to automatically set exposure. Try it. Terminology Topic: A basic cohesive component of an emacs outline, which can be closed (made hidden), opened (revealed), generated, traversed, and shifted as units, using outline-mode functions. A topic is composed of a HEADER, a BODY, and SUBTOPICs (see below). Exposure: Hidden (~closed~) topics are represented by ellipses ('...') at the end of the visible SUPERTOPIC which contains them, rather than by their actual text. Hidden topics are still susceptible to editing and regular movement functions, they just are not displayed normally, effectively collapsed into the ellipses which represent them. Outline mode provides the means to selectively expose topics based on their NESTING. SUBTOPICS of a topic can be hidden and subsequently revealed based on their DEPTH relative to the supertopic from which the exposure is being done. The BODIES of a topic do not generally become visible except during exposure of entire subtrees (see documentation for '-current-subtree'), or when the entry is explicitly exposed with the 'outline-show-entry' function, or (if you have a special version of isearch installed) when encountered by incremental searches. The CURRENT topic is the more recent visible one before or including the text cursor. Header: The initial portion of an outline topic. It is composed of a topic header PREFIX at the beginning of the line, followed by text to the end of the EFFECTIVE LINE. Body: Any subsequent lines of text following a topic header and preceding the next one. This is also referred to as the entry for a topic. Prefix: The text which distinguishes topic headers from normal text lines. There are two forms, both of which start at the beginning of the topic header (EFFECTIVE) line. The length of the prefix represents the DEPTH of the topic. The fundamental sort begins either with solely an asterisk ('*') or else dot ('.') followed by zero or more spaces and then an outline BULLET. [Note - you can now designate your own, arbitrary HEADER-LEAD string, by setting the variable 'outline-header-prefix'.] The second form is for backwards compatibility with the original emacs outline mode, and consists solely of asterisks. Both sorts are recognized by all outline commands. The first sort is generated by outline topic production commands if the emacs variable outline-old-style-prefixes is nil, otherwise the second style is used. Bullet: An outline prefix bullet is one of the characters on either of the outline bullet string vars, 'outline-plain-bullets-string' and 'outline-distinctive-bullets-string'. (See their documentation for more details.) The default choice of bullet for any prefix depends on the DEPTH of the topic. Depth and Nesting: The length of a topic header prefix, from the initial character to the bullet (inclusive), represents the depth of the topic. A topic is considered to contain the subsequent topics of greater depth up to the next topic of the same depth, and the contained topics are recursively considered to be nested within all containing topics. Contained topics are called subtopics. Immediate subtopics are called 'children'. Containing topics are supertopicsimmediate supertopics are 'parents'. Contained topics of the same depth are called siblings. Effective line: The regular ascii text in which form outlines are saved are manipulated in outline-mode to engage emacs' selective-display faculty. The upshot is that the effective end of an outline line can be terminated by either a normal Unix newline char, , or the special outline-mode eol, ^M. This only matters at the user level when you're doing searches which key on the end of line character." "P"]) (defvar outline-recent-prefix-beginning 0 "\ Buffer point of the start of the last topic prefix encountered.") (make-variable-buffer-local (quote outline-recent-prefix-beginning)) (defvar outline-recent-prefix-end 0 "\ Buffer point of the end of the last topic prefix encountered.") (make-variable-buffer-local (quote outline-recent-prefix-end)) (defalias 'outline-flag-region #[(from to flag) " Uǂ %)" [nil buffer-read-only subst-char-in-region from to flag 10 13 t] 6 "\ Hides or shows lines from FROM to TO, according to FLAG. Uses emacs selective-display, where text is show if FLAG put at beginning of line is `\\n' (newline character), while text is hidden if FLAG is `\\^M' (control-M). returns nil iff no changes were effected."]) (defalias (quote outline-flag-current-subtree) #[(flag) " ` ` #)" [outline-back-to-current-heading outline-flag-region outline-end-of-current-subtree flag] 4]) (defalias 'outline-hide-current-entry #[nil " ` `#)" [outline-back-to-current-heading outline-flag-region outline-end-of-current-entry 13] 4 "\ Hide the body directly following this heading." nil]) (defalias 'outline-show-current-entry #[(&optional arg) " ` `#)" [arg outline-hide-current-entry outline-flag-region outline-end-of-current-entry 10] 4 "\ Show body directly following this heading, or hide it if repeat count." "P"]) (defalias 'outline-show-entry #[nil " o`S` `#)" [outline-goto-prefix outline-flag-region outline-pre-next-preface 10] 4 "\ Like outline-show-current-entry, but reveals an entry that is nested within hidden topics." nil]) (defalias 'outline-hide-current-entry-completely #[nil " o`S` !``S#)" [outline-goto-prefix outline-flag-region outline-pre-next-preface looking-at " " 13] 4 "\ Like outline-hide-current-entry, but conceal topic completely." nil]) (defalias 'outline-show-current-subtree #[nil "!" [outline-flag-current-subtree 10] 2 "\ Show everything after this heading at deeper levels." nil]) (defalias 'outline-hide-current-subtree #[(&optional just-close) " `)!\n\nb`)U- ?-\"- )" [nil outline-goto-prefix orig-eol outline-flag-current-subtree 13 just-close outline-up-current-level 1 t outline-hide-current-subtree] 3 "\ Hide everything after this heading at deeper levels, or if it's already closed, and optional arg JUST-CLOSE is nil, hide the current level." nil]) (defalias 'outline-show-current-branches #[nil "!" [outline-show-current-children 1000] 2 "\ Show all subheadings of this heading, but not their bodies." nil]) (defalias 'outline-hide-current-leaves #[nil " ` `\"" [outline-back-to-current-heading outline-hide-region-body outline-end-of-current-subtree] 3 "\ Hide all body after this heading at deeper levels." nil]) (defalias 'outline-show-current-children #[(&optional level) "y \\` `T}ebm?K K X`Tuh>@u`#**" [level 1 0 outline-back-to-current-heading outline-recent-depth outline-end-of-current-subtree outline-next-heading end -1 (10 13) outline-flag-region 10] 4 "\ Show all direct subheadings of this heading. Optional LEVEL specifies how many levels below the current level should be shown." "p"]) (defalias 'outline-show-all #[nil "ed#" [outline-flag-region 10] 4 "\ Show all of the text in the buffer." nil]) (defalias 'outline-hide-bodies #[nil "ed\"" [outline-hide-region-body] 3 "\ Hide all of buffer except headings." nil]) (defalias 'outline-hide-region-body #[(start end) " }ebm?+` `#m !%ǂ&u *" [start end outline-flag-region outline-pre-next-preface 13 looking-at "[\n ][\n ]" 2 1] 4 "\ Hide all body lines in the region, but not headings."]) (defalias 'outline-expose #[(spec &rest followers) " ` z 9& = =z z K U8!z VD [ !z