From f24485f172efcd20394f6d5040305fe02c38e043 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Tue, 27 Apr 2004 21:00:31 +0000 Subject: * 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. --- lisp/subr.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lisp/subr.el') 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." (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 -- cgit v1.2.1