diff lisp/textmodes/ooutline.el @ 17411:f0ff96a35eb8

Add defgroup's; use defcustom for user vars.
author Richard M. Stallman <rms@gnu.org>
date Sat, 12 Apr 1997 03:18:33 +0000
parents 15cb7a0da3e0
children 018d8cb92e90
line wrap: on
line diff
--- a/lisp/textmodes/ooutline.el	Sat Apr 12 03:14:16 1997 +0000
+++ b/lisp/textmodes/ooutline.el	Sat Apr 12 03:18:33 1997 +0000
@@ -1,6 +1,6 @@
 ;;; outline.el --- outline mode commands for Emacs
 
-;; Copyright (C) 1986, 1993, 1994 Free Software Foundation, Inc.
+;; Copyright (C) 1986, 1993, 1994, 1997 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: outlines
@@ -31,24 +31,34 @@
 ;;; Code:
 
 ;; Jan '86, Some new features added by Peter Desnoyers and rewritten by RMS.
-  
-(defvar outline-regexp nil
+
+(defgroup outlines nil
+  "Support for hierarchical outlining"
+  :prefix "outline-"
+  :group 'editing)
+
+
+(defcustom outline-regexp nil
   "*Regular expression to match the beginning of a heading.
 Any line whose beginning matches this regexp is considered to start a heading.
 The recommended way to set this is with a Local Variables: list
-in the file it applies to.  See also outline-heading-end-regexp.")
+in the file it applies to.  See also outline-heading-end-regexp."
+  :type '(choice regexp (const nil))
+  :group 'outlines)
 
 ;; Can't initialize this in the defvar above -- some major modes have
 ;; already assigned a local value to it.
 (or (default-value 'outline-regexp)
     (setq-default outline-regexp "[*\^L]+"))
   
-(defvar outline-heading-end-regexp "[\n\^M]"
+(defcustom outline-heading-end-regexp "[\n\^M]"
   "*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.")
+in the file it applies to."
+  :type 'regexp
+  :group 'outlines)
 
 (defvar outline-mode-prefix-map nil)
 
@@ -129,8 +139,10 @@
   (define-key outline-mode-map "\C-c" outline-mode-prefix-map)
   (define-key outline-mode-map [menu-bar] outline-mode-menu-bar-map))
 
-(defvar outline-minor-mode nil
-  "Non-nil if using Outline mode as a minor mode of some other mode.")
+(defcustom outline-minor-mode nil
+  "Non-nil if using Outline mode as a minor mode of some other mode."
+  :type 'boolean
+  :group 'outlines)
 (make-variable-buffer-local 'outline-minor-mode)
 (put 'outline-minor-mode 'permanent-local t)
 (or (assq 'outline-minor-mode minor-mode-alist)
@@ -215,10 +227,12 @@
   (add-hook 'change-major-mode-hook 'show-all)
   (run-hooks 'text-mode-hook 'outline-mode-hook))
 
-(defvar outline-minor-mode-prefix "\C-c@"
+(defcustom outline-minor-mode-prefix "\C-c@"
   "*Prefix key to use for Outline commands in Outline minor mode.
 The value of this variable is checked as part of loading Outline mode.
-After that, changing the prefix key requires manipulating keymaps.")
+After that, changing the prefix key requires manipulating keymaps."
+  :type 'string
+  :group 'outlines)
 
 (defvar outline-minor-mode-map nil)
 (if outline-minor-mode-map