1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

* subr.el (remove-overlays): Make arguments optional.

* wid-edit.el (widget-specify-button): Put evaporate to the
overlay for sample.
(widget-specify-sample): Put evaporate to the overlay for sample.
(widget-specify-doc): Put evaporate to the overlay for documentation.

* etc/NEWS: Write about remove-overlays's arguments.

* man/widget.texi: Add remove-overlays to the example.
This commit is contained in:
Masatake YAMATO 2004-04-27 21:00:31 +00:00
parent e23390fa01
commit f24485f172
6 changed files with 28 additions and 2 deletions

View File

@ -3413,6 +3413,9 @@ using the text properties (esp. the face) of the prompt string.
** New function x-send-client-message sends a client message when
running under X.
** Arguments for remove-overlays are now optional, so that you can remove
all overlays in the buffer by just calling (remove-overlay).
** New packages:
*** The new package gdb-ui.el provides an enhanced graphical interface to

View File

@ -1,3 +1,13 @@
2004-04-28 Masatake YAMATO <jet@gyve.org>
* subr.el (remove-overlays): Make arguments
optional.
* wid-edit.el (widget-specify-button): Put evaporate to the
overlay for sample.
(widget-specify-sample): Put evaporate to the overlay for sample.
(widget-specify-doc): Put evaporate to the overlay for documentation.
2004-04-27 Jesper Harder <harder@ifa.au.dk>
* info.el (info-apropos): Make it an index node. Align node names

View File

@ -1528,9 +1528,13 @@ If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there."
(overlay-put o1 (pop props) (pop props)))
o1))
(defun remove-overlays (beg end name val)
(defun remove-overlays (&optional beg end name val)
"Clear BEG and END of overlays whose property NAME has value VAL.
Overlays might be moved and or split."
Overlays might be moved and or split.
If BEG is nil, `(point-min)' is used. If END is nil, `(point-max)'
is used."
(unless beg (setq beg (point-min)))
(unless end (setq end (point-max)))
(if (< end beg)
(setq beg (prog1 end (setq end beg))))
(save-excursion

View File

@ -382,6 +382,7 @@ new value.")
(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 +402,7 @@ new value.")
"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 +410,7 @@ new value.")
(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)

View File

@ -1,3 +1,8 @@
2004-04-28 Masatake YAMATO <jet@gyve.org>
* widget.texi (Programming Example): Remove
overlays.
2004-04-27 Jesper Harder <harder@ifa.au.dk>
* faq.texi, viper.texi, dired-x.texi, autotype.texi: lisp -> Lisp.

View File

@ -341,6 +341,7 @@ Interface}).
(make-local-variable 'widget-example-repeat)
(let ((inhibit-read-only t))
(erase-buffer))
(remove-overlays)
(widget-insert "Here is some documentation.\n\nName: ")
(widget-create 'editable-field
:size 13