Mercurial > emacs
comparison lisp/textmodes/ooutline.el @ 3376:898d7a33c038
(outline-flag-region): Pass t as NOUNDO arg
to subst-char-in-region. No need to restore buffer-modified-p by hand.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 01 Jun 1993 03:24:24 +0000 |
parents | 7c4226d1ea65 |
children | 0732700eb6c0 |
comparison
equal
deleted
inserted
replaced
3375:13ddc81f0b43 | 3376:898d7a33c038 |
---|---|
213 | 213 |
214 (defun outline-flag-region (from to flag) | 214 (defun outline-flag-region (from to flag) |
215 "Hides or shows lines from FROM to TO, according to FLAG. | 215 "Hides or shows lines from FROM to TO, according to FLAG. |
216 If FLAG is `\\n' (newline character) then text is shown, | 216 If FLAG is `\\n' (newline character) then text is shown, |
217 while if FLAG is `\\^M' (control-M) the text is hidden." | 217 while if FLAG is `\\^M' (control-M) the text is hidden." |
218 (let (buffer-read-only | 218 (let (buffer-read-only) |
219 (modp (buffer-modified-p))) | 219 (subst-char-in-region from to |
220 (unwind-protect | 220 (if (= flag ?\n) ?\^M ?\n) |
221 (subst-char-in-region from to | 221 flag t))) |
222 (if (= flag ?\n) ?\^M ?\n) | |
223 flag) | |
224 (set-buffer-modified-p modp)))) | |
225 | 222 |
226 (defun hide-entry () | 223 (defun hide-entry () |
227 "Hide the body directly following this heading." | 224 "Hide the body directly following this heading." |
228 (interactive) | 225 (interactive) |
229 (outline-back-to-heading) | 226 (outline-back-to-heading) |