Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
21cd2849
Commit
21cd2849
authored
Dec 14, 1996
by
Richard M. Stallman
Browse files
(outline-discard-overlays):
Use overlays-in, to ensure we get rid of empty overlays.
parent
147f1d2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
18 deletions
+15
-18
lisp/textmodes/outline.el
lisp/textmodes/outline.el
+15
-18
No files found.
lisp/textmodes/outline.el
View file @
21cd2849
...
...
@@ -386,25 +386,22 @@ If FLAG is nil then text is shown, while if FLAG is t the text is hidden."
(
if
(
<
end
beg
)
(
setq
beg
(
prog1
end
(
setq
end
beg
))))
(
save-excursion
(
goto-char
beg
)
(
while
(
<
(
point
)
end
)
(
let
((
overlays
(
overlays-at
(
point
))))
(
while
overlays
(
let
((
o
(
car
overlays
)))
(
if
(
overlay-get
o
prop
)
;; Either push this overlay outside beg...end
;; or split it to exclude beg...end
;; or delete it entirely (if it is contained in beg...end).
(
if
(
<
(
overlay-start
o
)
beg
)
(
if
(
>
(
overlay-end
o
)
end
)
(
let
((
o1
(
outline-copy-overlay
o
)))
(
move-overlay
o1
(
overlay-start
o1
)
beg
)
(
move-overlay
o
(
overlay-start
o
)
beg
)))
(
let
((
overlays
(
overlays-in
beg
end
)))
(
while
overlays
(
let
((
o
(
car
overlays
)))
(
if
(
overlay-get
o
prop
)
;; Either push this overlay outside beg...end
;; or split it to exclude beg...end
;; or delete it entirely (if it is contained in beg...end).
(
if
(
<
(
overlay-start
o
)
beg
)
(
if
(
>
(
overlay-end
o
)
end
)
(
move-overlay
o
end
(
overlay-end
o
))
(
delete-overlay
o
)))))
(
setq
overlays
(
cdr
overlays
))))
(
goto-char
(
next-overlay-change
(
point
))))))
(
let
((
o1
(
outline-copy-overlay
o
)))
(
move-overlay
o1
(
overlay-start
o1
)
beg
)
(
move-overlay
o
(
overlay-start
o
)
beg
)))
(
if
(
>
(
overlay-end
o
)
end
)
(
move-overlay
o
end
(
overlay-end
o
))
(
delete-overlay
o
)))))
(
setq
overlays
(
cdr
overlays
))))))
;; Make a copy of overlay O, with the same beginning, end and properties.
(
defun
outline-copy-overlay
(
o
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment