summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-04-15 23:38:27 +0000
committerRichard M. Stallman <rms@gnu.org>1997-04-15 23:38:27 +0000
commit94be4ae7df28cb84bb0581d6236e5864e0ec72ee (patch)
treef430624d937c7c9ec71ae17a1336e4a8bfc41825
parente2e0a9d448bd545e167d27b82165eef1150dcdac (diff)
downloademacs-94be4ae7df28cb84bb0581d6236e5864e0ec72ee.tar.gz
Add defgroup; use defcustom for user vars.
-rw-r--r--lisp/progmodes/pascal.el99
1 files changed, 65 insertions, 34 deletions
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index e9bd779718e..bb1881cac35 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -1,6 +1,6 @@
;;; pascal.el --- major mode for editing pascal source in Emacs
-;; Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
;; Author: Espen Skoglund (espensk@stud.cs.uit.no)
;; Keywords: languages
@@ -60,6 +60,10 @@
;;; Code:
+(defgroup pascal nil
+ "Major mode for editing Pascal source in Emacs"
+ :group 'languages)
+
(defvar pascal-mode-abbrev-table nil
"Abbrev table in use in Pascal-mode buffers.")
(define-abbrev-table 'pascal-mode-abbrev-table ())
@@ -170,58 +174,85 @@
(1 font-lock-keyword-face) (2 font-lock-reference-face nil t)))
"Additional expressions to highlight in Pascal mode.")
-(defvar pascal-indent-level 3
- "*Indentation of Pascal statements with respect to containing block.")
-
-(defvar pascal-case-indent 2
- "*Indentation for case statements.")
-
-(defvar pascal-auto-newline nil
- "*Non-nil means automatically newline after semicolons and the punctuation
-mark after an end.")
-
-(defvar pascal-tab-always-indent t
- "*Non-nil means TAB in Pascal mode should always reindent the current line,
-regardless of where in the line point is when the TAB command is used.")
-
-(defvar pascal-auto-endcomments t
- "*Non-nil means a comment { ... } is set after the ends which ends cases and
-functions. The name of the function or case will be set between the braces.")
-
-(defvar pascal-auto-lineup '(all)
+(defcustom pascal-indent-level 3
+ "*Indentation of Pascal statements with respect to containing block."
+ :type 'integer
+ :group 'pascal)
+
+(defcustom pascal-case-indent 2
+ "*Indentation for case statements."
+ :type 'integer
+ :group 'pascal)
+
+(defcustom pascal-auto-newline nil
+ "*Non-nil means automatically insert newlines in certain cases.
+These include after semicolons and after the punctuation mark after an `end'."
+ :type 'boolean
+ :group 'pascal)
+
+(defcustom pascal-tab-always-indent t
+ "*Non-nil means TAB in Pascal mode should always reindent the current line.
+If this is nil, TAB inserts a tab if it is at the end of the line
+and follows non-whitespace text."
+ :type 'boolean
+ :group 'pascal)
+
+(defcustom pascal-auto-endcomments t
+ "*Non-nil means automatically insert comments after certain `end's.
+Specifically, this is done after the ends of cases statements and functions.
+The name of the function or case is included between the braces."
+ :type 'boolean
+ :group 'pascal)
+
+(defcustom pascal-auto-lineup '(all)
"*List of contexts where auto lineup of :'s or ='s should be done.
Elements can be of type: 'paramlist', 'declaration' or 'case', which will
do auto lineup in parameterlist, declarations or case-statements
respectively. The word 'all' will do all lineups. '(case paramlist) for
instance will do lineup in case-statements and parameterlist, while '(all)
-will do all lineups.")
-
-(defvar pascal-toggle-completions nil
+will do all lineups."
+ :type '(repeat (choice (const all)
+ (const paramlist)
+ (const declaration)
+ (const case)))
+ :group 'pascal)
+
+(defcustom pascal-toggle-completions nil
"*Non-nil means \\<pascal-mode-map>\\[pascal-complete-word] should try all possible completions one by one.
Repeated use of \\[pascal-complete-word] will show you all of them.
Normally, when there is more than one possible completion,
-it displays a list of all possible completions.")
+it displays a list of all possible completions."
+ :type 'boolean
+ :group 'pascal)
-(defvar pascal-type-keywords
+(defcustom pascal-type-keywords
'("array" "file" "packed" "char" "integer" "real" "string" "record")
"*Keywords for types used when completing a word in a declaration or parmlist.
-\(eg. integer, real, char.) The types defined within the Pascal program
-will be completed runtime, and should not be added to this list.")
+These include integer, real, char, etc.
+The types defined within the Pascal program
+are handled in another way, and should not be added to this list."
+ :type '(repeat (string :tag "Keyword"))
+ :group 'pascal)
-(defvar pascal-start-keywords
+(defcustom pascal-start-keywords
'("begin" "end" "function" "procedure" "repeat" "until" "while"
"read" "readln" "reset" "rewrite" "write" "writeln")
"*Keywords to complete when standing at the first word of a statement.
-\(eg. begin, repeat, until, readln.)
+These are keywords such as begin, repeat, until, readln.
The procedures and variables defined within the Pascal program
-will be completed runtime and should not be added to this list.")
+are handled in another way, and should not be added to this list."
+ :type '(repeat (string :tag "Keyword"))
+ :group 'pascal)
-(defvar pascal-separator-keywords
+(defcustom pascal-separator-keywords
'("downto" "else" "mod" "div" "then")
"*Keywords to complete when NOT standing at the first word of a statement.
-\(eg. downto, else, mod, then.)
-Variables and function names defined within the
-Pascal program are completed runtime and should not be added to this list.")
+These are keywords such as downto, else, mod, then.
+Variables and function names defined within the Pascal program
+are handled in another way, and should not be added to this list."
+ :type '(repeat (string :tag "Keyword"))
+ :group 'pascal)
+
;;;
;;; Macros