From: Miles Bader Date: Mon, 27 Nov 2000 09:49:29 +0000 (+0000) Subject: (widget-field-buffer, widget-field-start) X-Git-Tag: emacs-pretest-21.0.92~62 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ec7251660f25010ae772a337cc0fbdcd3d7b6595;p=emacs.git (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'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f5683ff19e2..755b7ca1301 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2000-11-27 Miles Bader + * 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. diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 37454280445..6b5c1fbd99f 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -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)