Commit 9179616f authored by Dave Love's avatar Dave Love
Browse files

New version from Manheimer.

parent 3091c2a6
;;; allout.el --- Extensive outline mode for use alone and with other modes.
;;;_* allout.el --- Extensive outline mode for use alone and with other modes.
;; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
;; Author: Ken Manheimer <klm@python.org>
;; Maintainer: Ken Manheimer <klm@python.org>
;; Created: Dec 1991 - first release to usenet
;; Version: Id: allout.el,v 4.3 1994/05/12 17:43:08 klm Exp ||
;; Keywords: outlines
;; Version: $Id: allout.el,v 4.35 2000/02/01 15:58:14 klm Exp klm $||
;; Keywords: outline mode wp languages
;; This file is part of GNU Emacs.
......@@ -28,17 +28,28 @@
;;;_* Commentary:
;; Allout outline mode provides extensive outline formatting and
;; manipulation capabilities, subsuming and well beyond that of
;; standard emacs outline mode. It is specifically aimed at
;; supporting outline structuring and manipulation of syntax-
;; sensitive text, eg programming languages. (For an example, see the
;; allout code itself, which is organized in outline structure.)
;;
;; It also includes such things as topic-oriented repositioning, cut, and
;; paste; integral outline exposure-layout; incremental search with
;; dynamic exposure/concealment of concealed text; automatic topic-number
;; maintenance; and many other features.
;;
;; and manipulation beyond standard emacs outline mode. It provides
;; for structured editing of outlines, as well as navigation and
;; exposure. It also provides for syntax-sensitive text like
;; programming languages. (For an example, see the allout code
;; itself, which is organized in ;; an outline framework.)
;;
;; In addition to outline navigation and exposure, allout includes:
;;
;; - topic-oriented repositioning, cut, and paste
;; - integral outline exposure-layout
;; - incremental search with dynamic exposure and reconcealment of hidden text
;; - automatic topic-number maintenance
;; - "Hot-spot" operation, for single-keystroke maneuvering and
;; exposure control. (See the outline-mode docstring.)
;;
;; and many other features.
;;
;; The outline menubar additions provide quick reference to many of
;; the features, and see the docstring of the variable `outline-init'
;; for instructions on priming your emacs session for automatic
;; activation of outline-mode.
;;
;; See the docstring of the variables `outline-layout' and
;; `outline-auto-activation' for details on automatic activation of
;; allout outline-mode as a minor mode. (It has changed since allout
......@@ -47,14 +58,7 @@
;; Note - the lines beginning with `;;;_' are outline topic headers.
;; Just `ESC-x eval-current-buffer' to give it a whirl.
;;Ken Manheimer 301 975-3539
;;ken.manheimer@nist.gov FAX: 301 963-9137
;;
;;Computer Systems and Communications Division
;;
;; Nat'l Institute of Standards and Technology
;; Technology A151
;; Gaithersburg, MD 20899
;; Ken Manheimer klm@python.org
;;;_* Provide
(provide 'outline)
......@@ -69,7 +73,7 @@
;;;_ + Layout, Mode, and Topic Header Configuration
;;;_ = outline-auto-activation
(defvar outline-auto-activation nil
(defcustom outline-auto-activation nil
"*Regulates auto-activation modality of allout outlines - see `outline-init'.
Setq-default by `outline-init' to regulate whether or not allout
......@@ -84,14 +88,19 @@ With value `t', auto-mode-activation and auto-layout are enabled.
With value `ask', auto-mode-activation is enabled, and endorsement for
performing auto-layout is asked of the user each time.
With value `activate', only auto-mode-activation is enabled,
With value `activate', only auto-mode-activation is enabled,
auto-layout is not.
With value `nil', neither auto-mode-activation nor auto-layout are
enabled.
See the docstring for `outline-init' for the proper interface to
this variable.")
this variable."
:type '(choice (const :tag "On" t)
(const :tag "Ask about layout" "ask")
(const :tag "Mode only" "activate")
(const :tag "Off" nil))
:group 'allout)
;;;_ = outline-layout
(defvar outline-layout nil
"*Layout specification and provisional mode trigger for allout outlines.
......@@ -112,18 +121,25 @@ this var via the file's local variables. For example, the following
lines at the bottom of an Emacs Lisp file:
;;;Local variables:
;;;outline-layout: \(0 : -1 -1 0\)
;;;outline-layout: \(0 : -1 -1 0)
;;;End:
will, modulo the above-mentioned conditions, cause the mode to be
activated when the file is visited, followed by the equivalent of
`\(outline-expose-topic 0 : -1 -1 0\)'. \(This is the layout used for
`\(outline-expose-topic 0 : -1 -1 0)'. \(This is the layout used for
the allout.el, itself.)
Also, allout's mode-specific provisions will make topic prefixes default
to the comment-start string, if any, of the language of the file. This
is modulo the setting of `outline-use-mode-specific-leader', which see.")
(make-variable-buffer-local 'outline-layout)
;;;_ = outline-show-bodies
(defcustom outline-show-bodies nil
"*If non-nil, show entire body when exposing a topic, rather than
just the header."
:type 'boolean
:group 'allout)
(make-variable-buffer-local 'outline-show-bodies)
;;;_ = outline-header-prefix
(defcustom outline-header-prefix "."
......@@ -153,8 +169,7 @@ bullets."
:group 'allout)
(make-variable-buffer-local 'outline-primary-bullet)
;;;_ = outline-plain-bullets-string
(defcustom outline-plain-bullets-string (concat outline-primary-bullet
"+-:.;,")
(defcustom outline-plain-bullets-string ".:,;"
"*The bullets normally used in outline topic prefixes.
See `outline-distinctive-bullets-string' for the other kind of
......@@ -168,16 +183,31 @@ of this var to take effect."
:group 'allout)
(make-variable-buffer-local 'outline-plain-bullets-string)
;;;_ = outline-distinctive-bullets-string
(defcustom outline-distinctive-bullets-string "=>([{}&!?#%\"X@$~\\"
(defcustom outline-distinctive-bullets-string "*+-=>([{}&!?#%\"X@$~_\\"
"*Persistent outline header bullets used to distinguish special topics.
These bullets are not offered among the regular, level-specific
rotation, and are not altered by automatic rebulleting, as when
shifting the level of a topic. See `outline-plain-bullets-string' for
the selection of alternating bullets.
These bullets are used to distinguish topics from the run-of-the-mill
ones. They are not used in the standard topic headers created by
the topic-opening, shifting, and rebulleting \(eg, on topic shift,
topic paste, blanket rebulleting) routines, but are offered among the
choices for rebulleting. They are not altered by the above automatic
rebulleting, so they can be used to characterize topics, eg:
`?' question topics
`\(' parenthetic comment \(with a matching close paren inside)
`[' meta-note \(with a matching close ] inside)
`\"' a quote
`=' value settings
`~' \"more or less\"
... just for example. (`#' typically has a special meaning to the
software, according to the value of `outline-numbered-bullet'.)
See `outline-plain-bullets-string' for the selection of
alternating bullets.
You must run `set-outline-regexp' in order for changes
to the value of this var to effect outline-mode operation.
You must run `set-outline-regexp' in order for outline mode to
reconcile to changes of this value.
DO NOT include the close-square-bracket, `]', on either of the bullet
strings."
......@@ -197,17 +227,17 @@ String values are used as they stand.
Value `t' means to first check for assoc value in `outline-mode-leaders'
alist, then use comment-start string, if any, then use default \(`.').
\(See note about use of comment-start strings, below.\)
\(See note about use of comment-start strings, below.)
Set to the symbol for either of `outline-mode-leaders' or
`comment-start' to use only one of them, respectively.
Value `nil' means to always use the default \(`.'\).
Value `nil' means to always use the default \(`.').
comment-start strings that do not end in spaces are tripled, and an
`_' underscore is tacked on the end, to distinguish them from regular
comment strings. comment-start strings that do end in spaces are not
tripled, but an underscore is substituted for the space. [This
tripled, but an underscore is substituted for the space. [This
presumes that the space is for appearance, not comment syntax. You
can use `outline-mode-leaders' to override this behavior, when
incorrect.]"
......@@ -219,7 +249,7 @@ incorrect.]"
(defvar outline-mode-leaders '()
"Specific outline-prefix leading strings per major modes.
Entries will be used in the stead (or lieu) of mode-specific
Entries will be used instead or in lieu of mode-specific
comment-start strings. See also `outline-use-mode-specific-leader'.
If you're constructing a string that will comment-out outline
......@@ -302,11 +332,26 @@ disables numbering maintenance."
(defcustom outline-file-xref-bullet "@"
"*Bullet signifying file cross-references, for `outline-resolve-xref'.
Set this var to the bullet you want to use for file cross-references.
Set it to nil if you want to inhibit this capability."
Set this var to the bullet you want to use for file cross-references."
:type '(choice (const nil) string)
:group 'allout)
;;;_ = outline-presentation-padding
(defcustom outline-presentation-padding 2
"*Presentation-format white-space padding factor, for greater indent."
:type 'integer
:group 'allout)
(make-variable-buffer-local 'outline-presentation-padding)
;;;_ = outline-abbreviate-flattened-numbering
(defcustom outline-abbreviate-flattened-numbering nil
"*If non-nil, `outline-flatten-exposed-to-buffer' abbreviates topic
numbers to minimal amount with some context. Otherwise, entire
numbers are always used."
:type 'boolean
:group 'allout)
;;;_ + LaTeX formatting
;;;_ - outline-number-pages
(defcustom outline-number-pages nil
......@@ -352,20 +397,23 @@ formatted copy."
;;;_ + Miscellaneous customization
;;;_ = outline-command-prefix
(defcustom outline-command-prefix "\C-c"
"*Key sequence to be used as prefix for outline mode command key bindings."
:type 'string
:group 'allout)
;;;_ = outline-keybindings-list
;;; You have to reactivate outline-mode - `(outline-mode t)' - to
;;; institute changes to this var.
(defvar outline-keybindings-list ()
"*List of outline-mode key / function bindings.
"*List of outline-mode key / function bindings, for outline-mode-map.
These bindings will be locally bound on the outline-mode-map. The
keys will be prefixed by outline-command-prefix, unless the cell
contains a third, no-nil element, in which case the initial string
will be used as is.")
String or vector key will be prefaced with outline-command-prefix,
unless optional third, non-nil element is present.")
(setq outline-keybindings-list
'(
; Motion commands:
("?t" outline-latexify-exposed)
("\C-n" outline-next-visible-heading)
("\C-p" outline-previous-visible-heading)
("\C-u" outline-up-current-level)
......@@ -373,8 +421,6 @@ will be used as is.")
("\C-b" outline-backward-current-level)
("\C-a" outline-beginning-of-current-entry)
("\C-e" outline-end-of-current-entry)
;;("\C-n" outline-next-line-or-topic)
;;("\C-p" outline-previous-line-or-topic)
; Exposure commands:
("\C-i" outline-show-children)
("\C-s" outline-show-current-subtree)
......@@ -396,24 +442,20 @@ will be used as is.")
("\M-y" outline-yank-pop t)
("\C-k" outline-kill-topic)
; Miscellaneous commands:
("\C-@" outline-mark-topic)
;([?\C-\ ] outline-mark-topic)
("@" outline-resolve-xref)
("?c" outline-copy-exposed)))
;;;_ = outline-command-prefix
(defcustom outline-command-prefix "\C-c"
"*Key sequence to be used as prefix for outline mode command key bindings."
:type 'string
:group 'allout)
;;;_ = outline-enwrap-isearch-mode
(defcustom outline-enwrap-isearch-mode t
"*Set non-nil to enable automatic exposure of concealed isearch targets.
If non-nil, isearch will expose hidden text encountered in the course
of a search, and to reconceal it if the search is continued past it."
("=c" outline-copy-exposed-to-buffer)
("=i" outline-indented-exposed-to-buffer)
("=t" outline-latexify-exposed)
("=p" outline-flatten-exposed-to-buffer)))
;;;_ = outline-isearch-dynamic-expose
(defcustom outline-isearch-dynamic-expose t
"*Non-nil enable dynamic exposure of hidden incremental-search
targets as they're encountered."
:type 'boolean
:group 'allout)
(make-variable-buffer-local 'outline-isearch-dynamic-expose)
;;;_ = outline-use-hanging-indents
(defcustom outline-use-hanging-indents t
......@@ -461,16 +503,16 @@ behavior."
;;;_* CODE - no user customizations below.
;;;_ #1 Internal Outline Formatting and Configuration
;;;_ - Version
;;;_ #1 Internal Outline Formatting and Configuration
;;;_ : Version
;;;_ = outline-version
(defvar outline-version
(let ((rcs-rev "Revision: 4.3"))
(let ((rcs-rev "$Revision: 4.35 $"))
(condition-case err
(save-match-data
(string-match "Revision: \\([0-9]+\\.[0-9]+\\)" rcs-rev)
(substring rcs-rev (match-beginning 1) (match-end 1)))
(error rcs-rev)))
('error rcs-rev)))
"Revision number of currently loaded outline package. \(allout.el)")
;;;_ > outline-version
(defun outline-version (&optional here)
......@@ -480,7 +522,7 @@ behavior."
(if here (insert-string msg))
(message "%s" msg)
msg))
;;;_ - Topic header format
;;;_ : Topic header format
;;;_ = outline-regexp
(defvar outline-regexp ""
"*Regular expression to match the beginning of a heading line.
......@@ -512,7 +554,7 @@ that (match-beginning 2) and (match-end 2) delimit the prefix.")
;;;_ = outline-bob-regexp
(defvar outline-bob-regexp ()
"Like outline-line-boundary-regexp, for headers at beginning of buffer.
\(match-beginning 2) and (match-end 2) delimit the prefix.")
\(match-beginning 2) and \(match-end 2) delimit the prefix.")
(make-variable-buffer-local 'outline-bob-regexp)
;;;_ = outline-header-subtraction
(defvar outline-header-subtraction (1- (length outline-header-prefix))
......@@ -556,7 +598,7 @@ Works according to settings of:
`outline-use-mode-specific-leader'
and `outline-mode-leaders'.
Apply this via \(re\)activation of `outline-mode', rather than
Apply this via \(re)activation of `outline-mode', rather than
invoking it directly."
(let* ((use-leader (and (boundp 'outline-use-mode-specific-leader)
(if (or (stringp outline-use-mode-specific-leader)
......@@ -617,7 +659,8 @@ Works with respect to `outline-plain-bullets-string' and
;; Derive outline-bullets-string from user configured components:
(setq outline-bullets-string "")
(let ((strings (list 'outline-plain-bullets-string
'outline-distinctive-bullets-string))
'outline-distinctive-bullets-string
'outline-primary-bullet))
cur-string
cur-len
cur-char
......@@ -660,7 +703,7 @@ Works with respect to `outline-plain-bullets-string' and
(setq outline-bob-regexp
(concat "\\(\\`\\)\\(" outline-regexp "\\)"))
)
;;;_ - Key bindings
;;;_ : Key bindings
;;;_ = outline-mode-map
(defvar outline-mode-map nil "Keybindings for (allout) outline minor mode.")
;;;_ > produce-outline-mode-map (keymap-alist &optional base-map)
......@@ -669,13 +712,18 @@ Works with respect to `outline-plain-bullets-string' and
Built on top of optional BASE-MAP, or empty sparse map if none specified.
See doc string for outline-keybindings-list for format of binding list."
(let ((map (or base-map (make-sparse-keymap))))
(mapcar (lambda (cell)
(apply 'define-key map (if (null (cdr (cdr cell)))
(cons (concat outline-command-prefix
(car cell))
(cdr cell))
(list (car cell) (car (cdr cell))))))
(let ((map (or base-map (make-sparse-keymap)))
(pref (list outline-command-prefix)))
(mapcar (function
(lambda (cell)
(let ((add-pref (null (cdr (cdr cell))))
(key-suff (list (car cell))))
(apply 'define-key
(list map
(apply 'concat (if add-pref
(append pref key-suff)
key-suff))
(car (cdr cell)))))))
keymap-list)
map))
;;;_ = outline-prior-bindings - being deprecated.
......@@ -688,7 +736,65 @@ activation. Being deprecated.")
"Variable for use in V18, with outline-prior-bindings, for
resurrecting, on mode deactivation, bindings that existed before
activation. Being deprecated.")
;;;_ - Mode-Specific Variable Maintenance Utilities
;;;_ : Menu bar
(defun produce-outline-mode-menubar-entries ()
(require 'easymenu)
(easy-menu-define outline-mode-exposure-menu
outline-mode-map
"Allout outline exposure menu."
'("Exposure"
["Show Entry" outline-show-current-entry t]
["Show Children" outline-show-children t]
["Show Subtree" outline-show-current-subtree t]
["Hide Subtree" outline-hide-current-subtree t]
["Hide Leaves" outline-hide-current-leaves t]
"----"
["Show All" outline-show-all t]))
(easy-menu-define outline-mode-editing-menu
outline-mode-map
"Allout outline editing menu."
'("Headings"
["Open Sibling" outline-open-sibtopic t]
["Open Subtopic" outline-open-subtopic t]
["Open Supertopic" outline-open-supertopic t]
"----"
["Shift Topic In" outline-shift-in t]
["Shift Topic Out" outline-shift-out t]
["Rebullet Topic" outline-rebullet-topic t]
["Rebullet Heading" outline-rebullet-current-heading t]
["Number Siblings" outline-number-siblings t]))
(easy-menu-define outline-mode-navigation-menu
outline-mode-map
"Allout outline navigation menu."
'("Navigation"
["Next Visible Heading" outline-next-visible-heading t]
["Previous Visible Heading"
outline-previous-visible-heading t]
"----"
["Up Level" outline-up-current-level t]
["Forward Current Level" outline-forward-current-level t]
["Backward Current Level"
outline-backward-current-level t]
"----"
["Beginning of Entry"
outline-beginning-of-current-entry t]
["End of Entry" outline-end-of-current-entry t]
["End of Subtree" outline-end-of-current-subtree t]))
(easy-menu-define outline-mode-misc-menu
outline-mode-map
"Allout outlines miscellaneous bindings."
'("Misc"
["Version" outline-version t]
"----"
["Duplicate Exposed" outline-copy-exposed-to-buffer t]
["Duplicate Exposed, numbered"
outline-flatten-exposed-to-buffer t]
["Duplicate Exposed, indented"
outline-indented-exposed-to-buffer t]
"----"
["Set Header Lead" outline-reset-header-lead t]
["Set New Exposure" outline-expose-topic t])))
;;;_ : Mode-Specific Variable Maintenance Utilities
;;;_ = outline-mode-prior-settings
(defvar outline-mode-prior-settings nil
"Internal outline mode use; settings to be resumed on mode deactivation.")
......@@ -751,7 +857,7 @@ from the list."
(cdr outline-mode-prior-settings)))
(setq outline-mode-prior-settings rebuild)))))
)
;;;_ - Mode-specific incidentals
;;;_ : Mode-specific incidentals
;;;_ = outline-during-write-cue nil
(defvar outline-during-write-cue nil
"Used to inhibit outline change-protection during file write.
......@@ -759,6 +865,22 @@ from the list."
See also `outline-post-command-business', `outline-write-file-hook',
`outline-before-change-protect', and `outline-post-command-business'
functions.")
;;;_ = outline-pre-was-isearching nil
(defvar outline-pre-was-isearching nil
"Cue for isearch-dynamic-exposure mechanism, implemented in
outline-pre- and -post-command-hooks.")
(make-variable-buffer-local 'outline-pre-was-isearching)
;;;_ = outline-isearch-prior-pos nil
(defvar outline-isearch-prior-pos nil
"Cue for isearch-dynamic-exposure tracking, used by outline-isearch-expose.")
(make-variable-buffer-local 'outline-isearch-prior-pos)
;;;_ = outline-isearch-did-quit
(defvar outline-isearch-did-quit nil
"Distinguishes isearch conclusion and cancellation.
Maintained by outline-isearch-abort \(which is wrapped around the real
isearch-abort), and monitored by outline-isearch-expose for action.")
(make-variable-buffer-local 'outline-isearch-did-quit)
;;;_ = outline-override-protect nil
(defvar outline-override-protect nil
"Used in outline-mode for regulate of concealed-text protection mechanism.
......@@ -770,18 +892,18 @@ It's automatically reset to nil after every buffer modification.")
(make-variable-buffer-local 'outline-override-protect)
;;;_ > outline-unprotected (expr)
(defmacro outline-unprotected (expr)
"Evaluate EXPRESSION with `outline-override-protect' let-bound to t."
(` (let ((outline-override-protect t))
(, expr))))
"Evaluate EXPRESSION with `outline-override-protect' let-bound `t'."
`(let ((outline-override-protect t))
,expr))
;;;_ = outline-undo-aggregation
(defvar outline-undo-aggregation 30
"Amount of successive self-insert actions to bunch together per undo.
This is purely a kludge variable, regulating the compensation for a bug in
the way that before-change-function and undo interact.")
the way that before-change-functions and undo interact.")
(make-variable-buffer-local 'outline-undo-aggregation)
;;;_ = file-var-bug hack
(defvar outline-v18/9-file-var-hack nil
(defvar outline-v18/19-file-var-hack nil
"Horrible hack used to prevent invalid multiple triggering of outline
mode from prop-line file-var activation. Used by outline-mode function
to track repeats.")
......@@ -881,37 +1003,55 @@ the following two lines in your emacs init file:
((message
"Outline mode auto-activation and -layout enabled.")
'full)))))))
;;;_ > outline-setup-menubar ()
(defun outline-setup-menubar ()
"Populate the current buffer's menubar with allout outline-mode stuff."
(let ((menus (list outline-mode-exposure-menu
outline-mode-editing-menu
outline-mode-navigation-menu
outline-mode-misc-menu))
cur)
(while menus
(setq cur (car menus)
menus (cdr menus))
(easy-menu-add cur))))
;;;_ > outline-mode (&optional toggle)
;;;_ : Defun:
(defun outline-mode (&optional toggle)
;;;_ . Doc string:
"Toggle minor mode for controlling exposure and editing of text outlines.
Optional arg forces mode reactivation iff arg is positive num or symbol.
Optional arg forces mode to re-initialize iff arg is positive num or
symbol. Allout outline mode always runs as a minor mode.
Allout outline mode provides extensive outline formatting and
manipulation capabilities. It is specifically aimed at supporting
outline structuring and manipulation of syntax-sensitive text, eg
programming languages. \(For an example, see the allout code itself,
which is organized in outline structure.\)
Allout outline mode provides extensive outline-oriented formatting and
manipulation. It enables structural editing of outlines, as well as
navigation and exposure. It also is specifically aimed at
accommodating syntax-sensitive text like programming languages. \(For
an example, see the allout code itself, which is organized as an allout
outline.)
It also includes such things as topic-oriented repositioning, cut, and
paste; integral outline exposure-layout; incremental search with
dynamic exposure/concealment of concealed text; automatic topic-number
maintenance; and many other features.
In addition to outline navigation and exposure, allout includes:
See the docstring of the variable `outline-init' for instructions on
priming your emacs session for automatic activation of outline-mode,
according to file-var settings of the `outline-layout' variable.
- topic-oriented repositioning, cut, and paste
- integral outline exposure-layout
- incremental search with dynamic exposure and reconcealment of hidden text
- automatic topic-number maintenance
- \"Hot-spot\" operation, for single-keystroke maneuvering and
exposure control. \(See the outline-mode docstring.)
and many other features.
Below is a description of the bindings, and then explanation of
special outline-mode features and terminology.
special outline-mode features and terminology. See also the outline
menubar additions for quick reference to many of the features, and see
the docstring of the variable `outline-init' for instructions on
priming your emacs session for automatic activation of outline-mode.
The bindings themselves are established according to the values of
variables `outline-keybindings-list' and `outline-command-prefix',
each time the mode is invoked. Prior bindings are resurrected when
the mode is revoked.
The bindings are dictated by the `outline-keybindings-list' and
`outline-command-prefix' variables.
Navigation: Exposure Control:
---------- ----------------
......@@ -936,7 +1076,7 @@ C-c < outline-shift-out ... less deep.
C-c<CR> outline-rebullet-topic Reconcile bullets of topic and its offspring
- distinctive bullets are not changed, others
alternated according to nesting depth.
C-c * outline-rebullet-current-heading Prompt for alternate bullet for
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
......@@ -953,14 +1093,18 @@ 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 current topic outline sans concealed
text, to buffer with name derived from
current buffer - \"XXX exposed\"
M-x outlineify-sticky Activate outline mode for current buffer,
and establish a default file-var setting
for `outline-layout'.
C-c C-SPC outline-mark-topic
C-c = c outline-copy-exposed-to-buffer
Duplicate outline, sans concealed text, to
buffer with name derived from derived from
that of current buffer - \"*XXX exposed*\".
C-c = p outline-flatten-exposed-to-buffer
Like above 'copy-exposed', but convert topic
prefixes to section.subsection... numeric
format.
ESC ESC (outline-init t) Setup emacs session for outline mode
auto-activation.
......@@ -1075,13 +1219,13 @@ OPEN: A topic that is not closed, though its offspring or body may be."
(and (natnump toggle)
(not (zerop toggle)))))))
;; outline-mode already called once during this complex command?
(same-complex-command (eq outline-v18/9-file-var-hack
(same-complex-command (eq outline-v18/19-file-var-hack
(car command-history)))
do-layout
)
; See comments below re v19.18,.19 bug.
(setq outline-v18/9-file-var-hack (car command-history))
(setq outline-v18/19-file-var-hack (car command-history))
(cond
......@@ -1110,11 +1254,12 @@ OPEN: A topic that is not closed, though its offspring or body may be."
; Revoke those keys that remain
; as we set them:
(let ((curr-loc (current-local-map)))
(mapcar '(lambda (cell)
(mapcar (function
(lambda (cell)
(if (eq (lookup-key curr-loc (car cell))
(car (cdr cell)))
(define-key curr-loc (car cell)
(assq (car cell) outline-prior-bindings))))
(assq (car cell) outline-prior-bindings)))))
outline-added-bindings)