]> code.delx.au - gnu-emacs/commitdiff
lisp/outline.el (outline-mode): Clean up docstring
authorOleh Krehel <ohwoeowho@gmail.com>
Fri, 30 Jan 2015 08:24:33 +0000 (09:24 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Fri, 30 Jan 2015 16:41:49 +0000 (17:41 +0100)
* lisp/outline.el (font-lock-warning-face): Remove unused declare.
(outline-mode-prefix-map): Remove obsolete comment.
(outline-font-lock-face): Remove obsolete comment.

lisp/ChangeLog
lisp/outline.el

index 0c5d2fe5a8341448227b496d086baea2aa770296..511bb869c3ee87433d8149aa442fa289a698dc58 100644 (file)
@@ -1,3 +1,9 @@
+2015-01-30  Oleh Krehel  <ohwoeowho@gmail.com>
+
+       * outline.el (outline-mode): Clean up docstring.
+       (font-lock-warning-face): Remove obsolete declaration.
+       (outline-font-lock-face): Remove obsolete comment.
+
 2015-01-30  Oleh Krehel  <ohwoeowho@gmail.com>
 
        * lisp/custom.el (defface): Set `indent' to 1.
index 11d71fb1226339bc21b25707b85d56dc5474022d..1f52998ef6b0c64c97161ea44becb1472b67f852 100644 (file)
@@ -35,9 +35,6 @@
 
 ;;; Code:
 
-(defvar font-lock-warning-face)
-
-
 (defgroup outlines nil
   "Support for hierarchical outlining."
   :prefix "outline-"
@@ -84,7 +81,6 @@ in the file it applies to.")
     (define-key map [(control ?<)] 'outline-promote)
     (define-key map [(control ?>)] 'outline-demote)
     (define-key map "\C-m" 'outline-insert-heading)
-    ;; Where to bind outline-cycle ?
     map))
 
 (defvar outline-mode-menu-bar-map
@@ -190,7 +186,6 @@ in the file it applies to.")
                                   outline-mode-menu-bar-map))))))
     map))
 
-
 (defvar outline-mode-map
   (let ((map (make-sparse-keymap)))
     (define-key map "\C-c" outline-mode-prefix-map)
@@ -198,7 +193,7 @@ in the file it applies to.")
     map))
 
 (defvar outline-font-lock-keywords
-  '(;;
+  '(
     ;; Highlight headings according to the level.
     (eval . (list (concat "^\\(?:" outline-regexp "\\).+")
                  0 '(outline-font-lock-face) nil t)))
@@ -248,33 +243,13 @@ in the file it applies to.")
   [outline-1 outline-2 outline-3 outline-4
    outline-5 outline-6 outline-7 outline-8])
 
-;; (defvar outline-font-lock-levels nil)
-;; (make-variable-buffer-local 'outline-font-lock-levels)
-
 (defun outline-font-lock-face ()
-  ;; (save-excursion
-  ;;   (outline-back-to-heading t)
-  ;;   (let* ((count 0)
-  ;;      (start-level (funcall outline-level))
-  ;;      (level start-level)
-  ;;      face-level)
-  ;;     (while (not (setq face-level
-  ;;                   (if (or (bobp) (eq level 1)) 0
-  ;;                     (cdr (assq level outline-font-lock-levels)))))
-  ;;   (outline-up-heading 1 t)
-  ;;   (setq count (1+ count))
-  ;;   (setq level (funcall outline-level)))
-  ;;     ;; Remember for later.
-  ;;     (unless (zerop count)
-  ;;   (setq face-level (+ face-level count))
-  ;;   (push (cons start-level face-level) outline-font-lock-levels))
-  ;;     (condition-case nil
-  ;;     (aref outline-font-lock-faces face-level)
-  ;;   (error font-lock-warning-face))))
   (save-excursion
     (goto-char (match-beginning 0))
     (looking-at outline-regexp)
-    (aref outline-font-lock-faces (% (1- (funcall outline-level)) (length outline-font-lock-faces)))))
+    (aref outline-font-lock-faces
+          (% (1- (funcall outline-level))
+             (length outline-font-lock-faces)))))
 
 (defvar outline-view-change-hook nil
   "Normal hook to be run after outline visibility changes.")
@@ -296,29 +271,10 @@ invisible, or visible again.  Invisible lines are attached to the end
 of the heading, so they move with it, if the line is killed and yanked
 back.  A heading with text hidden under it is marked with an ellipsis (...).
 
-Commands:\\<outline-mode-map>
-\\[outline-next-visible-heading]   outline-next-visible-heading      move by visible headings
-\\[outline-previous-visible-heading]   outline-previous-visible-heading
-\\[outline-forward-same-level]   outline-forward-same-level        similar but skip subheadings
-\\[outline-backward-same-level]   outline-backward-same-level
-\\[outline-up-heading]   outline-up-heading                move from subheading to heading
-
-\\[hide-body]  make all text invisible (not headings).
-\\[show-all]   make everything in buffer visible.
-\\[hide-sublevels]  make only the first N levels of headers visible.
-
-The remaining commands are used when point is on a heading line.
-They apply to some of the body or subheadings of that heading.
-\\[hide-subtree]   hide-subtree        make body and subheadings invisible.
-\\[show-subtree]   show-subtree        make body and subheadings visible.
-\\[show-children]   show-children      make direct subheadings visible.
-                No effect on body, or subheadings 2 or more levels down.
-                With arg N, affects subheadings N levels down.
-\\[hide-entry]    make immediately following body invisible.
-\\[show-entry]    make it visible.
-\\[hide-leaves]           make body under heading and under its subheadings invisible.
-                    The subheadings remain visible.
-\\[show-branches]  make all subheadings at all levels visible.
+\\{outline-mode-map}
+The commands `hide-subtree', `show-subtree', `show-children',
+`hide-entry', `show-entry', `hide-leaves', and `show-branches'
+are used when point is on a heading line.
 
 The variable `outline-regexp' can be changed to control what is a heading.
 A line is a heading if `outline-regexp' matches something at the