[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange problem with latest CVS
From: |
Masatake YAMATO |
Subject: |
Re: Strange problem with latest CVS |
Date: |
Wed, 14 Apr 2004 12:13:23 +0900 (JST) |
> Richard Stallman <address@hidden> writes:
>
> > It seems that (at least) widgets related code doesn't set evaporate to
> > their overlays(*). My question was whether I should fix it.
> > Now, your answer is obvious. I will fix it.
> >
> > No! These overlays should not evaporate.
> > If they evaporate, the form won't work any more.
>
> Unless I misunderstand, they will evaporate only when the underlying
> buffer content gets deleted to prepare the buffer for insertion of new
> contents. The old overlays/buttons are then completely useless to
> keep around.
>
> When they evaporate, they do it at a time when there is no form left
> that could be working.
Thank you for your explanation. You write what I want to say.
However, as RMS wrote, I wondner what I should do when a editable-field
becomes empty during the user editing. Try the next code with the attached
patch. Delete "Delete me" in *Widget Example* buffer. You will get a signal.
(progn
(interactive)
(switch-to-buffer "*Widget Example*")
(kill-all-local-variables)
(let ((inhibit-read-only t))
(erase-buffer))
(widget-create 'editable-field
"Delete me")
(use-local-map widget-keymap)
(widget-setup))
cvs diff: warning: unrecognized response `access control disabled, clients can
connect from any host' from cvs server
Index: lisp/wid-edit.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/wid-edit.el,v
retrieving revision 1.124
diff -u -r1.124 wid-edit.el
--- lisp/wid-edit.el 4 Jan 2004 15:11:59 -0000 1.124
+++ lisp/wid-edit.el 14 Apr 2004 03:11:19 -0000
@@ -343,7 +343,9 @@
;; works in the field when, say, Custom uses `suppress-keymap'.
(overlay-put overlay 'local-map keymap)
(overlay-put overlay 'face face)
- (overlay-put overlay 'help-echo help-echo))
+ (overlay-put overlay 'help-echo help-echo)
+ (overlay-put overlay 'evaporate t)
+ )
(setq to (1- to))
(setq rear-sticky t))
(let ((overlay (make-overlay from to nil nil rear-sticky)))
@@ -352,7 +354,9 @@
(overlay-put overlay 'field widget)
(overlay-put overlay 'local-map keymap)
(overlay-put overlay 'face face)
- (overlay-put overlay 'help-echo help-echo)))
+ (overlay-put overlay 'help-echo help-echo)
+ (overlay-put overlay 'evaporate t)
+ ))
(widget-specify-secret widget))
(defun widget-specify-secret (field)
@@ -382,6 +386,7 @@
(setq help-echo 'widget-mouse-help))
(overlay-put overlay 'button widget)
(overlay-put overlay 'keymap (widget-get widget :keymap))
+ (overlay-put overlay 'evaporate t)
;; We want to avoid the face with image buttons.
(unless (widget-get widget :suppress-face)
(overlay-put overlay 'face (widget-apply widget :button-face-get))
@@ -401,6 +406,7 @@
"Specify sample for WIDGET between FROM and TO."
(let ((overlay (make-overlay from to nil t nil)))
(overlay-put overlay 'face (widget-apply widget :sample-face-get))
+ (overlay-put overlay 'evaporate t)
(widget-put widget :sample-overlay overlay)))
(defun widget-specify-doc (widget from to)
@@ -408,6 +414,7 @@
(let ((overlay (make-overlay from to nil t nil)))
(overlay-put overlay 'widget-doc widget)
(overlay-put overlay 'face widget-documentation-face)
+ (overlay-put overlay 'evaporate t)
(widget-put widget :doc-overlay overlay)))
(defmacro widget-specify-insert (&rest form)
- Re: Strange problem with latest CVS, Matt Hodges, 2004/04/02
- Re: Strange problem with latest CVS, Masatake YAMATO, 2004/04/07
- Re: Strange problem with latest CVS, peta, 2004/04/07
- Re: Strange problem with latest CVS, Richard Stallman, 2004/04/07
- Re: Strange problem with latest CVS, Masatake YAMATO, 2004/04/08
- Re: Strange problem with latest CVS, Richard Stallman, 2004/04/09
- Re: Strange problem with latest CVS, Masatake YAMATO, 2004/04/12
- Re: Strange problem with latest CVS, Richard Stallman, 2004/04/13
- Re: Strange problem with latest CVS, David Kastrup, 2004/04/13
- Re: Strange problem with latest CVS,
Masatake YAMATO <=
- Re: Strange problem with latest CVS, Richard Stallman, 2004/04/14
- Re: Strange problem with latest CVS, Richard Stallman, 2004/04/14
- Re: Strange problem with latest CVS, Masatake YAMATO, 2004/04/19
- Re: Strange problem with latest CVS, Richard Stallman, 2004/04/19
- Re: Strange problem with latest CVS, Masatake YAMATO, 2004/04/20
- Re: Strange problem with latest CVS, Richard Stallman, 2004/04/20
- Re: Strange problem with latest CVS, Masatake YAMATO, 2004/04/21
Re: Strange problem with latest CVS, Richard Stallman, 2004/04/07