diff options
| author | Eli Zaretskii | 2007-01-27 18:47:55 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2007-01-27 18:47:55 +0000 |
| commit | 914f7ec3f5b35be10bc5e4d9f843418c1b3fbb25 (patch) | |
| tree | e6d5dd3222856a80d92806cd2272498b3abc5f5a | |
| parent | dc769d236e295d76060c7a9043d05f8591cf26d1 (diff) | |
| download | emacs-914f7ec3f5b35be10bc5e4d9f843418c1b3fbb25.tar.gz emacs-914f7ec3f5b35be10bc5e4d9f843418c1b3fbb25.zip | |
(outline-promote, outline-demote): Doc fix. Rename the arg CHILDREN -> WHICH.
| -rw-r--r-- | lisp/outline.el | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/lisp/outline.el b/lisp/outline.el index c9863083b92..20dfb2429ef 100644 --- a/lisp/outline.el +++ b/lisp/outline.el | |||
| @@ -471,19 +471,22 @@ If INVISIBLE-OK is non-nil, an invisible heading line is ok too." | |||
| 471 | (if up "Parent" "Demoted") head) | 471 | (if up "Parent" "Demoted") head) |
| 472 | head nil nil t))))) | 472 | head nil nil t))))) |
| 473 | 473 | ||
| 474 | (defun outline-promote (&optional children) | 474 | (defun outline-promote (&optional which) |
| 475 | "Promote headings higher up the tree. | 475 | "Promote headings higher up the tree. |
| 476 | If prefix argument CHILDREN is given, promote also all the children. | 476 | If transient-mark-mode is on, and mark is active, promote headings in |
| 477 | If the region is active in `transient-mark-mode', promote all headings | 477 | the region (from a Lisp program, pass `region' for WHICH). Otherwise: |
| 478 | in the region." | 478 | without prefix argument, promote current heading and all headings in the |
| 479 | subtree (from a Lisp program, pass `subtree' for WHICH); with prefix | ||
| 480 | argument, promote just the current heading (from a Lisp program, pass | ||
| 481 | nil for WHICH, or do not pass any argument)." | ||
| 479 | (interactive | 482 | (interactive |
| 480 | (list (if (and transient-mark-mode mark-active) 'region | 483 | (list (if (and transient-mark-mode mark-active) 'region |
| 481 | (outline-back-to-heading) | 484 | (outline-back-to-heading) |
| 482 | (if current-prefix-arg nil 'subtree)))) | 485 | (if current-prefix-arg nil 'subtree)))) |
| 483 | (cond | 486 | (cond |
| 484 | ((eq children 'region) | 487 | ((eq which 'region) |
| 485 | (outline-map-region 'outline-promote (region-beginning) (region-end))) | 488 | (outline-map-region 'outline-promote (region-beginning) (region-end))) |
| 486 | (children | 489 | (which |
| 487 | (outline-map-region 'outline-promote | 490 | (outline-map-region 'outline-promote |
| 488 | (point) | 491 | (point) |
| 489 | (save-excursion (outline-get-next-sibling) (point)))) | 492 | (save-excursion (outline-get-next-sibling) (point)))) |
| @@ -507,19 +510,22 @@ in the region." | |||
| 507 | 510 | ||
| 508 | (replace-match up-head nil t))))) | 511 | (replace-match up-head nil t))))) |
| 509 | 512 | ||
| 510 | (defun outline-demote (&optional children) | 513 | (defun outline-demote (&optional which) |
| 511 | "Demote headings lower down the tree. | 514 | "Demote headings lower down the tree. |
| 512 | If prefix argument CHILDREN is given, demote also all the children. | 515 | If transient-mark-mode is on, and mark is active, demote headings in |
| 513 | If the region is active in `transient-mark-mode', demote all headings | 516 | the region (from a Lisp program, pass `region' for WHICH). Otherwise: |
| 514 | in the region." | 517 | without prefix argument, demote current heading and all headings in the |
| 518 | subtree (from a Lisp program, pass `subtree' for WHICH); with prefix | ||
| 519 | argument, demote just the current heading (from a Lisp program, pass | ||
| 520 | nil for WHICH, or do not pass any argument)." | ||
| 515 | (interactive | 521 | (interactive |
| 516 | (list (if (and transient-mark-mode mark-active) 'region | 522 | (list (if (and transient-mark-mode mark-active) 'region |
| 517 | (outline-back-to-heading) | 523 | (outline-back-to-heading) |
| 518 | (if current-prefix-arg nil 'subtree)))) | 524 | (if current-prefix-arg nil 'subtree)))) |
| 519 | (cond | 525 | (cond |
| 520 | ((eq children 'region) | 526 | ((eq which 'region) |
| 521 | (outline-map-region 'outline-demote (region-beginning) (region-end))) | 527 | (outline-map-region 'outline-demote (region-beginning) (region-end))) |
| 522 | (children | 528 | (which |
| 523 | (outline-map-region 'outline-demote | 529 | (outline-map-region 'outline-demote |
| 524 | (point) | 530 | (point) |
| 525 | (save-excursion (outline-get-next-sibling) (point)))) | 531 | (save-excursion (outline-get-next-sibling) (point)))) |