changeset 20960:2f9b7d0689a9

Customized.
author Stephen Eglen <stephen@gnu.org>
date Sun, 22 Feb 1998 19:51:45 +0000
parents 9b831f34ff7d
children 79530a618cd3
files lisp/progmodes/modula2.el lisp/progmodes/perl-mode.el lisp/progmodes/simula.el
diffstat 3 files changed, 118 insertions(+), 50 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/modula2.el	Sun Feb 22 17:34:42 1998 +0000
+++ b/lisp/progmodes/modula2.el	Sun Feb 22 19:51:45 1998 +0000
@@ -20,21 +20,34 @@
 
 ;;; Code:
 
+(defgroup modula2 nil
+  "Major mode for editing Modula-2 code."
+  :prefix "m2-"
+  :group 'languages)
+
 ;;; Added by Tom Perrine (TEP)
 (defvar m2-mode-syntax-table nil
   "Syntax table in use in Modula-2 buffers.")
 
-(defvar m2-compile-command "m2c"
-  "Command to compile Modula-2 programs")
+(defcustom m2-compile-command "m2c"
+  "Command to compile Modula-2 programs."
+  :type 'string
+  :group 'modula2)
 
-(defvar m2-link-command "m2l"
-  "Command to link Modula-2 programs")
+(defcustom m2-link-command "m2l"
+  "Command to link Modula-2 programs."
+  :type 'string
+  :group 'modula2)
 
-(defvar m2-link-name nil
-  "Name of the executable.")
+(defcustom m2-link-name nil
+  "Name of the Modula-2 executable."
+  :type '(choice (const nil) string)
+  :group 'modula2)
 
-(defvar m2-end-comment-column nil
-  "*Column for aligning the end of a comment, in Modula-2.")
+(defcustom m2-end-comment-column 75
+  "*Column for aligning the end of a comment, in Modula-2."
+  :type 'integer
+  :group 'modula2)
 
 (if m2-mode-syntax-table
     ()
@@ -89,7 +102,10 @@
     (define-key map "\C-c\C-c" 'm2-compile)
     (setq m2-mode-map map)))
 
-(defvar m2-indent 5 "*This variable gives the indentation in Modula-2-Mode")
+(defcustom m2-indent 5 
+  "*This variable gives the indentation in Modula-2-Mode."
+  :type 'integer
+  :group 'modula2)
   
 ;;;###autoload
 (defun modula-2-mode ()
@@ -123,7 +139,6 @@
   (make-local-variable 'comment-column)
   (setq comment-column 41)
   (make-local-variable 'm2-end-comment-column)
-  (setq m2-end-comment-column 75)
   (set-syntax-table m2-mode-syntax-table)
   (make-local-variable 'paragraph-start)
   (setq paragraph-start (concat "$\\|" page-delimiter))
--- a/lisp/progmodes/perl-mode.el	Sun Feb 22 17:34:42 1998 +0000
+++ b/lisp/progmodes/perl-mode.el	Sun Feb 22 19:51:45 1998 +0000
@@ -99,6 +99,11 @@
 
 ;;; Code:
 
+(defgroup perl nil
+  "Major mode for editing Perl code."
+  :prefix "perl-"
+  :group 'languages)
+
 (defvar perl-mode-abbrev-table nil
   "Abbrev table in use in perl-mode buffers.")
 (define-abbrev-table 'perl-mode-abbrev-table ())
@@ -218,35 +223,53 @@
   "Default expressions to highlight in Perl mode.")
 
 
-(defvar perl-indent-level 4
-  "*Indentation of Perl statements with respect to containing block.")
-(defvar perl-continued-statement-offset 4
-  "*Extra indent for lines not starting new statements.")
-(defvar perl-continued-brace-offset -4
+(defcustom perl-indent-level 4
+  "*Indentation of Perl statements with respect to containing block."
+  :type 'integer
+  :group 'perl)
+(defcustom perl-continued-statement-offset 4
+  "*Extra indent for lines not starting new statements."
+  :type 'integer
+  :group 'perl)
+(defcustom perl-continued-brace-offset -4
   "*Extra indent for substatements that start with open-braces.
-This is in addition to `perl-continued-statement-offset'.")
-(defvar perl-brace-offset 0
-  "*Extra indentation for braces, compared with other text in same context.")
-(defvar perl-brace-imaginary-offset 0
-  "*Imagined indentation of an open brace that actually follows a statement.")
-(defvar perl-label-offset -2
-  "*Offset of Perl label lines relative to usual indentation.")
+This is in addition to `perl-continued-statement-offset'."
+  :type 'integer
+  :group 'perl)
+(defcustom perl-brace-offset 0
+  "*Extra indentation for braces, compared with other text in same context."
+  :type 'integer
+  :group 'perl)
+(defcustom perl-brace-imaginary-offset 0
+  "*Imagined indentation of an open brace that actually follows a statement."
+  :type 'integer
+  :group 'perl)
+(defcustom perl-label-offset -2
+  "*Offset of Perl label lines relative to usual indentation."
+  :type 'integer
+  :group 'perl)
 
-(defvar perl-tab-always-indent t
+(defcustom perl-tab-always-indent t
   "*Non-nil means TAB in Perl mode always indents the current line.
 Otherwise it inserts a tab character if you type it past the first
-nonwhite character on the line.")
+nonwhite character on the line."
+  :type 'boolean
+  :group 'perl)
 
 ;; I changed the default to nil for consistency with general Emacs
 ;; conventions -- rms.
-(defvar perl-tab-to-comment nil
+(defcustom perl-tab-to-comment nil
   "*Non-nil means TAB moves to eol or makes a comment in some cases.
 For lines which don't need indenting, TAB either indents an
 existing comment, moves to end-of-line, or if at end-of-line already,
-create a new comment.")
+create a new comment."
+  :type 'boolean
+  :group 'perl)
 
-(defvar perl-nochange ";?#\\|\f\\|\\s(\\|\\(\\w\\|\\s_\\)+:"
-  "*Lines starting with this regular expression are not auto-indented.")
+(defcustom perl-nochange ";?#\\|\f\\|\\s(\\|\\(\\w\\|\\s_\\)+:"
+  "*Lines starting with this regular expression are not auto-indented."
+  :type 'regexp
+  :group 'perl)
 
 (defun perl-mode ()
   "Major mode for editing Perl code.
--- a/lisp/progmodes/simula.el	Sun Feb 22 17:34:42 1998 +0000
+++ b/lisp/progmodes/simula.el	Sun Feb 22 19:51:45 1998 +0000
@@ -37,27 +37,39 @@
 ;;; Code:
 
 
+(defgroup simula nil
+  "Major mode for editing Simula code."
+  :prefix "simula-"
+  :group 'languages)
+
 (defconst simula-tab-always-indent-default nil
   "Non-nil means TAB in SIMULA mode should always reindent the current line.
 Otherwise TAB indents only when point is within
 the run of whitespace at the beginning of the line.")
 
-(defvar simula-tab-always-indent simula-tab-always-indent-default
+(defcustom simula-tab-always-indent simula-tab-always-indent-default
   "*Non-nil means TAB in SIMULA mode should always reindent the current line.
 Otherwise TAB indents only when point is within
-the run of whitespace at the beginning of the line.")
+the run of whitespace at the beginning of the line."
+  :type 'boolean
+  :group 'simula)
 
 (defconst simula-indent-level-default 3
   "Indentation of SIMULA statements with respect to containing block.")
 
-(defvar simula-indent-level simula-indent-level-default
-  "*Indentation of SIMULA statements with respect to containing block.")
+(defcustom simula-indent-level simula-indent-level-default
+  "*Indentation of SIMULA statements with respect to containing block."
+  :type 'integer
+  :group 'simula)
+
 
 (defconst simula-substatement-offset-default 3
   "Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE.")
 
-(defvar simula-substatement-offset simula-substatement-offset-default
-  "*Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE.")
+(defcustom simula-substatement-offset simula-substatement-offset-default
+  "*Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE."
+  :type 'integer
+  :group 'simula)
 
 (defconst simula-continued-statement-offset-default 3
   "Extra indentation for lines not starting a statement or substatement.
@@ -65,69 +77,87 @@
 will have the car of the list extra indentation with respect to
 the previous line of the statement.")
 
-(defvar simula-continued-statement-offset simula-continued-statement-offset-default
+(defcustom simula-continued-statement-offset 
+  simula-continued-statement-offset-default
   "*Extra indentation for lines not starting a statement or substatement.
 If value is a list, each line in a multipleline continued statement
 will have the car of the list extra indentation with respect to
-the previous line of the statement.")
+the previous line of the statement."
+  :type 'integer
+  :group 'simula)
 
 (defconst simula-label-offset-default -4711
   "Offset of SIMULA label lines relative to usual indentation.")
 
-(defvar simula-label-offset simula-label-offset-default
-  "*Offset of SIMULA label lines relative to usual indentation.")
+(defcustom simula-label-offset simula-label-offset-default
+  "*Offset of SIMULA label lines relative to usual indentation."
+  :type 'integer
+  :group 'simula)
 
 (defconst simula-if-indent-default '(0 . 0)
   "Extra indentation of THEN and ELSE with respect to the starting IF.
 Value is a cons cell, the car is extra THEN indentation and the cdr
 extra ELSE indentation.  IF after ELSE is indented as the starting IF.")
 
-(defvar simula-if-indent simula-if-indent-default
+(defcustom simula-if-indent simula-if-indent-default
   "*Extra indentation of THEN and ELSE with respect to the starting IF.
 Value is a cons cell, the car is extra THEN indentation and the cdr
-extra ELSE indentation.  IF after ELSE is indented as the starting IF.")
+extra ELSE indentation.  IF after ELSE is indented as the starting IF."
+  :type '(cons integer integer)
+  :group 'simula)
 
 (defconst simula-inspect-indent-default '(0 . 0)
   "Extra indentation of WHEN and OTHERWISE with respect to the INSPECT.
 Value is a cons cell, the car is extra WHEN indentation
 and the cdr extra OTHERWISE indentation.")
 
-(defvar simula-inspect-indent simula-inspect-indent-default
+(defcustom simula-inspect-indent simula-inspect-indent-default
   "*Extra indentation of WHEN and OTHERWISE with respect to the INSPECT.
 Value is a cons cell, the car is extra WHEN indentation
-and the cdr extra OTHERWISE indentation.")
+and the cdr extra OTHERWISE indentation."
+  :type '(cons integer integer)
+  :group 'simula)
 
 (defconst simula-electric-indent-default nil
   "Non-nil means `simula-indent-line' function may reindent previous line.")
 
-(defvar simula-electric-indent simula-electric-indent-default
-  "*Non-nil means `simula-indent-line' function may reindent previous line.")
+(defcustom simula-electric-indent simula-electric-indent-default
+  "*Non-nil means `simula-indent-line' function may reindent previous line."
+  :type 'boolean
+  :group 'simula)
 
 (defconst simula-abbrev-keyword-default 'upcase
   "Specify how to convert case for SIMULA keywords.
 Value is one of the symbols `upcase', `downcase', `capitalize',
 (as in) `abbrev-table' or nil if they should not be changed.")
 
-(defvar simula-abbrev-keyword simula-abbrev-keyword-default
+(defcustom simula-abbrev-keyword simula-abbrev-keyword-default
   "*Specify how to convert case for SIMULA keywords.
 Value is one of the symbols `upcase', `downcase', `capitalize',
-(as in) `abbrev-table' or nil if they should not be changed.")
+(as in) `abbrev-table' or nil if they should not be changed."
+  :type '(choice (const upcase) (const downcase) (const capitalize)(const nil))
+  :group 'simula)
 
 (defconst simula-abbrev-stdproc-default 'abbrev-table
   "Specify how to convert case for standard SIMULA procedure and class names.
 Value is one of the symbols `upcase', `downcase', `capitalize',
 (as in) `abbrev-table', or nil if they should not be changed.")
 
-(defvar simula-abbrev-stdproc simula-abbrev-stdproc-default
+(defcustom simula-abbrev-stdproc simula-abbrev-stdproc-default
   "*Specify how to convert case for standard SIMULA procedure and class names.
 Value is one of the symbols `upcase', `downcase', `capitalize',
-(as in) `abbrev-table', or nil if they should not be changed.")
+(as in) `abbrev-table', or nil if they should not be changed."
+  :type '(choice (const upcase) (const downcase) (const capitalize)
+(const abbrev-table) (const nil))
+  :group 'simula)
 
-(defvar simula-abbrev-file nil
+(defcustom simula-abbrev-file nil
   "*File with extra abbrev definitions for use in SIMULA mode.
 These are used together with the standard abbrev definitions for SIMULA.
 Please note that the standard definitions are required
-for SIMULA mode to function correctly.")
+for SIMULA mode to function correctly."
+  :type '(choice file (const nil))
+  :group 'simula)
 
 (defvar simula-mode-syntax-table nil
   "Syntax table in SIMULA mode buffers.")