• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/

Lines Matching +defs:next +defs:depth

156  integer - dictate the relative depth to open the corresponding topic(s),
161 - positive numbers open to the relative depth indicated by the
445 depth) just preceding the start of the topic text) according to level.
574 "*LaTeX formatted depth-indent spacing."
690 ("\C-n" allout-next-visible-heading)
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
867 ;;;_ = allout-depth-specific-regexp
868 (defvar allout-depth-specific-regexp ""
869 "*Regular expression to match a heading line prefix for a particular depth.
871 This expression is used to search for depth-specific topic
872 headers at depth 2 and greater. Use `allout-depth-one-regexp'
873 for to seek topics at depth one.
877 decimal numbers, which should each be one less than the depth of the
879 (make-variable-buffer-local 'allout-depth-specific-regexp)
880 ;;;_ = allout-depth-one-regexp
881 (defvar allout-depth-one-regexp ""
882 "*Regular expression to match a heading line prefix for depth one.
886 decimal numbers, which should each be one less than the depth of the
888 (make-variable-buffer-local 'allout-depth-one-regexp)
901 "Allout-header prefix length to subtract when computing topic depth.")
910 "Validate apparent topics of this depth and shallower as being non-aberrant.
915 excessively greater depth.")
1041 ;; Derive next for repeated use in allout-pending-bullet:
1072 (setq allout-depth-specific-regexp
1101 (setq allout-depth-one-regexp
1179 (> (allout-current-depth) 1)]))
1184 ["Next Visible Heading" allout-next-visible-heading t]
1354 - depth - integer indicating the depth of the subtree that was deleted.
1367 - depth-change - integer indicating depth increase, negative for decrease
1481 (allout-next-topic-pending-encryption except-mark))
1709 \\[allout-next-visible-heading] `allout-next-visible-heading'
1735 are alternated according to nesting depth.
1746 \\[allout-yank] `allout-yank' Yank, adjusting depth of yanked topic to
1747 depth of heading if yanking into bare topic
1807 single keystroke. Regular navigation keys (eg, \\[forward-char], \\[next-line]) don't get
2082 (allout-this-or-next-heading)
2163 (next-property-change (1+ (point)) nil end)
2164 (next-char-property-change (1+ (point)) end))))
2224 ;;;_ = allout-recent-depth
2225 (defvar allout-recent-depth 0
2227 (make-variable-buffer-local 'allout-recent-depth)
2240 allout-recent-depth (max 1 (- allout-recent-prefix-end
2249 allout-recent-depth 0)
2251 ;;;_ > allout-recent-depth ()
2252 (defsubst allout-recent-depth ()
2253 "Return depth of last heading encountered by an outline maneuvering function.
2258 to return the current depth."
2260 allout-recent-depth)
2263 "Like `allout-recent-depth', but returns text of last encountered prefix.
2278 to return the current depth of the most recently matched topic."
2294 (<= allout-recent-depth allout-doublecheck-at-and-shallower)))
2297 "True if topic, or next sibling with children, contains them discontinuously.
2302 If topic has no offspring, then the next sibling with offspring will
2306 offspring that qaulifies it as aberrant, ie with depth that
2318 (let ((depth (allout-depth))
2328 ((eq allout-recent-depth depth))
2330 ((> allout-recent-depth (1+ depth))
2332 ;; next non-sibling is lower-depth - not aberrant:
2338 (allout-depth)
2361 ;;;_ > allout-depth ()
2362 (defun allout-depth ()
2363 "Return depth of topic most immediately containing point.
2367 Like `allout-current-depth', but respects hidden as well as visible topics."
2372 allout-recent-depth
2378 ;;;_ > allout-current-depth ()
2379 (defun allout-current-depth ()
2380 "Return depth of visible topic most immediately containing point.
2420 ;;;_ > allout-sibling-index (&optional depth)
2421 (defun allout-sibling-index (&optional depth)
2424 If optional arg DEPTH is greater than current depth, then we're
2427 If less than this depth, ascend to that depth and count..."
2430 (cond ((and depth (<= depth 0) 0))
2431 ((or (null depth) (= depth (allout-depth)))
2433 (while (allout-previous-sibling allout-recent-depth nil)
2436 ((< depth allout-recent-depth)
2437 (allout-ascend-to-depth depth)
2444 (let* ((depth (allout-depth))
2445 (next-index (allout-sibling-index depth))
2447 (while (> next-index 0)
2448 (setq rev-sibls (cons next-index rev-sibls))
2449 (setq depth (1- depth))
2450 (setq next-index (allout-sibling-index depth)))
2488 (allout-depth)
2531 ;;;_ > allout-next-heading ()
2532 (defsubst allout-next-heading ()
2548 ;;;_ > allout-this-or-next-heading
2549 (defun allout-this-or-next-heading ()
2550 "Position cursor on current or next heading."
2551 ;; A throwaway non-macro that is defined after allout-next-heading
2553 (if (not (allout-goto-prefix-doublechecked)) (allout-next-heading)))
2575 (allout-depth)
2602 ;;;_ > allout-chart-subtree (&optional levels visible orig-depth prev-depth)
2603 (defun allout-chart-subtree (&optional levels visible orig-depth prev-depth)
2606 Optional argument LEVELS specifies a depth limit (relative to start
2607 depth) for the chart. Null LEVELS means no limit.
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."
2631 (let ((original (not orig-depth)) ; `orig-depth' set only in recursion.
2632 chart curr-depth)
2637 (progn (setq orig-depth (allout-depth))
2638 (or prev-depth (setq prev-depth (1+ orig-depth)))
2640 (allout-next-visible-heading 1)
2641 (allout-next-heading))))
2645 ;; the typically quite constrained Emacs max-lisp-eval-depth.
2652 (< orig-depth (setq curr-depth allout-recent-depth))
2653 (cond ((= prev-depth curr-depth)
2657 ;; At depth limit - skip sublevels:
2658 (or (allout-next-sibling curr-depth)
2660 ;; next heading at lesser depth:
2661 (while (and (<= curr-depth
2662 allout-recent-depth)
2664 (allout-next-visible-heading 1)
2665 (allout-next-heading)))))
2667 (allout-next-visible-heading 1)
2668 (allout-next-heading))))
2670 ((and (< prev-depth curr-depth)
2678 orig-depth
2679 curr-depth)
2684 ;; ... else nil if we've ascended back to prev-depth.
2711 (while (allout-next-sibling)
2714 ;;;_ > allout-chart-to-reveal (chart depth)
2715 (defun allout-chart-to-reveal (chart depth)
2719 If DEPTH is nil, include hidden points at any depth.
2725 (while (and (or (null depth) (> depth 0))
2729 (let ((further (allout-chart-to-reveal here (if (null depth)
2730 depth
2731 (1- depth)))))
2733 ;; more depth to go:
2749 ;; indicating pending concealment, anything higher indicating depth to
2751 ;; indicating (negative of) the depth to which subtopic headers and
2794 ((allout-next-heading))
2826 (allout-current-depth)))
2831 (if (not (allout-current-depth))
2854 ;;;_ > allout-pre-next-prefix ()
2855 (defun allout-pre-next-prefix ()
2856 "Skip forward to just before the next heading line.
2860 (if (allout-next-heading)
2878 (let ((level allout-recent-depth))
2879 (allout-next-heading)
2881 (> allout-recent-depth level))
2882 (allout-next-heading))
2910 (if (< 0 (allout-current-depth))
2925 (allout-pre-next-prefix)
2956 ;;;_ > allout-ascend-to-depth (depth)
2957 (defun allout-ascend-to-depth (depth)
2958 "Ascend to depth DEPTH, returning depth if successful, nil if not."
2959 (if (and (> depth 0)(<= depth (allout-depth)))
2961 (while (and (< depth allout-recent-depth)
2965 (and last-ascended allout-recent-depth))))
2968 "Ascend one level, returning resulting depth if successful, nil if not.
2978 (bolevel-depth allout-recent-depth))
2980 (cond ((< allout-recent-depth bolevel-depth)
2981 allout-recent-depth)
2982 ((= allout-recent-depth bolevel-depth)
2985 (allout-depth)
2988 ;; some topic after very first is lower depth than first:
2990 (allout-depth)
2993 ;;;_ > allout-descend-to-depth (depth)
2994 (defun allout-descend-to-depth (depth)
2995 "Descend to depth DEPTH within current topic.
2997 Returning depth if successful, nil if not."
2999 (start-depth (allout-depth)))
3001 (and (> (allout-depth) 0)
3002 (not (= depth allout-recent-depth)) ; ... not there yet
3003 (allout-next-heading) ; ... go further
3004 (< start-depth allout-recent-depth))) ; ... still in topic
3005 (if (and (> (allout-depth) 0)
3006 (= allout-recent-depth depth))
3007 depth
3024 ;;;_ > allout-next-sibling (&optional depth backward)
3025 (defun allout-next-sibling (&optional depth backward)
3028 Traverse at optional DEPTH, or current depth if none specified.
3036 (let ((target-depth (or depth (allout-depth)))
3041 last-depth)
3048 (if backward (allout-previous-heading) (allout-next-heading))
3049 ;; we're below the target depth
3050 (> (setq last-depth allout-recent-depth) target-depth))
3055 (or (allout-next-sibling-leap target-depth backward)
3058 (if depth (allout-depth) target-depth)
3061 (and (> (or last-depth (allout-depth)) 0)
3062 (= allout-recent-depth target-depth))
3068 (if depth (allout-depth) target-depth)
3070 ;;;_ > allout-next-sibling-leap (&optional depth backward)
3071 (defun allout-next-sibling-leap (&optional depth backward)
3072 "Like `allout-next-sibling', but by direct search for topic at depth.
3074 Traverse at optional DEPTH, or current depth if none specified.
3080 Costs more than regular `allout-next-sibling' for short traversals:
3082 - we have to check the prior (next, if travelling backwards)
3089 offspring before the next sibling, however, so
3090 `allout-next-sibling' resorts to this if it finds itself in that
3096 (target-depth (or depth (allout-depth)))
3098 (depth-biased (- target-depth 2))
3099 (expression (if (<= target-depth 1)
3100 allout-depth-one-regexp
3101 (format allout-depth-specific-regexp
3102 depth-biased depth-biased)))
3116 ;; rationale: if any intervening items were at a lower depth, we
3117 ;; would now be on the first offspring at the target depth - ie,
3119 ;; lesser depth. that's all we need to check.
3120 (if backward (allout-next-heading) (allout-previous-heading))
3121 (if (< allout-recent-depth target-depth)
3125 (allout-depth)
3130 ;;;_ > allout-previous-sibling (&optional depth backward)
3131 (defun allout-previous-sibling (&optional depth backward)
3134 Optional DEPTH specifies depth to traverse, default current depth.
3138 Return depth if successful, nil otherwise."
3139 (allout-next-sibling depth (not backward))
3161 (let ((depth (allout-depth)))
3162 (while (allout-previous-sibling depth nil))
3163 (prog1 allout-recent-depth
3165 ;;;_ > allout-next-visible-heading (arg)
3166 (defun allout-next-visible-heading (arg)
3167 "Move to the next ARG'th visible heading line, backward if arg is negative.
3215 (prog1 (allout-next-visible-heading (- arg))
3219 "Position point at the next heading of the same level.
3225 (let ((start-depth (allout-current-depth))
3228 (if (= 0 start-depth)
3235 (allout-next-sibling)))
3243 allout-recent-depth
3385 ;;;_ > allout-solicit-alternate-bullet (depth &optional current-bullet)
3386 (defun allout-solicit-alternate-bullet (depth &optional current-bullet)
3390 Offer one suitable for current depth DEPTH as default."
3393 (allout-bullet-for-depth depth)))
3427 ;;;_ > allout-bullet-for-depth (&optional depth)
3428 (defun allout-bullet-for-depth (&optional depth)
3429 "Return outline topic bullet suited to optional DEPTH, or current depth."
3433 (% (max 0 (- depth 2))
3442 depth
3446 ;; Depth null means use current depth, non-null means we're either
3451 "Generate a topic prefix suitable for optional arg DEPTH, or current depth.
3467 Third arg DEPTH forces the topic prefix to that depth, regardless of
3468 the current topics' depth.
3473 distinction or depth) is offered. (This overrides other options,
3503 (depth (or depth (allout-depth)))
3511 ((<= depth 1) (setq header-lead "") allout-primary-bullet)
3516 (setq body (make-string depth
3522 ;; Sneak it in the condition of the next case, whatever it is.)
3525 ((progn (setq body (make-string (- depth 2) ?\ ))
3528 (let* ((got (allout-solicit-alternate-bullet depth solicit)))
3544 (allout-bullet-for-depth depth))))
3551 (<= depth (allout-depth))
3557 (or (>= depth (allout-depth))
3558 (allout-ascend-to-depth depth))
3575 ;; Else, standard bullet per depth:
3576 ((allout-bullet-for-depth depth)))))
3583 (new (1+ (allout-sibling-index depth)))
3587 ;;;_ > allout-open-topic (relative-depth &optional before offer-recent-bullet)
3588 (defun allout-open-topic (relative-depth &optional before offer-recent-bullet)
3589 "Open a new topic at depth DEPTH.
3626 (depth (+ (allout-current-depth) relative-depth))
3631 ref-depth
3634 (cond ((< relative-depth 0)
3635 (allout-ascend-to-depth depth))
3636 ((>= relative-depth 1) nil)
3638 (setq ref-depth allout-recent-depth)
3646 (or (<= relative-depth 0)
3647 (allout-descend-to-depth depth))
3662 (or (and (<= relative-depth 0) ; not descending;
3672 (and (= ref-depth 1)
3674 (= depth 1)
3678 (not (allout-pre-next-prefix)))))))
3682 (if (and before (>= relative-depth 0))
3690 (if (<= relative-depth 0)
3698 (allout-pre-next-prefix)
3717 ;; Blank lines between current header body and next
3725 (allout-next-heading)
3726 (when (> allout-recent-depth ref-depth)
3739 (progn (if (and (not (> depth ref-depth))
3742 (if (and (not dbl-space) (> depth ref-depth))
3748 (if (and dbl-space (not (> relative-depth 0)))
3761 (insert (concat (allout-make-topic-prefix opening-numbered t depth)
3766 depth nil nil t)
3767 (if (> relative-depth 0)
3831 ;;;_ > allout-reindent-body (old-depth new-depth &optional number)
3832 (defun allout-reindent-body (old-depth new-depth &optional number)
3846 ;; to the new margin and the shift in depth:
3847 (old-margin (+ old-depth (- new-margin new-depth))))
3849 ;; Process lines up to (but excluding) next topic header:
3885 nil ;;; depth
3896 (allout-next-visible-heading 1)
3898 (allout-next-visible-heading -1))))
3904 new-depth
3916 distinction or depth) is offered. If non-nil, then the
3919 Second arg DEPTH forces the topic prefix to that depth, regardless
3920 of the topic's current depth.
3943 (let* ((current-depth (allout-depth))
3944 (new-depth (or new-depth current-depth))
3951 new-depth
3957 (if (and (= current-depth new-depth)
3985 (not (= new-depth current-depth))
3987 (allout-reindent-body current-depth new-depth))
3993 (while (allout-next-sibling new-depth nil)
3999 new-depth ;;; new-depth
4003 ) ; (if (and (= current-depth new-depth)...))
4004 ) ; let* ((current-depth (allout-depth))...)
4015 discontinuity\", where the depth difference between a topic and
4018 With repeat count, shift topic depth by that amount."
4028 (if (<= (+ allout-recent-depth arg) 0)
4033 ;;;_ > allout-rebullet-topic-grunt (&optional relative-depth ...)
4034 (defun allout-rebullet-topic-grunt (&optional relative-depth
4035 starting-depth
4047 First arg RELATIVE-DEPTH means to shift the depth of the entire
4056 \"containment discontinuity\", where the depth difference between
4063 relative-depth
4064 (< relative-depth 0))
4068 (let* ((relative-depth (or relative-depth 0))
4069 (new-depth (allout-depth))
4070 (starting-depth (or starting-depth new-depth))
4074 ;; calculates it at what might be new depth:
4075 (and (or (zerop relative-depth)
4079 (moving-outwards (< 0 relative-depth))
4086 (> 0 (+ starting-depth relative-depth))
4089 (cond ((= starting-depth new-depth)
4090 ;; We're at depth to work on this one.
4095 (if (>= relative-depth 0)
4097 (+ starting-depth relative-depth)
4102 ;; ... and work on subsequent ones which are at greater depth:
4104 (allout-next-heading)
4106 (< starting-depth (allout-depth)))
4108 (allout-rebullet-topic-grunt relative-depth
4109 (1+ starting-depth)
4112 (when (< relative-depth 0)
4116 (+ starting-depth relative-depth)
4121 ((< starting-depth new-depth)
4124 (allout-rebullet-topic-grunt relative-depth
4125 new-depth
4133 ;; if topic has changed depth
4135 (and (not (zerop relative-depth))
4136 (or (= allout-recent-depth starting-depth)
4137 (= allout-recent-depth (+ starting-depth
4138 relative-depth)))))
4141 ;; if depth has been changed:
4143 (if (not (zerop relative-depth))
4147 ;;;_ > allout-renumber-to-depth (&optional depth)
4148 (defun allout-renumber-to-depth (&optional depth)
4149 "Renumber siblings at current depth.
4151 Affects superior topics if optional arg DEPTH is less than current depth.
4153 Returns final depth."
4156 ;; ascending until we get shallower than the start depth:
4158 (let ((ascender (allout-depth))
4161 (allout-depth)
4162 (>= allout-recent-depth depth)
4163 (>= ascender depth))
4168 (> allout-recent-depth ascender))
4169 (allout-next-heading))
4171 (setq ascender (1- allout-recent-depth))
4172 (if (>= allout-recent-depth depth)
4174 nil ;;; depth
4179 allout-recent-depth)
4195 (let ((depth allout-recent-depth)
4201 depth ;;; depth
4206 (setq more (allout-next-sibling depth nil))))))
4209 "Increase depth of current heading and any items collapsed within it.
4220 discontinuity\", where the depth difference between a topic and
4222 the file can be adjusted to any positive depth, however."
4231 (let* ((current-depth allout-recent-depth)
4233 (predecessor-depth (progn
4237 allout-recent-depth
4239 (if (and (> predecessor-depth 0)
4240 (> (1+ current-depth)
4241 (1+ predecessor-depth)))
4245 (if (< allout-recent-depth (1+ current-depth))
4252 "Decrease depth of current heading and any topics collapsed within it.
4274 (save-excursion (allout-next-sibling)))
4276 (let ((where (and (allout-depth) allout-recent-prefix-beginning)))
4309 (depth (allout-depth)))
4320 (allout-next-heading))
4321 (allout-renumber-to-depth depth)))
4322 (run-hook-with-args 'allout-structure-deleted-hook depth (point)))))
4349 (depth allout-recent-depth))
4356 (or (not (allout-next-heading))
4357 (= depth allout-recent-depth)))
4370 (allout-renumber-to-depth depth))
4371 (run-hook-with-args 'allout-structure-deleted-hook depth (point))))
4389 (let (done next prev overlay)
4391 ;; at or advance to start of next hidden region:
4393 (setq next
4395 (next-single-char-property-change (point)
4398 (if (or (not next) (eq prev next))
4401 (goto-char next)
4402 (setq prev next)
4407 (setq next (overlay-end overlay)
4408 prev next)
4410 (when next
4411 (goto-char next)
4414 (put-text-property (overlay-start overlay) next
4432 done next prev)
4434 ;; at or advance to start of next annotation:
4436 (setq next (next-single-char-property-change (point)
4439 (if (or (not next) (eq prev next))
4442 (goto-char next)
4443 (setq prev next)
4448 (setq next (next-single-char-property-change (point)
4451 (overlay-put (make-overlay prev next)
4453 (allout-deannotate-hidden prev next)
4454 (setq prev next)
4455 (if next (goto-char next)))))
4462 Does depth adjustment of yanked topics, when:
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
4501 (subj-depth allout-recent-depth)
4503 (adjust-to-depth
4504 ;; Nil if adjustment unnecessary, otherwise depth to which
4516 allout-recent-depth)))
4519 (if adjust-to-depth
4540 (allout-rebullet-topic-grunt (- adjust-to-depth
4541 subj-depth)))
4542 (allout-depth))
4566 (- adjust-to-depth
4567 subj-depth)))
4583 (allout-depth) ;;; depth
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.
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
4617 Numbering of yanked topics, and the successive siblings at the depth
4736 (setq end (allout-pre-next-prefix))
4771 (let* (depth
4784 (setq depth (allout-current-depth))
4785 (and (allout-next-heading)
4786 (> allout-recent-depth
4787 (1+ depth))))
4796 chart (- allout-recent-depth depth))))))
4880 (if (<= (allout-current-depth) 0)
4882 (if (not (allout-next-heading))
5004 Numbers indicate the relative depth to open the corresponding topic.
5008 - positive numbers open to the relative depth indicated by the
5038 (let ((depth (allout-depth))
5084 (if (allout-descend-to-depth (1+ depth))
5090 ;; Capitalize on max-pos state to get us nearer next sibling:
5092 (allout-next-heading)))
5093 ((allout-next-sibling depth))))
5114 - Numbers indicate the relative depth to open the corresponding topic:
5117 - positive numbers just open to the relative depth indicated by the number.
5124 dictates the exposure depth of the topic as a whole. Subsequent
5132 (depth (allout-current-depth))
5154 (let ((new-depth (+ (allout-current-depth) 1))
5159 (allout-descend-to-depth new-depth)
5169 (allout-next-sibling depth)))
5187 third subtopic; and close the next topic at the current level.
5198 (allout-next-heading)))
5214 (context-depth (or (and context 2) 1)))
5216 (while (> context-depth 0)
5222 context-depth (if flat-index (1- context-depth) 0)))
5301 - a number representing the depth of the topic,
5313 strings prefix result depth new-depth out gone-out bullet beg
5314 next done)
5326 (setq depth allout-recent-depth ; Current topics depth,
5331 (not (allout-next-visible-heading 1)))
5332 (setq new-depth allout-recent-depth)
5334 out (< new-depth depth))
5336 (setq next (point))
5339 (while (> next (point)) ; Get all the exposed text in
5348 (when (< (point) next) ; Resume from after hid text, if any.
5362 (list depth
5372 (list depth
5373 (concat (make-string (1+ depth) ? )
5376 (list depth
5377 (make-string depth ? )
5381 (list depth prefix strings))
5385 (cond ((= new-depth depth)
5388 ((> new-depth depth) ; descending - assume by 1:
5392 (while (< new-depth depth)
5394 (setq depth (1- depth)))
5475 \`(depth prefix text)'
5477 or \`(depth prefix text bullet-plus)'
5678 ;;;_ > allout-latexify-one-item (depth prefix bullet text)
5679 (defun allout-latexify-one-item (depth prefix bullet text)
5692 depth
5792 \\[allout-shift-in] to increase its depth.
5808 confirmation of the passphrase when next obtained, before encrypting or
5852 (if (= allout-recent-depth 1)
6410 ;;;_ > allout-next-topic-pending-encryption (&optional except-mark)
6411 (defun allout-next-topic-pending-encryption (&optional except-mark)
6412 "Return the point of the next topic pending encryption, or nil if none.
6487 (while (allout-next-topic-pending-encryption except-mark)