comparison lisp/textmodes/outline.el @ 21782:f2462c6cb265

(outline-discard-overlays): Interpret PROP as a value for `invisible', not as property name.
author Richard M. Stallman <rms@gnu.org>
date Mon, 27 Apr 1998 01:41:22 +0000
parents 95ec24fc6d78
children 431ec936e2da
comparison
equal deleted inserted replaced
21781:6e9ef4991da8 21782:f2462c6cb265
431 (goto-char (overlay-start overlay)) 431 (goto-char (overlay-start overlay))
432 (show-entry))) 432 (show-entry)))
433 433
434 434
435 ;; Exclude from the region BEG ... END all overlays 435 ;; Exclude from the region BEG ... END all overlays
436 ;; with a non-nil PROP property. 436 ;; which have PROP as the value of the `invisible' property.
437 ;; Exclude them by shrinking them to exclude BEG ... END, 437 ;; Exclude them by shrinking them to exclude BEG ... END,
438 ;; or even by splitting them if necessary. 438 ;; or even by splitting them if necessary.
439 ;; Overlays without a non-nil PROP property are not touched. 439 ;; Overlays without such an `invisible' property are not touched.
440 (defun outline-discard-overlays (beg end prop) 440 (defun outline-discard-overlays (beg end prop)
441 (if (< end beg) 441 (if (< end beg)
442 (setq beg (prog1 end (setq end beg)))) 442 (setq beg (prog1 end (setq end beg))))
443 (save-excursion 443 (save-excursion
444 (let ((overlays (overlays-in beg end)) 444 (let ((overlays (overlays-in beg end))
445 o 445 o
446 o1) 446 o1)
447 (while overlays 447 (while overlays
448 (setq o (car overlays)) 448 (setq o (car overlays))
449 (if (overlay-get o prop) 449 (if (eq (overlay-get o 'invisible) prop)
450 ;; Either push this overlay outside beg...end 450 ;; Either push this overlay outside beg...end
451 ;; or split it to exclude beg...end 451 ;; or split it to exclude beg...end
452 ;; or delete it entirely (if it is contained in beg...end). 452 ;; or delete it entirely (if it is contained in beg...end).
453 (if (< (overlay-start o) beg) 453 (if (< (overlay-start o) beg)
454 (if (> (overlay-end o) end) 454 (if (> (overlay-end o) end)