Function: allout-old-expose-topic

allout-old-expose-topic is an interactive and byte-compiled function defined in allout.el.gz.

This command is obsolete since 28.1; use allout-expose-topic instead.

Signature

(allout-old-expose-topic SPEC &rest FOLLOWERS)

Documentation

Deprecated. Use allout-expose-topic (with different schema format) instead.

Dictate wholesale exposure scheme for current topic, according to SPEC.

SPEC is either a number or a list. Optional successive args dictate exposure for subsequent siblings of current topic.

A simple spec (either a number, a special symbol, or the null list) dictates the overall exposure for a topic. Non null lists are composite specs whose first element dictates the overall exposure for a topic, with the subsequent elements in the list interpreted as specs that dictate the exposure for the successive offspring of the topic.

Simple (numeric and null-list) specs are interpreted as follows:

 - Numbers indicate the relative depth to open the corresponding topic:
  - negative numbers force the topic to be close before opening to the
    absolute value of the number.
  - positive numbers just open to the relative depth indicated by the number.
  - 0 just closes
 - * completely opens the topic, including bodies.
 - + shows all the sub headers, but not the bodies
 - - exposes the body and immediate offspring of the corresponding topic.

If the spec is a list, the first element must be a number, which dictates the exposure depth of the topic as a whole. Subsequent elements of the list are nested SPECs, dictating the specific exposure for the corresponding offspring of the topic.

Optional FOLLOWERS arguments dictate exposure for succeeding siblings.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/allout.el.gz
;;;_   > allout-old-expose-topic (spec &rest followers)
(defun allout-old-expose-topic (spec &rest followers)
  "Deprecated.  Use `allout-expose-topic' (with different schema format) instead.

Dictate wholesale exposure scheme for current topic, according to SPEC.

SPEC is either a number or a list.  Optional successive args
dictate exposure for subsequent siblings of current topic.

A simple spec (either a number, a special symbol, or the null list)
dictates the overall exposure for a topic.  Non null lists are
composite specs whose first element dictates the overall exposure for
a topic, with the subsequent elements in the list interpreted as specs
that dictate the exposure for the successive offspring of the topic.

Simple (numeric and null-list) specs are interpreted as follows:

 - Numbers indicate the relative depth to open the corresponding topic:
  - negative numbers force the topic to be close before opening to the
    absolute value of the number.
  - positive numbers just open to the relative depth indicated by the number.
  - 0 just closes
 - `*' completely opens the topic, including bodies.
 - `+' shows all the sub headers, but not the bodies
 - `-' exposes the body and immediate offspring of the corresponding topic.

If the spec is a list, the first element must be a number, which
dictates the exposure depth of the topic as a whole.  Subsequent
elements of the list are nested SPECs, dictating the specific exposure
for the corresponding offspring of the topic.

Optional FOLLOWERS arguments dictate exposure for succeeding siblings."
  (declare (obsolete allout-expose-topic "28.1"))
  (interactive "xExposure spec: ")
  (let ((inhibit-field-text-motion t)
        (depth (allout-current-depth))
	max-pos)
    (cond ((null spec) nil)
	  ((symbolp spec)
	   (if (eq spec '*) (allout-show-current-subtree))
	   (if (eq spec '+) (allout-show-current-branches))
	   (if (eq spec '-) (allout-show-current-entry)))
	  ((numberp spec)
	   (if (>= 0 spec)
	       (save-excursion (allout-hide-current-subtree t)
			       (end-of-line)
			       (if (or (not max-pos)
				       (> (point) max-pos))
				   (setq max-pos (point)))
			       (if (> 0 spec)
				   (setq spec (* -1 spec)))))
	   (if (> spec 0)
	     (allout-show-children spec)))
	  ((listp spec)
	   ;(let ((got (allout-old-expose-topic (car spec))))
	   ;  (if (and got (or (not max-pos) (> got max-pos)))
	   ;	 (setq max-pos got)))
	   (let ((new-depth  (+ (allout-current-depth) 1))
		 got)
	     (setq max-pos (allout-old-expose-topic (car spec)))
	     (setq spec (cdr spec))
	     (if (and spec
		      (allout-descend-to-depth new-depth)
		      (not (allout-hidden-p)))
		 (progn (setq got (apply #'allout-old-expose-topic spec))
			(if (and got (or (not max-pos) (> got max-pos)))
			    (setq max-pos got)))))))
    (while (and followers
		(progn (if (and max-pos (< (point) max-pos))
			   (progn (goto-char max-pos)
				  (setq max-pos nil)))
		       (end-of-line)
		       (allout-next-sibling depth)))
      (allout-old-expose-topic (car followers))
      (setq followers (cdr followers)))
    max-pos))