X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/a64bfdfa5a90731b804c057f2bcc74a8ba02937c..ff4871b986a082a4b21867827e460c50bfa0cb09:/lisp/outline.el?ds=sidebyside diff --git a/lisp/outline.el b/lisp/outline.el index 34d30fc459..0ec5227a28 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -1,7 +1,7 @@ ;;; outline.el --- outline mode commands for Emacs -;; Copyright (C) 1986, 1993-1995, 1997, 2000-2011 -;; Free Software Foundation, Inc. +;; Copyright (C) 1986, 1993-1995, 1997, 2000-2013 Free Software +;; Foundation, Inc. ;; Maintainer: FSF ;; Keywords: outlines @@ -43,25 +43,21 @@ :prefix "outline-" :group 'wp) -(defcustom outline-regexp "[*\^L]+" +(defvar outline-regexp "[*\^L]+" "Regular expression to match the beginning of a heading. Any line whose beginning matches this regexp is considered to start a heading. Note that Outline mode only checks this regexp at the start of a line, so the regexp need not (and usually does not) start with `^'. The recommended way to set this is with a Local Variables: list -in the file it applies to. See also `outline-heading-end-regexp'." - :type 'regexp - :group 'outlines) +in the file it applies to. See also `outline-heading-end-regexp'.") ;;;###autoload(put 'outline-regexp 'safe-local-variable 'stringp) -(defcustom outline-heading-end-regexp "\n" +(defvar outline-heading-end-regexp "\n" "Regular expression to match the end of a heading line. You can assume that point is at the beginning of a heading when this regexp is searched for. The heading ends at the end of the match. The recommended way to set this is with a `Local Variables:' list -in the file it applies to." - :type 'regexp - :group 'outlines) +in the file it applies to.") ;;;###autoload(put 'outline-heading-end-regexp 'safe-local-variable 'stringp) (defvar outline-mode-prefix-map @@ -144,10 +140,10 @@ in the file it applies to." :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")) + :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")) + :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 :enable mark-active @@ -284,10 +280,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" @@ -380,7 +376,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) @@ -642,12 +638,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)) @@ -751,6 +747,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