X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/5ed99d3685cc8d13f8e4c63ad449a6e4d63c8eb0..4cddca3070934602b0156a5cc260c633f210599c:/lisp/outline.el diff --git a/lisp/outline.el b/lisp/outline.el index 2f84e7d93e..40974a2c82 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -1,6 +1,6 @@ ;;; outline.el --- outline mode commands for Emacs -;; Copyright (C) 1986, 1993-1995, 1997, 2000-2011 +;; Copyright (C) 1986, 1993-1995, 1997, 2000-2012 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -137,24 +137,23 @@ in the file it applies to." (cons "Headings" (make-sparse-keymap "Headings"))) (define-key map [headings demote-subtree] - '(menu-item "Demote subtree" outline-demote + '(menu-item "Demote Subtree" outline-demote :help "Demote headings lower down the tree")) (define-key map [headings promote-subtree] - '(menu-item "Promote subtree" outline-promote + '(menu-item "Promote Subtree" outline-promote :help "Promote headings higher up the tree")) (define-key map [headings move-subtree-down] - '(menu-item "Move subtree down" outline-move-subtree-down - :help "Move the currrent subtree down past arg headlines of the same level")) + '(menu-item "Move Subtree Down" outline-move-subtree-down + :help "Move the current subtree down past arg headlines of the same level")) (define-key map [headings move-subtree-up] - '(menu-item "Move subtree up" outline-move-subtree-up - :help "Move the currrent subtree up past arg headlines of the same level")) + '(menu-item "Move Subtree Up" outline-move-subtree-up + :help "Move the current subtree up past arg headlines of the same level")) (define-key map [headings copy] - '(menu-item "Copy to kill ring" outline-headers-as-kill + '(menu-item "Copy to Kill Ring" outline-headers-as-kill :enable mark-active :help "Save the visible outline headers in region at the start of the kill ring")) (define-key map [headings outline-insert-heading] - - '(menu-item "New heading" outline-insert-heading + '(menu-item "New Heading" outline-insert-heading :help "Insert a new heading at same depth at point")) (define-key map [headings outline-backward-same-level] @@ -285,10 +284,10 @@ in the file it applies to." "Normal hook to be run after outline visibility changes.") (defvar outline-mode-hook nil - "*This hook is run when outline mode starts.") + "This hook is run when outline mode starts.") (defvar outline-blank-line nil - "*Non-nil means to leave unhidden blank line before heading.") + "Non-nil means to leave unhidden blank line before heading.") ;;;###autoload (define-derived-mode outline-mode text-mode "Outline" @@ -357,7 +356,10 @@ After that, changing the prefix key requires manipulating keymaps." ;;;###autoload (define-minor-mode outline-minor-mode "Toggle Outline minor mode. -With arg, turn Outline minor mode on if arg is positive, off otherwise. +With a prefix argument ARG, enable Outline minor mode if ARG is +positive, and disable it otherwise. If called from Lisp, enable +the mode if ARG is omitted or nil. + See the command `outline-mode' for more information on this mode." nil " Outl" (list (cons [menu-bar] outline-minor-mode-menu-bar-map) (cons outline-minor-mode-prefix outline-mode-prefix-map)) @@ -378,7 +380,7 @@ See the command `outline-mode' for more information on this mode." (show-all))) (defvar outline-level 'outline-level - "*Function of no args to compute a header's nesting level in an outline. + "Function of no args to compute a header's nesting level in an outline. It can assume point is at the beginning of a header line and that the match data reflects the `outline-regexp'.") ;;;###autoload(put 'outline-level 'risky-local-variable t) @@ -640,12 +642,12 @@ the match data is set appropriately." ;; Vertical tree motion (defun outline-move-subtree-up (&optional arg) - "Move the currrent subtree up past ARG headlines of the same level." + "Move the current subtree up past ARG headlines of the same level." (interactive "p") (outline-move-subtree-down (- arg))) (defun outline-move-subtree-down (&optional arg) - "Move the currrent subtree down past ARG headlines of the same level." + "Move the current subtree down past ARG headlines of the same level." (interactive "p") (let ((movfunc (if (> arg 0) 'outline-get-next-sibling 'outline-get-last-sibling)) @@ -749,6 +751,7 @@ If FLAG is nil then text is shown, while if FLAG is t the text is hidden." ;; very end of the heading, before the newline, so text inserted at FROM ;; belongs to the heading rather than to the entry. (let ((o (make-overlay from to nil 'front-advance))) + (overlay-put o 'evaporate t) (overlay-put o 'invisible 'outline) (overlay-put o 'isearch-open-invisible (or outline-isearch-open-invisible-function