aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2007-01-27 18:47:55 +0000
committerEli Zaretskii2007-01-27 18:47:55 +0000
commit914f7ec3f5b35be10bc5e4d9f843418c1b3fbb25 (patch)
treee6d5dd3222856a80d92806cd2272498b3abc5f5a
parentdc769d236e295d76060c7a9043d05f8591cf26d1 (diff)
downloademacs-914f7ec3f5b35be10bc5e4d9f843418c1b3fbb25.tar.gz
emacs-914f7ec3f5b35be10bc5e4d9f843418c1b3fbb25.zip
(outline-promote, outline-demote): Doc fix. Rename the arg CHILDREN -> WHICH.
-rw-r--r--lisp/outline.el30
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.
476If prefix argument CHILDREN is given, promote also all the children. 476If transient-mark-mode is on, and mark is active, promote headings in
477If the region is active in `transient-mark-mode', promote all headings 477the region (from a Lisp program, pass `region' for WHICH). Otherwise:
478in the region." 478without prefix argument, promote current heading and all headings in the
479subtree (from a Lisp program, pass `subtree' for WHICH); with prefix
480argument, promote just the current heading (from a Lisp program, pass
481nil 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.
512If prefix argument CHILDREN is given, demote also all the children. 515If transient-mark-mode is on, and mark is active, demote headings in
513If the region is active in `transient-mark-mode', demote all headings 516the region (from a Lisp program, pass `region' for WHICH). Otherwise:
514in the region." 517without prefix argument, demote current heading and all headings in the
518subtree (from a Lisp program, pass `subtree' for WHICH); with prefix
519argument, demote just the current heading (from a Lisp program, pass
520nil 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))))