aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMasatake YAMATO2004-04-27 21:00:31 +0000
committerMasatake YAMATO2004-04-27 21:00:31 +0000
commitf24485f172efcd20394f6d5040305fe02c38e043 (patch)
tree39effd1f3527d173dda01551df7a666ec35615c8 /lisp
parente23390fa015f523cba25fa4d952d7bee8c6c533f (diff)
downloademacs-f24485f172efcd20394f6d5040305fe02c38e043.tar.gz
emacs-f24485f172efcd20394f6d5040305fe02c38e043.zip
* 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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/subr.el8
-rw-r--r--lisp/wid-edit.el3
3 files changed, 19 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ecf9cfeaf9c..c01308a4e1a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12004-04-28 Masatake YAMATO <jet@gyve.org>
2
3 * subr.el (remove-overlays): Make arguments
4 optional.
5
6 * wid-edit.el (widget-specify-button): Put evaporate to the
7 overlay for sample.
8 (widget-specify-sample): Put evaporate to the overlay for sample.
9 (widget-specify-doc): Put evaporate to the overlay for documentation.
10
12004-04-27 Jesper Harder <harder@ifa.au.dk> 112004-04-27 Jesper Harder <harder@ifa.au.dk>
2 12
3 * info.el (info-apropos): Make it an index node. Align node names 13 * info.el (info-apropos): Make it an index node. Align node names
diff --git a/lisp/subr.el b/lisp/subr.el
index 516b0fc781a..a9acc15606d 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1528,9 +1528,13 @@ If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there."
1528 (overlay-put o1 (pop props) (pop props))) 1528 (overlay-put o1 (pop props) (pop props)))
1529 o1)) 1529 o1))
1530 1530
1531(defun remove-overlays (beg end name val) 1531(defun remove-overlays (&optional beg end name val)
1532 "Clear BEG and END of overlays whose property NAME has value VAL. 1532 "Clear BEG and END of overlays whose property NAME has value VAL.
1533Overlays might be moved and or split." 1533Overlays might be moved and or split.
1534If BEG is nil, `(point-min)' is used. If END is nil, `(point-max)'
1535is used."
1536 (unless beg (setq beg (point-min)))
1537 (unless end (setq end (point-max)))
1534 (if (< end beg) 1538 (if (< end beg)
1535 (setq beg (prog1 end (setq end beg)))) 1539 (setq beg (prog1 end (setq end beg))))
1536 (save-excursion 1540 (save-excursion
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 2392ccdfb47..33f1f06ba9a 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -382,6 +382,7 @@ new value.")
382 (setq help-echo 'widget-mouse-help)) 382 (setq help-echo 'widget-mouse-help))
383 (overlay-put overlay 'button widget) 383 (overlay-put overlay 'button widget)
384 (overlay-put overlay 'keymap (widget-get widget :keymap)) 384 (overlay-put overlay 'keymap (widget-get widget :keymap))
385 (overlay-put overlay 'evaporate t)
385 ;; We want to avoid the face with image buttons. 386 ;; We want to avoid the face with image buttons.
386 (unless (widget-get widget :suppress-face) 387 (unless (widget-get widget :suppress-face)
387 (overlay-put overlay 'face (widget-apply widget :button-face-get)) 388 (overlay-put overlay 'face (widget-apply widget :button-face-get))
@@ -401,6 +402,7 @@ new value.")
401 "Specify sample for WIDGET between FROM and TO." 402 "Specify sample for WIDGET between FROM and TO."
402 (let ((overlay (make-overlay from to nil t nil))) 403 (let ((overlay (make-overlay from to nil t nil)))
403 (overlay-put overlay 'face (widget-apply widget :sample-face-get)) 404 (overlay-put overlay 'face (widget-apply widget :sample-face-get))
405 (overlay-put overlay 'evaporate t)
404 (widget-put widget :sample-overlay overlay))) 406 (widget-put widget :sample-overlay overlay)))
405 407
406(defun widget-specify-doc (widget from to) 408(defun widget-specify-doc (widget from to)
@@ -408,6 +410,7 @@ new value.")
408 (let ((overlay (make-overlay from to nil t nil))) 410 (let ((overlay (make-overlay from to nil t nil)))
409 (overlay-put overlay 'widget-doc widget) 411 (overlay-put overlay 'widget-doc widget)
410 (overlay-put overlay 'face widget-documentation-face) 412 (overlay-put overlay 'face widget-documentation-face)
413 (overlay-put overlay 'evaporate t)
411 (widget-put widget :doc-overlay overlay))) 414 (widget-put widget :doc-overlay overlay)))
412 415
413(defmacro widget-specify-insert (&rest form) 416(defmacro widget-specify-insert (&rest form)