diff lisp/subr.el @ 55202:4c64ee838f41

* 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.
author Masatake YAMATO <jet@gyve.org>
date Tue, 27 Apr 2004 21:00:31 +0000
parents 1bc853c54243
children 32822ce3259d
line wrap: on
line diff
--- a/lisp/subr.el	Tue Apr 27 15:13:04 2004 +0000
+++ b/lisp/subr.el	Tue Apr 27 21:00:31 2004 +0000
@@ -1528,9 +1528,13 @@
       (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