diff options
| author | Richard M. Stallman | 2008-01-27 01:04:56 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2008-01-27 01:04:56 +0000 |
| commit | 60c7bbd2ad7f57a88dd0001e6a39e44fb6a4e7c4 (patch) | |
| tree | fecd0179309db2943e9e3362ae8c1e2faf73a663 /lisp | |
| parent | ae068fdff1f6ef59035b1db42572ea09731a8285 (diff) | |
| download | emacs-60c7bbd2ad7f57a88dd0001e6a39e44fb6a4e7c4.tar.gz emacs-60c7bbd2ad7f57a88dd0001e6a39e44fb6a4e7c4.zip | |
Many doc fixes.
(allout-encrypt-string): Fix error message.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/allout.el | 319 |
1 files changed, 160 insertions, 159 deletions
diff --git a/lisp/allout.el b/lisp/allout.el index 7782170e834..08c0c4a391f 100644 --- a/lisp/allout.el +++ b/lisp/allout.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | ;; Author: Ken Manheimer <ken dot manheimer at gmail dot com> | 6 | ;; Author: Ken Manheimer <ken dot manheimer at gmail dot com> |
| 7 | ;; Maintainer: Ken Manheimer <ken dot manheimer at gmail dot com> | 7 | ;; Maintainer: Ken Manheimer <ken dot manheimer at gmail dot com> |
| 8 | ;; Created: Dec 1991 - first release to usenet | 8 | ;; Created: Dec 1991 -- first release to usenet |
| 9 | ;; Version: 2.2.1 | 9 | ;; Version: 2.2.1 |
| 10 | ;; Keywords: outlines wp languages | 10 | ;; Keywords: outlines wp languages |
| 11 | ;; Website: http://myriadicity.net/Sundry/EmacsAllout | 11 | ;; Website: http://myriadicity.net/Sundry/EmacsAllout |
| @@ -36,11 +36,11 @@ | |||
| 36 | ;; - Topic-oriented editing including coherent topic and subtopic | 36 | ;; - Topic-oriented editing including coherent topic and subtopic |
| 37 | ;; creation, promotion, demotion, cut/paste across depths, etc. | 37 | ;; creation, promotion, demotion, cut/paste across depths, etc. |
| 38 | ;; - Incremental search with dynamic exposure and reconcealment of text | 38 | ;; - Incremental search with dynamic exposure and reconcealment of text |
| 39 | ;; - Customizable bullet format - enables programming-language specific | 39 | ;; - Customizable bullet format -- enables programming-language specific |
| 40 | ;; outlining, for code-folding editing. (Allout code itself is to try it; | 40 | ;; outlining, for code-folding editing. (Allout code itself is to try it; |
| 41 | ;; formatted as an outline - do ESC-x eval-buffer in allout.el; but | 41 | ;; formatted as an outline -- do ESC-x eval-buffer in allout.el; but |
| 42 | ;; emacs local file variables need to be enabled when the | 42 | ;; emacs local file variables need to be enabled when the |
| 43 | ;; file was visited - see `enable-local-variables'.) | 43 | ;; file was visited -- see `enable-local-variables'.) |
| 44 | ;; - Configurable per-file initial exposure settings | 44 | ;; - Configurable per-file initial exposure settings |
| 45 | ;; - Symmetric-key and key-pair topic encryption, plus symmetric passphrase | 45 | ;; - Symmetric-key and key-pair topic encryption, plus symmetric passphrase |
| 46 | ;; mnemonic support, with verification against an established passphrase | 46 | ;; mnemonic support, with verification against an established passphrase |
| @@ -53,7 +53,7 @@ | |||
| 53 | ;; exposure control (see the allout-mode docstring) | 53 | ;; exposure control (see the allout-mode docstring) |
| 54 | ;; - Easy rendering of exposed portions into numbered, latex, indented, etc | 54 | ;; - Easy rendering of exposed portions into numbered, latex, indented, etc |
| 55 | ;; outline styles | 55 | ;; outline styles |
| 56 | ;; - Careful attention to whitespace - enabling blank lines between items | 56 | ;; - Careful attention to whitespace -- enabling blank lines between items |
| 57 | ;; and maintenance of hanging indentation (in paragraph auto-fill and | 57 | ;; and maintenance of hanging indentation (in paragraph auto-fill and |
| 58 | ;; across topic promotion and demotion) of topic bodies consistent with | 58 | ;; across topic promotion and demotion) of topic bodies consistent with |
| 59 | ;; indentation of their topic header. | 59 | ;; indentation of their topic header. |
| @@ -76,7 +76,7 @@ | |||
| 76 | ;; `allout-mode' as a minor mode. (It has changed since allout | 76 | ;; `allout-mode' as a minor mode. (It has changed since allout |
| 77 | ;; 3.x, for those of you that depend on the old method.) | 77 | ;; 3.x, for those of you that depend on the old method.) |
| 78 | ;; | 78 | ;; |
| 79 | ;; Note - the lines beginning with `;;;_' are outline topic headers. | 79 | ;; Note -- the lines beginning with `;;;_' are outline topic headers. |
| 80 | ;; Just `ESC-x eval-buffer' to give it a whirl. | 80 | ;; Just `ESC-x eval-buffer' to give it a whirl. |
| 81 | 81 | ||
| 82 | ;; ken manheimer (ken dot manheimer at gmail dot com) | 82 | ;; ken manheimer (ken dot manheimer at gmail dot com) |
| @@ -111,7 +111,7 @@ | |||
| 111 | 111 | ||
| 112 | ;;;_ = allout-auto-activation | 112 | ;;;_ = allout-auto-activation |
| 113 | (defcustom allout-auto-activation nil | 113 | (defcustom allout-auto-activation nil |
| 114 | "*Regulates auto-activation modality of allout outlines - see `allout-init'. | 114 | "*Regulates auto-activation modality of allout outlines -- see `allout-init'. |
| 115 | 115 | ||
| 116 | Setq-default by `allout-init' to regulate whether or not allout | 116 | Setq-default by `allout-init' to regulate whether or not allout |
| 117 | outline mode is automatically activated when the buffer-specific | 117 | outline mode is automatically activated when the buffer-specific |
| @@ -153,35 +153,35 @@ value will automatically trigger `allout-mode', provided | |||
| 153 | 153 | ||
| 154 | The types of elements in the layout specification are: | 154 | The types of elements in the layout specification are: |
| 155 | 155 | ||
| 156 | integer - dictate the relative depth to open the corresponding topic(s), | 156 | INTEGER -- dictate the relative depth to open the corresponding topic(s), |
| 157 | where: | 157 | where: |
| 158 | - negative numbers force the topic to be closed before opening | 158 | -- negative numbers force the topic to be closed before opening |
| 159 | to the absolute value of the number, so all siblings are open | 159 | to the absolute value of the number, so all siblings are open |
| 160 | only to that level. | 160 | only to that level. |
| 161 | - positive numbers open to the relative depth indicated by the | 161 | -- positive numbers open to the relative depth indicated by the |
| 162 | number, but do not force already opened subtopics to be closed. | 162 | number, but do not force already opened subtopics to be closed. |
| 163 | - 0 means to close topic - hide all subitems. | 163 | -- 0 means to close topic -- hide all subitems. |
| 164 | : - repeat spec - apply the preceeding element to all siblings at | 164 | : -- repeat spec -- apply the preceeding element to all siblings at |
| 165 | current level, *up to* those siblings that would be covered by specs | 165 | current level, *up to* those siblings that would be covered by specs |
| 166 | following the `:' on the list. Ie, apply to all topics at level but | 166 | following the `:' on the list. Ie, apply to all topics at level but |
| 167 | trailing ones accounted for by trailing specs. (Only the first of | 167 | trailing ones accounted for by trailing specs. (Only the first of |
| 168 | multiple colons at the same level is honored - later ones are ignored.) | 168 | multiple colons at the same level is honored -- later ones are ignored.) |
| 169 | * - completely exposes the topic, including bodies | 169 | * -- completely exposes the topic, including bodies |
| 170 | + - exposes all subtopics, but not the bodies | 170 | + -- exposes all subtopics, but not the bodies |
| 171 | - - exposes the body of the corresponding topic, but not subtopics | 171 | - -- exposes the body of the corresponding topic, but not subtopics |
| 172 | list - a nested layout spec, to be applied intricately to its | 172 | LIST -- a nested layout spec, to be applied intricately to its |
| 173 | corresponding item(s) | 173 | corresponding item(s) |
| 174 | 174 | ||
| 175 | Examples: | 175 | Examples: |
| 176 | '(-2 : 0) | 176 | (-2 : 0) |
| 177 | Collapse the top-level topics to show their children and | 177 | Collapse the top-level topics to show their children and |
| 178 | grandchildren, but completely collapse the final top-level topic. | 178 | grandchildren, but completely collapse the final top-level topic. |
| 179 | '(-1 () : 1 0) | 179 | (-1 () : 1 0) |
| 180 | Close the first topic so only the immediate subtopics are shown, | 180 | Close the first topic so only the immediate subtopics are shown, |
| 181 | leave the subsequent topics exposed as they are until the second | 181 | leave the subsequent topics exposed as they are until the second |
| 182 | second to last topic, which is exposed at least one level, and | 182 | second to last topic, which is exposed at least one level, and |
| 183 | completely close the last topic. | 183 | completely close the last topic. |
| 184 | '(-2 : -1 *) | 184 | (-2 : -1 *) |
| 185 | Expose children and grandchildren of all topics at current | 185 | Expose children and grandchildren of all topics at current |
| 186 | level except the last two; expose children of the second to | 186 | level except the last two; expose children of the second to |
| 187 | last and completely expose the last one, including its subtopics. | 187 | last and completely expose the last one, including its subtopics. |
| @@ -253,7 +253,7 @@ repeated calls." | |||
| 253 | Cycling only happens on when the command is repeated, not when it | 253 | Cycling only happens on when the command is repeated, not when it |
| 254 | follows a different command. | 254 | follows a different command. |
| 255 | 255 | ||
| 256 | Smart-placement means that repeated calls to this function will | 256 | Smart placement means that repeated calls to this function will |
| 257 | advance as follows: | 257 | advance as follows: |
| 258 | 258 | ||
| 259 | - if the cursor is not on the end-of-line, | 259 | - if the cursor is not on the end-of-line, |
| @@ -335,25 +335,25 @@ persistent until deliberately changed. Their significance is | |||
| 335 | purely by convention, however. Some conventions suggest | 335 | purely by convention, however. Some conventions suggest |
| 336 | themselves: | 336 | themselves: |
| 337 | 337 | ||
| 338 | `(' - open paren - an aside or incidental point | 338 | `(' - open paren -- an aside or incidental point |
| 339 | `?' - question mark - uncertain or outright question | 339 | `?' - question mark -- uncertain or outright question |
| 340 | `!' - exclamation point/bang - emphatic | 340 | `!' - exclamation point/bang -- emphatic |
| 341 | `[' - open square bracket - meta-note, about item instead of item's subject | 341 | `[' - open square bracket -- meta-note, about item instead of item's subject |
| 342 | `\"' - double quote - a quotation or other citation | 342 | `\"' - double quote -- a quotation or other citation |
| 343 | `=' - equal sign - an assignement, equating a name with some connotation | 343 | `=' - equal sign -- an assignement, equating a name with some connotation |
| 344 | `^' - carat - relates to something above | 344 | `^' - carat -- relates to something above |
| 345 | 345 | ||
| 346 | Some are more elusive, but their rationale may be recognizable: | 346 | Some are more elusive, but their rationale may be recognizable: |
| 347 | 347 | ||
| 348 | `+' - plus - pending consideration, completion | 348 | `+' - plus -- pending consideration, completion |
| 349 | `_' - underscore - done, completed | 349 | `_' - underscore -- done, completed |
| 350 | `&' - ampersand - addendum, furthermore | 350 | `&' - ampersand -- addendum, furthermore |
| 351 | 351 | ||
| 352 | \(Some other non-plain bullets have special meaning to the | 352 | \(Some other non-plain bullets have special meaning to the |
| 353 | software. By default: | 353 | software. By default: |
| 354 | 354 | ||
| 355 | `~' marks encryptable topics - see `allout-topic-encryption-bullet' | 355 | `~' marks encryptable topics -- see `allout-topic-encryption-bullet' |
| 356 | `#' marks auto-numbered bullets - see `allout-numbered-bullet'.) | 356 | `#' marks auto-numbered bullets -- see `allout-numbered-bullet'.) |
| 357 | 357 | ||
| 358 | See `allout-plain-bullets-string' for the standard, alternating | 358 | See `allout-plain-bullets-string' for the standard, alternating |
| 359 | bullets. | 359 | bullets. |
| @@ -436,7 +436,7 @@ are always respected by the topic maneuvering functions." | |||
| 436 | ;;;###autoload | 436 | ;;;###autoload |
| 437 | (put 'allout-old-style-prefixes 'safe-local-variable | 437 | (put 'allout-old-style-prefixes 'safe-local-variable |
| 438 | (if (fboundp 'booleanp) 'booleanp '(lambda (x) (member x '(t nil))))) | 438 | (if (fboundp 'booleanp) 'booleanp '(lambda (x) (member x '(t nil))))) |
| 439 | ;;;_ = allout-stylish-prefixes - alternating bullets | 439 | ;;;_ = allout-stylish-prefixes -- alternating bullets |
| 440 | (defcustom allout-stylish-prefixes t | 440 | (defcustom allout-stylish-prefixes t |
| 441 | "*Do fancy stuff with topic prefix bullets according to level, etc. | 441 | "*Do fancy stuff with topic prefix bullets according to level, etc. |
| 442 | 442 | ||
| @@ -600,9 +600,9 @@ variable for details about allout ajustment of file variables." | |||
| 600 | (defcustom allout-passphrase-hint-handling 'always | 600 | (defcustom allout-passphrase-hint-handling 'always |
| 601 | "*Dictate outline encryption passphrase reminder handling: | 601 | "*Dictate outline encryption passphrase reminder handling: |
| 602 | 602 | ||
| 603 | always - always show reminder when prompting | 603 | always -- always show reminder when prompting |
| 604 | needed - show reminder on passphrase entry failure | 604 | needed -- show reminder on passphrase entry failure |
| 605 | disabled - never present or adjust reminder | 605 | disabled -- never present or adjust reminder |
| 606 | 606 | ||
| 607 | See the docstring for the `allout-enable-file-variable-adjustment' | 607 | See the docstring for the `allout-enable-file-variable-adjustment' |
| 608 | variable for details about allout ajustment of file variables." | 608 | variable for details about allout ajustment of file variables." |
| @@ -625,7 +625,7 @@ mostly covers both deliberate file writes and auto-saves. | |||
| 625 | can continue editing but the copy on the file system will be | 625 | can continue editing but the copy on the file system will be |
| 626 | encrypted.) | 626 | encrypted.) |
| 627 | Auto-saves will use the \"All except current topic\" mode if this | 627 | Auto-saves will use the \"All except current topic\" mode if this |
| 628 | one is selected, to avoid practical difficulties - see below. | 628 | one is selected, to avoid practical difficulties -- see below. |
| 629 | - All except current topic: skip the topic currently being edited, even if | 629 | - All except current topic: skip the topic currently being edited, even if |
| 630 | it's pending encryption. This may expose the current topic on the | 630 | it's pending encryption. This may expose the current topic on the |
| 631 | file sytem, but avoids the nuisance of prompts for the encryption | 631 | file sytem, but avoids the nuisance of prompts for the encryption |
| @@ -677,7 +677,7 @@ willing to let allout use a bunch of \C-c keybindings." | |||
| 677 | :group 'allout) | 677 | :group 'allout) |
| 678 | 678 | ||
| 679 | ;;;_ = allout-keybindings-list | 679 | ;;;_ = allout-keybindings-list |
| 680 | ;;; You have to reactivate allout-mode - `(allout-mode t)' - to | 680 | ;;; You have to reactivate allout-mode -- `(allout-mode t)' -- to |
| 681 | ;;; institute changes to this var. | 681 | ;;; institute changes to this var. |
| 682 | (defvar allout-keybindings-list () | 682 | (defvar allout-keybindings-list () |
| 683 | "*List of `allout-mode' key / function bindings, for `allout-mode-map'. | 683 | "*List of `allout-mode' key / function bindings, for `allout-mode-map'. |
| @@ -792,7 +792,7 @@ For details, see `allout-toggle-current-subtree-encryption's docstring." | |||
| 792 | :group 'allout) | 792 | :group 'allout) |
| 793 | (make-variable-buffer-local 'allout-enable-file-variable-adjustment) | 793 | (make-variable-buffer-local 'allout-enable-file-variable-adjustment) |
| 794 | 794 | ||
| 795 | ;;;_* CODE - no user customizations below. | 795 | ;;;_* CODE -- no user customizations below. |
| 796 | 796 | ||
| 797 | ;;;_ #1 Internal Outline Formatting and Configuration | 797 | ;;;_ #1 Internal Outline Formatting and Configuration |
| 798 | ;;;_ : Version | 798 | ;;;_ : Version |
| @@ -812,7 +812,7 @@ For details, see `allout-toggle-current-subtree-encryption's docstring." | |||
| 812 | (defvar allout-mode nil "Allout outline mode minor-mode flag.") | 812 | (defvar allout-mode nil "Allout outline mode minor-mode flag.") |
| 813 | (make-variable-buffer-local 'allout-mode) | 813 | (make-variable-buffer-local 'allout-mode) |
| 814 | ;;;_ = allout-layout nil | 814 | ;;;_ = allout-layout nil |
| 815 | (defvar allout-layout nil ; LEAVE GLOBAL VALUE NIL - see docstring. | 815 | (defvar allout-layout nil ; LEAVE GLOBAL VALUE NIL -- see docstring. |
| 816 | "Buffer-specific setting for allout layout. | 816 | "Buffer-specific setting for allout layout. |
| 817 | 817 | ||
| 818 | In buffers where this is non-nil (and if `allout-init' has been run, to | 818 | In buffers where this is non-nil (and if `allout-init' has been run, to |
| @@ -856,7 +856,7 @@ by `set-allout-regexp'.") | |||
| 856 | (defvar allout-bullets-string "" | 856 | (defvar allout-bullets-string "" |
| 857 | "A string dictating the valid set of outline topic bullets. | 857 | "A string dictating the valid set of outline topic bullets. |
| 858 | 858 | ||
| 859 | This var should *not* be set by the user - it is set by `set-allout-regexp', | 859 | This var should *not* be set by the user -- it is set by `set-allout-regexp', |
| 860 | and is produced from the elements of `allout-plain-bullets-string' | 860 | and is produced from the elements of `allout-plain-bullets-string' |
| 861 | and `allout-distinctive-bullets-string'.") | 861 | and `allout-distinctive-bullets-string'.") |
| 862 | (make-variable-buffer-local 'allout-bullets-string) | 862 | (make-variable-buffer-local 'allout-bullets-string) |
| @@ -954,7 +954,7 @@ invoking it directly." | |||
| 954 | comment-start | 954 | comment-start |
| 955 | t))) | 955 | t))) |
| 956 | allout-use-mode-specific-leader | 956 | allout-use-mode-specific-leader |
| 957 | ;; Oops - garbled value, equate with effect of 't: | 957 | ;; Oops -- garbled value, equate with effect of t: |
| 958 | t))) | 958 | t))) |
| 959 | (leader | 959 | (leader |
| 960 | (cond | 960 | (cond |
| @@ -983,7 +983,7 @@ invoking it directly." | |||
| 983 | (setq allout-header-prefix leader) | 983 | (setq allout-header-prefix leader) |
| 984 | (if (not allout-old-style-prefixes) | 984 | (if (not allout-old-style-prefixes) |
| 985 | ;; setting allout-primary-bullet makes the top level topics use - | 985 | ;; setting allout-primary-bullet makes the top level topics use - |
| 986 | ;; actually, be - the special prefix: | 986 | ;; actually, be -- the special prefix: |
| 987 | (setq allout-primary-bullet leader)) | 987 | (setq allout-primary-bullet leader)) |
| 988 | allout-header-prefix))) | 988 | allout-header-prefix))) |
| 989 | (defalias 'allout-infer-header-lead | 989 | (defalias 'allout-infer-header-lead |
| @@ -1239,7 +1239,7 @@ extended from the existing one by `append'ing a list containing the second | |||
| 1239 | element of the pair onto the end of the existing value. | 1239 | element of the pair onto the end of the existing value. |
| 1240 | 1240 | ||
| 1241 | Extension, and resumptions in general, should not be used for hook | 1241 | Extension, and resumptions in general, should not be used for hook |
| 1242 | functions - use the 'local mode of `add-hook' for that, instead. | 1242 | functions -- use the 'local mode of `add-hook' for that, instead. |
| 1243 | 1243 | ||
| 1244 | The settings are stored on `allout-mode-prior-settings'." | 1244 | The settings are stored on `allout-mode-prior-settings'." |
| 1245 | (while pairs | 1245 | (while pairs |
| @@ -1258,7 +1258,7 @@ The settings are stored on `allout-mode-prior-settings'." | |||
| 1258 | (when (not (assoc name allout-mode-prior-settings)) | 1258 | (when (not (assoc name allout-mode-prior-settings)) |
| 1259 | ;; Not already added as a resumption, create the prior setting entry. | 1259 | ;; Not already added as a resumption, create the prior setting entry. |
| 1260 | (if (local-variable-p name) | 1260 | (if (local-variable-p name) |
| 1261 | ;; is already local variable - preserve the prior value: | 1261 | ;; is already local variable -- preserve the prior value: |
| 1262 | (push (list name prior-value) allout-mode-prior-settings) | 1262 | (push (list name prior-value) allout-mode-prior-settings) |
| 1263 | ;; wasn't local variable, indicate so for resumption by killing | 1263 | ;; wasn't local variable, indicate so for resumption by killing |
| 1264 | ;; local value, and make it local: | 1264 | ;; local value, and make it local: |
| @@ -1324,9 +1324,9 @@ It is run at the conclusion of `allout-flag-region'. | |||
| 1324 | 1324 | ||
| 1325 | Functions on the hook must take three arguments: | 1325 | Functions on the hook must take three arguments: |
| 1326 | 1326 | ||
| 1327 | - from - integer indicating the point at the start of the change. | 1327 | - FROM -- integer indicating the point at the start of the change. |
| 1328 | - to - integer indicating the point of the end of the change. | 1328 | - TO -- integer indicating the point of the end of the change. |
| 1329 | - flag - change mode: nil for exposure, otherwise concealment. | 1329 | - FLAG -- change mode: nil for exposure, otherwise concealment. |
| 1330 | 1330 | ||
| 1331 | This hook might be invoked multiple times by a single command. | 1331 | This hook might be invoked multiple times by a single command. |
| 1332 | 1332 | ||
| @@ -1338,10 +1338,10 @@ and eventually will not be invoked.") | |||
| 1338 | 1338 | ||
| 1339 | Functions on the hook should take two arguments: | 1339 | Functions on the hook should take two arguments: |
| 1340 | 1340 | ||
| 1341 | - new-start - integer indicating the point at the start of the first new item. | 1341 | - NEW-START -- integer indicating position of start of the first new item. |
| 1342 | - new-end - integer indicating the point of the end of the last new item. | 1342 | - NEW-END -- integer indicating position of end of the last new item. |
| 1343 | 1343 | ||
| 1344 | Some edits that introduce new items may missed by this hook - | 1344 | Some edits that introduce new items may missed by this hook: |
| 1345 | specifically edits that native allout routines do not control. | 1345 | specifically edits that native allout routines do not control. |
| 1346 | 1346 | ||
| 1347 | This hook might be invoked multiple times by a single command.") | 1347 | This hook might be invoked multiple times by a single command.") |
| @@ -1351,10 +1351,10 @@ This hook might be invoked multiple times by a single command.") | |||
| 1351 | 1351 | ||
| 1352 | Functions on the hook must take two arguments: | 1352 | Functions on the hook must take two arguments: |
| 1353 | 1353 | ||
| 1354 | - depth - integer indicating the depth of the subtree that was deleted. | 1354 | - DEPTH -- integer indicating the depth of the subtree that was deleted. |
| 1355 | - removed-from - integer indicating the point where the subtree was removed. | 1355 | - REMOVED-FROM -- integer indicating the point where the subtree was removed. |
| 1356 | 1356 | ||
| 1357 | Some edits that remove or invalidate items may missed by this hook - | 1357 | Some edits that remove or invalidate items may missed by this hook: |
| 1358 | specifically edits that native allout routines do not control. | 1358 | specifically edits that native allout routines do not control. |
| 1359 | 1359 | ||
| 1360 | This hook might be invoked multiple times by a single command.") | 1360 | This hook might be invoked multiple times by a single command.") |
| @@ -1364,10 +1364,10 @@ This hook might be invoked multiple times by a single command.") | |||
| 1364 | 1364 | ||
| 1365 | Functions on the hook should take two arguments: | 1365 | Functions on the hook should take two arguments: |
| 1366 | 1366 | ||
| 1367 | - depth-change - integer indicating depth increase, negative for decrease | 1367 | - DEPTH-CHANGE -- integer indicating depth increase, negative for decrease |
| 1368 | - start - integer indicating the start point of the shifted parent item. | 1368 | - START -- integer indicating the start point of the shifted parent item. |
| 1369 | 1369 | ||
| 1370 | Some edits that shift items can be missed by this hook - specifically edits | 1370 | Some edits that shift items can be missed by this hook: specifically edits |
| 1371 | that native allout routines do not control. | 1371 | that native allout routines do not control. |
| 1372 | 1372 | ||
| 1373 | This hook might be invoked multiple times by a single command.") | 1373 | This hook might be invoked multiple times by a single command.") |
| @@ -1462,7 +1462,7 @@ See `allout-encryption-ciphertext-rejection-regexps' for rejection reasons.") | |||
| 1462 | (make-variable-buffer-local 'allout-encryption-ciphertext-rejection-ceiling) | 1462 | (make-variable-buffer-local 'allout-encryption-ciphertext-rejection-ceiling) |
| 1463 | ;;;_ > allout-mode-p () | 1463 | ;;;_ > allout-mode-p () |
| 1464 | ;; Must define this macro above any uses, or byte compilation will lack | 1464 | ;; Must define this macro above any uses, or byte compilation will lack |
| 1465 | ;; proper def, if file isn't loaded - eg, during emacs build! | 1465 | ;; proper def, if file isn't loaded -- eg, during emacs build! |
| 1466 | (defmacro allout-mode-p () | 1466 | (defmacro allout-mode-p () |
| 1467 | "Return t if `allout-mode' is active in current buffer." | 1467 | "Return t if `allout-mode' is active in current buffer." |
| 1468 | 'allout-mode) | 1468 | 'allout-mode) |
| @@ -1638,8 +1638,8 @@ the following two lines in your Emacs init file: | |||
| 1638 | (put 'allout-exposure-category 'evaporate t) | 1638 | (put 'allout-exposure-category 'evaporate t) |
| 1639 | ;; XXX We use isearch-open-invisible *and* isearch-mode-end-hook. The | 1639 | ;; XXX We use isearch-open-invisible *and* isearch-mode-end-hook. The |
| 1640 | ;; latter would be sufficient, but it seems that a separate behavior - | 1640 | ;; latter would be sufficient, but it seems that a separate behavior - |
| 1641 | ;; the _transient_ opening of invisible text during isearch - is keyed to | 1641 | ;; the _transient_ opening of invisible text during isearch -- is keyed to |
| 1642 | ;; presence of the isearch-open-invisible property - even though this | 1642 | ;; presence of the isearch-open-invisible property -- even though this |
| 1643 | ;; property controls the isearch _arrival_ behavior. This is the case at | 1643 | ;; property controls the isearch _arrival_ behavior. This is the case at |
| 1644 | ;; least in emacs 21, 22.0, and xemacs 21.4. | 1644 | ;; least in emacs 21, 22.0, and xemacs 21.4. |
| 1645 | (put 'allout-exposure-category 'isearch-open-invisible | 1645 | (put 'allout-exposure-category 'isearch-open-invisible |
| @@ -1693,7 +1693,7 @@ variable. We recommend customizing `allout-command-prefix' to use just | |||
| 1693 | `\\C-c' as the command prefix, if the allout bindings don't conflict with | 1693 | `\\C-c' as the command prefix, if the allout bindings don't conflict with |
| 1694 | any personal bindings you have on \\C-c. In any case, outline structure | 1694 | any personal bindings you have on \\C-c. In any case, outline structure |
| 1695 | navigation and authoring is simplified by positioning the cursor on an | 1695 | navigation and authoring is simplified by positioning the cursor on an |
| 1696 | item's bullet character, the \"hot-spot\" - then you can invoke allout | 1696 | item's bullet character, the \"hot-spot\" -- then you can invoke allout |
| 1697 | commands with just the un-prefixed, un-control-shifted command letters. | 1697 | commands with just the un-prefixed, un-control-shifted command letters. |
| 1698 | This is described further in the HOT-SPOT Operation section. | 1698 | This is described further in the HOT-SPOT Operation section. |
| 1699 | 1699 | ||
| @@ -1714,7 +1714,7 @@ This is described further in the HOT-SPOT Operation section. | |||
| 1714 | \\[allout-backward-current-level] `allout-backward-current-level' | 1714 | \\[allout-backward-current-level] `allout-backward-current-level' |
| 1715 | \\[allout-end-of-entry] `allout-end-of-entry' | 1715 | \\[allout-end-of-entry] `allout-end-of-entry' |
| 1716 | \\[allout-beginning-of-current-entry] `allout-beginning-of-current-entry' (alternately, goes to hot-spot) | 1716 | \\[allout-beginning-of-current-entry] `allout-beginning-of-current-entry' (alternately, goes to hot-spot) |
| 1717 | \\[allout-beginning-of-line] `allout-beginning-of-line' - like regular beginning-of-line, but | 1717 | \\[allout-beginning-of-line] `allout-beginning-of-line' -- like regular beginning-of-line, but |
| 1718 | if immediately repeated cycles to the beginning of the current item | 1718 | if immediately repeated cycles to the beginning of the current item |
| 1719 | and then to the hot-spot (if `allout-beginning-of-line-cycles' is set). | 1719 | and then to the hot-spot (if `allout-beginning-of-line-cycles' is set). |
| 1720 | 1720 | ||
| @@ -1732,7 +1732,7 @@ This is described further in the HOT-SPOT Operation section. | |||
| 1732 | \\[allout-rebullet-current-heading] `allout-rebullet-current-heading' Prompt for alternate bullet for | 1732 | \\[allout-rebullet-current-heading] `allout-rebullet-current-heading' Prompt for alternate bullet for |
| 1733 | current topic | 1733 | current topic |
| 1734 | \\[allout-rebullet-topic] `allout-rebullet-topic' Reconcile bullets of topic and | 1734 | \\[allout-rebullet-topic] `allout-rebullet-topic' Reconcile bullets of topic and |
| 1735 | its' offspring - distinctive bullets are not changed, others | 1735 | its' offspring -- distinctive bullets are not changed, others |
| 1736 | are alternated according to nesting depth. | 1736 | are alternated according to nesting depth. |
| 1737 | \\[allout-number-siblings] `allout-number-siblings' Number bullets of topic and siblings - | 1737 | \\[allout-number-siblings] `allout-number-siblings' Number bullets of topic and siblings - |
| 1738 | the offspring are not affected. | 1738 | the offspring are not affected. |
| @@ -1763,7 +1763,7 @@ M-x outlineify-sticky Activate outline mode for current buffer, | |||
| 1763 | \\[allout-copy-exposed-to-buffer] `allout-copy-exposed-to-buffer' | 1763 | \\[allout-copy-exposed-to-buffer] `allout-copy-exposed-to-buffer' |
| 1764 | Duplicate outline, sans concealed text, to | 1764 | Duplicate outline, sans concealed text, to |
| 1765 | buffer with name derived from derived from that | 1765 | buffer with name derived from derived from that |
| 1766 | of current buffer - \"*BUFFERNAME exposed*\". | 1766 | of current buffer -- \"*BUFFERNAME exposed*\". |
| 1767 | \\[allout-flatten-exposed-to-buffer] `allout-flatten-exposed-to-buffer' | 1767 | \\[allout-flatten-exposed-to-buffer] `allout-flatten-exposed-to-buffer' |
| 1768 | Like above 'copy-exposed', but convert topic | 1768 | Like above 'copy-exposed', but convert topic |
| 1769 | prefixes to section.subsection... numeric | 1769 | prefixes to section.subsection... numeric |
| @@ -1832,7 +1832,7 @@ without changes to the allout core. Here are key ones: | |||
| 1832 | 1832 | ||
| 1833 | Terminology | 1833 | Terminology |
| 1834 | 1834 | ||
| 1835 | Topic hierarchy constituents - TOPICS and SUBTOPICS: | 1835 | Topic hierarchy constituents -- TOPICS and SUBTOPICS: |
| 1836 | 1836 | ||
| 1837 | ITEM: A unitary outline element, including the HEADER and ENTRY text. | 1837 | ITEM: A unitary outline element, including the HEADER and ENTRY text. |
| 1838 | TOPIC: An ITEM and any ITEMs contained within it, ie having greater DEPTH | 1838 | TOPIC: An ITEM and any ITEMs contained within it, ie having greater DEPTH |
| @@ -2085,7 +2085,7 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be." | |||
| 2085 | (progn | 2085 | (progn |
| 2086 | (apply 'allout-expose-topic (list use-layout)) | 2086 | (apply 'allout-expose-topic (list use-layout)) |
| 2087 | (message "Adjusting '%s' exposure... done." (buffer-name))) | 2087 | (message "Adjusting '%s' exposure... done." (buffer-name))) |
| 2088 | ;; Problem applying exposure - notify user, but don't | 2088 | ;; Problem applying exposure -- notify user, but don't |
| 2089 | ;; interrupt, eg, file visit: | 2089 | ;; interrupt, eg, file visit: |
| 2090 | (error (message "%s" (car (cdr err))) | 2090 | (error (message "%s" (car (cdr err))) |
| 2091 | (sit-for 1)))))) | 2091 | (sit-for 1)))))) |
| @@ -2153,7 +2153,7 @@ We expose the invisible text and ask for confirmation. Refusal or | |||
| 2153 | `keyboard-quit' abandons the changes, with keyboard-quit additionally | 2153 | `keyboard-quit' abandons the changes, with keyboard-quit additionally |
| 2154 | reclosing the opened text. | 2154 | reclosing the opened text. |
| 2155 | 2155 | ||
| 2156 | No confirmation is necessary when `inhibit-read-only' is set - eg, allout | 2156 | No confirmation is necessary when `inhibit-read-only' is set -- eg, allout |
| 2157 | internal functions use this feature cohesively bunch changes." | 2157 | internal functions use this feature cohesively bunch changes." |
| 2158 | 2158 | ||
| 2159 | (when (and (not inhibit-read-only) (not after)) | 2159 | (when (and (not inhibit-read-only) (not after)) |
| @@ -2191,7 +2191,7 @@ internal functions use this feature cohesively bunch changes." | |||
| 2191 | (defun allout-before-change-handler (beg end) | 2191 | (defun allout-before-change-handler (beg end) |
| 2192 | "Protect against changes to invisible text. | 2192 | "Protect against changes to invisible text. |
| 2193 | 2193 | ||
| 2194 | See allout-overlay-interior-modification-handler for details." | 2194 | See `allout-overlay-interior-modification-handler' for details." |
| 2195 | 2195 | ||
| 2196 | (if (and (allout-mode-p) undo-in-progress (allout-hidden-p)) | 2196 | (if (and (allout-mode-p) undo-in-progress (allout-hidden-p)) |
| 2197 | (allout-show-to-offshoot)) | 2197 | (allout-show-to-offshoot)) |
| @@ -2216,7 +2216,7 @@ function can also be used as an `isearch-mode-end-hook'." | |||
| 2216 | (if (and (allout-mode-p) (allout-hidden-p)) | 2216 | (if (and (allout-mode-p) (allout-hidden-p)) |
| 2217 | (allout-show-to-offshoot))) | 2217 | (allout-show-to-offshoot))) |
| 2218 | 2218 | ||
| 2219 | ;;;_ #3 Internal Position State-Tracking - "allout-recent-*" funcs | 2219 | ;;;_ #3 Internal Position State-Tracking -- "allout-recent-*" funcs |
| 2220 | ;;; All the basic outline functions that directly do string matches to | 2220 | ;;; All the basic outline functions that directly do string matches to |
| 2221 | ;;; evaluate heading prefix location set the variables | 2221 | ;;; evaluate heading prefix location set the variables |
| 2222 | ;;; `allout-recent-prefix-beginning' and `allout-recent-prefix-end' | 2222 | ;;; `allout-recent-prefix-beginning' and `allout-recent-prefix-end' |
| @@ -2299,7 +2299,7 @@ to return the current depth of the most recently matched topic." | |||
| 2299 | (defsubst allout-do-doublecheck () | 2299 | (defsubst allout-do-doublecheck () |
| 2300 | "True if current item conditions qualify for checking on topic aberrance." | 2300 | "True if current item conditions qualify for checking on topic aberrance." |
| 2301 | (and | 2301 | (and |
| 2302 | ;; presume integrity of outline and yanked content during yank - necessary, | 2302 | ;; presume integrity of outline and yanked content during yank -- necessary |
| 2303 | ;; to allow for level disparity of yank location and yanked text: | 2303 | ;; to allow for level disparity of yank location and yanked text: |
| 2304 | (not allout-inhibit-aberrance-doublecheck) | 2304 | (not allout-inhibit-aberrance-doublecheck) |
| 2305 | ;; allout-doublecheck-at-and-shallower is ceiling for doublecheck: | 2305 | ;; allout-doublecheck-at-and-shallower is ceiling for doublecheck: |
| @@ -2336,12 +2336,12 @@ exceeds the topic by more than one." | |||
| 2336 | (allout-prefix-data) | 2336 | (allout-prefix-data) |
| 2337 | (goto-char allout-recent-prefix-beginning) | 2337 | (goto-char allout-recent-prefix-beginning) |
| 2338 | (cond | 2338 | (cond |
| 2339 | ;; sibling - continue: | 2339 | ;; sibling -- continue: |
| 2340 | ((eq allout-recent-depth depth)) | 2340 | ((eq allout-recent-depth depth)) |
| 2341 | ;; first offspring is excessive - aberrant: | 2341 | ;; first offspring is excessive -- aberrant: |
| 2342 | ((> allout-recent-depth (1+ depth)) | 2342 | ((> allout-recent-depth (1+ depth)) |
| 2343 | (setq done t aberrant t)) | 2343 | (setq done t aberrant t)) |
| 2344 | ;; next non-sibling is lower-depth - not aberrant: | 2344 | ;; next non-sibling is lower-depth -- not aberrant: |
| 2345 | (t (setq done t))))) | 2345 | (t (setq done t))))) |
| 2346 | (if aberrant | 2346 | (if aberrant |
| 2347 | aberrant | 2347 | aberrant |
| @@ -2666,9 +2666,9 @@ starting point, and PREV-DEPTH is depth of prior topic." | |||
| 2666 | ;; Register this one and move on: | 2666 | ;; Register this one and move on: |
| 2667 | (setq chart (cons allout-recent-prefix-beginning chart)) | 2667 | (setq chart (cons allout-recent-prefix-beginning chart)) |
| 2668 | (if (and levels (<= levels 1)) | 2668 | (if (and levels (<= levels 1)) |
| 2669 | ;; At depth limit - skip sublevels: | 2669 | ;; At depth limit -- skip sublevels: |
| 2670 | (or (allout-next-sibling curr-depth) | 2670 | (or (allout-next-sibling curr-depth) |
| 2671 | ;; or no more siblings - proceed to | 2671 | ;; or no more siblings -- proceed to |
| 2672 | ;; next heading at lesser depth: | 2672 | ;; next heading at lesser depth: |
| 2673 | (while (and (<= curr-depth | 2673 | (while (and (<= curr-depth |
| 2674 | allout-recent-depth) | 2674 | allout-recent-depth) |
| @@ -2741,7 +2741,7 @@ start point." | |||
| 2741 | (let ((further (allout-chart-to-reveal here (if (null depth) | 2741 | (let ((further (allout-chart-to-reveal here (if (null depth) |
| 2742 | depth | 2742 | depth |
| 2743 | (1- depth))))) | 2743 | (1- depth))))) |
| 2744 | ;; We're on the start of a subtree - recurse with it, if there's | 2744 | ;; We're on the start of a subtree -- recurse with it, if there's |
| 2745 | ;; more depth to go: | 2745 | ;; more depth to go: |
| 2746 | (if further (setq result (append further result))) | 2746 | (if further (setq result (append further result))) |
| 2747 | (setq chart (cdr chart))) | 2747 | (setq chart (cdr chart))) |
| @@ -3126,7 +3126,7 @@ situation." | |||
| 3126 | (progn (goto-char start-point) | 3126 | (progn (goto-char start-point) |
| 3127 | nil) | 3127 | nil) |
| 3128 | ;; rationale: if any intervening items were at a lower depth, we | 3128 | ;; rationale: if any intervening items were at a lower depth, we |
| 3129 | ;; would now be on the first offspring at the target depth - ie, | 3129 | ;; would now be on the first offspring at the target depth -- ie, |
| 3130 | ;; the preceeding item (per the search direction) must be at a | 3130 | ;; the preceeding item (per the search direction) must be at a |
| 3131 | ;; lesser depth. that's all we need to check. | 3131 | ;; lesser depth. that's all we need to check. |
| 3132 | (if backward (allout-next-heading) (allout-previous-heading)) | 3132 | (if backward (allout-next-heading) (allout-previous-heading)) |
| @@ -3203,7 +3203,7 @@ Move to buffer limit in indicated direction if headings are exhausted." | |||
| 3203 | (allout-aberrant-container-p)) | 3203 | (allout-aberrant-container-p)) |
| 3204 | ;; skip this aberrant prospective header line: | 3204 | ;; skip this aberrant prospective header line: |
| 3205 | t | 3205 | t |
| 3206 | ;; this prospective headerline qualifies - register: | 3206 | ;; this prospective headerline qualifies -- register: |
| 3207 | (setq got allout-recent-prefix-beginning) | 3207 | (setq got allout-recent-prefix-beginning) |
| 3208 | ;; and break the loop: | 3208 | ;; and break the loop: |
| 3209 | nil)))) | 3209 | nil)))) |
| @@ -3371,7 +3371,7 @@ Returns the qualifying command, if any, else nil." | |||
| 3371 | (>= 122 key-num)) ; "z" | 3371 | (>= 122 key-num)) ; "z" |
| 3372 | (- key-num 96) key-num))) | 3372 | (- key-num 96) key-num))) |
| 3373 | t)))) | 3373 | t)))) |
| 3374 | ;; Qualified as an allout command - do hot-spot operation. | 3374 | ;; Qualified as an allout command -- do hot-spot operation. |
| 3375 | (setq allout-post-goto-bullet t) | 3375 | (setq allout-post-goto-bullet t) |
| 3376 | ;; accept-defaults nil, or else we'll get allout-item-icon-key-handler. | 3376 | ;; accept-defaults nil, or else we'll get allout-item-icon-key-handler. |
| 3377 | (setq mapped-binding (key-binding (char-to-string key-num)))) | 3377 | (setq mapped-binding (key-binding (char-to-string key-num)))) |
| @@ -3473,7 +3473,7 @@ Second arg NEW indicates that a new topic is being opened after the | |||
| 3473 | topic at point, if non-nil. Default bullet for new topics, eg, may | 3473 | topic at point, if non-nil. Default bullet for new topics, eg, may |
| 3474 | be set (contingent to other args) to numbered bullets if previous | 3474 | be set (contingent to other args) to numbered bullets if previous |
| 3475 | sibling is one. The implication otherwise is that the current topic | 3475 | sibling is one. The implication otherwise is that the current topic |
| 3476 | is being adjusted - shifted or rebulleted - and we don't consider | 3476 | is being adjusted -- shifted or rebulleted -- and we don't consider |
| 3477 | bullet or previous sibling. | 3477 | bullet or previous sibling. |
| 3478 | 3478 | ||
| 3479 | Third arg DEPTH forces the topic prefix to that depth, regardless of | 3479 | Third arg DEPTH forces the topic prefix to that depth, regardless of |
| @@ -3519,11 +3519,11 @@ index for each successive sibling)." | |||
| 3519 | ;; Getting value for bullet char is practically the whole job: | 3519 | ;; Getting value for bullet char is practically the whole job: |
| 3520 | 3520 | ||
| 3521 | (cond | 3521 | (cond |
| 3522 | ; Simplest situation - level 1: | 3522 | ; Simplest situation -- level 1: |
| 3523 | ((<= depth 1) (setq header-lead "") allout-primary-bullet) | 3523 | ((<= depth 1) (setq header-lead "") allout-primary-bullet) |
| 3524 | ; Simple, too: all asterisks: | 3524 | ; Simple, too: all asterisks: |
| 3525 | (allout-old-style-prefixes | 3525 | (allout-old-style-prefixes |
| 3526 | ;; Cheat - make body the whole thing, null out header-lead and | 3526 | ;; Cheat -- make body the whole thing, null out header-lead and |
| 3527 | ;; bullet-char: | 3527 | ;; bullet-char: |
| 3528 | (setq body (make-string depth | 3528 | (setq body (make-string depth |
| 3529 | (string-to-char allout-primary-bullet))) | 3529 | (string-to-char allout-primary-bullet))) |
| @@ -3601,8 +3601,8 @@ index for each successive sibling)." | |||
| 3601 | "Open a new topic at depth DEPTH. | 3601 | "Open a new topic at depth DEPTH. |
| 3602 | 3602 | ||
| 3603 | New topic is situated after current one, unless optional flag BEFORE | 3603 | New topic is situated after current one, unless optional flag BEFORE |
| 3604 | is non-nil, or unless current line is completely empty - lacking even | 3604 | is non-nil, or unless current line is completely empty -- lacking even |
| 3605 | whitespace - in which case open is done on the current line. | 3605 | whitespace -- in which case open is done on the current line. |
| 3606 | 3606 | ||
| 3607 | When adding an offspring, it will be added immediately after the parent if | 3607 | When adding an offspring, it will be added immediately after the parent if |
| 3608 | the other offspring are exposed, or after the last child if the offspring | 3608 | the other offspring are exposed, or after the last child if the offspring |
| @@ -3666,7 +3666,7 @@ Nuances: | |||
| 3666 | 3666 | ||
| 3667 | (if (not opening-on-blank) | 3667 | (if (not opening-on-blank) |
| 3668 | ; Positioning and vertical | 3668 | ; Positioning and vertical |
| 3669 | ; padding - only if not | 3669 | ; padding -- only if not |
| 3670 | ; opening-on-blank: | 3670 | ; opening-on-blank: |
| 3671 | (progn | 3671 | (progn |
| 3672 | (goto-char ref-topic) | 3672 | (goto-char ref-topic) |
| @@ -3717,7 +3717,7 @@ Nuances: | |||
| 3717 | (open-line 1))) | 3717 | (open-line 1))) |
| 3718 | (allout-end-of-current-subtree) | 3718 | (allout-end-of-current-subtree) |
| 3719 | (if (looking-at "\n\n") (forward-char 1)))) | 3719 | (if (looking-at "\n\n") (forward-char 1)))) |
| 3720 | ;; Going inwards - double-space if first offspring is | 3720 | ;; Going inwards -- double-space if first offspring is |
| 3721 | ;; double-spaced, otherwise snug up. | 3721 | ;; double-spaced, otherwise snug up. |
| 3722 | (allout-end-of-entry) | 3722 | (allout-end-of-entry) |
| 3723 | (if (eobp) | 3723 | (if (eobp) |
| @@ -3727,7 +3727,7 @@ Nuances: | |||
| 3727 | (backward-char 1) | 3727 | (backward-char 1) |
| 3728 | (if (bolp) | 3728 | (if (bolp) |
| 3729 | ;; Blank lines between current header body and next | 3729 | ;; Blank lines between current header body and next |
| 3730 | ;; header - get to last substantive (non-white-space) | 3730 | ;; header -- get to last substantive (non-white-space) |
| 3731 | ;; line in body: | 3731 | ;; line in body: |
| 3732 | (progn (setq dbl-space t) | 3732 | (progn (setq dbl-space t) |
| 3733 | (re-search-backward "[^ \t\n]" nil t))) | 3733 | (re-search-backward "[^ \t\n]" nil t))) |
| @@ -3872,7 +3872,7 @@ Note that refill of indented paragraphs is not done." | |||
| 3872 | (not (looking-at allout-regexp))) | 3872 | (not (looking-at allout-regexp))) |
| 3873 | (if (> 0 (setq excess (- (- old-indent-end old-indent-begin) | 3873 | (if (> 0 (setq excess (- (- old-indent-end old-indent-begin) |
| 3874 | old-margin))) | 3874 | old-margin))) |
| 3875 | ;; Text starts left of old margin - don't adjust: | 3875 | ;; Text starts left of old margin -- don't adjust: |
| 3876 | nil | 3876 | nil |
| 3877 | ;; Text was hanging at or right of old left margin - | 3877 | ;; Text was hanging at or right of old left margin - |
| 3878 | ;; reindent it, preserving its existing indentation | 3878 | ;; reindent it, preserving its existing indentation |
| @@ -4131,7 +4131,7 @@ a topic and its immediate offspring is greater than one.)" | |||
| 4131 | nil)))) ;;; do-successors | 4131 | nil)))) ;;; do-successors |
| 4132 | 4132 | ||
| 4133 | ((< starting-depth new-depth) | 4133 | ((< starting-depth new-depth) |
| 4134 | ;; Rare case - subtopic more than one level deeper than parent. | 4134 | ;; Rare case -- subtopic more than one level deeper than parent. |
| 4135 | ;; Treat this one at an even deeper level: | 4135 | ;; Treat this one at an even deeper level: |
| 4136 | (allout-rebullet-topic-grunt relative-depth | 4136 | (allout-rebullet-topic-grunt relative-depth |
| 4137 | new-depth | 4137 | new-depth |
| @@ -4193,7 +4193,7 @@ Returns final depth." | |||
| 4193 | (defun allout-number-siblings (&optional denumber) | 4193 | (defun allout-number-siblings (&optional denumber) |
| 4194 | "Assign numbered topic prefix to this topic and its siblings. | 4194 | "Assign numbered topic prefix to this topic and its siblings. |
| 4195 | 4195 | ||
| 4196 | With universal argument, denumber - assign default bullet to this | 4196 | With universal argument, denumber -- assign default bullet to this |
| 4197 | topic and its siblings. | 4197 | topic and its siblings. |
| 4198 | 4198 | ||
| 4199 | With repeated universal argument (`^U^U'), solicit bullet for each | 4199 | With repeated universal argument (`^U^U'), solicit bullet for each |
| @@ -4408,7 +4408,7 @@ Topic exposure is marked with text-properties, to be used by | |||
| 4408 | 'invisible | 4408 | 'invisible |
| 4409 | nil end)))) | 4409 | nil end)))) |
| 4410 | (if (or (not next) (eq prev next)) | 4410 | (if (or (not next) (eq prev next)) |
| 4411 | ;; still not at start of hidden area - must not be any left. | 4411 | ;; still not at start of hidden area -- must not be any left. |
| 4412 | (setq done t) | 4412 | (setq done t) |
| 4413 | (goto-char next) | 4413 | (goto-char next) |
| 4414 | (setq prev next) | 4414 | (setq prev next) |
| @@ -4449,7 +4449,7 @@ Topic exposure is marked with text-properties, to be used by | |||
| 4449 | 'allout-was-hidden | 4449 | 'allout-was-hidden |
| 4450 | nil end))) | 4450 | nil end))) |
| 4451 | (if (or (not next) (eq prev next)) | 4451 | (if (or (not next) (eq prev next)) |
| 4452 | ;; no more or not advancing - must not be any left. | 4452 | ;; no more or not advancing -- must not be any left. |
| 4453 | (setq done t) | 4453 | (setq done t) |
| 4454 | (goto-char next) | 4454 | (goto-char next) |
| 4455 | (setq prev next) | 4455 | (setq prev next) |
| @@ -4505,7 +4505,7 @@ however, are left exactly like normal, non-allout-specific yanks." | |||
| 4505 | (rectify-numbering (or resituate | 4505 | (rectify-numbering (or resituate |
| 4506 | (and into-bol (looking-at allout-regexp))))) | 4506 | (and into-bol (looking-at allout-regexp))))) |
| 4507 | (if resituate | 4507 | (if resituate |
| 4508 | ;; Yanking a topic into the start of a topic - reconcile to fit: | 4508 | ;; Yanking a topic into the start of a topic -- reconcile to fit: |
| 4509 | (let* ((inhibit-field-text-motion t) | 4509 | (let* ((inhibit-field-text-motion t) |
| 4510 | (prefix-len (if (not (match-end 1)) | 4510 | (prefix-len (if (not (match-end 1)) |
| 4511 | 1 | 4511 | 1 |
| @@ -4644,7 +4644,7 @@ works with normal `yank' in non-outline buffers." | |||
| 4644 | 4644 | ||
| 4645 | Adapts level of popped topics to level of fresh prefix. | 4645 | Adapts level of popped topics to level of fresh prefix. |
| 4646 | 4646 | ||
| 4647 | Note - prefix changes to distinctive bullets will stick, if followed | 4647 | Note -- prefix changes to distinctive bullets will stick, if followed |
| 4648 | by pops to non-distinctive yanks. Bug..." | 4648 | by pops to non-distinctive yanks. Bug..." |
| 4649 | 4649 | ||
| 4650 | (interactive "*p") | 4650 | (interactive "*p") |
| @@ -4663,7 +4663,7 @@ by pops to non-distinctive yanks. Bug..." | |||
| 4663 | (interactive) | 4663 | (interactive) |
| 4664 | (if (not allout-file-xref-bullet) | 4664 | (if (not allout-file-xref-bullet) |
| 4665 | (error | 4665 | (error |
| 4666 | "Outline cross references disabled - no `allout-file-xref-bullet'") | 4666 | "Outline cross references disabled -- no `allout-file-xref-bullet'") |
| 4667 | (if (not (string= (allout-current-bullet) allout-file-xref-bullet)) | 4667 | (if (not (string= (allout-current-bullet) allout-file-xref-bullet)) |
| 4668 | (error "Current heading lacks cross-reference bullet `%s'" | 4668 | (error "Current heading lacks cross-reference bullet `%s'" |
| 4669 | allout-file-xref-bullet) | 4669 | allout-file-xref-bullet) |
| @@ -4890,11 +4890,11 @@ With a repeat-count, expose this topic and its siblings." | |||
| 4890 | (interactive "P") | 4890 | (interactive "P") |
| 4891 | (save-excursion | 4891 | (save-excursion |
| 4892 | (if (<= (allout-current-depth) 0) | 4892 | (if (<= (allout-current-depth) 0) |
| 4893 | ;; Outside any topics - try to get to the first: | 4893 | ;; Outside any topics -- try to get to the first: |
| 4894 | (if (not (allout-next-heading)) | 4894 | (if (not (allout-next-heading)) |
| 4895 | (error "No topics") | 4895 | (error "No topics") |
| 4896 | ;; got to first, outermost topic - set to expose it and siblings: | 4896 | ;; got to first, outermost topic -- set to expose it and siblings: |
| 4897 | (message "Above outermost topic - exposing all.") | 4897 | (message "Above outermost topic -- exposing all.") |
| 4898 | (allout-flag-region (point-min)(point-max) nil)) | 4898 | (allout-flag-region (point-min)(point-max) nil)) |
| 4899 | (allout-beginning-of-current-line) | 4899 | (allout-beginning-of-current-line) |
| 4900 | (if (not arg) | 4900 | (if (not arg) |
| @@ -4931,7 +4931,7 @@ siblings, even if the target topic is already closed." | |||
| 4931 | 4931 | ||
| 4932 | (interactive) | 4932 | (interactive) |
| 4933 | (let* ((from (point)) | 4933 | (let* ((from (point)) |
| 4934 | (sibs-msg "Top-level topic already closed - closing siblings...") | 4934 | (sibs-msg "Top-level topic already closed -- closing siblings...") |
| 4935 | (current-exposed (not (allout-current-topic-collapsed-p t)))) | 4935 | (current-exposed (not (allout-current-topic-collapsed-p t)))) |
| 4936 | (cond (current-exposed (allout-flag-current-subtree t)) | 4936 | (cond (current-exposed (allout-flag-current-subtree t)) |
| 4937 | (just-close nil) | 4937 | (just-close nil) |
| @@ -5019,13 +5019,13 @@ Simple (numeric and null-list) specs are interpreted as follows: | |||
| 5019 | that level. | 5019 | that level. |
| 5020 | - positive numbers open to the relative depth indicated by the | 5020 | - positive numbers open to the relative depth indicated by the |
| 5021 | number, but do not force already opened subtopics to be closed. | 5021 | number, but do not force already opened subtopics to be closed. |
| 5022 | - 0 means to close topic - hide all offspring. | 5022 | - 0 means to close topic -- hide all offspring. |
| 5023 | : - `repeat' | 5023 | : - `repeat' |
| 5024 | apply prior element to all siblings at current level, *up to* | 5024 | apply prior element to all siblings at current level, *up to* |
| 5025 | those siblings that would be covered by specs following the `:' | 5025 | those siblings that would be covered by specs following the `:' |
| 5026 | on the list. Ie, apply to all topics at level but the last | 5026 | on the list. Ie, apply to all topics at level but the last |
| 5027 | ones. (Only first of multiple colons at same level is | 5027 | ones. (Only first of multiple colons at same level is |
| 5028 | respected - subsequent ones are discarded.) | 5028 | respected -- subsequent ones are discarded.) |
| 5029 | * - completely opens the topic, including bodies. | 5029 | * - completely opens the topic, including bodies. |
| 5030 | + - shows all the sub headers, but not the bodies | 5030 | + - shows all the sub headers, but not the bodies |
| 5031 | - - exposes the body of the corresponding topic. | 5031 | - - exposes the body of the corresponding topic. |
| @@ -5073,11 +5073,11 @@ Examples: | |||
| 5073 | ;; Expand the `repeat' spec to an explicit version, | 5073 | ;; Expand the `repeat' spec to an explicit version, |
| 5074 | ;; w.r.t. remaining siblings: | 5074 | ;; w.r.t. remaining siblings: |
| 5075 | (let ((residue ; = # of sibs not covered by remaining spec | 5075 | (let ((residue ; = # of sibs not covered by remaining spec |
| 5076 | ;; Dang - could be nice to make use of the chart, sigh: | 5076 | ;; Dang, could be nice to make use of the chart, sigh: |
| 5077 | (- (length (allout-chart-siblings)) | 5077 | (- (length (allout-chart-siblings)) |
| 5078 | (length spec)))) | 5078 | (length spec)))) |
| 5079 | (if (< 0 residue) | 5079 | (if (< 0 residue) |
| 5080 | ;; Some residue - cover it with prev-elem: | 5080 | ;; Some residue -- cover it with prev-elem: |
| 5081 | (setq spec (append (make-list residue prev-elem) | 5081 | (setq spec (append (make-list residue prev-elem) |
| 5082 | spec))))))) | 5082 | spec))))))) |
| 5083 | ((numberp curr-elem) | 5083 | ((numberp curr-elem) |
| @@ -5211,7 +5211,7 @@ Examples: | |||
| 5211 | (error "allout-new-exposure: Can't find any outline topics")) | 5211 | (error "allout-new-exposure: Can't find any outline topics")) |
| 5212 | (list 'allout-expose-topic (list 'quote spec)))) | 5212 | (list 'allout-expose-topic (list 'quote spec)))) |
| 5213 | 5213 | ||
| 5214 | ;;;_ #7 Systematic outline presentation - copying, printing, flattening | 5214 | ;;;_ #7 Systematic outline presentation -- copying, printing, flattening |
| 5215 | 5215 | ||
| 5216 | ;;;_ - Mapping and processing of topics | 5216 | ;;;_ - Mapping and processing of topics |
| 5217 | ;;;_ ( See also Subtree Charting, in Navigation code.) | 5217 | ;;;_ ( See also Subtree Charting, in Navigation code.) |
| @@ -5302,9 +5302,9 @@ Optional START and END indicate bounds of region. | |||
| 5302 | Optional arg, FORMAT, designates an alternate presentation form for | 5302 | Optional arg, FORMAT, designates an alternate presentation form for |
| 5303 | the prefix: | 5303 | the prefix: |
| 5304 | 5304 | ||
| 5305 | list - Present prefix as numeric section.subsection..., starting with | 5305 | list -- Present prefix as numeric section.subsection..., starting with |
| 5306 | section indicated by the list, innermost nesting first. | 5306 | section indicated by the list, innermost nesting first. |
| 5307 | `indent' (symbol) - Convert header prefixes to all white space, | 5307 | `indent' (symbol) -- Convert header prefixes to all white space, |
| 5308 | except for distinctive bullets. | 5308 | except for distinctive bullets. |
| 5309 | 5309 | ||
| 5310 | The elements of the list produced are lists that represents a topic | 5310 | The elements of the list produced are lists that represents a topic |
| @@ -5329,7 +5329,7 @@ header and body. The elements of that list are: | |||
| 5329 | (beginning-of-line) | 5329 | (beginning-of-line) |
| 5330 | ;; Goto initial topic, and register preceeding stuff, if any: | 5330 | ;; Goto initial topic, and register preceeding stuff, if any: |
| 5331 | (if (> (allout-goto-prefix-doublechecked) start) | 5331 | (if (> (allout-goto-prefix-doublechecked) start) |
| 5332 | ;; First topic follows beginning point - register preliminary stuff: | 5332 | ;; First topic follows beginning point -- register preliminary stuff: |
| 5333 | (setq result (list (list 0 "" nil | 5333 | (setq result (list (list 0 "" nil |
| 5334 | (buffer-substring start (1- (point))))))) | 5334 | (buffer-substring start (1- (point))))))) |
| 5335 | (while (and (not done) | 5335 | (while (and (not done) |
| @@ -5397,7 +5397,7 @@ header and body. The elements of that list are: | |||
| 5397 | (cond ((= new-depth depth) | 5397 | (cond ((= new-depth depth) |
| 5398 | (setq format (cons (1+ (car format)) | 5398 | (setq format (cons (1+ (car format)) |
| 5399 | (cdr format)))) | 5399 | (cdr format)))) |
| 5400 | ((> new-depth depth) ; descending - assume by 1: | 5400 | ((> new-depth depth) ; descending -- assume by 1: |
| 5401 | (setq format (cons 1 format))) | 5401 | (setq format (cons 1 format))) |
| 5402 | (t | 5402 | (t |
| 5403 | ; Pop the residue: | 5403 | ; Pop the residue: |
| @@ -5428,12 +5428,12 @@ Apply FUNCTION to exposed portions FROM position TO position in buffer | |||
| 5428 | FROMBUF to buffer TOBUF. Sixth optional arg, FORMAT, designates an | 5428 | FROMBUF to buffer TOBUF. Sixth optional arg, FORMAT, designates an |
| 5429 | alternate presentation form: | 5429 | alternate presentation form: |
| 5430 | 5430 | ||
| 5431 | `flat' - Present prefix as numeric section.subsection..., starting with | 5431 | `flat' -- Present prefix as numeric section.subsection..., starting with |
| 5432 | section indicated by the START-NUM, innermost nesting first. | 5432 | section indicated by the START-NUM, innermost nesting first. |
| 5433 | X`flat-indented' - Prefix is like `flat' for first topic at each | 5433 | X`flat-indented' -- Prefix is like `flat' for first topic at each |
| 5434 | X level, but subsequent topics have only leaf topic | 5434 | X level, but subsequent topics have only leaf topic |
| 5435 | X number, padded with blanks to line up with first. | 5435 | X number, padded with blanks to line up with first. |
| 5436 | `indent' (symbol) - Convert header prefixes to all white space, | 5436 | `indent' (symbol) -- Convert header prefixes to all white space, |
| 5437 | except for distinctive bullets. | 5437 | except for distinctive bullets. |
| 5438 | 5438 | ||
| 5439 | Defaults: | 5439 | Defaults: |
| @@ -5453,19 +5453,19 @@ Defaults: | |||
| 5453 | (setq from (point-min) to (point-max)))) | 5453 | (setq from (point-min) to (point-max)))) |
| 5454 | (if frombuf | 5454 | (if frombuf |
| 5455 | (if (not (bufferp frombuf)) | 5455 | (if (not (bufferp frombuf)) |
| 5456 | ;; Specified but not a buffer - get it: | 5456 | ;; Specified but not a buffer -- get it: |
| 5457 | (let ((got (get-buffer frombuf))) | 5457 | (let ((got (get-buffer frombuf))) |
| 5458 | (if (not got) | 5458 | (if (not got) |
| 5459 | (error (concat "allout-process-exposed: source buffer " | 5459 | (error (concat "allout-process-exposed: source buffer " |
| 5460 | frombuf | 5460 | frombuf |
| 5461 | " not found.")) | 5461 | " not found.")) |
| 5462 | (setq frombuf got)))) | 5462 | (setq frombuf got)))) |
| 5463 | ;; not specified - default it: | 5463 | ;; not specified -- default it: |
| 5464 | (setq frombuf (current-buffer))) | 5464 | (setq frombuf (current-buffer))) |
| 5465 | (if tobuf | 5465 | (if tobuf |
| 5466 | (if (not (bufferp tobuf)) | 5466 | (if (not (bufferp tobuf)) |
| 5467 | (setq tobuf (get-buffer-create tobuf))) | 5467 | (setq tobuf (get-buffer-create tobuf))) |
| 5468 | ;; not specified - default it: | 5468 | ;; not specified -- default it: |
| 5469 | (setq tobuf (concat "*" (buffer-name frombuf) " exposed*"))) | 5469 | (setq tobuf (concat "*" (buffer-name frombuf) " exposed*"))) |
| 5470 | (if (listp format) | 5470 | (if (listp format) |
| 5471 | (nreverse format)) | 5471 | (nreverse format)) |
| @@ -5552,7 +5552,7 @@ alternate presentation format for the outline: | |||
| 5552 | (defun allout-flatten-exposed-to-buffer (&optional arg tobuf) | 5552 | (defun allout-flatten-exposed-to-buffer (&optional arg tobuf) |
| 5553 | "Present numeric outline of outline's exposed portions in another buffer. | 5553 | "Present numeric outline of outline's exposed portions in another buffer. |
| 5554 | 5554 | ||
| 5555 | The resulting outline is not compatible with outline mode - use | 5555 | The resulting outline is not compatible with outline mode -- use |
| 5556 | `allout-copy-exposed-to-buffer' if you want that. | 5556 | `allout-copy-exposed-to-buffer' if you want that. |
| 5557 | 5557 | ||
| 5558 | Use `allout-indented-exposed-to-buffer' for indented presentation. | 5558 | Use `allout-indented-exposed-to-buffer' for indented presentation. |
| @@ -5568,7 +5568,7 @@ used verbatim." | |||
| 5568 | (defun allout-indented-exposed-to-buffer (&optional arg tobuf) | 5568 | (defun allout-indented-exposed-to-buffer (&optional arg tobuf) |
| 5569 | "Present indented outline of outline's exposed portions in another buffer. | 5569 | "Present indented outline of outline's exposed portions in another buffer. |
| 5570 | 5570 | ||
| 5571 | The resulting outline is not compatible with outline mode - use | 5571 | The resulting outline is not compatible with outline mode -- use |
| 5572 | `allout-copy-exposed-to-buffer' if you want that. | 5572 | `allout-copy-exposed-to-buffer' if you want that. |
| 5573 | 5573 | ||
| 5574 | Use `allout-flatten-exposed-to-buffer' for numeric sectional presentation. | 5574 | Use `allout-flatten-exposed-to-buffer' for numeric sectional presentation. |
| @@ -5796,7 +5796,7 @@ encryption are encrypted. See allout-encrypt-unencrypted-on-saves for | |||
| 5796 | auto-encryption specifics. | 5796 | auto-encryption specifics. |
| 5797 | 5797 | ||
| 5798 | \*NOTE WELL* that automatic encryption that happens during saves will | 5798 | \*NOTE WELL* that automatic encryption that happens during saves will |
| 5799 | default to symmetric encryption - you must deliberately (re)encrypt key-pair | 5799 | default to symmetric encryption -- you must deliberately (re)encrypt key-pair |
| 5800 | encrypted topics if you want them to continue to use the key-pair cipher. | 5800 | encrypted topics if you want them to continue to use the key-pair cipher. |
| 5801 | 5801 | ||
| 5802 | Level-one topics, with prefix consisting solely of an `*' asterisk, cannot be | 5802 | Level-one topics, with prefix consisting solely of an `*' asterisk, cannot be |
| @@ -5883,7 +5883,7 @@ See `allout-toggle-current-subtree-encryption' for more details." | |||
| 5883 | subtree-end)) | 5883 | subtree-end)) |
| 5884 | (subtree-end-char (char-after (1- subtree-end))) | 5884 | (subtree-end-char (char-after (1- subtree-end))) |
| 5885 | (subtree-trailing-char (char-after subtree-end)) | 5885 | (subtree-trailing-char (char-after subtree-end)) |
| 5886 | ;; kluge - result-text needs to be nil, but we also want to | 5886 | ;; kluge -- result-text needs to be nil, but we also want to |
| 5887 | ;; check for the error condition | 5887 | ;; check for the error condition |
| 5888 | (result-text (if (or (string= "" subject-text) | 5888 | (result-text (if (or (string= "" subject-text) |
| 5889 | (string= "\n" subject-text)) | 5889 | (string= "\n" subject-text)) |
| @@ -5970,18 +5970,19 @@ If DECRYPT is true (default false), then decrypt instead of encrypt. | |||
| 5970 | 5970 | ||
| 5971 | FETCH-PASS (default false) forces fresh prompting for the passphrase. | 5971 | FETCH-PASS (default false) forces fresh prompting for the passphrase. |
| 5972 | 5972 | ||
| 5973 | KEY-TYPE indicates whether to use a 'symmetric or 'keypair cipher. | 5973 | KEY-TYPE, either `symmetric' or `keypair', specifies which type |
| 5974 | of cypher to use. | ||
| 5974 | 5975 | ||
| 5975 | FOR-KEY is human readable identification of the first of the user's | 5976 | FOR-KEY is human readable identification of the first of the user's |
| 5976 | eligible secret keys a keypair decryption targets, or else nil. | 5977 | eligible secret keys a keypair decryption targets, or else nil. |
| 5977 | 5978 | ||
| 5978 | Optional RETRIED is for internal use - conveys the number of failed keys | 5979 | Optional RETRIED is for internal use -- conveys the number of failed keys |
| 5979 | that have been solicited in sequence leading to this current call. | 5980 | that have been solicited in sequence leading to this current call. |
| 5980 | 5981 | ||
| 5981 | Optional PASSPHRASE enables explicit delivery of the decryption passphrase, | 5982 | Optional PASSPHRASE enables explicit delivery of the decryption passphrase, |
| 5982 | for verification purposes. | 5983 | for verification purposes. |
| 5983 | 5984 | ||
| 5984 | Optional REJECTED is for internal use - conveys the number of | 5985 | Optional REJECTED is for internal use -- conveys the number of |
| 5985 | rejections due to matches against | 5986 | rejections due to matches against |
| 5986 | `allout-encryption-ciphertext-rejection-regexps', as limited by | 5987 | `allout-encryption-ciphertext-rejection-regexps', as limited by |
| 5987 | `allout-encryption-ciphertext-rejection-ceiling'. | 5988 | `allout-encryption-ciphertext-rejection-ceiling'. |
| @@ -6078,13 +6079,13 @@ Returns the resulting string, or nil if the transformation fails." | |||
| 6078 | 6079 | ||
| 6079 | (if status | 6080 | (if status |
| 6080 | (pgg-situate-output (point-min) (point-max)) | 6081 | (pgg-situate-output (point-min) (point-max)) |
| 6081 | ;; failed - handle passphrase caching | 6082 | ;; failed -- handle passphrase caching |
| 6082 | (if verifying | 6083 | (if verifying |
| 6083 | (throw 'encryption-failed nil) | 6084 | (throw 'encryption-failed nil) |
| 6084 | (pgg-remove-passphrase-from-cache target-cache-id t) | 6085 | (pgg-remove-passphrase-from-cache target-cache-id t) |
| 6085 | (error "Symmetric-cipher %scryption failed - %s" | 6086 | (error "Symmetric-cipher %scryption failed -- %s" |
| 6086 | (if decrypt "de" "en") | 6087 | (if decrypt "de" "en") |
| 6087 | "try again with different passphrase.")))) | 6088 | "try again with different passphrase")))) |
| 6088 | 6089 | ||
| 6089 | ;; encrypt 'keypair: | 6090 | ;; encrypt 'keypair: |
| 6090 | ((not decrypt) | 6091 | ((not decrypt) |
| @@ -6115,7 +6116,7 @@ Returns the resulting string, or nil if the transformation fails." | |||
| 6115 | 1 (- (point-max) (if decrypt 0 1)))) | 6116 | 1 (- (point-max) (if decrypt 0 1)))) |
| 6116 | ) | 6117 | ) |
| 6117 | 6118 | ||
| 6118 | ;; validate result - non-empty | 6119 | ;; validate result -- non-empty |
| 6119 | (cond ((not result-text) | 6120 | (cond ((not result-text) |
| 6120 | (if verifying | 6121 | (if verifying |
| 6121 | nil | 6122 | nil |
| @@ -6151,7 +6152,7 @@ Returns the resulting string, or nil if the transformation fails." | |||
| 6151 | (string-match "[\C-a\C-k\C-o-\C-z\C-@]" | 6152 | (string-match "[\C-a\C-k\C-o-\C-z\C-@]" |
| 6152 | result-text)) | 6153 | result-text)) |
| 6153 | (error (concat "Encryption produced non-armored text, which" | 6154 | (error (concat "Encryption produced non-armored text, which" |
| 6154 | "conflicts with allout mode - reconfigure!"))) | 6155 | "conflicts with allout mode -- reconfigure!"))) |
| 6155 | 6156 | ||
| 6156 | ;; valid result and just verifying or non-symmetric: | 6157 | ;; valid result and just verifying or non-symmetric: |
| 6157 | ((or verifying (not (equal key-type 'symmetric))) | 6158 | ((or verifying (not (equal key-type 'symmetric))) |
| @@ -6160,7 +6161,7 @@ Returns the resulting string, or nil if the transformation fails." | |||
| 6160 | passphrase t)) | 6161 | passphrase t)) |
| 6161 | result-text) | 6162 | result-text) |
| 6162 | 6163 | ||
| 6163 | ;; valid result and regular symmetric - "register" | 6164 | ;; valid result and regular symmetric -- "register" |
| 6164 | ;; passphrase with mnemonic aids/cache. | 6165 | ;; passphrase with mnemonic aids/cache. |
| 6165 | (t | 6166 | (t |
| 6166 | (set-buffer allout-buffer) | 6167 | (set-buffer allout-buffer) |
| @@ -6191,7 +6192,7 @@ CACHE-ID is the cache id of the key for the passphrase. | |||
| 6191 | 6192 | ||
| 6192 | PROMPT-ID is the id for use when prompting the user. | 6193 | PROMPT-ID is the id for use when prompting the user. |
| 6193 | 6194 | ||
| 6194 | KEY-TYPE is either 'symmetric or 'keypair. | 6195 | KEY-TYPE is either `symmetric' or `keypair'. |
| 6195 | 6196 | ||
| 6196 | ALLOUT-BUFFER is the buffer containing the entry being en/decrypted. | 6197 | ALLOUT-BUFFER is the buffer containing the entry being en/decrypted. |
| 6197 | 6198 | ||
| @@ -6254,7 +6255,7 @@ of the availability of a cached copy." | |||
| 6254 | (if (and (not confirmation) | 6255 | (if (and (not confirmation) |
| 6255 | (if (yes-or-no-p | 6256 | (if (yes-or-no-p |
| 6256 | (concat "Passphrase differs from established" | 6257 | (concat "Passphrase differs from established" |
| 6257 | " - use new one instead? ")) | 6258 | " -- use new one instead? ")) |
| 6258 | ;; deactivate password for subsequent | 6259 | ;; deactivate password for subsequent |
| 6259 | ;; confirmation: | 6260 | ;; confirmation: |
| 6260 | (progn | 6261 | (progn |
| @@ -6264,11 +6265,11 @@ of the availability of a cached copy." | |||
| 6264 | t)) | 6265 | t)) |
| 6265 | (progn (pgg-remove-passphrase-from-cache cache-id t) | 6266 | (progn (pgg-remove-passphrase-from-cache cache-id t) |
| 6266 | (error "Wrong passphrase.")))) | 6267 | (error "Wrong passphrase.")))) |
| 6267 | ;; No verifier string - force confirmation by repetition of | 6268 | ;; No verifier string -- force confirmation by repetition of |
| 6268 | ;; (new) passphrase: | 6269 | ;; (new) passphrase: |
| 6269 | ((or fetch-pass (not cached)) | 6270 | ((or fetch-pass (not cached)) |
| 6270 | (pgg-remove-passphrase-from-cache cache-id t)))) | 6271 | (pgg-remove-passphrase-from-cache cache-id t)))) |
| 6271 | ;; confirmation vs new input - doing pgg-read-passphrase will do the | 6272 | ;; confirmation vs new input -- doing pgg-read-passphrase will do the |
| 6272 | ;; right thing, in either case: | 6273 | ;; right thing, in either case: |
| 6273 | (if (not confirmation) | 6274 | (if (not confirmation) |
| 6274 | (setq confirmation | 6275 | (setq confirmation |
| @@ -6279,7 +6280,7 @@ of the availability of a cached copy." | |||
| 6279 | (if (equal got-pass confirmation) | 6280 | (if (equal got-pass confirmation) |
| 6280 | confirmation | 6281 | confirmation |
| 6281 | (if (yes-or-no-p (concat "spelling of original and" | 6282 | (if (yes-or-no-p (concat "spelling of original and" |
| 6282 | " confirmation differ - retry? ")) | 6283 | " confirmation differ -- retry? ")) |
| 6283 | (progn (setq retried (if retried (1+ retried) 1)) | 6284 | (progn (setq retried (if retried (1+ retried) 1)) |
| 6284 | (pgg-remove-passphrase-from-cache cache-id t) | 6285 | (pgg-remove-passphrase-from-cache cache-id t) |
| 6285 | ;; recurse to this routine: | 6286 | ;; recurse to this routine: |
| @@ -6301,9 +6302,9 @@ of the availability of a cached copy." | |||
| 6301 | (defun allout-encrypted-key-info (text) | 6302 | (defun allout-encrypted-key-info (text) |
| 6302 | "Return a pair of the key type and identity of a recipient's secret key. | 6303 | "Return a pair of the key type and identity of a recipient's secret key. |
| 6303 | 6304 | ||
| 6304 | The key type is one of 'symmetric or 'keypair. | 6305 | The key type is one of `symmetric' or `keypair'. |
| 6305 | 6306 | ||
| 6306 | If 'keypair, and some of the user's secret keys are among those for which | 6307 | If `keypair', and some of the user's secret keys are among those for which |
| 6307 | the message was encoded, return the identity of the first. Otherwise, | 6308 | the message was encoded, return the identity of the first. Otherwise, |
| 6308 | return nil for the second item of the pair. | 6309 | return nil for the second item of the pair. |
| 6309 | 6310 | ||
| @@ -6479,7 +6480,7 @@ must also have content." | |||
| 6479 | "Encrypt topics pending encryption except those containing exemption point. | 6480 | "Encrypt topics pending encryption except those containing exemption point. |
| 6480 | 6481 | ||
| 6481 | EXCEPT-MARK identifies a point whose containing topics should be excluded | 6482 | EXCEPT-MARK identifies a point whose containing topics should be excluded |
| 6482 | from encryption. This supports 'except-current mode of | 6483 | from encryption. This supports the `except-current' mode of |
| 6483 | `allout-encrypt-unencrypted-on-saves'. | 6484 | `allout-encrypt-unencrypted-on-saves'. |
| 6484 | 6485 | ||
| 6485 | If a topic that is currently being edited was encrypted, we return a list | 6486 | If a topic that is currently being edited was encrypted, we return a list |
| @@ -6545,7 +6546,7 @@ setup for auto-startup." | |||
| 6545 | (if (allout-goto-prefix) | 6546 | (if (allout-goto-prefix) |
| 6546 | t | 6547 | t |
| 6547 | (allout-open-topic 2) | 6548 | (allout-open-topic 2) |
| 6548 | (insert (concat "Dummy outline topic header - see" | 6549 | (insert (concat "Dummy outline topic header -- see" |
| 6549 | "`allout-mode' docstring: `^Hm'.")) | 6550 | "`allout-mode' docstring: `^Hm'.")) |
| 6550 | (allout-adjust-file-variable | 6551 | (allout-adjust-file-variable |
| 6551 | "allout-layout" (or allout-layout '(-1 : 0)))))) | 6552 | "allout-layout" (or allout-layout '(-1 : 0)))))) |
| @@ -6553,7 +6554,7 @@ setup for auto-startup." | |||
| 6553 | (defun allout-file-vars-section-data () | 6554 | (defun allout-file-vars-section-data () |
| 6554 | "Return data identifying the file-vars section, or nil if none. | 6555 | "Return data identifying the file-vars section, or nil if none. |
| 6555 | 6556 | ||
| 6556 | Returns list `(beginning-point prefix-string suffix-string)'." | 6557 | Returns a list of the form (BEGINNING-POINT PREFIX-STRING SUFFIX-STRING)." |
| 6557 | ;; minimally gleaned from emacs 21.4 files.el hack-local-variables function. | 6558 | ;; minimally gleaned from emacs 21.4 files.el hack-local-variables function. |
| 6558 | (let (beg prefix suffix) | 6559 | (let (beg prefix suffix) |
| 6559 | (save-excursion | 6560 | (save-excursion |
| @@ -6655,7 +6656,7 @@ not its value." | |||
| 6655 | got) | 6656 | got) |
| 6656 | (dolist (sym configvar-value) | 6657 | (dolist (sym configvar-value) |
| 6657 | (if (not (boundp sym)) | 6658 | (if (not (boundp sym)) |
| 6658 | (if (yes-or-no-p (format "%s entry `%s' is unbound - remove it? " | 6659 | (if (yes-or-no-p (format "%s entry `%s' is unbound -- remove it? " |
| 6659 | configvar-name sym)) | 6660 | configvar-name sym)) |
| 6660 | (delq sym (symbol-value configvar-name))) | 6661 | (delq sym (symbol-value configvar-name))) |
| 6661 | (push (symbol-value sym) got))) | 6662 | (push (symbol-value sym) got))) |
| @@ -6702,7 +6703,7 @@ Optional arg DO-DEFAULTING indicates to accept empty input (CR)." | |||
| 6702 | string | 6703 | string |
| 6703 | "")) | 6704 | "")) |
| 6704 | nil)))) | 6705 | nil)))) |
| 6705 | ;; got something out of loop - return it: | 6706 | ;; got something out of loop -- return it: |
| 6706 | got) | 6707 | got) |
| 6707 | ) | 6708 | ) |
| 6708 | ;;;_ : Strings: | 6709 | ;;;_ : Strings: |
| @@ -6710,7 +6711,7 @@ Optional arg DO-DEFAULTING indicates to accept empty input (CR)." | |||
| 6710 | (defun regexp-sans-escapes (regexp &optional successive-backslashes) | 6711 | (defun regexp-sans-escapes (regexp &optional successive-backslashes) |
| 6711 | "Return a copy of REGEXP with all character escapes stripped out. | 6712 | "Return a copy of REGEXP with all character escapes stripped out. |
| 6712 | 6713 | ||
| 6713 | Representations of actual backslashes - '\\\\\\\\' - are left as a | 6714 | Representations of actual backslashes -- '\\\\\\\\' -- are left as a |
| 6714 | single backslash. | 6715 | single backslash. |
| 6715 | 6716 | ||
| 6716 | Optional arg SUCCESSIVE-BACKSLASHES is used internally for recursion." | 6717 | Optional arg SUCCESSIVE-BACKSLASHES is used internally for recursion." |
| @@ -6809,7 +6810,7 @@ BEG and END default respectively to the beginning and end of buffer." | |||
| 6809 | (move-overlay o end (overlay-end o)) | 6810 | (move-overlay o end (overlay-end o)) |
| 6810 | (delete-overlay o))))))) | 6811 | (delete-overlay o))))))) |
| 6811 | ) | 6812 | ) |
| 6812 | ;;;_ > copy-overlay if necessary - xemacs ~ 21.4 | 6813 | ;;;_ > copy-overlay if necessary -- xemacs ~ 21.4 |
| 6813 | (if (not (fboundp 'copy-overlay)) | 6814 | (if (not (fboundp 'copy-overlay)) |
| 6814 | (defun copy-overlay (o) | 6815 | (defun copy-overlay (o) |
| 6815 | "Return a copy of overlay O." | 6816 | "Return a copy of overlay O." |
| @@ -6821,7 +6822,7 @@ BEG and END default respectively to the beginning and end of buffer." | |||
| 6821 | (while props | 6822 | (while props |
| 6822 | (overlay-put o1 (pop props) (pop props))) | 6823 | (overlay-put o1 (pop props) (pop props))) |
| 6823 | o1))) | 6824 | o1))) |
| 6824 | ;;;_ > add-to-invisibility-spec if necessary - xemacs ~ 21.4 | 6825 | ;;;_ > add-to-invisibility-spec if necessary -- xemacs ~ 21.4 |
| 6825 | (if (not (fboundp 'add-to-invisibility-spec)) | 6826 | (if (not (fboundp 'add-to-invisibility-spec)) |
| 6826 | (defun add-to-invisibility-spec (element) | 6827 | (defun add-to-invisibility-spec (element) |
| 6827 | "Add ELEMENT to `buffer-invisibility-spec'. | 6828 | "Add ELEMENT to `buffer-invisibility-spec'. |
| @@ -6831,14 +6832,14 @@ that can be added." | |||
| 6831 | (setq buffer-invisibility-spec (list t))) | 6832 | (setq buffer-invisibility-spec (list t))) |
| 6832 | (setq buffer-invisibility-spec | 6833 | (setq buffer-invisibility-spec |
| 6833 | (cons element buffer-invisibility-spec)))) | 6834 | (cons element buffer-invisibility-spec)))) |
| 6834 | ;;;_ > remove-from-invisibility-spec if necessary - xemacs ~ 21.4 | 6835 | ;;;_ > remove-from-invisibility-spec if necessary -- xemacs ~ 21.4 |
| 6835 | (if (not (fboundp 'remove-from-invisibility-spec)) | 6836 | (if (not (fboundp 'remove-from-invisibility-spec)) |
| 6836 | (defun remove-from-invisibility-spec (element) | 6837 | (defun remove-from-invisibility-spec (element) |
| 6837 | "Remove ELEMENT from `buffer-invisibility-spec'." | 6838 | "Remove ELEMENT from `buffer-invisibility-spec'." |
| 6838 | (if (consp buffer-invisibility-spec) | 6839 | (if (consp buffer-invisibility-spec) |
| 6839 | (setq buffer-invisibility-spec (delete element | 6840 | (setq buffer-invisibility-spec (delete element |
| 6840 | buffer-invisibility-spec))))) | 6841 | buffer-invisibility-spec))))) |
| 6841 | ;;;_ > move-beginning-of-line if necessary - older emacs, xemacs | 6842 | ;;;_ > move-beginning-of-line if necessary -- older emacs, xemacs |
| 6842 | (if (not (fboundp 'move-beginning-of-line)) | 6843 | (if (not (fboundp 'move-beginning-of-line)) |
| 6843 | (defun move-beginning-of-line (arg) | 6844 | (defun move-beginning-of-line (arg) |
| 6844 | "Move point to beginning of current line as displayed. | 6845 | "Move point to beginning of current line as displayed. |
| @@ -6862,7 +6863,7 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t." | |||
| 6862 | (skip-chars-backward "^\n")) | 6863 | (skip-chars-backward "^\n")) |
| 6863 | (vertical-motion 0)) | 6864 | (vertical-motion 0)) |
| 6864 | ) | 6865 | ) |
| 6865 | ;;;_ > move-end-of-line if necessary - older emacs, xemacs | 6866 | ;;;_ > move-end-of-line if necessary -- older emacs, xemacs |
| 6866 | (if (not (fboundp 'move-end-of-line)) | 6867 | (if (not (fboundp 'move-end-of-line)) |
| 6867 | (defun move-end-of-line (arg) | 6868 | (defun move-end-of-line (arg) |
| 6868 | "Move point to end of current line as displayed. | 6869 | "Move point to end of current line as displayed. |
| @@ -6931,7 +6932,7 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t." | |||
| 6931 | (isearch-repeat 'forward) | 6932 | (isearch-repeat 'forward) |
| 6932 | (isearch-mode t))) | 6933 | (isearch-mode t))) |
| 6933 | 6934 | ||
| 6934 | ;;;_ #11 Unit tests - this should be last item before "Provide" | 6935 | ;;;_ #11 Unit tests -- this should be last item before "Provide" |
| 6935 | ;;;_ > allout-run-unit-tests () | 6936 | ;;;_ > allout-run-unit-tests () |
| 6936 | (defun allout-run-unit-tests () | 6937 | (defun allout-run-unit-tests () |
| 6937 | "Run the various allout unit tests." | 6938 | "Run the various allout unit tests." |
| @@ -6947,11 +6948,11 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t." | |||
| 6947 | (while (boundp name) (makunbound name))) | 6948 | (while (boundp name) (makunbound name))) |
| 6948 | ;;;_ > allout-test-resumptions () | 6949 | ;;;_ > allout-test-resumptions () |
| 6949 | (defvar allout-tests-globally-unbound nil | 6950 | (defvar allout-tests-globally-unbound nil |
| 6950 | "Fodder for allout resumptions tests - defvar just for byte compiler.") | 6951 | "Fodder for allout resumptions tests -- defvar just for byte compiler.") |
| 6951 | (defvar allout-tests-globally-true nil | 6952 | (defvar allout-tests-globally-true nil |
| 6952 | "Fodder for allout resumptions tests - defvar just for byte compiler.") | 6953 | "Fodder for allout resumptions tests -- defvar just for byte compiler.") |
| 6953 | (defvar allout-tests-locally-true nil | 6954 | (defvar allout-tests-locally-true nil |
| 6954 | "Fodder for allout resumptions tests - defvar just for byte compiler.") | 6955 | "Fodder for allout resumptions tests -- defvar just for byte compiler.") |
| 6955 | (defun allout-test-resumptions () | 6956 | (defun allout-test-resumptions () |
| 6956 | "Exercise allout resumptions." | 6957 | "Exercise allout resumptions." |
| 6957 | ;; for each resumption case, we also test that the right local/global | 6958 | ;; for each resumption case, we also test that the right local/global |
| @@ -6987,10 +6988,10 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t." | |||
| 6987 | (allout-tests-obliterate-variable 'allout-tests-locally-true) | 6988 | (allout-tests-obliterate-variable 'allout-tests-locally-true) |
| 6988 | (set (make-local-variable 'allout-tests-locally-true) t) | 6989 | (set (make-local-variable 'allout-tests-locally-true) t) |
| 6989 | (assert (not (default-boundp 'allout-tests-locally-true)) | 6990 | (assert (not (default-boundp 'allout-tests-locally-true)) |
| 6990 | nil (concat "Test setup mistake - variable supposed to" | 6991 | nil (concat "Test setup mistake -- variable supposed to" |
| 6991 | " not have global binding, but it does.")) | 6992 | " not have global binding, but it does.")) |
| 6992 | (assert (local-variable-p 'allout-tests-locally-true) | 6993 | (assert (local-variable-p 'allout-tests-locally-true) |
| 6993 | nil (concat "Test setup mistake - variable supposed to have" | 6994 | nil (concat "Test setup mistake -- variable supposed to have" |
| 6994 | " local binding, but it lacks one.")) | 6995 | " local binding, but it lacks one.")) |
| 6995 | (allout-add-resumptions '(allout-tests-locally-true nil)) | 6996 | (allout-add-resumptions '(allout-tests-locally-true nil)) |
| 6996 | (assert (not (default-boundp 'allout-tests-locally-true))) | 6997 | (assert (not (default-boundp 'allout-tests-locally-true))) |