Customize
authorStephen Eglen <stephen@gnu.org>
Thu, 9 Apr 1998 12:31:57 +0000 (12:31 +0000)
committerStephen Eglen <stephen@gnu.org>
Thu, 9 Apr 1998 12:31:57 +0000 (12:31 +0000)
lisp/progmodes/c-mode.el
lisp/progmodes/cplus-md.el
lisp/progmodes/m4-mode.el

index 5a19a42..ab9cf8d 100644 (file)
 ;; and do M-x describe-mode for details.
 
 ;;; Code:
+(defgroup old-c nil
+  "Old C code editing commands for Emacs."
+  :prefix "c-"
+  :group 'languages)
+
 
 (defvar c-mode-abbrev-table nil
   "Abbrev table in use in C mode.")
@@ -114,21 +119,35 @@ The expansion is entirely correct because it uses the C preprocessor."
   (modify-syntax-entry ?| "." c-mode-syntax-table)
   (modify-syntax-entry ?\' "\"" c-mode-syntax-table))
 
-(defconst c-indent-level 2
-  "*Indentation of C statements with respect to containing block.")
-(defconst c-brace-imaginary-offset 0
-  "*Imagined indentation of a C open brace that actually follows a statement.")
-(defconst c-brace-offset 0
-  "*Extra indentation for braces, compared with other text in same context.")
-(defconst c-argdecl-indent 5
-  "*Indentation level of declarations of C function arguments.")
-(defconst c-label-offset -2
-  "*Offset of C label lines and case statements relative to usual indentation.")
-(defconst c-continued-statement-offset 2
-  "*Extra indent for lines not starting new statements.")
-(defconst c-continued-brace-offset 0
+(defcustom c-indent-level 2
+  "*Indentation of C statements with respect to containing block."
+  :type 'integer
+  :group 'old-c)
+(defcustom c-brace-imaginary-offset 0
+  "*Imagined indentation of a C open brace that actually follows a statement."
+  :type 'integer
+  :group 'old-c)
+(defcustom c-brace-offset 0
+  "*Extra indentation for braces, compared with other text in same context."
+  :type 'integer
+  :group 'old-c)
+(defcustom c-argdecl-indent 5
+  "*Indentation level of declarations of C function arguments."
+  :type 'integer
+  :group 'old-c)
+(defcustom c-label-offset -2
+  "*Offset of C label lines and case statements relative to usual indentation."
+  :type 'integer
+  :group 'old-c)
+(defcustom c-continued-statement-offset 2
+  "*Extra indent for lines not starting new statements."
+  :type 'integer
+  :group 'old-c)
+(defcustom c-continued-brace-offset 0
   "*Extra indent for substatements that start with open-braces.
-This is in addition to `c-continued-statement-offset'.")
+This is in addition to `c-continued-statement-offset'."
+  :type 'integer
+  :group 'old-c)
 (defconst c-style-alist
   '(("GNU"
      (c-indent-level               .  2)
@@ -167,15 +186,19 @@ This is in addition to `c-continued-statement-offset'.")
      (c-label-offset               . -4)
      (c-continued-statement-offset .  4))))
 
-(defconst c-auto-newline nil
+(defcustom c-auto-newline nil
   "*Non-nil means automatically newline before and after braces,
 and after colons and semicolons, inserted in C code.
 If you do not want a leading newline before braces then use:
-  (define-key c-mode-map \"{\" 'electric-c-semi)")
+  (define-key c-mode-map \"{\" 'electric-c-semi)"
+  :type 'boolean
+  :group 'old-c)
 
-(defconst c-tab-always-indent t
+(defcustom c-tab-always-indent t
   "*Non-nil means TAB in C mode should always reindent the current line,
-regardless of where in the line point is when the TAB command is used.")
+regardless of where in the line point is when the TAB command is used."
+  :type 'boolean
+  :group 'old-c)
 
 ;;; Regular expression used internally to recognize labels in switch
 ;;; statements.
@@ -1504,8 +1527,10 @@ Available styles are GNU, K&R, BSD and Whitesmith."
 \f
 ;;; This page handles insertion and removal of backslashes for C macros.
 
-(defvar c-backslash-column 48
-  "*Minimum column for end-of-line backslashes of macro definitions.")
+(defcustom c-backslash-column 48
+  "*Minimum column for end-of-line backslashes of macro definitions."
+  :type 'integer
+  :group 'old-c)
 
 (defun c-backslash-region (from to delete-flag)
   "Insert, align, or delete end-of-line backslashes on the lines in the region.
index dbbe191..8eef19d 100644 (file)
 
 ;;; Code:
 
+(defgroup old-c++ nil
+  "Old C++ code editing mode for Emacs."
+  :prefix "c-"
+  :group 'languages)
+
 (defvar c++-mode-abbrev-table nil
   "Abbrev table used in C++ mode.")
 (define-abbrev-table 'c++-mode-abbrev-table ())
   (modify-syntax-entry ?\n ">" c++-mode-syntax-table)
   (modify-syntax-entry ?\^m ">" c++-mode-syntax-table))
 
-(defvar c++-continued-member-init-offset nil
+(defcustom c++-continued-member-init-offset nil
   "*Extra indent for continuation lines of member inits;
 nil means to align with previous initializations rather than
-with the colon on the first line.")
-(defvar c++-member-init-indent 0
-  "*Indentation level of member initializations in function declarations.")
-(defvar c++-friend-offset -4
-  "*Offset of C++ friend declarations relative to member declarations.")
-(defvar c++-electric-colon t
-  "*If t, colon is an electric terminator.")
-(defvar c++-empty-arglist-indent nil
+with the colon on the first line."
+  :type '(choice (const nil) integer)
+  :group 'old-c++)
+(defcustom c++-member-init-indent 0
+  "*Indentation level of member initializations in function declarations."
+  :type 'integer
+  :group 'old-c++)
+(defcustom c++-friend-offset -4
+  "*Offset of C++ friend declarations relative to member declarations."
+  :type 'integer
+  :group 'old-c++)
+(defcustom c++-electric-colon t
+  "*If t, colon is an electric terminator."
+  :type 'boolean
+  :group 'old-c++)
+(defcustom c++-empty-arglist-indent nil
   "*Indicates how far to indent an line following an empty argument
-list.  Nil indicates to just after the paren.")
+list.  Nil indicates to just after the paren."
+  :type '(choice (const nil) integer)
+  :group 'old-c++)
 
 (defvar c++-imenu-generic-expression
   (` 
index ddf91a3..dc1aae1 100644 (file)
 
 ;;; Code:
 
-(defvar m4-program 
+(defgroup m4 nil
+  "m4 code editing commands for Emacs."
+  :prefix "m4-"
+  :group 'languages)
+
+(defcustom m4-program 
   (cond 
    ((file-exists-p "/usr/local/bin/m4") "/usr/local/bin/m4")
    ((file-exists-p "/usr/bin/m4") "/usr/bin/m4")
    ((file-exists-p "/bin/m4") "/bin/m4")
    ((file-exists-p "/usr/ccs/bin/m4") "/usr/ccs/bin/m4")
+   ( t "m4")
    )
-  "File name of the m4 executable.")
+  "File name of the m4 executable."
+  :type 'file
+  :group 'm4)
 
 ;;options to m4
-(defconst m4-program-options nil)
+(defcustom m4-program-options nil
+  "Options to pass to `m4-program'."
+  :type '(repeat string)
+  :group 'm4)
+
 ;;to use --prefix-builtins, you can use
 ;;(defconst m4-program-options '("-P"))
 ;;or
     "Default font-lock-keywords for m4 mode.")
 )
 
+(defcustom m4-mode-hook nil
+  "*Hook called by `m4-mode'."
+  :type 'hook
+  :group 'm4)
+
 ;;this may still need some work
 (defvar m4-mode-syntax-table nil
   "syntax table used in m4 mode")