Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
5636765c
Commit
5636765c
authored
Feb 22, 1998
by
Stephen Eglen
Browse files
Customized.
parent
d1ebc62e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
120 additions
and
52 deletions
+120
-52
lisp/progmodes/modula2.el
lisp/progmodes/modula2.el
+25
-10
lisp/progmodes/perl-mode.el
lisp/progmodes/perl-mode.el
+43
-20
lisp/progmodes/simula.el
lisp/progmodes/simula.el
+52
-22
No files found.
lisp/progmodes/modula2.el
View file @
5636765c
...
...
@@ -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 @@ followed by the first character of the construct.
(
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
))
...
...
lisp/progmodes/perl-mode.el
View file @
5636765c
...
...
@@ -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 @@ The expansion is entirely correct because it uses the C preprocessor."
"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."
)
(
defvar
perl-tab-always-indent
t
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
)
(
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.
(
def
var
perl-tab-to-comment
nil
(
def
custom
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."
)
(
defvar
perl-nochange
";?#\\|\f\\|\\s(\\|\\(\\w\\|\\s_\\)+:"
"*Lines starting with this regular expression are not auto-indented."
)
create a new comment."
:type
'boolean
:group
'perl
)
(
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.
...
...
lisp/progmodes/simula.el
View file @
5636765c
...
...
@@ -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."
)
(
def
var
simula-tab-always-indent
simula-tab-always-indent-default
(
def
custom
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 @@ 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."
)
(
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."
)
(
def
var
simula-if-indent
simula-if-indent-default
(
def
custom
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."
)
(
def
var
simula-inspect-indent
simula-inspect-indent-default
(
def
custom
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."
)
(
def
var
simula-abbrev-keyword
simula-abbrev-keyword-default
(
def
custom
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."
)
(
def
var
simula-abbrev-stdproc
simula-abbrev-stdproc-default
(
def
custom
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
)
(
def
var
simula-abbrev-file
nil
(
def
custom
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."
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment