2000-11-27 Miles Bader <miles@gnu.org>
+ * wid-edit.el (widget-field-buffer, widget-field-start)
+ (widget-field-end): Handle widget field `pseudo-overlays'.
+ (widget-field-value-delete): Delete WIDGET from `widget-field-new'
+ if it's there instead of in `widget-field-list'.
+
* help.el (help-manyarg-func-alist): Correct entry for `vconcat'.
(help-make-xrefs): Delete extraneous newlines at the end of the
docstring.
(defun widget-field-buffer (widget)
"Return the start of WIDGET's editing field."
(let ((overlay (widget-get widget :field-overlay)))
- (and overlay (overlay-buffer overlay))))
+ (cond ((overlayp overlay)
+ (overlay-buffer overlay))
+ ((consp overlay)
+ (marker-buffer (car overlay))))))
(defun widget-field-start (widget)
"Return the start of WIDGET's editing field."
(let ((overlay (widget-get widget :field-overlay)))
- (and overlay (overlay-start overlay))))
+ (if (overlayp overlay)
+ (overlay-start overlay)
+ (car overlay))))
(defun widget-field-end (widget)
"Return the end of WIDGET's editing field."
;; Don't subtract one if local-map works at the end of the overlay,
;; or if a special `boundary' field has been added after the widget
;; field.
- (and overlay
- (if (and (not (eq (get-char-property (overlay-end overlay)
- 'field
- (widget-field-buffer widget))
- 'boundary))
- (or widget-field-add-space
- (null (widget-get widget :size))))
- (1- (overlay-end overlay))
- (overlay-end overlay)))))
+ (if (overlayp overlay)
+ (if (and (not (eq (get-char-property (overlay-end overlay)
+ 'field
+ (widget-field-buffer widget))
+ 'boundary))
+ (or widget-field-add-space
+ (null (widget-get widget :size))))
+ (1- (overlay-end overlay))
+ (overlay-end overlay))
+ (cdr overlay))))
(defun widget-field-find (pos)
"Return the field at POS.
(defun widget-field-value-delete (widget)
"Remove the widget from the list of active editing fields."
(setq widget-field-list (delq widget widget-field-list))
+ (setq widget-field-new (delq widget widget-field-new))
;; These are nil if the :format string doesn't contain `%v'.
(let ((overlay (widget-get widget :field-overlay)))
(when (overlayp overlay)