aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Ponce2005-04-05 06:41:09 +0000
committerDavid Ponce2005-04-05 06:41:09 +0000
commit318d030ef51bbb3272901316cede489ce7cdf558 (patch)
tree1a7e85369c1a8fe93ff0bbdc2e20034343d39247
parent0e73959747313a6572d5e5b540a0a93d56c7747c (diff)
downloademacs-318d030ef51bbb3272901316cede489ce7cdf558.tar.gz
emacs-318d030ef51bbb3272901316cede489ce7cdf558.zip
(widget-field-end): Temporarily remove field
narrowing before to call `get-char-property'.
-rw-r--r--lisp/wid-edit.el14
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index f89095fd7fc..74bda990aed 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -1185,9 +1185,17 @@ When not inside a field, move to the previous button or field."
1185 ;; or if a special `boundary' field has been added after the widget 1185 ;; or if a special `boundary' field has been added after the widget
1186 ;; field. 1186 ;; field.
1187 (if (overlayp overlay) 1187 (if (overlayp overlay)
1188 (if (and (not (eq (get-char-property (overlay-end overlay) 1188 (if (and (not (eq (with-current-buffer
1189 'field 1189 (widget-field-buffer widget)
1190 (widget-field-buffer widget)) 1190 (save-restriction
1191 ;; `widget-narrow-to-field' can be
1192 ;; active when this function is called
1193 ;; from an change-functions hook. So
1194 ;; temporarily remove field narrowing
1195 ;; before to call `get-char-property'.
1196 (widen)
1197 (get-char-property (overlay-end overlay)
1198 'field)))
1191 'boundary)) 1199 'boundary))
1192 (or widget-field-add-space 1200 (or widget-field-add-space
1193 (null (widget-get widget :size)))) 1201 (null (widget-get widget :size))))