emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/wid-edit.el


From: Eli Zaretskii
Subject: [Emacs-diffs] Changes to emacs/lisp/wid-edit.el
Date: Fri, 13 Jan 2006 19:56:10 +0000

Index: emacs/lisp/wid-edit.el
diff -u emacs/lisp/wid-edit.el:1.160 emacs/lisp/wid-edit.el:1.161
--- emacs/lisp/wid-edit.el:1.160        Wed Jan  4 15:56:08 2006
+++ emacs/lisp/wid-edit.el      Fri Jan 13 19:56:10 2006
@@ -1203,22 +1203,24 @@
     ;; or if a special `boundary' field has been added after the widget
     ;; field.
     (if (overlayp overlay)
-       (if (and (not (eq (with-current-buffer
-                             (widget-field-buffer widget)
-                           (save-restriction
-                             ;; `widget-narrow-to-field' can be
-                             ;; active when this function is called
-                             ;; from an change-functions hook. So
-                             ;; temporarily remove field narrowing
-                             ;; before to call `get-char-property'.
-                             (widen)
-                             (get-char-property (overlay-end overlay)
-                                                'field)))
-                         'boundary))
-                (or widget-field-add-space
-                    (null (widget-get widget :size))))
-           (1- (overlay-end overlay))
-         (overlay-end overlay))
+        ;; Don't proceed if overlay has been removed from buffer.
+        (when (overlay-buffer overlay)
+          (if (and (not (eq (with-current-buffer
+                                (widget-field-buffer widget)
+                              (save-restriction
+                                ;; `widget-narrow-to-field' can be
+                                ;; active when this function is called
+                                ;; from an change-functions hook. So
+                                ;; temporarily remove field narrowing
+                                ;; before to call `get-char-property'.
+                                (widen)
+                                (get-char-property (overlay-end overlay)
+                                                   'field)))
+                            '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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]