comparison lisp/allout.el @ 48857:8641226163f1

Avoid name conflicts with outline.el. Use 3 installments to keep diffs understandable. Change 2: Put `quotes' around many function and variable names.
author Markus Rost <rost@math.uni-bielefeld.de>
date Mon, 16 Dec 2002 00:26:22 +0000
parents e7aab76fa215
children f4d079377a9a
comparison
equal deleted inserted replaced
48856:e7aab76fa215 48857:8641226163f1
3 ;; Copyright (C) 1992, 1993, 1994, 2001 Free Software Foundation, Inc. 3 ;; Copyright (C) 1992, 1993, 1994, 2001 Free Software Foundation, Inc.
4 4
5 ;; Author: Ken Manheimer <klm@python.org> 5 ;; Author: Ken Manheimer <klm@python.org>
6 ;; Maintainer: Ken Manheimer <klm@python.org> 6 ;; Maintainer: Ken Manheimer <klm@python.org>
7 ;; Created: Dec 1991 - first release to usenet 7 ;; Created: Dec 1991 - first release to usenet
8 ;; Version: $Id: allout.el,v 1.34 2002/08/30 11:03:28 lektu Exp $|| 8 ;; Version: $Id: allout.el,v 1.35 2002/12/16 00:20:42 rost Exp $||
9 ;; Keywords: outlines mode wp languages 9 ;; Keywords: outlines mode wp languages
10 10
11 ;; This file is part of GNU Emacs. 11 ;; This file is part of GNU Emacs.
12 12
13 ;; GNU Emacs is free software; you can redistribute it and/or modify 13 ;; GNU Emacs is free software; you can redistribute it and/or modify
148 "*Leading string which helps distinguish topic headers. 148 "*Leading string which helps distinguish topic headers.
149 149
150 Outline topic header lines are identified by a leading topic 150 Outline topic header lines are identified by a leading topic
151 header prefix, which mostly have the value of this var at their front. 151 header prefix, which mostly have the value of this var at their front.
152 \(Level 1 topics are exceptions. They consist of only a single 152 \(Level 1 topics are exceptions. They consist of only a single
153 character, which is typically set to the allout-primary-bullet. Many 153 character, which is typically set to the `allout-primary-bullet'. Many
154 outlines start at level 2 to avoid this discrepancy." 154 outlines start at level 2 to avoid this discrepancy."
155 :type 'string 155 :type 'string
156 :group 'allout) 156 :group 'allout)
157 (make-variable-buffer-local 'allout-header-prefix) 157 (make-variable-buffer-local 'allout-header-prefix)
158 ;;;_ = allout-primary-bullet 158 ;;;_ = allout-primary-bullet
162 Outline topic header lines are identified by a leading topic header 162 Outline topic header lines are identified by a leading topic header
163 prefix, which is concluded by bullets that includes the value of this 163 prefix, which is concluded by bullets that includes the value of this
164 var and the respective allout-*-bullets-string vars. 164 var and the respective allout-*-bullets-string vars.
165 165
166 The value of an asterisk (`*') provides for backwards compatibility 166 The value of an asterisk (`*') provides for backwards compatibility
167 with the original emacs outline mode. See allout-plain-bullets-string 167 with the original emacs outline mode. See `allout-plain-bullets-string'
168 and allout-distinctive-bullets-string for the range of available 168 and `allout-distinctive-bullets-string' for the range of available
169 bullets." 169 bullets."
170 :type 'string 170 :type 'string
171 :group 'allout) 171 :group 'allout)
172 (make-variable-buffer-local 'allout-primary-bullet) 172 (make-variable-buffer-local 'allout-primary-bullet)
173 ;;;_ = allout-plain-bullets-string 173 ;;;_ = allout-plain-bullets-string
311 311
312 Stylish and constant prefixes (as well as old-style prefixes) are 312 Stylish and constant prefixes (as well as old-style prefixes) are
313 always respected by the topic maneuvering functions, regardless of 313 always respected by the topic maneuvering functions, regardless of
314 this variable setting. 314 this variable setting.
315 315
316 The setting of this var is not relevant when allout-old-style-prefixes 316 The setting of this var is not relevant when `allout-old-style-prefixes'
317 is non-nil." 317 is non-nil."
318 :type 'boolean 318 :type 'boolean
319 :group 'allout) 319 :group 'allout)
320 (make-variable-buffer-local 'allout-stylish-prefixes) 320 (make-variable-buffer-local 'allout-stylish-prefixes)
321 321
407 407
408 ;;;_ = allout-keybindings-list 408 ;;;_ = allout-keybindings-list
409 ;;; You have to reactivate allout-mode - `(allout-mode t)' - to 409 ;;; You have to reactivate allout-mode - `(allout-mode t)' - to
410 ;;; institute changes to this var. 410 ;;; institute changes to this var.
411 (defvar allout-keybindings-list () 411 (defvar allout-keybindings-list ()
412 "*List of allout-mode key / function bindings, for allout-mode-map. 412 "*List of `allout-mode' key / function bindings, for `allout-mode-map'.
413 413
414 String or vector key will be prefaced with allout-command-prefix, 414 String or vector key will be prefaced with `allout-command-prefix',
415 unless optional third, non-nil element is present.") 415 unless optional third, non-nil element is present.")
416 (setq allout-keybindings-list 416 (setq allout-keybindings-list
417 '( 417 '(
418 ; Motion commands: 418 ; Motion commands:
419 ("\C-n" allout-next-visible-heading) 419 ("\C-n" allout-next-visible-heading)
495 495
496 Outline mode uses emacs change-triggered functions to detect unruly 496 Outline mode uses emacs change-triggered functions to detect unruly
497 changes to concealed regions. Set this var non-nil to disable the 497 changes to concealed regions. Set this var non-nil to disable the
498 protection, potentially increasing text-entry responsiveness a bit. 498 protection, potentially increasing text-entry responsiveness a bit.
499 499
500 This var takes effect at allout-mode activation, so you may have to 500 This var takes effect at `allout-mode' activation, so you may have to
501 deactivate and then reactivate the mode if you want to toggle the 501 deactivate and then reactivate the mode if you want to toggle the
502 behavior." 502 behavior."
503 :type 'boolean 503 :type 'boolean
504 :group 'allout) 504 :group 'allout)
505 505
507 507
508 ;;;_ #1 Internal Outline Formatting and Configuration 508 ;;;_ #1 Internal Outline Formatting and Configuration
509 ;;;_ : Version 509 ;;;_ : Version
510 ;;;_ = allout-version 510 ;;;_ = allout-version
511 (defvar allout-version 511 (defvar allout-version
512 (let ((rcs-rev "$Revision: 1.34 $")) 512 (let ((rcs-rev "$Revision: 1.35 $"))
513 (condition-case err 513 (condition-case err
514 (save-match-data 514 (save-match-data
515 (string-match "Revision: \\([0-9]+\\.[0-9]+\\)" rcs-rev) 515 (string-match "Revision: \\([0-9]+\\.[0-9]+\\)" rcs-rev)
516 (substring rcs-rev (match-beginning 1) (match-end 1))) 516 (substring rcs-rev (match-beginning 1) (match-end 1)))
517 ('error rcs-rev))) 517 ('error rcs-rev)))
529 (defvar allout-regexp "" 529 (defvar allout-regexp ""
530 "*Regular expression to match the beginning of a heading line. 530 "*Regular expression to match the beginning of a heading line.
531 531
532 Any line whose beginning matches this regexp is considered a 532 Any line whose beginning matches this regexp is considered a
533 heading. This var is set according to the user configuration vars 533 heading. This var is set according to the user configuration vars
534 by set-allout-regexp.") 534 by `set-allout-regexp'.")
535 (make-variable-buffer-local 'allout-regexp) 535 (make-variable-buffer-local 'allout-regexp)
536 ;;;_ = allout-bullets-string 536 ;;;_ = allout-bullets-string
537 (defvar allout-bullets-string "" 537 (defvar allout-bullets-string ""
538 "A string dictating the valid set of outline topic bullets. 538 "A string dictating the valid set of outline topic bullets.
539 539
541 and is produced from the elements of `allout-plain-bullets-string' 541 and is produced from the elements of `allout-plain-bullets-string'
542 and `allout-distinctive-bullets-string'.") 542 and `allout-distinctive-bullets-string'.")
543 (make-variable-buffer-local 'allout-bullets-string) 543 (make-variable-buffer-local 'allout-bullets-string)
544 ;;;_ = allout-bullets-string-len 544 ;;;_ = allout-bullets-string-len
545 (defvar allout-bullets-string-len 0 545 (defvar allout-bullets-string-len 0
546 "Length of current buffers' allout-plain-bullets-string.") 546 "Length of current buffers' `allout-plain-bullets-string'.")
547 (make-variable-buffer-local 'allout-bullets-string-len) 547 (make-variable-buffer-local 'allout-bullets-string-len)
548 ;;;_ = allout-line-boundary-regexp 548 ;;;_ = allout-line-boundary-regexp
549 (defvar allout-line-boundary-regexp () 549 (defvar allout-line-boundary-regexp ()
550 "Allout-regexp with allout-style beginning-of-line anchor. 550 "Allout-regexp with allout-style beginning-of-line anchor.
551 551
552 \(Ie, C-j, *or* C-m, for prefixes of hidden topics). This is properly 552 \(Ie, C-j, *or* C-m, for prefixes of hidden topics). This is properly
553 set when allout-regexp is produced by `set-allout-regexp', so 553 set when `allout-regexp' is produced by `set-allout-regexp', so
554 that (match-beginning 2) and (match-end 2) delimit the prefix.") 554 that (match-beginning 2) and (match-end 2) delimit the prefix.")
555 (make-variable-buffer-local 'allout-line-boundary-regexp) 555 (make-variable-buffer-local 'allout-line-boundary-regexp)
556 ;;;_ = allout-bob-regexp 556 ;;;_ = allout-bob-regexp
557 (defvar allout-bob-regexp () 557 (defvar allout-bob-regexp ()
558 "Like allout-line-boundary-regexp, for headers at beginning of buffer. 558 "Like `allout-line-boundary-regexp', for headers at beginning of buffer.
559 \(match-beginning 2) and \(match-end 2) delimit the prefix.") 559 \(match-beginning 2) and \(match-end 2) delimit the prefix.")
560 (make-variable-buffer-local 'allout-bob-regexp) 560 (make-variable-buffer-local 'allout-bob-regexp)
561 ;;;_ = allout-header-subtraction 561 ;;;_ = allout-header-subtraction
562 (defvar allout-header-subtraction (1- (length allout-header-prefix)) 562 (defvar allout-header-subtraction (1- (length allout-header-prefix))
563 "Allout-header prefix length to subtract when computing topic depth.") 563 "Allout-header prefix length to subtract when computing topic depth.")
564 (make-variable-buffer-local 'allout-header-subtraction) 564 (make-variable-buffer-local 'allout-header-subtraction)
565 ;;;_ = allout-plain-bullets-string-len 565 ;;;_ = allout-plain-bullets-string-len
566 (defvar allout-plain-bullets-string-len (length allout-plain-bullets-string) 566 (defvar allout-plain-bullets-string-len (length allout-plain-bullets-string)
567 "Length of allout-plain-bullets-string, updated by set-allout-regexp.") 567 "Length of `allout-plain-bullets-string', updated by `set-allout-regexp'.")
568 (make-variable-buffer-local 'allout-plain-bullets-string-len) 568 (make-variable-buffer-local 'allout-plain-bullets-string-len)
569 569
570 570
571 ;;;_ X allout-reset-header-lead (header-lead) 571 ;;;_ X allout-reset-header-lead (header-lead)
572 (defun allout-reset-header-lead (header-lead) 572 (defun allout-reset-header-lead (header-lead)
728 (car (cdr cell))))))) 728 (car (cdr cell)))))))
729 keymap-list) 729 keymap-list)
730 map)) 730 map))
731 ;;;_ = allout-prior-bindings - being deprecated. 731 ;;;_ = allout-prior-bindings - being deprecated.
732 (defvar allout-prior-bindings nil 732 (defvar allout-prior-bindings nil
733 "Variable for use in V18, with allout-added-bindings, for 733 "Variable for use in V18, with `allout-added-bindings', for
734 resurrecting, on mode deactivation, bindings that existed before 734 resurrecting, on mode deactivation, bindings that existed before
735 activation. Being deprecated.") 735 activation. Being deprecated.")
736 ;;;_ = allout-added-bindings - being deprecated 736 ;;;_ = allout-added-bindings - being deprecated
737 (defvar allout-added-bindings nil 737 (defvar allout-added-bindings nil
738 "Variable for use in V18, with allout-prior-bindings, for 738 "Variable for use in V18, with `allout-prior-bindings', for
739 resurrecting, on mode deactivation, bindings that existed before 739 resurrecting, on mode deactivation, bindings that existed before
740 activation. Being deprecated.") 740 activation. Being deprecated.")
741 ;;;_ : Menu bar 741 ;;;_ : Menu bar
742 (defun produce-allout-mode-menubar-entries () 742 (defun produce-allout-mode-menubar-entries ()
743 (require 'easymenu) 743 (require 'easymenu)
802 "Internal outline mode use; settings to be resumed on mode deactivation.") 802 "Internal outline mode use; settings to be resumed on mode deactivation.")
803 (make-variable-buffer-local 'allout-mode-prior-settings) 803 (make-variable-buffer-local 'allout-mode-prior-settings)
804 ;;;_ > allout-resumptions (name &optional value) 804 ;;;_ > allout-resumptions (name &optional value)
805 (defun allout-resumptions (name &optional value) 805 (defun allout-resumptions (name &optional value)
806 806
807 "Registers or resumes settings over allout-mode activation/deactivation. 807 "Registers or resumes settings over `allout-mode' activation/deactivation.
808 808
809 First arg is NAME of variable affected. Optional second arg is list 809 First arg is NAME of variable affected. Optional second arg is list
810 containing allout-mode-specific VALUE to be imposed on named 810 containing allout-mode-specific VALUE to be imposed on named
811 variable, and to be registered. (It's a list so you can specify 811 variable, and to be registered. (It's a list so you can specify
812 registrations of null values.) If no value is specified, the 812 registrations of null values.) If no value is specified, the
878 (make-variable-buffer-local 'allout-isearch-prior-pos) 878 (make-variable-buffer-local 'allout-isearch-prior-pos)
879 ;;;_ = allout-isearch-did-quit 879 ;;;_ = allout-isearch-did-quit
880 (defvar allout-isearch-did-quit nil 880 (defvar allout-isearch-did-quit nil
881 "Distinguishes isearch conclusion and cancellation. 881 "Distinguishes isearch conclusion and cancellation.
882 882
883 Maintained by allout-isearch-abort \(which is wrapped around the real 883 Maintained by `allout-isearch-abort' \(which is wrapped around the real
884 isearch-abort), and monitored by allout-isearch-expose for action.") 884 isearch-abort), and monitored by `allout-isearch-expose' for action.")
885 (make-variable-buffer-local 'allout-isearch-did-quit) 885 (make-variable-buffer-local 'allout-isearch-did-quit)
886 ;;;_ = allout-override-protect nil 886 ;;;_ = allout-override-protect nil
887 (defvar allout-override-protect nil 887 (defvar allout-override-protect nil
888 "Used in allout-mode for regulate of concealed-text protection mechanism. 888 "Used in `allout-mode' for regulate of concealed-text protection mechanism.
889 889
890 Allout outline mode regulates alteration of concealed text to protect 890 Allout outline mode regulates alteration of concealed text to protect
891 against inadvertent, unnoticed changes. This is for use by specific, 891 against inadvertent, unnoticed changes. This is for use by specific,
892 native outline functions to temporarily override that protection. 892 native outline functions to temporarily override that protection.
893 It's automatically reset to nil after every buffer modification.") 893 It's automatically reset to nil after every buffer modification.")
905 the way that before-change-functions and undo interact.") 905 the way that before-change-functions and undo interact.")
906 (make-variable-buffer-local 'allout-undo-aggregation) 906 (make-variable-buffer-local 'allout-undo-aggregation)
907 ;;;_ = file-var-bug hack 907 ;;;_ = file-var-bug hack
908 (defvar allout-v18/19-file-var-hack nil 908 (defvar allout-v18/19-file-var-hack nil
909 "Horrible hack used to prevent invalid multiple triggering of outline 909 "Horrible hack used to prevent invalid multiple triggering of outline
910 mode from prop-line file-var activation. Used by allout-mode function 910 mode from prop-line file-var activation. Used by `allout-mode' function
911 to track repeats.") 911 to track repeats.")
912 ;;;_ > allout-write-file-hook () 912 ;;;_ > allout-write-file-hook ()
913 (defun allout-write-file-hook () 913 (defun allout-write-file-hook ()
914 "In outline mode, run as a local-write-file-hooks activity. 914 "In outline mode, run as a `local-write-file-hooks' activity.
915 915
916 Currently just sets `allout-during-write-cue', so allout-change-protection 916 Currently just sets `allout-during-write-cue', so allout-change-protection
917 knows to keep inactive during file write." 917 knows to keep inactive during file write."
918 (setq allout-during-write-cue t) 918 (setq allout-during-write-cue t)
919 nil) 919 nil)
922 ;;;_ = allout-mode 922 ;;;_ = allout-mode
923 (defvar allout-mode () "Allout outline mode minor-mode flag.") 923 (defvar allout-mode () "Allout outline mode minor-mode flag.")
924 (make-variable-buffer-local 'allout-mode) 924 (make-variable-buffer-local 'allout-mode)
925 ;;;_ > allout-mode-p () 925 ;;;_ > allout-mode-p ()
926 (defmacro allout-mode-p () 926 (defmacro allout-mode-p ()
927 "Return t if allout-mode is active in current buffer." 927 "Return t if `allout-mode' is active in current buffer."
928 'allout-mode) 928 'allout-mode)
929 ;;;_ = allout-explicitly-deactivated 929 ;;;_ = allout-explicitly-deactivated
930 (defvar allout-explicitly-deactivated nil 930 (defvar allout-explicitly-deactivated nil
931 "Allout-mode was last deliberately deactivated. 931 "Allout-mode was last deliberately deactivated.
932 So allout-post-command-business should not reactivate it...") 932 So `allout-post-command-business' should not reactivate it...")
933 (make-variable-buffer-local 'allout-explicitly-deactivated) 933 (make-variable-buffer-local 'allout-explicitly-deactivated)
934 ;;;_ > allout-init (&optional mode) 934 ;;;_ > allout-init (&optional mode)
935 (defun allout-init (&optional mode) 935 (defun allout-init (&optional mode)
936 "Prime allout-mode to enable/disable auto-activation, wrt `allout-layout'. 936 "Prime `allout-mode' to enable/disable auto-activation, wrt `allout-layout'.
937 937
938 MODE is one of the following symbols: 938 MODE is one of the following symbols:
939 939
940 - nil \(or no argument) deactivate auto-activation/layout; 940 - nil \(or no argument) deactivate auto-activation/layout;
941 - `activate', enable auto-activation only; 941 - `activate', enable auto-activation only;
1044 exposure control. \(See the allout-mode docstring.) 1044 exposure control. \(See the allout-mode docstring.)
1045 1045
1046 and many other features. 1046 and many other features.
1047 1047
1048 Below is a description of the bindings, and then explanation of 1048 Below is a description of the bindings, and then explanation of
1049 special allout-mode features and terminology. See also the outline 1049 special `allout-mode' features and terminology. See also the outline
1050 menubar additions for quick reference to many of the features, and see 1050 menubar additions for quick reference to many of the features, and see
1051 the docstring of the variable `allout-init' for instructions on 1051 the docstring of the variable `allout-init' for instructions on
1052 priming your emacs session for automatic activation of allout-mode. 1052 priming your emacs session for automatic activation of `allout-mode'.
1053 1053
1054 1054
1055 The bindings are dictated by the `allout-keybindings-list' and 1055 The bindings are dictated by the `allout-keybindings-list' and
1056 `allout-command-prefix' variables. 1056 `allout-command-prefix' variables.
1057 1057
1171 The relative length of the PREFIX determines the nesting depth 1171 The relative length of the PREFIX determines the nesting depth
1172 of the topic. 1172 of the topic.
1173 PREFIX-LEAD: 1173 PREFIX-LEAD:
1174 The string at the beginning of a topic prefix, normally a `.'. 1174 The string at the beginning of a topic prefix, normally a `.'.
1175 It can be customized by changing the setting of 1175 It can be customized by changing the setting of
1176 `allout-header-prefix' and then reinitializing allout-mode. 1176 `allout-header-prefix' and then reinitializing `allout-mode'.
1177 1177
1178 By setting the prefix-lead to the comment-string of a 1178 By setting the prefix-lead to the comment-string of a
1179 programming language, you can embed allout-structuring in 1179 programming language, you can embed allout-structuring in
1180 program code without interfering with the language processing 1180 program code without interfering with the language processing
1181 of that code. See `allout-use-mode-specific-leader' 1181 of that code. See `allout-use-mode-specific-leader'
1235 ;; Emacs v 19.18, 19.19 file-var code invokes prop-line-designated 1235 ;; Emacs v 19.18, 19.19 file-var code invokes prop-line-designated
1236 ;; modes twice when file is visited. We have to avoid toggling mode 1236 ;; modes twice when file is visited. We have to avoid toggling mode
1237 ;; off on second invocation, so we detect it as best we can, and 1237 ;; off on second invocation, so we detect it as best we can, and
1238 ;; skip everything. 1238 ;; skip everything.
1239 ((and same-complex-command ; Still in same complex command 1239 ((and same-complex-command ; Still in same complex command
1240 ; as last time allout-mode invoked. 1240 ; as last time `allout-mode' invoked.
1241 active ; Already activated. 1241 active ; Already activated.
1242 (not explicit-activation) ; Prop-line file-vars don't have args. 1242 (not explicit-activation) ; Prop-line file-vars don't have args.
1243 (string-match "^19.1[89]" ; Bug only known to be in v19.18 and 1243 (string-match "^19.1[89]" ; Bug only known to be in v19.18 and
1244 emacs-version)); 19.19. 1244 emacs-version)); 19.19.
1245 t) 1245 t)
1430 (defvar allout-recent-prefix-end 0 1430 (defvar allout-recent-prefix-end 0
1431 "Buffer point of the end of the last topic prefix encountered.") 1431 "Buffer point of the end of the last topic prefix encountered.")
1432 (make-variable-buffer-local 'allout-recent-prefix-end) 1432 (make-variable-buffer-local 'allout-recent-prefix-end)
1433 ;;;_ = allout-recent-end-of-subtree 1433 ;;;_ = allout-recent-end-of-subtree
1434 (defvar allout-recent-end-of-subtree 0 1434 (defvar allout-recent-end-of-subtree 0
1435 "Buffer point last returned by allout-end-of-current-subtree.") 1435 "Buffer point last returned by `allout-end-of-current-subtree'.")
1436 (make-variable-buffer-local 'allout-recent-end-of-subtree) 1436 (make-variable-buffer-local 'allout-recent-end-of-subtree)
1437 ;;;_ > allout-prefix-data (beg end) 1437 ;;;_ > allout-prefix-data (beg end)
1438 (defmacro allout-prefix-data (beg end) 1438 (defmacro allout-prefix-data (beg end)
1439 "Register allout-prefix state data - BEGINNING and END of prefix. 1439 "Register allout-prefix state data - BEGINNING and END of prefix.
1440 1440
1444 ;;;_ > allout-recent-depth () 1444 ;;;_ > allout-recent-depth ()
1445 (defmacro allout-recent-depth () 1445 (defmacro allout-recent-depth ()
1446 "Return depth of last heading encountered by an outline maneuvering function. 1446 "Return depth of last heading encountered by an outline maneuvering function.
1447 1447
1448 All outline functions which directly do string matches to assess 1448 All outline functions which directly do string matches to assess
1449 headings set the variables allout-recent-prefix-beginning and 1449 headings set the variables `allout-recent-prefix-beginning' and
1450 allout-recent-prefix-end if successful. This function uses those settings 1450 `allout-recent-prefix-end' if successful. This function uses those settings
1451 to return the current depth." 1451 to return the current depth."
1452 1452
1453 '(max 1 (- allout-recent-prefix-end 1453 '(max 1 (- allout-recent-prefix-end
1454 allout-recent-prefix-beginning 1454 allout-recent-prefix-beginning
1455 allout-header-subtraction))) 1455 allout-header-subtraction)))
1456 ;;;_ > allout-recent-prefix () 1456 ;;;_ > allout-recent-prefix ()
1457 (defmacro allout-recent-prefix () 1457 (defmacro allout-recent-prefix ()
1458 "Like allout-recent-depth, but returns text of last encountered prefix. 1458 "Like `allout-recent-depth', but returns text of last encountered prefix.
1459 1459
1460 All outline functions which directly do string matches to assess 1460 All outline functions which directly do string matches to assess
1461 headings set the variables allout-recent-prefix-beginning and 1461 headings set the variables `allout-recent-prefix-beginning' and
1462 allout-recent-prefix-end if successful. This function uses those settings 1462 `allout-recent-prefix-end' if successful. This function uses those settings
1463 to return the current depth." 1463 to return the current depth."
1464 '(buffer-substring allout-recent-prefix-beginning 1464 '(buffer-substring allout-recent-prefix-beginning
1465 allout-recent-prefix-end)) 1465 allout-recent-prefix-end))
1466 ;;;_ > allout-recent-bullet () 1466 ;;;_ > allout-recent-bullet ()
1467 (defmacro allout-recent-bullet () 1467 (defmacro allout-recent-bullet ()
1468 "Like allout-recent-prefix, but returns bullet of last encountered prefix. 1468 "Like allout-recent-prefix, but returns bullet of last encountered prefix.
1469 1469
1470 All outline functions which directly do string matches to assess 1470 All outline functions which directly do string matches to assess
1471 headings set the variables allout-recent-prefix-beginning and 1471 headings set the variables `allout-recent-prefix-beginning' and
1472 allout-recent-prefix-end if successful. This function uses those settings 1472 `allout-recent-prefix-end' if successful. This function uses those settings
1473 to return the current depth of the most recently matched topic." 1473 to return the current depth of the most recently matched topic."
1474 '(buffer-substring (1- allout-recent-prefix-end) 1474 '(buffer-substring (1- allout-recent-prefix-end)
1475 allout-recent-prefix-end)) 1475 allout-recent-prefix-end))
1476 1476
1477 ;;;_ #4 Navigation 1477 ;;;_ #4 Navigation
1507 (interactive) 1507 (interactive)
1508 '(not (allout-hidden-p))) 1508 '(not (allout-hidden-p)))
1509 ;;;_ : Location attributes 1509 ;;;_ : Location attributes
1510 ;;;_ > allout-depth () 1510 ;;;_ > allout-depth ()
1511 (defsubst allout-depth () 1511 (defsubst allout-depth ()
1512 "Like allout-current-depth, but respects hidden as well as visible topics." 1512 "Like `allout-current-depth', but respects hidden as well as visible topics."
1513 (save-excursion 1513 (save-excursion
1514 (if (allout-goto-prefix) 1514 (if (allout-goto-prefix)
1515 (allout-recent-depth) 1515 (allout-recent-depth)
1516 (progn 1516 (progn
1517 ;; Oops, no prefix, zero prefix data: 1517 ;; Oops, no prefix, zero prefix data:
1888 ;;;_ > allout-beginning-of-current-entry () 1888 ;;;_ > allout-beginning-of-current-entry ()
1889 (defun allout-beginning-of-current-entry () 1889 (defun allout-beginning-of-current-entry ()
1890 "When not already there, position point at beginning of current topic's body. 1890 "When not already there, position point at beginning of current topic's body.
1891 1891
1892 If already there, move cursor to bullet for hot-spot operation. 1892 If already there, move cursor to bullet for hot-spot operation.
1893 \(See allout-mode doc string for details on hot-spot operation.)" 1893 \(See `allout-mode' doc string for details on hot-spot operation.)"
1894 (interactive) 1894 (interactive)
1895 (let ((start-point (point))) 1895 (let ((start-point (point)))
1896 (allout-end-of-prefix) 1896 (allout-end-of-prefix)
1897 (if (and (interactive-p) 1897 (if (and (interactive-p)
1898 (= (point) start-point)) 1898 (= (point) start-point))
1991 allout-recent-prefix-beginning))) 1991 allout-recent-prefix-beginning)))
1992 1992
1993 ;;;_ - Linear 1993 ;;;_ - Linear
1994 ;;;_ > allout-next-sibling (&optional depth backward) 1994 ;;;_ > allout-next-sibling (&optional depth backward)
1995 (defun allout-next-sibling (&optional depth backward) 1995 (defun allout-next-sibling (&optional depth backward)
1996 "Like allout-forward-current-level, but respects invisible topics. 1996 "Like `allout-forward-current-level', but respects invisible topics.
1997 1997
1998 Traverse at optional DEPTH, or current depth if none specified. 1998 Traverse at optional DEPTH, or current depth if none specified.
1999 1999
2000 Go backward if optional arg BACKWARD is non-nil. 2000 Go backward if optional arg BACKWARD is non-nil.
2001 2001
2017 (goto-char start-point) 2017 (goto-char start-point)
2018 (if depth (allout-depth) start-depth) 2018 (if depth (allout-depth) start-depth)
2019 nil)))) 2019 nil))))
2020 ;;;_ > allout-previous-sibling (&optional depth backward) 2020 ;;;_ > allout-previous-sibling (&optional depth backward)
2021 (defun allout-previous-sibling (&optional depth backward) 2021 (defun allout-previous-sibling (&optional depth backward)
2022 "Like allout-forward-current-level,but backwards & respect invisible topics. 2022 "Like `allout-forward-current-level',but backwards & respect invisible topics.
2023 2023
2024 Optional DEPTH specifies depth to traverse, default current depth. 2024 Optional DEPTH specifies depth to traverse, default current depth.
2025 2025
2026 Optional BACKWARD reverses direction. 2026 Optional BACKWARD reverses direction.
2027 2027
2084 ;;;_ > allout-previous-visible-heading (arg) 2084 ;;;_ > allout-previous-visible-heading (arg)
2085 (defun allout-previous-visible-heading (arg) 2085 (defun allout-previous-visible-heading (arg)
2086 "Move to the previous heading line. 2086 "Move to the previous heading line.
2087 2087
2088 With argument, repeats or can move forward if negative. 2088 With argument, repeats or can move forward if negative.
2089 A heading line is one that starts with a `*' (or that allout-regexp 2089 A heading line is one that starts with a `*' (or that `allout-regexp'
2090 matches)." 2090 matches)."
2091 (interactive "p") 2091 (interactive "p")
2092 (allout-next-visible-heading (- arg))) 2092 (allout-next-visible-heading (- arg)))
2093 ;;;_ > allout-forward-current-level (arg) 2093 ;;;_ > allout-forward-current-level (arg)
2094 (defun allout-forward-current-level (arg) 2094 (defun allout-forward-current-level (arg)
2264 ;;;_ = allout-post-goto-bullet 2264 ;;;_ = allout-post-goto-bullet
2265 (defvar allout-post-goto-bullet nil 2265 (defvar allout-post-goto-bullet nil
2266 "Outline internal var, for `allout-pre-command-business' hot-spot operation. 2266 "Outline internal var, for `allout-pre-command-business' hot-spot operation.
2267 2267
2268 When set, tells post-processing to reposition on topic bullet, and 2268 When set, tells post-processing to reposition on topic bullet, and
2269 then unset it. Set by allout-pre-command-business when implementing 2269 then unset it. Set by `allout-pre-command-business' when implementing
2270 hot-spot operation, where literal characters typed over a topic bullet 2270 hot-spot operation, where literal characters typed over a topic bullet
2271 are mapped to the command of the corresponding control-key on the 2271 are mapped to the command of the corresponding control-key on the
2272 allout-mode-map.") 2272 `allout-mode-map'.")
2273 (make-variable-buffer-local 'allout-post-goto-bullet) 2273 (make-variable-buffer-local 'allout-post-goto-bullet)
2274 ;;;_ > allout-post-command-business () 2274 ;;;_ > allout-post-command-business ()
2275 (defun allout-post-command-business () 2275 (defun allout-post-command-business ()
2276 "Outline post-command-hook function. 2276 "Outline `post-command-hook' function.
2277 2277
2278 - Null allout-override-protect, so it's not left open. 2278 - Null `allout-override-protect', so it's not left open.
2279 2279
2280 - Implement (and clear) allout-post-goto-bullet, for hot-spot 2280 - Implement (and clear) `allout-post-goto-bullet', for hot-spot
2281 outline commands. 2281 outline commands.
2282 2282
2283 - Massages buffer-undo-list so successive, standard character self-inserts are 2283 - Massages buffer-undo-list so successive, standard character self-inserts are
2284 aggregated. This kludge compensates for lack of undo bunching when 2284 aggregated. This kludge compensates for lack of undo bunching when
2285 before-change-functions is used." 2285 `before-change-functions' is used."
2286 2286
2287 ; Apply any external change func: 2287 ; Apply any external change func:
2288 (if (not (allout-mode-p)) ; In allout-mode. 2288 (if (not (allout-mode-p)) ; In allout-mode.
2289 nil 2289 nil
2290 (setq allout-override-protect nil) 2290 (setq allout-override-protect nil)
2327 (progn (goto-char (allout-current-bullet-pos)) 2327 (progn (goto-char (allout-current-bullet-pos))
2328 (setq allout-post-goto-bullet nil))) 2328 (setq allout-post-goto-bullet nil)))
2329 )) 2329 ))
2330 ;;;_ > allout-pre-command-business () 2330 ;;;_ > allout-pre-command-business ()
2331 (defun allout-pre-command-business () 2331 (defun allout-pre-command-business ()
2332 "Outline pre-command-hook function for outline buffers. 2332 "Outline `pre-command-hook' function for outline buffers.
2333 Implements special behavior when cursor is on bullet char. 2333 Implements special behavior when cursor is on bullet char.
2334 2334
2335 Self-insert characters are reinterpreted control-character references 2335 Self-insert characters are reinterpreted control-character references
2336 into the allout-mode-map. The allout-mode post-command hook will 2336 into the `allout-mode-map'. The `allout-mode' post-command hook will
2337 position a cursor that has moved as a result of such reinterpretation, 2337 position a cursor that has moved as a result of such reinterpretation,
2338 on the destination topic's bullet, when the cursor wound up in the 2338 on the destination topic's bullet, when the cursor wound up in the
2339 2339
2340 The upshot is that you can get easy, single (ie, unmodified) key 2340 The upshot is that you can get easy, single (ie, unmodified) key
2341 outline maneuvering operations by positioning the cursor on the bullet 2341 outline maneuvering operations by positioning the cursor on the bullet
2379 (if mapped-binding 2379 (if mapped-binding
2380 (setq allout-post-goto-bullet t 2380 (setq allout-post-goto-bullet t
2381 this-command mapped-binding))))))) 2381 this-command mapped-binding)))))))
2382 ;;;_ > allout-find-file-hook () 2382 ;;;_ > allout-find-file-hook ()
2383 (defun allout-find-file-hook () 2383 (defun allout-find-file-hook ()
2384 "Activate allout-mode when `allout-auto-activation' & `allout-layout' are non-nil. 2384 "Activate `allout-mode' when `allout-auto-activation' & `allout-layout' are non-nil.
2385 2385
2386 See `allout-init' for setup instructions." 2386 See `allout-init' for setup instructions."
2387 (if (and allout-auto-activation 2387 (if (and allout-auto-activation
2388 (not (allout-mode-p)) 2388 (not (allout-mode-p))
2389 allout-layout) 2389 allout-layout)
2390 (allout-mode t))) 2390 (allout-mode t)))
2391 ;;;_ > allout-isearch-rectification 2391 ;;;_ > allout-isearch-rectification
2392 (defun allout-isearch-rectification () 2392 (defun allout-isearch-rectification ()
2393 "Rectify outline exposure before, during, or after isearch. 2393 "Rectify outline exposure before, during, or after isearch.
2394 2394
2395 Called as part of allout-post-command-business." 2395 Called as part of `allout-post-command-business'."
2396 2396
2397 (let ((isearching (and (boundp 'isearch-mode) isearch-mode))) 2397 (let ((isearching (and (boundp 'isearch-mode) isearch-mode)))
2398 (cond ((and isearching (not allout-pre-was-isearching)) 2398 (cond ((and isearching (not allout-pre-was-isearching))
2399 (allout-isearch-expose 'start)) 2399 (allout-isearch-expose 'start))
2400 ((and isearching allout-pre-was-isearching) 2400 ((and isearching allout-pre-was-isearching)
2450 (setq allout-isearch-prior-pos nil) 2450 (setq allout-isearch-prior-pos nil)
2451 (allout-show-children)))) 2451 (allout-show-children))))
2452 (setq allout-isearch-did-quit nil)) 2452 (setq allout-isearch-did-quit nil))
2453 ;;;_ > allout-enwrap-isearch () 2453 ;;;_ > allout-enwrap-isearch ()
2454 (defun allout-enwrap-isearch () 2454 (defun allout-enwrap-isearch ()
2455 "Impose allout-mode isearch-abort wrapper for dynamic exposure in isearch. 2455 "Impose `allout-mode' isearch-abort wrapper for dynamic exposure in isearch.
2456 2456
2457 The function checks to ensure that the rebinding is done only once." 2457 The function checks to ensure that the rebinding is done only once."
2458 2458
2459 (add-hook 'isearch-mode-end-hook 'allout-isearch-rectification) 2459 (add-hook 'isearch-mode-end-hook 'allout-isearch-rectification)
2460 (if (fboundp 'allout-real-isearch-abort) 2460 (if (fboundp 'allout-real-isearch-abort)
2480 ;; names, in their stead: 2480 ;; names, in their stead:
2481 (fset 'allout-real-isearch-abort (symbol-function 'isearch-abort)) 2481 (fset 'allout-real-isearch-abort (symbol-function 'isearch-abort))
2482 (fset 'isearch-abort 'allout-isearch-abort))))) 2482 (fset 'isearch-abort 'allout-isearch-abort)))))
2483 ;;;_ > allout-isearch-abort () 2483 ;;;_ > allout-isearch-abort ()
2484 (defun allout-isearch-abort () 2484 (defun allout-isearch-abort ()
2485 "Wrapper for allout-real-isearch-abort \(which see), to register 2485 "Wrapper for `allout-real-isearch-abort' \(which see), to register
2486 actual quits." 2486 actual quits."
2487 (interactive) 2487 (interactive)
2488 (setq allout-isearch-did-quit nil) 2488 (setq allout-isearch-did-quit nil)
2489 (condition-case what 2489 (condition-case what
2490 (allout-real-isearch-abort) 2490 (allout-real-isearch-abort)
2492 (signal 'quit nil)))) 2492 (signal 'quit nil))))
2493 2493
2494 ;;; Prevent unnecessary font-lock while isearching! 2494 ;;; Prevent unnecessary font-lock while isearching!
2495 (defvar isearch-was-font-locking nil) 2495 (defvar isearch-was-font-locking nil)
2496 (defun isearch-inhibit-font-lock () 2496 (defun isearch-inhibit-font-lock ()
2497 "Inhibit font-lock while isearching - for use on isearch-mode-hook." 2497 "Inhibit font-lock while isearching - for use on `isearch-mode-hook'."
2498 (if (and (allout-mode-p) (boundp 'font-lock-mode) font-lock-mode) 2498 (if (and (allout-mode-p) (boundp 'font-lock-mode) font-lock-mode)
2499 (setq isearch-was-font-locking t 2499 (setq isearch-was-font-locking t
2500 font-lock-mode nil))) 2500 font-lock-mode nil)))
2501 (add-hook 'isearch-mode-hook 'isearch-inhibit-font-lock) 2501 (add-hook 'isearch-mode-hook 'isearch-inhibit-font-lock)
2502 (defun isearch-reenable-font-lock () 2502 (defun isearch-reenable-font-lock ()
2530 (message "") 2530 (message "")
2531 (if (string= choice "") default-bullet choice)) 2531 (if (string= choice "") default-bullet choice))
2532 ) 2532 )
2533 ;;;_ > allout-distinctive-bullet (bullet) 2533 ;;;_ > allout-distinctive-bullet (bullet)
2534 (defun allout-distinctive-bullet (bullet) 2534 (defun allout-distinctive-bullet (bullet)
2535 "True if bullet is one of those on allout-distinctive-bullets-string." 2535 "True if bullet is one of those on `allout-distinctive-bullets-string'."
2536 (string-match (regexp-quote bullet) allout-distinctive-bullets-string)) 2536 (string-match (regexp-quote bullet) allout-distinctive-bullets-string))
2537 ;;;_ > allout-numbered-type-prefix (&optional prefix) 2537 ;;;_ > allout-numbered-type-prefix (&optional prefix)
2538 (defun allout-numbered-type-prefix (&optional prefix) 2538 (defun allout-numbered-type-prefix (&optional prefix)
2539 "True if current header prefix bullet is numbered bullet." 2539 "True if current header prefix bullet is numbered bullet."
2540 (and allout-numbered-bullet 2540 (and allout-numbered-bullet
2570 2570
2571 All the arguments are optional. 2571 All the arguments are optional.
2572 2572
2573 PRIOR-BULLET indicates the bullet of the prefix being changed, or 2573 PRIOR-BULLET indicates the bullet of the prefix being changed, or
2574 nil if none. This bullet may be preserved (other options 2574 nil if none. This bullet may be preserved (other options
2575 notwithstanding) if it is on the allout-distinctive-bullets-string, 2575 notwithstanding) if it is on the `allout-distinctive-bullets-string',
2576 for instance. 2576 for instance.
2577 2577
2578 Second arg NEW indicates that a new topic is being opened after the 2578 Second arg NEW indicates that a new topic is being opened after the
2579 topic at point, if non-nil. Default bullet for new topics, eg, may 2579 topic at point, if non-nil. Default bullet for new topics, eg, may
2580 be set (contingent to other args) to numbered bullets if previous 2580 be set (contingent to other args) to numbered bullets if previous
2902 2902
2903 ;;;_ - Outline Alteration 2903 ;;;_ - Outline Alteration
2904 ;;;_ : Topic Modification 2904 ;;;_ : Topic Modification
2905 ;;;_ = allout-former-auto-filler 2905 ;;;_ = allout-former-auto-filler
2906 (defvar allout-former-auto-filler nil 2906 (defvar allout-former-auto-filler nil
2907 "Name of modal fill function being wrapped by allout-auto-fill.") 2907 "Name of modal fill function being wrapped by `allout-auto-fill'.")
2908 ;;;_ > allout-auto-fill () 2908 ;;;_ > allout-auto-fill ()
2909 (defun allout-auto-fill () 2909 (defun allout-auto-fill ()
2910 "Allout-mode autofill function. 2910 "Allout-mode autofill function.
2911 2911
2912 Maintains outline hanging topic indentation if 2912 Maintains outline hanging topic indentation if
3020 prefix of the topic is forced to be non-numbered. Null index and 3020 prefix of the topic is forced to be non-numbered. Null index and
3021 non-nil NUMBER-CONTROL forces denumbering. Non-nil INDEX (and 3021 non-nil NUMBER-CONTROL forces denumbering. Non-nil INDEX (and
3022 non-nil NUMBER-CONTROL) forces a numbered-prefix form. If non-nil 3022 non-nil NUMBER-CONTROL) forces a numbered-prefix form. If non-nil
3023 INDEX is a number, then that number is used for the numbered 3023 INDEX is a number, then that number is used for the numbered
3024 prefix. Non-nil and non-number means that the index for the 3024 prefix. Non-nil and non-number means that the index for the
3025 numbered prefix will be derived by allout-make-topic-prefix. 3025 numbered prefix will be derived by `allout-make-topic-prefix'.
3026 3026
3027 Fifth arg DO-SUCCESSORS t means re-resolve count on succeeding 3027 Fifth arg DO-SUCCESSORS t means re-resolve count on succeeding
3028 siblings. 3028 siblings.
3029 3029
3030 Cf vars `allout-stylish-prefixes', `allout-old-style-prefixes', 3030 Cf vars `allout-stylish-prefixes', `allout-old-style-prefixes',
3087 ) ; (if (and (= current-depth new-depth)...)) 3087 ) ; (if (and (= current-depth new-depth)...))
3088 ) ; let* ((current-depth (allout-depth))...) 3088 ) ; let* ((current-depth (allout-depth))...)
3089 ) ; defun 3089 ) ; defun
3090 ;;;_ > allout-rebullet-topic (arg) 3090 ;;;_ > allout-rebullet-topic (arg)
3091 (defun allout-rebullet-topic (arg) 3091 (defun allout-rebullet-topic (arg)
3092 "Like allout-rebullet-topic-grunt, but start from topic visible at point. 3092 "Like `allout-rebullet-topic-grunt', but start from topic visible at point.
3093 3093
3094 Descends into invisible as well as visible topics, however. 3094 Descends into invisible as well as visible topics, however.
3095 3095
3096 With repeat count, shift topic depth by that amount." 3096 With repeat count, shift topic depth by that amount."
3097 (interactive "P") 3097 (interactive "P")
3115 starting-point 3115 starting-point
3116 index 3116 index
3117 do-successors) 3117 do-successors)
3118 3118
3119 "Rebullet the topic at point, visible or invisible, and all 3119 "Rebullet the topic at point, visible or invisible, and all
3120 contained subtopics. See allout-rebullet-heading for rebulleting 3120 contained subtopics. See `allout-rebullet-heading' for rebulleting
3121 behavior. 3121 behavior.
3122 3122
3123 All arguments are optional. 3123 All arguments are optional.
3124 3124
3125 First arg RELATIVE-DEPTH means to shift the depth of the entire 3125 First arg RELATIVE-DEPTH means to shift the depth of the entire
3453 Non-topic yanks work no differently than normal yanks. 3453 Non-topic yanks work no differently than normal yanks.
3454 3454
3455 If a topic is being yanked into a bare topic prefix, the depth of the 3455 If a topic is being yanked into a bare topic prefix, the depth of the
3456 yanked topic is adjusted to the depth of the topic prefix. 3456 yanked topic is adjusted to the depth of the topic prefix.
3457 3457
3458 1 we're yanking in an allout-mode buffer 3458 1 we're yanking in an `allout-mode' buffer
3459 2 the stuff being yanked starts with a valid outline header prefix, and 3459 2 the stuff being yanked starts with a valid outline header prefix, and
3460 3 it is being yanked at the end of a line which consists of only a valid 3460 3 it is being yanked at the end of a line which consists of only a valid
3461 topic prefix. 3461 topic prefix.
3462 3462
3463 If these conditions hold then the depth of the yanked topics are all 3463 If these conditions hold then the depth of the yanked topics are all
3470 exactly like normal yanks. 3470 exactly like normal yanks.
3471 3471
3472 Numbering of yanked topics, and the successive siblings at the depth 3472 Numbering of yanked topics, and the successive siblings at the depth
3473 into which they're being yanked, is adjusted. 3473 into which they're being yanked, is adjusted.
3474 3474
3475 Allout-yank-pop works with allout-yank just like normal yank-pop 3475 `Allout-yank-pop' works with `allout-yank' just like normal yank-pop
3476 works with normal yank in non-outline buffers." 3476 works with normal yank in non-outline buffers."
3477 3477
3478 (interactive "*P") 3478 (interactive "*P")
3479 (setq this-command 'yank) 3479 (setq this-command 'yank)
3480 (yank arg) 3480 (yank arg)
3481 (if (allout-mode-p) 3481 (if (allout-mode-p)
3482 (allout-yank-processing))) 3482 (allout-yank-processing)))
3483 ;;;_ > allout-yank-pop (&optional arg) 3483 ;;;_ > allout-yank-pop (&optional arg)
3484 (defun allout-yank-pop (&optional arg) 3484 (defun allout-yank-pop (&optional arg)
3485 "Yank-pop like allout-yank when popping to bare outline prefixes. 3485 "Yank-pop like `allout-yank' when popping to bare outline prefixes.
3486 3486
3487 Adapts level of popped topics to level of fresh prefix. 3487 Adapts level of popped topics to level of fresh prefix.
3488 3488
3489 Note - prefix changes to distinctive bullets will stick, if followed 3489 Note - prefix changes to distinctive bullets will stick, if followed
3490 by pops to non-distinctive yanks. Bug..." 3490 by pops to non-distinctive yanks. Bug..."
3559 (defun allout-show-entry () 3559 (defun allout-show-entry ()
3560 "Like `allout-show-current-entry', reveals entries nested in hidden topics. 3560 "Like `allout-show-current-entry', reveals entries nested in hidden topics.
3561 3561
3562 This is a way to give restricted peek at a concealed locality without the 3562 This is a way to give restricted peek at a concealed locality without the
3563 expense of exposing its context, but can leave the outline with aberrant 3563 expense of exposing its context, but can leave the outline with aberrant
3564 exposure. allout-hide-current-entry-completely or allout-show-offshoot 3564 exposure. `allout-hide-current-entry-completely' or `allout-show-offshoot'
3565 should be used after the peek to rectify the exposure." 3565 should be used after the peek to rectify the exposure."
3566 3566
3567 (interactive) 3567 (interactive)
3568 (save-excursion 3568 (save-excursion
3569 (let ((at (point)) 3569 (let ((at (point))
3581 ;;;_ > allout-show-children (&optional level strict) 3581 ;;;_ > allout-show-children (&optional level strict)
3582 (defun allout-show-children (&optional level strict) 3582 (defun allout-show-children (&optional level strict)
3583 3583
3584 "If point is visible, show all direct subheadings of this heading. 3584 "If point is visible, show all direct subheadings of this heading.
3585 3585
3586 Otherwise, do allout-show-to-offshoot, and then show subheadings. 3586 Otherwise, do `allout-show-to-offshoot', and then show subheadings.
3587 3587
3588 Optional LEVEL specifies how many levels below the current level 3588 Optional LEVEL specifies how many levels below the current level
3589 should be shown, or all levels if t. Default is 1. 3589 should be shown, or all levels if t. Default is 1.
3590 3590
3591 Optional STRICT means don't resort to -show-to-offshoot, no matter 3591 Optional STRICT means don't resort to -show-to-offshoot, no matter
3631 ;;;_ > allout-hide-point-reconcile () 3631 ;;;_ > allout-hide-point-reconcile ()
3632 (defun allout-hide-reconcile () 3632 (defun allout-hide-reconcile ()
3633 "Like `allout-hide-current-entry'; hides completely if within hidden region. 3633 "Like `allout-hide-current-entry'; hides completely if within hidden region.
3634 3634
3635 Specifically intended for aberrant exposure states, like entries that were 3635 Specifically intended for aberrant exposure states, like entries that were
3636 exposed by allout-show-entry but are within otherwise concealed regions." 3636 exposed by `allout-show-entry' but are within otherwise concealed regions."
3637 (interactive) 3637 (interactive)
3638 (save-excursion 3638 (save-excursion
3639 (allout-goto-prefix) 3639 (allout-goto-prefix)
3640 (allout-flag-region (if (not (bobp)) (1- (point)) (point)) 3640 (allout-flag-region (if (not (bobp)) (1- (point)) (point))
3641 (progn (allout-pre-next-preface) 3641 (progn (allout-pre-next-preface)
3643 (point) 3643 (point)
3644 (1- (point)))) 3644 (1- (point))))
3645 ?\r))) 3645 ?\r)))
3646 ;;;_ > allout-show-to-offshoot () 3646 ;;;_ > allout-show-to-offshoot ()
3647 (defun allout-show-to-offshoot () 3647 (defun allout-show-to-offshoot ()
3648 "Like allout-show-entry, but reveals all concealed ancestors, as well. 3648 "Like `allout-show-entry', but reveals all concealed ancestors, as well.
3649 3649
3650 As with allout-hide-current-entry-completely, useful for rectifying 3650 As with `allout-hide-current-entry-completely', useful for rectifying
3651 aberrant exposure states produced by allout-show-entry." 3651 aberrant exposure states produced by `allout-show-entry'."
3652 3652
3653 (interactive) 3653 (interactive)
3654 (save-excursion 3654 (save-excursion
3655 (let ((orig-pt (point)) 3655 (let ((orig-pt (point))
3656 (orig-pref (allout-goto-prefix)) 3656 (orig-pref (allout-goto-prefix))
3696 (progn (allout-end-of-current-entry) (point)) 3696 (progn (allout-end-of-current-entry) (point))
3697 ?\n)))) 3697 ?\n))))
3698 ;;;_ > allout-hide-current-entry-completely () 3698 ;;;_ > allout-hide-current-entry-completely ()
3699 ; ... allout-hide-current-entry-completely also for isearch dynamic exposure: 3699 ; ... allout-hide-current-entry-completely also for isearch dynamic exposure:
3700 (defun allout-hide-current-entry-completely () 3700 (defun allout-hide-current-entry-completely ()
3701 "Like allout-hide-current-entry, but conceal topic completely. 3701 "Like `allout-hide-current-entry', but conceal topic completely.
3702 3702
3703 Specifically intended for aberrant exposure states, like entries that were 3703 Specifically intended for aberrant exposure states, like entries that were
3704 exposed by allout-show-entry but are within otherwise concealed regions." 3704 exposed by `allout-show-entry' but are within otherwise concealed regions."
3705 (interactive) 3705 (interactive)
3706 (save-excursion 3706 (save-excursion
3707 (allout-goto-prefix) 3707 (allout-goto-prefix)
3708 (allout-flag-region (if (not (bobp)) (1- (point)) (point)) 3708 (allout-flag-region (if (not (bobp)) (1- (point)) (point))
3709 (progn (allout-pre-next-preface) 3709 (progn (allout-pre-next-preface)
3924 ((allout-next-sibling depth)))) 3924 ((allout-next-sibling depth))))
3925 max-pos))) 3925 max-pos)))
3926 ;;;_ > allout-old-expose-topic (spec &rest followers) 3926 ;;;_ > allout-old-expose-topic (spec &rest followers)
3927 (defun allout-old-expose-topic (spec &rest followers) 3927 (defun allout-old-expose-topic (spec &rest followers)
3928 3928
3929 "Deprecated. Use allout-expose-topic \(with different schema 3929 "Deprecated. Use `allout-expose-topic' \(with different schema
3930 format) instead. 3930 format) instead.
3931 3931
3932 Dictate wholesale exposure scheme for current topic, according to SPEC. 3932 Dictate wholesale exposure scheme for current topic, according to SPEC.
3933 3933
3934 SPEC is either a number or a list. Optional successive args 3934 SPEC is either a number or a list. Optional successive args
4002 (setq followers (cdr followers))) 4002 (setq followers (cdr followers)))
4003 max-pos)) 4003 max-pos))
4004 ;;;_ > allout-new-exposure '() 4004 ;;;_ > allout-new-exposure '()
4005 (defmacro allout-new-exposure (&rest spec) 4005 (defmacro allout-new-exposure (&rest spec)
4006 "Literal frontend for `allout-expose-topic', doesn't evaluate arguments. 4006 "Literal frontend for `allout-expose-topic', doesn't evaluate arguments.
4007 Some arguments that would need to be quoted in allout-expose-topic 4007 Some arguments that would need to be quoted in `allout-expose-topic'
4008 need not be quoted in allout-new-exposure. 4008 need not be quoted in `allout-new-exposure'.
4009 4009
4010 Cursor is left at start position. 4010 Cursor is left at start position.
4011 4011
4012 Use this instead of obsolete `allout-exposure'. 4012 Use this instead of obsolete `allout-exposure'.
4013 4013