Mercurial > emacs
comparison lisp/textmodes/ooutline.el @ 6080:2f02deab5b9e
(hide-sublevels): Doc fix. Rename arg.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 24 Feb 1994 23:43:30 +0000 |
parents | 7c17887a0daf |
children | 340f5eb2e8b6 |
comparison
equal
deleted
inserted
replaced
6079:6617a69cece1 | 6080:2f02deab5b9e |
---|---|
349 (defun show-subtree () | 349 (defun show-subtree () |
350 "Show everything after this heading at deeper levels." | 350 "Show everything after this heading at deeper levels." |
351 (interactive) | 351 (interactive) |
352 (outline-flag-subtree ?\n)) | 352 (outline-flag-subtree ?\n)) |
353 | 353 |
354 (defun hide-sublevels (keep-levels) | 354 (defun hide-sublevels (levels) |
355 "Hide everything except the first KEEP-LEVEL headers." | 355 "Hide everything except the top LEVELS levels of headers." |
356 (interactive "p") | 356 (interactive "p") |
357 (if (< keep-levels 1) | 357 (if (< levels 1) |
358 (error "Must keep at least one level of headers")) | 358 (error "Must keep at least one level of headers")) |
359 (setq keep-levels (1- keep-levels)) | 359 (setq levels (1- levels)) |
360 (save-excursion | 360 (save-excursion |
361 (goto-char (point-min)) | 361 (goto-char (point-min)) |
362 (hide-subtree) | 362 (hide-subtree) |
363 (show-children keep-levels) | 363 (show-children levels) |
364 (condition-case err | 364 (condition-case err |
365 (while (outline-get-next-sibling) | 365 (while (outline-get-next-sibling) |
366 (hide-subtree) | 366 (hide-subtree) |
367 (show-children keep-levels)) | 367 (show-children levels)) |
368 (error nil)))) | 368 (error nil)))) |
369 | 369 |
370 (defun hide-other () | 370 (defun hide-other () |
371 "Hide everything except for the current body and the parent headings." | 371 "Hide everything except for the current body and the parent headings." |
372 (interactive) | 372 (interactive) |