Function: allout-widgets-exposure-undo-processor
allout-widgets-exposure-undo-processor is a byte-compiled function
defined in allout-widgets.el.gz.
Signature
(allout-widgets-exposure-undo-processor)
Documentation
Adjust items tracking undo of allout outline structure exposure.
Dispatched by allout-widgets-post-command-business in response to
:undone-exposure entries recorded by allout-widgets-exposure-undo-recorder.
Source Code
;; Defined in /usr/src/emacs/lisp/allout-widgets.el.gz
;;;_ > allout-widgets-exposure-undo-processor ()
(defun allout-widgets-exposure-undo-processor ()
"Adjust items tracking undo of allout outline structure exposure.
Dispatched by `allout-widgets-post-command-business' in response to
:undone-exposure entries recorded by `allout-widgets-exposure-undo-recorder'."
(let* ((allout-undo-exposure-in-progress t)
;; inhibit undo recording while twiddling exposure to track undo:
(widgets allout-widgets-undo-exposure-record)
widget-start-marker widget-end-marker
from-state icon-start-point to-state
handled covered)
(setq allout-widgets-undo-exposure-record nil)
(save-excursion
(dolist (widget widgets)
(setq widget-start-marker (widget-get widget :from)
widget-end-marker (widget-get widget :to)
from-state (widget-get widget :icon-state)
icon-start-point (widget-apply widget :actual-position
:icon-start)
to-state (get-text-property icon-start-point
:icon-state))
(setq handled (allout-range-overlaps widget-start-marker
widget-end-marker
handled)
covered (car handled)
handled (cadr handled))
(when (not covered)
(goto-char (widget-get widget :from))
(when (not (allout-hidden-p))
;; adjust actual exposure to that of to-state viz from-state
(cond ((and (eq to-state 'closed) (eq from-state 'opened))
(allout-hide-current-subtree)
(allout-decorate-item-and-context widget))
((and (eq to-state 'opened) (eq from-state 'closed))
(save-excursion
(dolist
(expose-to (allout-chart-exposure-contour-by-icon))
(goto-char expose-to)
(allout-show-to-offshoot)))))))))))