868 |
(make-variable-buffer-local 'allout-pre-was-isearching) |
(make-variable-buffer-local 'allout-pre-was-isearching) |
869 |
;;;_ = allout-isearch-prior-pos nil |
;;;_ = allout-isearch-prior-pos nil |
870 |
(defvar allout-isearch-prior-pos nil |
(defvar allout-isearch-prior-pos nil |
871 |
"Cue for isearch-dynamic-exposure tracking, used by allout-isearch-expose.") |
"Cue for isearch-dynamic-exposure tracking, used by `allout-isearch-expose'.") |
872 |
(make-variable-buffer-local 'allout-isearch-prior-pos) |
(make-variable-buffer-local 'allout-isearch-prior-pos) |
873 |
;;;_ = allout-isearch-did-quit |
;;;_ = allout-isearch-did-quit |
874 |
(defvar allout-isearch-did-quit nil |
(defvar allout-isearch-did-quit nil |
887 |
It's automatically reset to nil after every buffer modification.") |
It's automatically reset to nil after every buffer modification.") |
888 |
(make-variable-buffer-local 'allout-override-protect) |
(make-variable-buffer-local 'allout-override-protect) |
889 |
;;;_ > allout-unprotected (expr) |
;;;_ > allout-unprotected (expr) |
890 |
(defmacro allout-unprotected (expr) |
(defmacro allout-unprotected (expression) |
891 |
"Evaluate EXPRESSION with `allout-override-protect' let-bound t." |
"Evaluate EXPRESSION with `allout-override-protect' let-bound to t." |
892 |
`(let ((allout-override-protect t)) |
`(let ((allout-override-protect t)) |
893 |
,expr)) |
,expression)) |
894 |
;;;_ = allout-undo-aggregation |
;;;_ = allout-undo-aggregation |
895 |
(defvar allout-undo-aggregation 30 |
(defvar allout-undo-aggregation 30 |
896 |
"Amount of successive self-insert actions to bunch together per undo. |
"Amount of successive self-insert actions to bunch together per undo. |
897 |
|
|
898 |
This is purely a kludge variable, regulating the compensation for a bug in |
This is purely a kludge variable, regulating the compensation for a bug in |
899 |
the way that before-change-functions and undo interact.") |
the way that `before-change-functions' and undo interact.") |
900 |
(make-variable-buffer-local 'allout-undo-aggregation) |
(make-variable-buffer-local 'allout-undo-aggregation) |
901 |
;;;_ = file-var-bug hack |
;;;_ = file-var-bug hack |
902 |
(defvar allout-v18/19-file-var-hack nil |
(defvar allout-v18/19-file-var-hack nil |
1407 |
"Buffer point last returned by `allout-end-of-current-subtree'.") |
"Buffer point last returned by `allout-end-of-current-subtree'.") |
1408 |
(make-variable-buffer-local 'allout-recent-end-of-subtree) |
(make-variable-buffer-local 'allout-recent-end-of-subtree) |
1409 |
;;;_ > allout-prefix-data (beg end) |
;;;_ > allout-prefix-data (beg end) |
1410 |
(defmacro allout-prefix-data (beg end) |
(defmacro allout-prefix-data (beginning end) |
1411 |
"Register allout-prefix state data - BEGINNING and END of prefix. |
"Register allout-prefix state data - BEGINNING and END of prefix. |
1412 |
|
|
1413 |
For reference by `allout-recent' funcs. Returns BEGINNING." |
For reference by `allout-recent' funcs. Returns BEGINNING." |
1414 |
`(setq allout-recent-prefix-end ,end |
`(setq allout-recent-prefix-end ,end |
1415 |
allout-recent-prefix-beginning ,beg)) |
allout-recent-prefix-beginning ,beginning)) |
1416 |
;;;_ > allout-recent-depth () |
;;;_ > allout-recent-depth () |
1417 |
(defmacro allout-recent-depth () |
(defmacro allout-recent-depth () |
1418 |
"Return depth of last heading encountered by an outline maneuvering function. |
"Return depth of last heading encountered by an outline maneuvering function. |
1632 |
The chart for a topics' offspring precedes the entry for the topic |
The chart for a topics' offspring precedes the entry for the topic |
1633 |
itself. |
itself. |
1634 |
|
|
1635 |
\(fn &optional levels)" |
\(fn &optional LEVELS)" |
1636 |
|
|
1637 |
;; The other function parameters are for internal recursion, and should |
;; The other function parameters are for internal recursion, and should |
1638 |
;; not be specified by external callers. ORIG-DEPTH is depth of topic at |
;; not be specified by external callers. ORIG-DEPTH is depth of topic at |
1999 |
) |
) |
2000 |
;;;_ > allout-snug-back () |
;;;_ > allout-snug-back () |
2001 |
(defun allout-snug-back () |
(defun allout-snug-back () |
2002 |
"Position cursor at end of previous topic |
"Position cursor at end of previous topic. |
2003 |
|
|
2004 |
Presumes point is at the start of a topic prefix." |
Presumes point is at the start of a topic prefix." |
2005 |
(if (or (bobp) (eobp)) |
(if (or (bobp) (eobp)) |
2249 |
- Implement (and clear) `allout-post-goto-bullet', for hot-spot |
- Implement (and clear) `allout-post-goto-bullet', for hot-spot |
2250 |
outline commands. |
outline commands. |
2251 |
|
|
2252 |
- Massages buffer-undo-list so successive, standard character self-inserts are |
- Massages `buffer-undo-list' so successive, standard character self-inserts |
2253 |
aggregated. This kludge compensates for lack of undo bunching when |
are aggregated. This kludge compensates for lack of undo bunching when |
2254 |
`before-change-functions' is used." |
`before-change-functions' is used." |
2255 |
|
|
2256 |
; Apply any external change func: |
; Apply any external change func: |
2379 |
|
|
2380 |
;;;_ > allout-flag-region (from to flag) |
;;;_ > allout-flag-region (from to flag) |
2381 |
(defmacro allout-flag-region (from to flag) |
(defmacro allout-flag-region (from to flag) |
2382 |
"Hide or show lines from FROM to TO, via Emacs selective-display FLAG char. |
"Hide or show lines from FROM to TO, via Emacs `selective-display' FLAG char. |
2383 |
Ie, text following flag C-m \(carriage-return) is hidden until the |
Ie, text following flag C-m \(carriage-return) is hidden until the |
2384 |
next C-j (newline) char. |
next C-j (newline) char. |
2385 |
|
|
2421 |
(setq allout-isearch-did-quit nil)) |
(setq allout-isearch-did-quit nil)) |
2422 |
;;;_ > allout-enwrap-isearch () |
;;;_ > allout-enwrap-isearch () |
2423 |
(defun allout-enwrap-isearch () |
(defun allout-enwrap-isearch () |
2424 |
"Impose `allout-mode' isearch-abort wrapper for dynamic exposure in isearch. |
"Impose `isearch-abort' wrapper for dynamic exposure in isearch. |
2425 |
|
|
2426 |
The function checks to ensure that the rebinding is done only once." |
The function checks to ensure that the rebinding is done only once." |
2427 |
|
|
2469 |
font-lock-mode nil))) |
font-lock-mode nil))) |
2470 |
(add-hook 'isearch-mode-hook 'isearch-inhibit-font-lock) |
(add-hook 'isearch-mode-hook 'isearch-inhibit-font-lock) |
2471 |
(defun isearch-reenable-font-lock () |
(defun isearch-reenable-font-lock () |
2472 |
"Reenable font-lock after isearching - for use on isearch-mode-end-hook." |
"Reenable font-lock after isearching - for use on `isearch-mode-end-hook'." |
2473 |
(if (and (boundp 'font-lock-mode) font-lock-mode) |
(if (and (boundp 'font-lock-mode) font-lock-mode) |
2474 |
(if (and (allout-mode-p) isearch-was-font-locking) |
(if (and (allout-mode-p) isearch-was-font-locking) |
2475 |
(setq isearch-was-font-locking nil |
(setq isearch-was-font-locking nil |
2671 |
((allout-sibling-index)))))) |
((allout-sibling-index)))))) |
2672 |
) |
) |
2673 |
) |
) |
2674 |
;;;_ > allout-open-topic (relative-depth &optional before use_sib_bullet) |
;;;_ > allout-open-topic (relative-depth &optional before use-sib-bullet) |
2675 |
(defun allout-open-topic (relative-depth &optional before use_sib_bullet) |
(defun allout-open-topic (relative-depth &optional before use-sib-bullet) |
2676 |
"Open a new topic at depth RELATIVE-DEPTH. |
"Open a new topic at depth RELATIVE-DEPTH. |
2677 |
|
|
2678 |
New topic is situated after current one, unless optional flag BEFORE |
New topic is situated after current one, unless optional flag BEFORE |
2679 |
is non-nil, or unless current line is complete empty (not even |
is non-nil, or unless current line is complete empty (not even |
2680 |
whitespace), in which case open is done on current line. |
whitespace), in which case open is done on current line. |
2681 |
|
|
2682 |
If USE_SIB_BULLET is true, use the bullet of the prior sibling. |
If USE-SIB-BULLET is true, use the bullet of the prior sibling. |
2683 |
|
|
2684 |
Nuances: |
Nuances: |
2685 |
|
|
2821 |
;;(if doing-beginning (save-excursion (newline (if dbl-space 2 1)))) |
;;(if doing-beginning (save-excursion (newline (if dbl-space 2 1)))) |
2822 |
|
|
2823 |
|
|
2824 |
(allout-rebullet-heading (and use_sib_bullet ref-bullet);;; solicit |
(allout-rebullet-heading (and use-sib-bullet ref-bullet);;; solicit |
2825 |
depth ;;; depth |
depth ;;; depth |
2826 |
nil ;;; number-control |
nil ;;; number-control |
2827 |
nil ;;; index |
nil ;;; index |
3439 |
Numbering of yanked topics, and the successive siblings at the depth |
Numbering of yanked topics, and the successive siblings at the depth |
3440 |
into which they're being yanked, is adjusted. |
into which they're being yanked, is adjusted. |
3441 |
|
|
3442 |
`allout-yank-pop' works with `allout-yank' just like normal yank-pop |
`allout-yank-pop' works with `allout-yank' just like normal `yank-pop' |
3443 |
works with normal yank in non-outline buffers." |
works with normal `yank' in non-outline buffers." |
3444 |
|
|
3445 |
(interactive "*P") |
(interactive "*P") |
3446 |
(setq this-command 'yank) |
(setq this-command 'yank) |
4365 |
;;;_ - LaTeX formatting |
;;;_ - LaTeX formatting |
4366 |
;;;_ > allout-latex-verb-quote (string &optional flow) |
;;;_ > allout-latex-verb-quote (string &optional flow) |
4367 |
(defun allout-latex-verb-quote (string &optional flow) |
(defun allout-latex-verb-quote (string &optional flow) |
4368 |
"Return copy of STRING for literal reproduction across latex processing. |
"Return copy of STRING for literal reproduction across LaTeX processing. |
4369 |
Expresses the original characters \(including carriage returns) of the |
Expresses the original characters \(including carriage returns) of the |
4370 |
string across latex processing." |
string across LaTeX processing." |
4371 |
(mapconcat (function |
(mapconcat (function |
4372 |
(lambda (char) |
(lambda (char) |
4373 |
(cond ((memq char '(?\\ ?$ ?% ?# ?& ?{ ?} ?_ ?^ ?- ?*)) |
(cond ((memq char '(?\\ ?$ ?% ?# ?& ?{ ?} ?_ ?^ ?- ?*)) |
4378 |
"")) |
"")) |
4379 |
;;;_ > allout-latex-verbatim-quote-curr-line () |
;;;_ > allout-latex-verbatim-quote-curr-line () |
4380 |
(defun allout-latex-verbatim-quote-curr-line () |
(defun allout-latex-verbatim-quote-curr-line () |
4381 |
"Express line for exact \(literal) representation across latex processing. |
"Express line for exact \(literal) representation across LaTeX processing. |
4382 |
|
|
4383 |
Adjust line contents so it is unaltered \(from the original line) |
Adjust line contents so it is unaltered \(from the original line) |
4384 |
across latex processing, within the context of a `verbatim' |
across LaTeX processing, within the context of a `verbatim' |
4385 |
environment. Leaves point at the end of the line." |
environment. Leaves point at the end of the line." |
4386 |
(beginning-of-line) |
(beginning-of-line) |
4387 |
(let ((beg (point)) |
(let ((beg (point)) |
4397 |
(goto-char (1+ (match-end 0)))))) |
(goto-char (1+ (match-end 0)))))) |
4398 |
;;;_ > allout-insert-latex-header (buffer) |
;;;_ > allout-insert-latex-header (buffer) |
4399 |
(defun allout-insert-latex-header (buffer) |
(defun allout-insert-latex-header (buffer) |
4400 |
"Insert initial latex commands at point in BUFFER." |
"Insert initial LaTeX commands at point in BUFFER." |
4401 |
;; Much of this is being derived from the stuff in appendix of E in |
;; Much of this is being derived from the stuff in appendix of E in |
4402 |
;; the TeXBook, pg 421. |
;; the TeXBook, pg 421. |
4403 |
(set-buffer buffer) |
(set-buffer buffer) |
4471 |
))) |
))) |
4472 |
;;;_ > allout-insert-latex-trailer (buffer) |
;;;_ > allout-insert-latex-trailer (buffer) |
4473 |
(defun allout-insert-latex-trailer (buffer) |
(defun allout-insert-latex-trailer (buffer) |
4474 |
"Insert concluding latex commands at point in BUFFER." |
"Insert concluding LaTeX commands at point in BUFFER." |
4475 |
(set-buffer buffer) |
(set-buffer buffer) |
4476 |
(insert "\n\\end{document}\n")) |
(insert "\n\\end{document}\n")) |
4477 |
;;;_ > allout-latexify-one-item (depth prefix bullet text) |
;;;_ > allout-latexify-one-item (depth prefix bullet text) |
4526 |
))) |
))) |
4527 |
;;;_ > allout-latexify-exposed (arg &optional tobuf) |
;;;_ > allout-latexify-exposed (arg &optional tobuf) |
4528 |
(defun allout-latexify-exposed (arg &optional tobuf) |
(defun allout-latexify-exposed (arg &optional tobuf) |
4529 |
"Format current topics exposed portions to TOBUF for latex processing. |
"Format current topics exposed portions to TOBUF for LaTeX processing. |
4530 |
TOBUF defaults to a buffer named the same as the current buffer, but |
TOBUF defaults to a buffer named the same as the current buffer, but |
4531 |
with \"*\" prepended and \" latex-formed*\" appended. |
with \"*\" prepended and \" latex-formed*\" appended. |
4532 |
|
|
4640 |
Representations of actual backslashes - '\\\\\\\\' - are left as a |
Representations of actual backslashes - '\\\\\\\\' - are left as a |
4641 |
single backslash. |
single backslash. |
4642 |
|
|
4643 |
Optional arg SUCCESSIVE-BACKSLASHES is used internally for recursion." |
\(fn REGEXP)" |
4644 |
|
;; Optional arg SUCCESSIVE-BACKSLASHES is used internally for recursion. |
4645 |
|
|
4646 |
(if (string= regexp "") |
(if (string= regexp "") |
4647 |
"" |
"" |
4684 |
(cons function (symbol-value hook))))))) |
(cons function (symbol-value hook))))))) |
4685 |
;;;_ : my-mark-marker to accommodate divergent emacsen: |
;;;_ : my-mark-marker to accommodate divergent emacsen: |
4686 |
(defun my-mark-marker (&optional force buffer) |
(defun my-mark-marker (&optional force buffer) |
4687 |
"Accommodate the different signature for mark-marker across Emacsen. |
"Accommodate the different signature for `mark-marker' across Emacsen. |
4688 |
|
|
4689 |
XEmacs takes two optional args, while GNU Emacs does not, |
XEmacs takes two optional args, while GNU Emacs does not, |
4690 |
so pass them along when appropriate." |
so pass them along when appropriate." |