Function: allout-process-exposed
allout-process-exposed is a byte-compiled function defined in
allout.el.gz.
Signature
(allout-process-exposed &optional FUNC FROM TO FROMBUF TOBUF FORMAT START-NUM)
Documentation
Map function on exposed parts of current topic; results to another buffer.
All args are options; default values itemized below.
Apply FUNCTION to exposed portions FROM position TO position in buffer FROMBUF to buffer TOBUF. Sixth optional arg, FORMAT, designates an alternate presentation form:
flat -- Present prefix as numeric section.subsection..., starting with
section indicated by the START-NUM, innermost nesting first.
indent (symbol) -- Convert header prefixes to all white space,
except for distinctive bullets.
Defaults:
FUNCTION: allout-insert-listified
FROM: region start, if region active, else start of buffer
TO: region end, if region active, else end of buffer
FROMBUF: current buffer
TOBUF: buffer name derived: "*current-buffer-name exposed*"
FORMAT: nil
Source Code
;; Defined in /usr/src/emacs/lisp/allout.el.gz
;;_ > allout-process-exposed (&optional func from to frombuf
;;; tobuf format)
(defun allout-process-exposed (&optional func from to frombuf tobuf
format _start-num)
"Map function on exposed parts of current topic; results to another buffer.
All args are options; default values itemized below.
Apply FUNCTION to exposed portions FROM position TO position in buffer
FROMBUF to buffer TOBUF. Sixth optional arg, FORMAT, designates an
alternate presentation form:
`flat' -- Present prefix as numeric section.subsection..., starting with
section indicated by the START-NUM, innermost nesting first.
`indent' (symbol) -- Convert header prefixes to all white space,
except for distinctive bullets.
Defaults:
FUNCTION: `allout-insert-listified'
FROM: region start, if region active, else start of buffer
TO: region end, if region active, else end of buffer
FROMBUF: current buffer
TOBUF: buffer name derived: \"*current-buffer-name exposed*\"
FORMAT: nil"
; Resolve arguments,
; defaulting if necessary:
(if (not func) (setq func 'allout-insert-listified))
(if (not (and from to))
(if (region-active-p)
(setq from (region-beginning) to (region-end))
(setq from (point-min) to (point-max))))
(if frombuf
(if (not (bufferp frombuf))
;; Specified but not a buffer -- get it:
(let ((got (get-buffer frombuf)))
(if (not got)
(error "allout-process-exposed: Source buffer %s not found"
frombuf)
(setq frombuf got))))
;; not specified -- default it:
(setq frombuf (current-buffer)))
(if tobuf
(if (not (bufferp tobuf))
(setq tobuf (get-buffer-create tobuf)))
;; not specified -- default it:
(setq tobuf (concat "*" (buffer-name frombuf) " exposed*")))
(if (listp format)
(setq format (reverse format)))
(let* ((listified
(progn (set-buffer frombuf)
(allout-listify-exposed from to format))))
(set-buffer tobuf)
(mapc func listified)
(pop-to-buffer tobuf)))