1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00

(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'.
This commit is contained in:
Miles Bader 2000-11-27 09:49:29 +00:00
parent a2e6f42617
commit ec7251660f
2 changed files with 23 additions and 11 deletions

View File

@ -1,5 +1,10 @@
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.

View File

@ -1093,12 +1093,17 @@ When not inside a field, move to the previous button or field."
(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."
@ -1106,15 +1111,16 @@ When not inside a field, move to the previous button or 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.
@ -1745,6 +1751,7 @@ the earlier input."
(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)