• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/

Lines Matching +defs:end +defs:of

13 ;; This file is part of GNU Emacs.
16 ;; it under the terms of the GNU General Public License as published by
21 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;; You should have received a copy of the GNU General Public License
38 ;; - Incremental search with dynamic exposure and reconcealment of text
54 ;; - Easy rendering of exposed portions into numbered, latex, indented, etc
57 ;; and maintenance of hanging indentation (in paragraph auto-fill and
58 ;; across topic promotion and demotion) of topic bodies consistent with
59 ;; indentation of their topic header.
69 ;; The outline menubar additions provide quick reference to many of
70 ;; the features, and see the docstring of the variable `allout-init'
72 ;; activation of allout-mode.
74 ;; See the docstring of the variables `allout-layout' and
75 ;; `allout-auto-activation' for details on automatic activation of
77 ;; 3.x, for those of you that depend on the old method.)
89 ;; Most of the requires here are for stuff covered by autoloads.
114 "*Regulates auto-activation modality of allout outlines - see `allout-init'.
126 performing auto-layout is asked of the user each time.
150 to be applied upon activation of `allout-mode'. Any non-nil
154 The types of elements in the layout specification are:
159 to the absolute value of the number, so all siblings are open
167 trailing ones accounted for by trailing specs. (Only the first of
171 - - exposes the body of the corresponding topic, but not subtopics
185 Expose children and grandchildren of all topics at current
186 level except the last two; expose children of the second to
192 to the comment-start string, if any, of the language of the file. This
193 is modulo the setting of `allout-use-mode-specific-leader', which see."
218 ;;;_ = allout-beginning-of-line-cycles
219 (defcustom allout-beginning-of-line-cycles t
220 "*If non-nil, \\[allout-beginning-of-line] will cycle through smart-placement options.
230 - if the cursor is on the first column of a non-headline body line:
231 then it goes to the start of the headline within the item body
232 - if the cursor is on the headline and not the start of the headline:
233 then it goes to the start of the headline
234 - if the cursor is on the start of the headline:
237 then it goes to the first column of that line (the headline)
238 - if the cursor is on the first column of the headline:
239 then it goes to the start of the headline within the item body.
241 In this fashion, you can use the beginning-of-line command to do
246 advanced to the beginning of the line and remains there on
249 ;;;_ = allout-end-of-line-cycles
250 (defcustom allout-end-of-line-cycles t
251 "*If non-nil, \\[allout-end-of-line] will cycle through smart-placement options.
259 - if the cursor is not on the end-of-line,
260 then it goes to the end-of-line
261 - if the cursor is on the end-of-line but not the end-of-entry,
262 then it goes to the end-of-entry, exposing it if necessary
263 - if the cursor is on the end-of-entry,
264 then it goes to the end of the head line
266 In this fashion, you can use the end-of-line command to do its
271 advanced to the end of the line and remains there on repeated
282 header prefix, which mostly have the value of this var at their front.
283 Level 1 topics are exceptions. They consist of only a single
295 prefix, which is concluded by bullets that includes the value of this
298 The value of an asterisk (`*') provides for backwards compatibility
300 and `allout-distinctive-bullets-string' for the range of available
311 See `allout-distinctive-bullets-string' for the other kind of
317 of this var to take effect."
341 `[' - open square bracket - meta-note, about item instead of item's subject
362 adopt changes of this value.
364 DO NOT include the close-square-bracket, `]', on either of the bullet
386 \(See note about use of comment-start strings, below.)
388 Set to the symbol for either of `allout-mode-leaders' or
389 `comment-start' to use only one of them, respectively.
394 comment-start strings that do not end in spaces are tripled in
395 the header-prefix, and an `_' underscore is tacked on the end, to
397 strings that do end in spaces are not tripled, but an underscore
421 from regular comments that start at the beginning-of-line.")
431 Whatever the setting of this variable, both old and new style prefixes
445 depth) just preceding the start of the topic text) according to level.
477 always respected by the topic maneuvering functions, regardless of
480 The setting of this var is not relevant when `allout-old-style-prefixes'
491 "*String designating bullet of topics that have auto-numbering; nil for none.
493 Topics having this bullet have automatic maintenance of a sibling
495 to \"#\", you can set it to a bullet of your choice. A nil value
538 "*Non-nil turns on page numbering for LaTeX formatting of an outline."
543 "*Font and size of labels for LaTeX formatting of an outline."
548 "*Font and size of entries for LaTeX formatting of an outline."
553 "*Font and size of entries for LaTeX formatting of an outline."
558 "*Font and size of titles for LaTeX formatting of an outline."
569 "*Space between lines for LaTeX formatting of an outline."
581 "Settings for topic encryption features of allout outliner."
585 "*Bullet signifying encryption of the entry's body."
591 "*Enable use of symmetric encryption passphrase verifier if non-nil.
594 variable for details about allout ajustment of file variables."
608 variable for details about allout ajustment of file variables."
619 The idea is to prevent file-system exposure of any un-encrypted stuff, and
631 file sytem, but avoids the nuisance of prompts for the encryption
632 passphrase in the middle of editing for, eg, autosaves.
652 "Settings for topic encryption features of allout outliner."
656 "*When non-nil, unit tests will be run at end of loading the allout module.
675 willing to let allout use a bunch of \C-c keybindings."
683 "*List of `allout-mode' key / function bindings, for `allout-mode-map'.
695 ("\C-a" allout-beginning-of-current-entry)
696 ("\C-e" allout-end-of-entry)
748 "*If non-nil, topic body text auto-indent defaults to indent of the header.
762 "*Non-nil enables auto-adjust of topic body hanging indent with depth shifts.
765 their topic header are reindented to correspond with depth shifts of
768 A value of t enables reindent in non-programming-code buffers, ie
769 those that do not have the variable `comment-start' set. A value of
783 This can range from changes to existing entries, addition of new ones,
784 and creation of a new local variables section when necessary.
801 "Version of currently loaded outline package. (allout.el)")
827 example, the following lines at the bottom of an Emacs Lisp file:
833 dictate activation of `allout-mode' mode when the file is visited
835 equivalent of `(allout-expose-topic 0 : -1 -1 0)'. (This is
840 case the value of `allout-default-layout' is used.")
849 "*Regular expression to match the beginning of a heading line.
857 "A string dictating the valid set of outline topic bullets.
860 and is produced from the elements of `allout-plain-bullets-string'
865 "Length of current buffers' `allout-plain-bullets-string'.")
877 decimal numbers, which should each be one less than the depth of the
886 decimal numbers, which should each be one less than the depth of the
891 "`allout-regexp' with outline style beginning-of-line anchor.
897 "Like `allout-line-boundary-regexp', for headers at beginning of buffer.")
905 "Length of `allout-plain-bullets-string', updated by `set-allout-regexp'.")
910 "Validate apparent topics of this depth and shallower as being non-aberrant.
913 limited to shallow depths, because the determination of aberrance
914 is according to the mistaken item being followed by a legitimate item of
941 Works according to settings of:
948 Apply this via (re)activation of `allout-mode', rather than
957 ;; Oops - garbled value, equate with effect of 't:
995 Depends on default setting of `allout-reindent-bodies' (which see)
996 and presence of setting for `comment-start', to tell whether the
1107 ;; disqualify any bullet char following any amount of
1129 Built on top of optional BASE-MAP, or empty sparse map if none specified.
1130 See doc string for allout-keybindings-list for format of binding list."
1193 ["Beginning of Entry"
1194 allout-beginning-of-current-entry t]
1195 ["End of Entry" allout-end-of-entry t]
1196 ["End of Subtree" allout-end-of-current-subtree t]))
1225 scope of the variable is restored along with its value. If it was a void
1228 The pairs are lists whose car is the name of the variable and car of the
1230 triples, where the third element qualifies the disposition of the setting,
1234 created by `cons'ing the second element of the pair onto the front of the
1239 element of the pair onto the end of the existing value.
1242 functions - use the 'local mode of `add-hook' for that, instead.
1254 name (type-of name)))
1270 (error "extension of non-list prior value attempted")
1274 (error "appending of non-list prior value attempted")
1316 currently respected, but the other conveys the details of the exposure
1323 It is run at the conclusion of `allout-flag-region'.
1327 - from - integer indicating the point at the start of the change.
1328 - to - integer indicating the point of the end of the change.
1337 "*Hook that's run after addition of items to the outline.
1341 - new-start - integer indicating the point at the start of the first new item.
1342 - new-end - integer indicating the point of the end of the last new item.
1350 "*Hook that's run after disciplined deletion of subtrees from the outline.
1354 - depth - integer indicating the depth of the subtree that was deleted.
1363 "*Hook that's run after shifting of items in the outline.
1368 - start - integer indicating the start point of the shifted parent item.
1376 "Value of normal-auto-fill-function outside of allout mode.
1383 "Horrible hack used to prevent invalid multiple triggering of outline
1391 It consists of an encrypted random string useful only to verify that a
1407 See the description of `allout-passphrase-hint-handling' for details about how
1419 "Internal variable, is nil or has the value of two points:
1421 - the location of a topic to be decrypted after saving is done
1425 was encrypted automatically as part of a file write or autosave.")
1429 "List of regexps whose matches are removed from plaintext before encryption.
1431 This is for the sake of removing artifacts, like escapes, that are added on
1432 and not actually part of the original plaintext. The removal is done just
1446 This is for the sake of redoing encryption in cases where the ciphertext
1459 "Limit on number of times encryption ciphertext is rejected.
1529 ;; processing to happen in the presence of such discrepancies. It should
1547 MODE is one of the following symbols:
1558 of allout outline mode, contingent to the buffer-specific setting of
1602 ;; Just punt and use the reports from each of the modes:
1635 "Set the properties of the allout invisible-text overlay and others."
1639 ;; XXX We use isearch-open-invisible *and* isearch-mode-end-hook. The
1641 ;; the _transient_ opening of invisible text during isearch - is keyed to
1642 ;; presence of the isearch-open-invisible property - even though this
1646 'allout-isearch-end-handler)
1658 "Toggle minor mode for controlling exposure and editing of text outlines.
1665 manipulation. It enables structural editing of outlines, as well as
1675 - incremental search with dynamic exposure and reconcealment of hidden text
1684 Below is a description of the key bindings, and then explanation of
1686 menubar additions for quick reference to many of the features, and see
1687 the docstring of the function `allout-init' for instructions on
1688 priming your emacs session for automatic activation of `allout-mode'.
1714 \\[allout-end-of-entry] `allout-end-of-entry'
1715 \\[allout-beginning-of-current-entry] `allout-beginning-of-current-entry' (alternately, goes to hot-spot)
1716 \\[allout-beginning-of-line] `allout-beginning-of-line' - like regular beginning-of-line, but
1717 if immediately repeated cycles to the beginning of the current item
1718 and then to the hot-spot (if `allout-beginning-of-line-cycles' is set).
1724 \\[allout-open-subtopic] `allout-open-subtopic' ... an offspring of current topic.
1725 \\[allout-open-supertopic] `allout-open-supertopic' ... a sibling of the current topic's parent.
1733 \\[allout-rebullet-topic] `allout-rebullet-topic' Reconcile bullets of topic and
1736 \\[allout-number-siblings] `allout-number-siblings' Number bullets of topic and siblings -
1746 \\[allout-yank] `allout-yank' Yank, adjusting depth of yanked topic to
1747 depth of heading if yanking into bare topic
1765 of current buffer - \"*BUFFERNAME exposed*\".
1775 Outline mode supports gpg encryption of topics, with support for
1778 mode, and auto-encryption of topics pending encryption on save.
1781 encrypted during file saves. If the contents of the topic
1785 The aim of these measures is reliable topic privacy while
1799 When the text cursor is positioned directly on the bullet character of
1800 a topic, regular characters (a to z) invoke the commands of the
1808 this special translation, so you can use them to get out of the
1811 In allout-mode, the normal beginning-of-line command (\\[allout-beginning-of-line]]) is
1813 repeat it immediately it cycles (if `allout-beginning-of-line-cycles'
1814 is set) to the beginning of the item and then, if you hit it again
1815 immediately, to the hot-spot. Similarly, `allout-beginning-of-current-entry'
1816 \(\\[allout-beginning-of-current-entry]) moves to the hot-spot when the cursor is already located
1817 at the beginning of the current entry.
1838 and with no intervening items of lower DEPTH than the container.
1841 DEPTH: The degree of nesting of an ITEM; it increases with containment.
1849 of the ITEM.
1853 An OFFSPRING of its ANCESTOR TOPICs.
1855 An immediate SUBTOPIC of its PARENT.
1861 HEADER: The first line of an ITEM, include the ITEM PREFIX and HEADER
1863 ENTRY: The text content of an ITEM, before any OFFSPRING, but including
1866 PREFIX: The leading text of an ITEM which distinguishes it from normal
1868 to the strict PREFIX format. It consists of a PREFIX-LEAD string,
1870 number, indicating the ordinal number of the topic among its
1872 space. After that is the ITEM HEADER text, which is not part of
1875 The relative length of the PREFIX determines the nesting DEPTH
1876 of the ITEM.
1878 The string at the beginning of a HEADER PREFIX, by default a `.'.
1879 It can be customized by changing the setting of
1882 When the PREFIX-LEAD is set to the comment-string of a
1884 program code without interfering with processing of the text
1892 BULLET: A character at the end of the ITEM PREFIX, it must be one of
1895 plain BULLETs are by default used, according to the DEPTH of the
1899 significance of the various distinctive bullets is purely by
1903 The state of a TOPIC which determines the on-screen visibility
1904 of its OFFSPRING and contained ENTRY text.
1970 (remove-hook 'isearch-mode-end-hook 'allout-isearch-end-handler t)
2001 ;; Produce map from current version of allout-keybindings-list:
2019 (add-hook 'isearch-mode-end-hook 'allout-isearch-end-handler nil t)
2061 ) ;; end of activation-mode cases.
2101 (substitute-key-definition 'beginning-of-line
2102 'allout-beginning-of-line
2104 (substitute-key-definition 'move-beginning-of-line
2105 'allout-beginning-of-line
2107 (substitute-key-definition 'end-of-line
2108 'allout-end-of-line
2110 (substitute-key-definition 'move-end-of-line
2111 'allout-end-of-line
2128 ;;;_ > allout-overlay-insert-in-front-handler (ol after beg end
2130 (defun allout-overlay-insert-in-front-handler (ol after beg end
2132 "Shift the overlay so stuff inserted in front of it are excluded."
2134 (move-overlay ol (1+ beg) (overlay-end ol))))
2135 ;;;_ > allout-overlay-interior-modification-handler (ol after beg end
2137 (defun allout-overlay-interior-modification-handler (ol after beg end
2151 (ol-end (overlay-end ol))
2154 (while (< (point) end)
2163 (next-property-change (1+ (point)) nil end)
2164 (next-char-property-change (1+ (point)) end))))
2175 (quit (allout-flag-region ol-start ol-end nil)
2176 (allout-flag-region ol-start ol-end t)
2179 ;;;_ > allout-before-change-handler (beg end)
2180 (defun allout-before-change-handler (beg end)
2191 ;; process all of the pending overlays:
2196 overlay nil beg end nil)))))
2197 ;;;_ > allout-isearch-end-handler (&optional overlay)
2198 (defun allout-isearch-end-handler (&optional overlay)
2203 function can also be used as an `isearch-mode-end-hook'."
2211 ;;; `allout-recent-prefix-beginning' and `allout-recent-prefix-end'
2218 "Buffer point of the start of the last topic prefix encountered.")
2220 ;;;_ = allout-recent-prefix-end
2221 (defvar allout-recent-prefix-end 0
2222 "Buffer point of the end of the last topic prefix encountered.")
2223 (make-variable-buffer-local 'allout-recent-prefix-end)
2226 "Depth of the last topic prefix encountered.")
2228 ;;;_ = allout-recent-end-of-subtree
2229 (defvar allout-recent-end-of-subtree 0
2230 "Buffer point last returned by `allout-end-of-current-subtree'.")
2231 (make-variable-buffer-local 'allout-recent-end-of-subtree)
2237 (setq allout-recent-prefix-end (or (match-end 1) (match-end 2))
2240 allout-recent-depth (max 1 (- allout-recent-prefix-end
2247 (setq allout-recent-prefix-end (point)
2253 "Return depth of last heading encountered by an outline maneuvering function.
2257 `allout-recent-prefix-end' if successful. This function uses those settings
2263 "Like `allout-recent-depth', but returns text of last encountered prefix.
2267 `allout-recent-prefix-end' if successful. This function uses those settings
2270 allout-recent-prefix-end))
2273 "Like allout-recent-prefix, but returns bullet of last encountered prefix.
2277 `allout-recent-prefix-end' if successful. This function uses those settings
2278 to return the current depth of the most recently matched topic."
2279 '(buffer-substring-no-properties (1- allout-recent-prefix-end)
2280 allout-recent-prefix-end))
2290 ;; presume integrity of outline and yanked content during yank - necessary,
2291 ;; to allow for level disparity of yank location and yanked text:
2312 ;; following bullet qualifies without this protection. (A sequence of
2346 (allout-beginning-of-current-line)
2357 (beginning-of-line))
2359 (= (point)(save-excursion (allout-end-of-prefix)(point)))))
2363 "Return depth of topic most immediately containing point.
2380 "Return depth of visible topic most immediately containing point.
2386 (- allout-recent-prefix-end
2392 "Topic prefix of the current topic."
2398 "Return bullet of containing topic (visible or not)."
2404 "Return bullet of current (visible) topic heading, or none if none found."
2408 (buffer-substring-no-properties (- allout-recent-prefix-end 1)
2409 allout-recent-prefix-end))
2411 (args-out-of-range nil))
2415 "Return the bullet of the header prefix string PREFIX."
2419 (substring prefix (1- (match-end 2)) (match-end 2))))
2422 "Item number of this prospective topic among its siblings.
2455 ;;;_ > allout-beginning-of-current-line ()
2456 (defun allout-beginning-of-current-line ()
2457 "Like beginning of line, but to visible text."
2459 ;; This combination of move-beginning-of-line and beginning-of-line is
2460 ;; deliberate, but the (beginning-of-line) may now be superfluous.
2462 (move-beginning-of-line 1)
2463 (beginning-of-line)
2465 (beginning-of-line)
2468 ;;;_ > allout-end-of-current-line ()
2469 (defun allout-end-of-current-line ()
2470 "Move to the end of line, past concealed text if any."
2471 ;; XXX This is for symmetry with `allout-beginning-of-current-line' -
2472 ;; `move-end-of-line' doesn't suffer the same problem as
2473 ;; `move-beginning-of-line'.
2475 (end-of-line)
2477 (end-of-line)
2479 ;;;_ > allout-beginning-of-line ()
2480 (defun allout-beginning-of-line ()
2481 "Beginning-of-line with `allout-beginning-of-line-cycles' behavior, if set."
2485 (if (or (not allout-beginning-of-line-cycles)
2487 (move-beginning-of-line 1)
2489 (let ((beginning-of-body
2494 (allout-beginning-of-current-entry)
2497 (goto-char beginning-of-body))
2498 ((< (point) beginning-of-body)
2499 (allout-beginning-of-current-line))
2500 ((= (point) beginning-of-body)
2502 (t (allout-beginning-of-current-line)
2503 (if (< (point) beginning-of-body)
2505 (goto-char beginning-of-body)))))))
2506 ;;;_ > allout-end-of-line ()
2507 (defun allout-end-of-line ()
2508 "End-of-line with `allout-end-of-line-cycles' behavior, if set."
2512 (if (or (not allout-end-of-line-cycles)
2514 (allout-end-of-current-line)
2515 (let ((end-of-entry (save-excursion
2516 (allout-end-of-entry)
2519 (allout-end-of-current-line))
2526 (allout-end-of-entry))
2527 ((>= (point) end-of-entry)
2529 (allout-end-of-current-line))
2530 (t (allout-end-of-entry))))))
2535 Returns the location of the heading, or nil if none found.
2558 Return the location of the beginning of the heading, or nil if not found.
2597 ;;; nested lists of the locations of topics within a subtree.
2600 ;;; for elaborate, compound assessment and adjustment of a subtree.
2604 "Produce a location \"chart\" of subtopics of the containing topic.
2610 only the visible subelements of the charted subjects.
2614 Point is left at the end of the subtree.
2621 last topic is listed first. The entry for each topic consists of
2622 an integer indicating the point at the beginning of the topic
2623 prefix. Charts for offspring consists of a list containing,
2628 not be specified by external callers. ORIG-DEPTH is depth of topic at
2629 starting point, and PREV-DEPTH is depth of prior topic."
2673 ;; Recurse on deeper level of curr topic:
2690 ; to the end of it:
2698 (setq allout-recent-end-of-subtree (point))))
2703 ;;;_ > allout-chart-siblings (&optional start end)
2704 (defun allout-chart-siblings (&optional start end)
2705 "Produce a list of locations of this and succeeding sibling topics.
2706 Effectively a top-level chart of siblings. See `allout-chart-subtree'
2707 for an explanation of charts."
2717 "Return a flat list of hidden points in subtree CHART, up to DEPTH.
2721 Note that point can be left at any of the points on chart, or at the
2732 ;; We're on the start of a subtree - recurse with it, if there's
2751 ;; indicating (negative of) the depth to which subtopic headers and
2754 ;; The produced list can have two types of entries. Bare numbers
2759 ;; point which is the negative of the number should be opened,
2763 ;; - Lists signify the beginning and end points of regions that should
2776 "Put point at beginning of immediately containing outline topic.
2782 Returns the point at the beginning of the prefix, or nil if none."
2799 "Put point at beginning of immediately containing outline topic.
2811 ;;;_ > allout-end-of-prefix ()
2812 (defun allout-end-of-prefix (&optional ignore-decorations)
2813 "Position cursor at beginning of header text.
2820 (goto-char allout-recent-prefix-end)
2829 "Return position of current (visible) topic's bullet."
2833 (1- allout-recent-prefix-end)))
2836 "Move to heading line of current topic, or beginning if not in a topic.
2838 If interactive, we position at the end of the prefix.
2840 Return value of resulting point, unless we started outside
2841 of (before any) topics, in which case we return nil."
2843 (allout-beginning-of-current-line)
2848 (allout-end-of-prefix)
2862 ;;;_ > allout-end-of-subtree (&optional current include-trailing-blank)
2863 (defun allout-end-of-subtree (&optional current include-trailing-blank)
2864 "Put point at the end of the last leaf in the containing topic.
2866 Optional CURRENT means put point at the end of the containing
2870 any, as part of the subtree. Otherwise, that trailing blank will be
2873 Returns the value of point."
2884 (allout-end-of-entry)
2888 (setq allout-recent-end-of-subtree (point))))
2889 ;;;_ > allout-end-of-current-subtree (&optional include-trailing-blank)
2890 (defun allout-end-of-current-subtree (&optional include-trailing-blank)
2892 "Put point at end of last leaf in currently visible containing topic.
2895 any, as part of the subtree. Otherwise, that trailing blank will be
2898 Returns the value of point."
2900 (allout-end-of-subtree t include-trailing-blank))
2901 ;;;_ > allout-beginning-of-current-entry ()
2902 (defun allout-beginning-of-current-entry ()
2903 "When not already there, position point at beginning of current topic header.
2906 \(See `allout-mode' doc string for details of hot-spot operation.)"
2909 (move-beginning-of-line 1)
2911 (goto-char allout-recent-prefix-end)
2913 (allout-end-of-prefix)
2917 ;;;_ > allout-end-of-entry (&optional inclusive)
2918 (defun allout-end-of-entry (&optional inclusive)
2919 "Position the point at the end of the current topics' entry.
2929 ;;;_ > allout-end-of-current-heading ()
2930 (defun allout-end-of-current-heading ()
2932 (allout-beginning-of-current-entry)
2935 (defalias 'allout-end-of-heading 'allout-end-of-current-heading)
2938 "Return the unmangled body text of the topic immediately containing point."
2940 (allout-end-of-prefix)
2947 (allout-end-of-entry t)
2964 (if (interactive-p) (allout-end-of-prefix))
2970 Point is left at the beginning of the level whether or not
2976 (if (allout-beginning-of-level)
2992 (if (interactive-p) (allout-end-of-prefix))))
3020 (if (interactive-p) (allout-end-of-prefix))
3032 Return the start point of the new topic if successful, nil otherwise."
3078 Return the start point of the new topic if successful, nil otherwise.
3143 "Position cursor at end of previous topic.
3145 Presumes point is at the start of a topic prefix."
3153 ;;;_ > allout-beginning-of-level ()
3154 (defun allout-beginning-of-level ()
3156 (allout-end-of-level 'backward))
3157 ;;;_ > allout-end-of-level (&optional backward)
3158 (defun allout-end-of-level (&optional backward)
3164 (if (interactive-p) (allout-end-of-prefix)))))
3184 (allout-beginning-of-current-line))
3202 (allout-end-of-prefix))
3205 (allout-end-of-prefix))
3206 ((not backward) (end-of-line) nil))))
3216 (if (interactive-p) (allout-end-of-prefix))))
3219 "Position point at the next heading of the same level.
3239 (allout-end-of-prefix)
3241 (error "Hit %s level %d topic, traversed %d of %d requested"
3248 "Inverse of `allout-forward-current-level'."
3265 are mapped to the command of the corresponding control-key on the
3308 the cursor which has moved as a result of such reinterpretation is
3309 positioned on the bullet character of the destination topic.
3314 command/keystrokes to relocate the cursor off of a bullet character to
3315 return to regular interpretation of self-insert characters."
3327 "Catchall handling of key bindings in hot-spots.
3409 "True if BULLET is one of those on `allout-distinctive-bullets-string'."
3448 ;; changing level of current topic.
3455 PRIOR-BULLET indicates the bullet of the prefix being changed, or
3467 Third arg DEPTH forces the topic prefix to that depth, regardless of
3470 If SOLICIT is non-nil, then the choice of bullet is solicited from
3480 denumbered format, depending on the value of the sixth arg, INDEX.
3485 the prefix of the topic is forced to be numbered. Non-nil
3489 siblings back to start of level. If INDEX is a number, then that
3494 ;; The options are ordered in likely frequence of use, most common
3522 ;; Sneak it in the condition of the next case, whatever it is.)
3600 If OFFER-RECENT-BULLET is true, offer to use the bullet of the prior sibling.
3604 - Creation of new topics is with respect to the visible topic
3605 containing the cursor, regardless of intervening concealed ones.
3607 - New headers are generally created after/before the body of a
3613 - Double spacing of topic lists is preserved. Also, the first
3618 - Creation of sibling or nested topics is with respect to the topic
3620 can easily create a sibling in front of the current topic without
3624 (allout-beginning-of-current-line)
3640 (if (> allout-recent-prefix-end 1)
3653 start end)
3670 (allout-end-of-current-subtree)
3697 (progn (end-of-line)
3706 (allout-end-of-current-subtree)
3710 (allout-end-of-entry)
3714 (allout-beginning-of-current-line)
3733 (allout-end-of-current-line))
3738 ;; avoid rear-stickiness inheritence of read-only property.
3763 (setq end (1+ (point)))
3770 (end-of-line)
3772 (run-hook-with-args 'allout-structure-added-hook start end)
3787 Positive universal arg means to use the bullet of the prior sibling.
3807 "Name of modal fill function being wrapped by `allout-auto-fill'.")
3819 (beginning-of-line)
3822 ;; length of topic prefix:
3823 (make-string (progn (allout-end-of-prefix)
3838 Note that refill of indented paragraphs is not done."
3841 (allout-end-of-prefix)
3843 excess old-indent-begin old-indent-end
3859 old-indent-end (match-end 1))
3861 (if (> 0 (setq excess (- (- old-indent-end old-indent-begin)
3863 ;; Text starts left of old margin - don't adjust:
3865 ;; Text was hanging at or right of old left margin -
3868 (delete-region old-indent-begin old-indent-end)
3881 (allout-end-of-prefix)
3883 to allout-recent-prefix-end)
3909 "Adjust bullet of current topic prefix.
3913 If SOLICIT is non-nil, then the choice of bullet is solicited from
3920 of the topic's current depth.
3926 of the forth arg, INDEX.
3929 prefix of the topic is forced to be non-numbered. Null index and
3940 and `allout-numbered-bullet', which all affect the behavior of
3946 (me allout-recent-prefix-end)
3964 ; get rid of old one:
3973 (delete-region (match-beginning 0)(match-end 0))))
3989 ;; Recursively rectify successive siblings of orig topic if
4047 First arg RELATIVE-DEPTH means to shift the depth of the entire
4132 ;; Rectify numbering of former siblings of the adjusted topic,
4140 ;; Now rectify numbering of new siblings of the adjusted topic,
4194 (allout-beginning-of-level)
4209 "Increase depth of current heading and any items collapsed within it.
4215 offspring, making the item into a sibling of its former children,
4216 and a child of sibling that formerly preceeded it.
4218 You are not allowed to shift the first offspring of a topic
4252 "Decrease depth of current heading and any topics collapsed within it.
4253 This will make the item a sibling of its former container.
4259 but not the item itself, making the former children siblings of
4264 subtopics into siblings of the item."
4304 end
4306 (end-hidden (save-excursion (allout-end-of-current-line)
4307 (setq end (point))
4311 (allout-annotate-hidden beg end)
4312 (if (and (not beg-hidden) (not end-hidden))
4315 (allout-deannotate-hidden beg end)
4325 "Like allout-kill-topic, but save to kill ring instead of deleting."
4338 - would separate the topic from the end of buffer
4347 (beg (prog1 (allout-back-to-current-heading) (beginning-of-line)))
4348 end
4350 (allout-end-of-current-subtree)
4362 (allout-annotate-hidden beg (setq end (point)))
4364 (allout-unprotected (kill-region beg end))
4367 (allout-deannotate-hidden beg end)))
4374 "Like allout-kill-topic, but save to kill ring instead of deleting."
4380 ;;;_ > allout-annotate-hidden (begin end)
4381 (defun allout-annotate-hidden (begin end)
4386 (allout-deannotate-hidden begin end)
4391 ;; at or advance to start of next hidden region:
4397 nil end))))
4399 ;; still not at start of hidden area - must not be any left.
4404 ;; still not at start of hidden area.
4407 (setq next (overlay-end overlay)
4409 ;; advance to end of this hidden area:
4417 ;;;_ > allout-deannotate-hidden (begin end)
4418 (defun allout-deannotate-hidden (begin end)
4424 ;(remove-text-properties begin end '(allout-was-hidden t))
4426 ;;;_ > allout-hide-by-annotation (begin end)
4427 (defun allout-hide-by-annotation (begin end)
4434 ;; at or advance to start of next annotation:
4438 nil end)))
4445 ;; still not at start of annotation.
4447 ;; advance to just after end of this annotation:
4450 nil end))
4462 Does depth adjustment of yanked topics, when:
4465 2 it is being yanked at the end of a line which consists of only a valid
4468 Also, adjusts numbering of subsequent siblings when appropriate.
4470 Depth adjustment alters the depth of all the topics being yanked
4471 the amount it takes to make the first topic have the depth of the
4474 The point is left in front of yanked, adjusted topics, rather than
4475 at the end (and vice-versa with the mark). Non-adjusted yanks,
4485 (subj-end (allout-mark-marker t))
4496 ;; Yanking a topic into the start of a topic - reconcile to fit:
4498 (prefix-len (if (not (match-end 1))
4500 (- (match-end 1) subj-beg)))
4507 (and (goto-char subj-end)
4512 (beginning-of-line)
4523 (narrow-to-region subj-beg subj-end)
4525 ; line at end, if any:
4551 ; Delete from bullet of old to
4552 ; before bullet of new:
4554 (beginning-of-line)
4557 (set-marker (allout-mark-marker t) subj-end)
4559 (allout-end-of-prefix))
4593 (run-hook-with-args 'allout-structure-added-hook subj-beg subj-end)))
4596 "`allout-mode' yank, with depth and numbering adjustment of yanked topics.
4600 If a topic is being yanked into a bare topic prefix, the depth of the
4601 yanked topic is adjusted to the depth of the topic prefix.
4605 3 it is being yanked at the end of a line which consists of only a valid
4608 If these conditions hold then the depth of the yanked topics are all
4609 adjusted the amount it takes to make the first one at the depth of the
4612 The point is left in front of yanked, adjusted topics, rather than
4613 at the end (and vice-versa with the mark). Non-adjusted yanks,
4617 Numbering of yanked topics, and the successive siblings at the depth
4633 Adapts level of popped topics to level of fresh prefix.
4650 \(Works according to setting of `allout-file-xref-bullet')."
4661 (let* ((text-start allout-recent-prefix-end)
4662 (heading-end (progn (end-of-line) (point))))
4665 (if (re-search-forward "\\s-\\(\\S-*\\)" heading-end t)
4666 (buffer-substring (match-beginning 1) (match-end 1))))))
4712 (end-of-line))
4718 (allout-end-of-current-subtree (not flag))
4727 expense of exposing its context, but can leave the outline with aberrant
4733 (let (beg end)
4736 (setq end (allout-pre-next-prefix))
4737 (allout-flag-region beg end nil)
4738 (list beg end))))
4742 "If point is visible, show all direct subheadings of this heading.
4751 this function, can employ the pure offspring-revealing capabilities of
4754 Returns point at end of subtree that was opened, if any. (May get a
4755 point of non-opened subtree?)"
4769 (allout-beginning-of-current-line)
4799 ;; Concealed root would already have been taken care of,
4815 ;; Compensate for `save-excursion's maintenance of point
4832 (move-beginning-of-line 1)
4837 (progn (beginning-of-line)
4857 (end-of-line))
4859 (progn (allout-end-of-entry) (point))
4871 (progn (allout-end-of-entry t) (point))
4887 (allout-beginning-of-current-line)
4890 (allout-beginning-of-level)
4904 (move-end-of-line 1)
4906 (allout-end-of-current-subtree (not (looking-at "\n\n"))))
4935 "Show all subheadings of this heading, but not their bodies."
4938 (beginning-of-line))
4942 "Hide the bodies of the current topic and all its offspring."
4945 (allout-hide-region-body (point) (progn (allout-end-of-current-subtree)
4951 "Show all of the text in the buffer."
4958 "Hide all of buffer except headings."
4961 ;;;_ > allout-hide-region-body (start end)
4962 (defun allout-hide-region-body (start end)
4966 (narrow-to-region start end)
4970 (end-of-line)
4971 (allout-flag-region (point) (allout-end-of-entry) t)
4982 need evaluation of the arguments, or even better, the `allout-layout'
4983 variable-keyed mode-activation/auto-exposure feature of allout outline
4992 A simple spec (either a number, one of a few symbols, or the null
4996 subtopics of the current topic.
4998 The `:' repeat spec is used to specify exposure for any number of
5006 absolute value of the number, so all siblings are open only to
5015 ones. (Only first of multiple colons at same level is
5019 - - exposes the body of the corresponding topic.
5031 Expose children and grandchildren of all topics at current
5032 level except the last two; expose children of the second to
5050 (if (> allout-recent-end-of-subtree max-pos)
5051 (setq max-pos allout-recent-end-of-subtree)))
5056 (if (> allout-recent-end-of-subtree max-pos)
5057 (setq max-pos allout-recent-end-of-subtree)))
5063 (let ((residue ; = # of sibs not covered by remaining spec
5064 ;; Dang - could be nice to make use of the chart, sigh:
5076 (if (> allout-recent-end-of-subtree max-pos)
5078 allout-recent-end-of-subtree)))))
5081 (if (> allout-recent-end-of-subtree max-pos)
5082 (setq max-pos allout-recent-end-of-subtree)))))
5104 dictate exposure for subsequent siblings of current topic.
5110 that dictate the exposure for the successive offspring of the topic.
5116 absolute value of the number.
5121 - `-' exposes the body and immediate offspring of the corresponding topic.
5124 dictates the exposure depth of the topic as a whole. Subsequent
5125 elements of the list are nested SPECs, dictating the specific exposure
5126 for the corresponding offspring of the topic.
5142 (end-of-line)
5168 (end-of-line)
5181 Use this instead of obsolete `allout-exposure'.
5186 subtopics are shown, except also show the children of the
5193 Expose children and grandchildren of first topic at current
5194 level, and expose children of subsequent topics at current
5204 ;;;_ - Mapping and processing of topics
5215 ;; Take care of the explicit context:
5224 ;; Take care of the indentation:
5237 ;; Dispose of single extra delim:
5257 ;; Take care of the explicit context:
5264 ;; Take care of the indentation:
5277 ;; Dispose of single extra delim:
5280 ;;;_ > allout-listify-exposed (&optional start end format)
5281 (defun allout-listify-exposed (&optional start end format)
5288 Optional START and END indicate bounds of region.
5298 The elements of the list produced are lists that represents a topic
5299 header and body. The elements of that list are:
5301 - a number representing the depth of the topic,
5305 - and a series of strings, each containing one line of the exposed
5306 portion of the topic entry."
5317 (beginning-of-line)
5325 (not (> (point) end)))
5329 beg (progn (allout-end-of-prefix t) (point))) ; and beginning.
5335 (beginning-of-line)
5343 ;To hidden text or end of line:
5345 (end-of-line)
5350 (beginning-of-line))
5411 "Map function on exposed parts of current topic; results to another buffer.
5429 FROM: region start, if region active, else start of buffer
5430 TO: region end, if region active, else end of buffer
5440 (setq from (region-beginning) to (region-end))
5471 "Insert contents of listified outline portion in current buffer.
5497 "Duplicate exposed portions of current outline to another buffer.
5501 With repeat count, copy the exposed parts of only the current topic.
5512 `indent-flat' - The best of both - only the first of each level has
5514 of the leaf, preceded by the right amount of indentation."
5521 (end (if arg (allout-end-of-current-subtree) (point-max)))
5532 end
5541 "Present numeric outline of outline's exposed portions in another buffer.
5548 With repeat count, copy the exposed portions of only current topic.
5557 "Present indented outline of outline's exposed portions in another buffer.
5564 With repeat count, copy the exposed portions of only current topic.
5575 "Return copy of STRING for literal reproduction across LaTeX processing.
5576 Expresses the original characters (including carriage returns) of the
5591 across LaTeX processing, within the context of a `verbatim'
5592 environment. Leaves point at the end of the line."
5594 (beginning-of-line)
5596 (end (progn (end-of-line)(point))))
5600 end ; bounded by end-of-line
5601 1) ; no matches, move to end & return nil
5604 (setq end (1+ end))
5605 (goto-char (1+ (match-end 2)))))))
5609 ;; Much of this is being derived from the stuff in appendix of E in
5654 "\\end{center}\n\n"))
5677 (insert "\n\\end{document}\n"))
5683 BULLET string, and a list of TEXT strings for the body."
5707 ; Mangle any occurrences of
5708 ; "\end{verbatim}" in text,
5711 (setq bop (string-match "\\end{verbatim}" curr-line)))
5726 (insert "\\end{verbatim}\n")
5734 With repeat count, copy the exposed portions of entire buffer."
5742 (end (if arg (point-max) (allout-end-of-current-subtree)))
5750 end
5762 "Encrypt clear or decrypt encoded text of visibly-containing topic's contents.
5766 it forces prompting for the passphrase regardless of availability from the
5778 Encrypted topic's bullet is set to a `~' to signal that the contents of the
5790 Level-one topics, with prefix consisting solely of an `*' asterisk, cannot be
5791 encrypted. If you want to encrypt the contents of a top-level topic, use
5808 confirmation of the passphrase when next obtained, before encrypting or
5814 added to an Emacs 'local variables' section at the end of the file, which
5815 is created if necessary. That setting is for retention of the passphrase
5822 the hint string is stored in the local-variables section of the file, and
5836 it forces prompting for the passphrase regardless of availability from the
5850 (allout-end-of-prefix t)
5869 (subtree-end (allout-end-of-subtree))
5871 subtree-end))
5872 (subtree-end-char (char-after (1- subtree-end)))
5873 (subtree-trailing-char (char-after subtree-end))
5899 (select-safe-coding-system subtree-beg subtree-end))
5924 (delete-region subtree-beg subtree-end)
5930 (if (and (= subtree-end-char ?\n)
5948 bullet-pos subtree-end))))
5957 If DECRYPT is true (default false), then decrypt instead of encrypt.
5963 FOR-KEY is human readable identification of the first of the user's
5966 Optional RETRIED is for internal use - conveys the number of failed keys
5969 Optional PASSPHRASE enables explicit delivery of the decryption passphrase,
5972 Optional REJECTED is for internal use - conveys the number of
5982 (error "Allout encryption depends on a newer version of pgg"))
6040 ;; convey the text characteristics of the original buffer:
6119 ;; Check for disqualification of this ciphertext:
6178 CACHE-ID is the cache id of the key for the passphrase.
6186 RETRIED is the number of this attempt to obtain this passphrase.
6189 of the availability of a cached copy."
6255 ;; No verifier string - force confirmation by repetition of
6269 (if (yes-or-no-p (concat "spelling of original and"
6281 (allout-end-of-prefix t)
6290 "Return a pair of the key type and identity of a recipient's secret key.
6292 The key type is one of 'symmetric or 'keypair.
6294 if 'keypair, and some of the user's secret keys are among those for which
6295 the message was encoded, return the identity of the first. otherwise,
6296 return nil for the second item of the pair.
6322 "Encrypt random message for later validation of symmetric key's passphrase."
6342 OUTLINE-BUFFER is the buffer of the outline being adjusted.
6344 These are used to help the user keep track of the passphrase they use for
6386 "Return text of the encrypt passphrase verifier, unmassaged, or nil if none.
6388 Derived from value of `allout-passphrase-verifier-string'."
6401 \"Otherwise\" includes absence of passphrase verifier."
6412 "Return the point of the next topic pending encryption, or nil if none.
6415 from encryption. This supports 'except-current mode of
6450 (allout-end-of-subtree)
6470 from encryption. This supports 'except-current mode of
6474 containing the location of the topic and the location of the cursor just
6476 and exactly resituate the cursor if this is being done as part of a file
6495 (allout-end-of-current-subtree)
6570 "Adjust the setting of an Emacs file variable named VARNAME to VALUE.
6579 a top-level topic at the end of the file.
6581 `enable-local-variables' must be true for any of this to happen."
6597 (end-of-line)
6603 (beginning-of-line)
6612 ;; of new value:
6617 (line-end (progn (if (search-forward "\n" nil t)
6620 (value-end (- line-end (length suffix))))
6621 (if (> value-end value-beg)
6622 (delete-region value-beg value-end)))
6623 (end-of-line)
6634 "Return a list of values of the symbols in list bound to CONFIGVAR-NAME.
6636 The user is prompted for removal of symbols that are unbound, and they
6639 CONFIGVAR-NAME should be the name of the configuration variable,
6657 (beginning-of-line))
6660 (allout-end-of-current-subtree)
6665 "Solicit (with first arg PROMPT) choice of a character from string STRING.
6693 ;; got something out of loop - return it:
6699 "Return a copy of REGEXP with all character escapes stripped out.
6701 Representations of actual backslashes - '\\\\\\\\' - are left as a
6720 ;;;_ > count-trailing-whitespace-region (beg end)
6721 (defun count-trailing-whitespace-region (beg end)
6722 "Return number of trailing whitespace chars between BEG and END.
6725 (if (> beg end)
6730 (while (re-search-forward "[ ][ ]*$" end t)
6736 "Return a copy of string with all \"%\" characters doubled."
6743 "Return a list of all atoms in list."
6775 (defun remove-overlays (&optional beg end name val)
6776 "Clear BEG and END of overlays whose property NAME has value VAL.
6778 BEG and END default respectively to the beginning and end of buffer."
6780 (unless end (setq end (point-max)))
6781 (if (< end beg)
6782 (setq beg (prog1 end (setq end beg))))
6784 (dolist (o (overlays-in beg end))
6786 ;; Either push this overlay outside beg...end
6787 ;; or split it to exclude beg...end
6788 ;; or delete it entirely (if it is contained in beg...end).
6790 (if (> (overlay-end o) end)
6794 (move-overlay o end (overlay-end o)))
6796 (if (> (overlay-end o) end)
6797 (move-overlay o end (overlay-end o))
6803 "Return a copy of overlay O."
6804 (let ((o1 (make-overlay (overlay-start o) (overlay-end o)
6806 ;; insertion-type of the two markers.
6816 See documentation for `buffer-invisibility-spec' for the kind of elements
6829 ;;;_ > move-beginning-of-line if necessary - older emacs, xemacs
6830 (if (not (fboundp 'move-beginning-of-line))
6831 (defun move-beginning-of-line (arg)
6832 "Move point to beginning of current line as displayed.
6834 which are part of the text that an image rests on.)
6837 If point reaches the beginning or end of buffer, it stops there.
6844 ;; Move to beginning-of-line, ignoring fields and invisibles.
6853 ;;;_ > move-end-of-line if necessary - older emacs, xemacs
6854 (if (not (fboundp 'move-end-of-line))
6855 (defun move-end-of-line (arg)
6856 "Move point to end of current line as displayed.
6858 which are part of the text that an image rests on.)
6861 If point reaches the beginning or end of buffer, it stops there.
6993 ;; ensure that last of multiple resumptions holds, for various scopes.
7006 ;; reestablish many of the basic conditions are maintained after re-add:
7052 ;; - shows the children of the third to last (config vars)