Function: allout-item-element-span-is
allout-item-element-span-is is a byte-compiled function defined in
allout-widgets.el.gz.
Signature
(allout-item-element-span-is ITEM-WIDGET ELEMENT &optional START END FORCE)
Documentation
Return or register the location of the indicated ITEM-WIDGET ELEMENT.
ELEMENT is one of :guides-span, :icon-span, :cue-span, or :body-span.
When optional START is specified, optional END must also be.
START and END are the actual bounds of the region, if provided.
If START and END are not passed in, we return either a dotted pair of the current span, if established, or nil if not yet set.
When the START and END are passed, we return t if the region changed or nil if not.
Optional FORCE means force assignment of the region's text property, even if it's already set.
Source Code
;; Defined in /usr/src/emacs/lisp/allout-widgets.el.gz
;;;_ > allout-item-element-span-is (item-widget element
;;; &optional start end force)
(defun allout-item-element-span-is (item-widget element
&optional start end force)
"Return or register the location of the indicated ITEM-WIDGET ELEMENT.
ELEMENT is one of :guides-span, :icon-span, :cue-span, or :body-span.
When optional START is specified, optional END must also be.
START and END are the actual bounds of the region, if provided.
If START and END are not passed in, we return either a dotted
pair of the current span, if established, or nil if not yet set.
When the START and END are passed, we return t if the region
changed or nil if not.
Optional FORCE means force assignment of the region's text
property, even if it's already set."
(let ((span (widget-get item-widget element)))
(cond ((or (not span) force)
(when start
(widget-put item-widget element (cons start end))
(put-text-property start end 'category
(cdr (assoc element
allout-span-to-category)))
t))
;; report:
((not start) span)
;; move if necessary:
((not (and (eq (car span) start)
(eq (cdr span) end)))
(widget-put item-widget element span)
t)
;; specified span already set:
(t nil))))