diff options
| author | Stephen Eglen | 1998-02-22 19:51:45 +0000 |
|---|---|---|
| committer | Stephen Eglen | 1998-02-22 19:51:45 +0000 |
| commit | 5636765c529be5dfbdc3aed7ecd4c0a9f58b8eb7 (patch) | |
| tree | 1bbac28b43b0ad9ef5d0e0b2c3cc83de2139af43 | |
| parent | d1ebc62e6ca3ab4d6f714326ed8ae2c626d30bf1 (diff) | |
| download | emacs-5636765c529be5dfbdc3aed7ecd4c0a9f58b8eb7.tar.gz emacs-5636765c529be5dfbdc3aed7ecd4c0a9f58b8eb7.zip | |
Customized.
| -rw-r--r-- | lisp/progmodes/modula2.el | 35 | ||||
| -rw-r--r-- | lisp/progmodes/perl-mode.el | 63 | ||||
| -rw-r--r-- | lisp/progmodes/simula.el | 74 |
3 files changed, 120 insertions, 52 deletions
diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el index da67a7850a4..3c4ee33ebe0 100644 --- a/lisp/progmodes/modula2.el +++ b/lisp/progmodes/modula2.el | |||
| @@ -20,21 +20,34 @@ | |||
| 20 | 20 | ||
| 21 | ;;; Code: | 21 | ;;; Code: |
| 22 | 22 | ||
| 23 | (defgroup modula2 nil | ||
| 24 | "Major mode for editing Modula-2 code." | ||
| 25 | :prefix "m2-" | ||
| 26 | :group 'languages) | ||
| 27 | |||
| 23 | ;;; Added by Tom Perrine (TEP) | 28 | ;;; Added by Tom Perrine (TEP) |
| 24 | (defvar m2-mode-syntax-table nil | 29 | (defvar m2-mode-syntax-table nil |
| 25 | "Syntax table in use in Modula-2 buffers.") | 30 | "Syntax table in use in Modula-2 buffers.") |
| 26 | 31 | ||
| 27 | (defvar m2-compile-command "m2c" | 32 | (defcustom m2-compile-command "m2c" |
| 28 | "Command to compile Modula-2 programs") | 33 | "Command to compile Modula-2 programs." |
| 34 | :type 'string | ||
| 35 | :group 'modula2) | ||
| 29 | 36 | ||
| 30 | (defvar m2-link-command "m2l" | 37 | (defcustom m2-link-command "m2l" |
| 31 | "Command to link Modula-2 programs") | 38 | "Command to link Modula-2 programs." |
| 39 | :type 'string | ||
| 40 | :group 'modula2) | ||
| 32 | 41 | ||
| 33 | (defvar m2-link-name nil | 42 | (defcustom m2-link-name nil |
| 34 | "Name of the executable.") | 43 | "Name of the Modula-2 executable." |
| 44 | :type '(choice (const nil) string) | ||
| 45 | :group 'modula2) | ||
| 35 | 46 | ||
| 36 | (defvar m2-end-comment-column nil | 47 | (defcustom m2-end-comment-column 75 |
| 37 | "*Column for aligning the end of a comment, in Modula-2.") | 48 | "*Column for aligning the end of a comment, in Modula-2." |
| 49 | :type 'integer | ||
| 50 | :group 'modula2) | ||
| 38 | 51 | ||
| 39 | (if m2-mode-syntax-table | 52 | (if m2-mode-syntax-table |
| 40 | () | 53 | () |
| @@ -89,7 +102,10 @@ | |||
| 89 | (define-key map "\C-c\C-c" 'm2-compile) | 102 | (define-key map "\C-c\C-c" 'm2-compile) |
| 90 | (setq m2-mode-map map))) | 103 | (setq m2-mode-map map))) |
| 91 | 104 | ||
| 92 | (defvar m2-indent 5 "*This variable gives the indentation in Modula-2-Mode") | 105 | (defcustom m2-indent 5 |
| 106 | "*This variable gives the indentation in Modula-2-Mode." | ||
| 107 | :type 'integer | ||
| 108 | :group 'modula2) | ||
| 93 | 109 | ||
| 94 | ;;;###autoload | 110 | ;;;###autoload |
| 95 | (defun modula-2-mode () | 111 | (defun modula-2-mode () |
| @@ -123,7 +139,6 @@ followed by the first character of the construct. | |||
| 123 | (make-local-variable 'comment-column) | 139 | (make-local-variable 'comment-column) |
| 124 | (setq comment-column 41) | 140 | (setq comment-column 41) |
| 125 | (make-local-variable 'm2-end-comment-column) | 141 | (make-local-variable 'm2-end-comment-column) |
| 126 | (setq m2-end-comment-column 75) | ||
| 127 | (set-syntax-table m2-mode-syntax-table) | 142 | (set-syntax-table m2-mode-syntax-table) |
| 128 | (make-local-variable 'paragraph-start) | 143 | (make-local-variable 'paragraph-start) |
| 129 | (setq paragraph-start (concat "$\\|" page-delimiter)) | 144 | (setq paragraph-start (concat "$\\|" page-delimiter)) |
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index b0b5a74cbea..1cfc44399c4 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el | |||
| @@ -99,6 +99,11 @@ | |||
| 99 | 99 | ||
| 100 | ;;; Code: | 100 | ;;; Code: |
| 101 | 101 | ||
| 102 | (defgroup perl nil | ||
| 103 | "Major mode for editing Perl code." | ||
| 104 | :prefix "perl-" | ||
| 105 | :group 'languages) | ||
| 106 | |||
| 102 | (defvar perl-mode-abbrev-table nil | 107 | (defvar perl-mode-abbrev-table nil |
| 103 | "Abbrev table in use in perl-mode buffers.") | 108 | "Abbrev table in use in perl-mode buffers.") |
| 104 | (define-abbrev-table 'perl-mode-abbrev-table ()) | 109 | (define-abbrev-table 'perl-mode-abbrev-table ()) |
| @@ -218,35 +223,53 @@ The expansion is entirely correct because it uses the C preprocessor." | |||
| 218 | "Default expressions to highlight in Perl mode.") | 223 | "Default expressions to highlight in Perl mode.") |
| 219 | 224 | ||
| 220 | 225 | ||
| 221 | (defvar perl-indent-level 4 | 226 | (defcustom perl-indent-level 4 |
| 222 | "*Indentation of Perl statements with respect to containing block.") | 227 | "*Indentation of Perl statements with respect to containing block." |
| 223 | (defvar perl-continued-statement-offset 4 | 228 | :type 'integer |
| 224 | "*Extra indent for lines not starting new statements.") | 229 | :group 'perl) |
| 225 | (defvar perl-continued-brace-offset -4 | 230 | (defcustom perl-continued-statement-offset 4 |
| 231 | "*Extra indent for lines not starting new statements." | ||
| 232 | :type 'integer | ||
| 233 | :group 'perl) | ||
| 234 | (defcustom perl-continued-brace-offset -4 | ||
| 226 | "*Extra indent for substatements that start with open-braces. | 235 | "*Extra indent for substatements that start with open-braces. |
| 227 | This is in addition to `perl-continued-statement-offset'.") | 236 | This is in addition to `perl-continued-statement-offset'." |
| 228 | (defvar perl-brace-offset 0 | 237 | :type 'integer |
| 229 | "*Extra indentation for braces, compared with other text in same context.") | 238 | :group 'perl) |
| 230 | (defvar perl-brace-imaginary-offset 0 | 239 | (defcustom perl-brace-offset 0 |
| 231 | "*Imagined indentation of an open brace that actually follows a statement.") | 240 | "*Extra indentation for braces, compared with other text in same context." |
| 232 | (defvar perl-label-offset -2 | 241 | :type 'integer |
| 233 | "*Offset of Perl label lines relative to usual indentation.") | 242 | :group 'perl) |
| 234 | 243 | (defcustom perl-brace-imaginary-offset 0 | |
| 235 | (defvar perl-tab-always-indent t | 244 | "*Imagined indentation of an open brace that actually follows a statement." |
| 245 | :type 'integer | ||
| 246 | :group 'perl) | ||
| 247 | (defcustom perl-label-offset -2 | ||
| 248 | "*Offset of Perl label lines relative to usual indentation." | ||
| 249 | :type 'integer | ||
| 250 | :group 'perl) | ||
| 251 | |||
| 252 | (defcustom perl-tab-always-indent t | ||
| 236 | "*Non-nil means TAB in Perl mode always indents the current line. | 253 | "*Non-nil means TAB in Perl mode always indents the current line. |
| 237 | Otherwise it inserts a tab character if you type it past the first | 254 | Otherwise it inserts a tab character if you type it past the first |
| 238 | nonwhite character on the line.") | 255 | nonwhite character on the line." |
| 256 | :type 'boolean | ||
| 257 | :group 'perl) | ||
| 239 | 258 | ||
| 240 | ;; I changed the default to nil for consistency with general Emacs | 259 | ;; I changed the default to nil for consistency with general Emacs |
| 241 | ;; conventions -- rms. | 260 | ;; conventions -- rms. |
| 242 | (defvar perl-tab-to-comment nil | 261 | (defcustom perl-tab-to-comment nil |
| 243 | "*Non-nil means TAB moves to eol or makes a comment in some cases. | 262 | "*Non-nil means TAB moves to eol or makes a comment in some cases. |
| 244 | For lines which don't need indenting, TAB either indents an | 263 | For lines which don't need indenting, TAB either indents an |
| 245 | existing comment, moves to end-of-line, or if at end-of-line already, | 264 | existing comment, moves to end-of-line, or if at end-of-line already, |
| 246 | create a new comment.") | 265 | create a new comment." |
| 247 | 266 | :type 'boolean | |
| 248 | (defvar perl-nochange ";?#\\|\f\\|\\s(\\|\\(\\w\\|\\s_\\)+:" | 267 | :group 'perl) |
| 249 | "*Lines starting with this regular expression are not auto-indented.") | 268 | |
| 269 | (defcustom perl-nochange ";?#\\|\f\\|\\s(\\|\\(\\w\\|\\s_\\)+:" | ||
| 270 | "*Lines starting with this regular expression are not auto-indented." | ||
| 271 | :type 'regexp | ||
| 272 | :group 'perl) | ||
| 250 | 273 | ||
| 251 | (defun perl-mode () | 274 | (defun perl-mode () |
| 252 | "Major mode for editing Perl code. | 275 | "Major mode for editing Perl code. |
diff --git a/lisp/progmodes/simula.el b/lisp/progmodes/simula.el index 33817300b1e..9ea3d52836c 100644 --- a/lisp/progmodes/simula.el +++ b/lisp/progmodes/simula.el | |||
| @@ -37,27 +37,39 @@ | |||
| 37 | ;;; Code: | 37 | ;;; Code: |
| 38 | 38 | ||
| 39 | 39 | ||
| 40 | (defgroup simula nil | ||
| 41 | "Major mode for editing Simula code." | ||
| 42 | :prefix "simula-" | ||
| 43 | :group 'languages) | ||
| 44 | |||
| 40 | (defconst simula-tab-always-indent-default nil | 45 | (defconst simula-tab-always-indent-default nil |
| 41 | "Non-nil means TAB in SIMULA mode should always reindent the current line. | 46 | "Non-nil means TAB in SIMULA mode should always reindent the current line. |
| 42 | Otherwise TAB indents only when point is within | 47 | Otherwise TAB indents only when point is within |
| 43 | the run of whitespace at the beginning of the line.") | 48 | the run of whitespace at the beginning of the line.") |
| 44 | 49 | ||
| 45 | (defvar simula-tab-always-indent simula-tab-always-indent-default | 50 | (defcustom simula-tab-always-indent simula-tab-always-indent-default |
| 46 | "*Non-nil means TAB in SIMULA mode should always reindent the current line. | 51 | "*Non-nil means TAB in SIMULA mode should always reindent the current line. |
| 47 | Otherwise TAB indents only when point is within | 52 | Otherwise TAB indents only when point is within |
| 48 | the run of whitespace at the beginning of the line.") | 53 | the run of whitespace at the beginning of the line." |
| 54 | :type 'boolean | ||
| 55 | :group 'simula) | ||
| 49 | 56 | ||
| 50 | (defconst simula-indent-level-default 3 | 57 | (defconst simula-indent-level-default 3 |
| 51 | "Indentation of SIMULA statements with respect to containing block.") | 58 | "Indentation of SIMULA statements with respect to containing block.") |
| 52 | 59 | ||
| 53 | (defvar simula-indent-level simula-indent-level-default | 60 | (defcustom simula-indent-level simula-indent-level-default |
| 54 | "*Indentation of SIMULA statements with respect to containing block.") | 61 | "*Indentation of SIMULA statements with respect to containing block." |
| 62 | :type 'integer | ||
| 63 | :group 'simula) | ||
| 64 | |||
| 55 | 65 | ||
| 56 | (defconst simula-substatement-offset-default 3 | 66 | (defconst simula-substatement-offset-default 3 |
| 57 | "Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE.") | 67 | "Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE.") |
| 58 | 68 | ||
| 59 | (defvar simula-substatement-offset simula-substatement-offset-default | 69 | (defcustom simula-substatement-offset simula-substatement-offset-default |
| 60 | "*Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE.") | 70 | "*Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE." |
| 71 | :type 'integer | ||
| 72 | :group 'simula) | ||
| 61 | 73 | ||
| 62 | (defconst simula-continued-statement-offset-default 3 | 74 | (defconst simula-continued-statement-offset-default 3 |
| 63 | "Extra indentation for lines not starting a statement or substatement. | 75 | "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 | |||
| 65 | will have the car of the list extra indentation with respect to | 77 | will have the car of the list extra indentation with respect to |
| 66 | the previous line of the statement.") | 78 | the previous line of the statement.") |
| 67 | 79 | ||
| 68 | (defvar simula-continued-statement-offset simula-continued-statement-offset-default | 80 | (defcustom simula-continued-statement-offset |
| 81 | simula-continued-statement-offset-default | ||
| 69 | "*Extra indentation for lines not starting a statement or substatement. | 82 | "*Extra indentation for lines not starting a statement or substatement. |
| 70 | If value is a list, each line in a multipleline continued statement | 83 | If value is a list, each line in a multipleline continued statement |
| 71 | will have the car of the list extra indentation with respect to | 84 | will have the car of the list extra indentation with respect to |
| 72 | the previous line of the statement.") | 85 | the previous line of the statement." |
| 86 | :type 'integer | ||
| 87 | :group 'simula) | ||
| 73 | 88 | ||
| 74 | (defconst simula-label-offset-default -4711 | 89 | (defconst simula-label-offset-default -4711 |
| 75 | "Offset of SIMULA label lines relative to usual indentation.") | 90 | "Offset of SIMULA label lines relative to usual indentation.") |
| 76 | 91 | ||
| 77 | (defvar simula-label-offset simula-label-offset-default | 92 | (defcustom simula-label-offset simula-label-offset-default |
| 78 | "*Offset of SIMULA label lines relative to usual indentation.") | 93 | "*Offset of SIMULA label lines relative to usual indentation." |
| 94 | :type 'integer | ||
| 95 | :group 'simula) | ||
| 79 | 96 | ||
| 80 | (defconst simula-if-indent-default '(0 . 0) | 97 | (defconst simula-if-indent-default '(0 . 0) |
| 81 | "Extra indentation of THEN and ELSE with respect to the starting IF. | 98 | "Extra indentation of THEN and ELSE with respect to the starting IF. |
| 82 | Value is a cons cell, the car is extra THEN indentation and the cdr | 99 | Value is a cons cell, the car is extra THEN indentation and the cdr |
| 83 | extra ELSE indentation. IF after ELSE is indented as the starting IF.") | 100 | extra ELSE indentation. IF after ELSE is indented as the starting IF.") |
| 84 | 101 | ||
| 85 | (defvar simula-if-indent simula-if-indent-default | 102 | (defcustom simula-if-indent simula-if-indent-default |
| 86 | "*Extra indentation of THEN and ELSE with respect to the starting IF. | 103 | "*Extra indentation of THEN and ELSE with respect to the starting IF. |
| 87 | Value is a cons cell, the car is extra THEN indentation and the cdr | 104 | Value is a cons cell, the car is extra THEN indentation and the cdr |
| 88 | extra ELSE indentation. IF after ELSE is indented as the starting IF.") | 105 | extra ELSE indentation. IF after ELSE is indented as the starting IF." |
| 106 | :type '(cons integer integer) | ||
| 107 | :group 'simula) | ||
| 89 | 108 | ||
| 90 | (defconst simula-inspect-indent-default '(0 . 0) | 109 | (defconst simula-inspect-indent-default '(0 . 0) |
| 91 | "Extra indentation of WHEN and OTHERWISE with respect to the INSPECT. | 110 | "Extra indentation of WHEN and OTHERWISE with respect to the INSPECT. |
| 92 | Value is a cons cell, the car is extra WHEN indentation | 111 | Value is a cons cell, the car is extra WHEN indentation |
| 93 | and the cdr extra OTHERWISE indentation.") | 112 | and the cdr extra OTHERWISE indentation.") |
| 94 | 113 | ||
| 95 | (defvar simula-inspect-indent simula-inspect-indent-default | 114 | (defcustom simula-inspect-indent simula-inspect-indent-default |
| 96 | "*Extra indentation of WHEN and OTHERWISE with respect to the INSPECT. | 115 | "*Extra indentation of WHEN and OTHERWISE with respect to the INSPECT. |
| 97 | Value is a cons cell, the car is extra WHEN indentation | 116 | Value is a cons cell, the car is extra WHEN indentation |
| 98 | and the cdr extra OTHERWISE indentation.") | 117 | and the cdr extra OTHERWISE indentation." |
| 118 | :type '(cons integer integer) | ||
| 119 | :group 'simula) | ||
| 99 | 120 | ||
| 100 | (defconst simula-electric-indent-default nil | 121 | (defconst simula-electric-indent-default nil |
| 101 | "Non-nil means `simula-indent-line' function may reindent previous line.") | 122 | "Non-nil means `simula-indent-line' function may reindent previous line.") |
| 102 | 123 | ||
| 103 | (defvar simula-electric-indent simula-electric-indent-default | 124 | (defcustom simula-electric-indent simula-electric-indent-default |
| 104 | "*Non-nil means `simula-indent-line' function may reindent previous line.") | 125 | "*Non-nil means `simula-indent-line' function may reindent previous line." |
| 126 | :type 'boolean | ||
| 127 | :group 'simula) | ||
| 105 | 128 | ||
| 106 | (defconst simula-abbrev-keyword-default 'upcase | 129 | (defconst simula-abbrev-keyword-default 'upcase |
| 107 | "Specify how to convert case for SIMULA keywords. | 130 | "Specify how to convert case for SIMULA keywords. |
| 108 | Value is one of the symbols `upcase', `downcase', `capitalize', | 131 | Value is one of the symbols `upcase', `downcase', `capitalize', |
| 109 | (as in) `abbrev-table' or nil if they should not be changed.") | 132 | (as in) `abbrev-table' or nil if they should not be changed.") |
| 110 | 133 | ||
| 111 | (defvar simula-abbrev-keyword simula-abbrev-keyword-default | 134 | (defcustom simula-abbrev-keyword simula-abbrev-keyword-default |
| 112 | "*Specify how to convert case for SIMULA keywords. | 135 | "*Specify how to convert case for SIMULA keywords. |
| 113 | Value is one of the symbols `upcase', `downcase', `capitalize', | 136 | Value is one of the symbols `upcase', `downcase', `capitalize', |
| 114 | (as in) `abbrev-table' or nil if they should not be changed.") | 137 | (as in) `abbrev-table' or nil if they should not be changed." |
| 138 | :type '(choice (const upcase) (const downcase) (const capitalize)(const nil)) | ||
| 139 | :group 'simula) | ||
| 115 | 140 | ||
| 116 | (defconst simula-abbrev-stdproc-default 'abbrev-table | 141 | (defconst simula-abbrev-stdproc-default 'abbrev-table |
| 117 | "Specify how to convert case for standard SIMULA procedure and class names. | 142 | "Specify how to convert case for standard SIMULA procedure and class names. |
| 118 | Value is one of the symbols `upcase', `downcase', `capitalize', | 143 | Value is one of the symbols `upcase', `downcase', `capitalize', |
| 119 | (as in) `abbrev-table', or nil if they should not be changed.") | 144 | (as in) `abbrev-table', or nil if they should not be changed.") |
| 120 | 145 | ||
| 121 | (defvar simula-abbrev-stdproc simula-abbrev-stdproc-default | 146 | (defcustom simula-abbrev-stdproc simula-abbrev-stdproc-default |
| 122 | "*Specify how to convert case for standard SIMULA procedure and class names. | 147 | "*Specify how to convert case for standard SIMULA procedure and class names. |
| 123 | Value is one of the symbols `upcase', `downcase', `capitalize', | 148 | Value is one of the symbols `upcase', `downcase', `capitalize', |
| 124 | (as in) `abbrev-table', or nil if they should not be changed.") | 149 | (as in) `abbrev-table', or nil if they should not be changed." |
| 150 | :type '(choice (const upcase) (const downcase) (const capitalize) | ||
| 151 | (const abbrev-table) (const nil)) | ||
| 152 | :group 'simula) | ||
| 125 | 153 | ||
| 126 | (defvar simula-abbrev-file nil | 154 | (defcustom simula-abbrev-file nil |
| 127 | "*File with extra abbrev definitions for use in SIMULA mode. | 155 | "*File with extra abbrev definitions for use in SIMULA mode. |
| 128 | These are used together with the standard abbrev definitions for SIMULA. | 156 | These are used together with the standard abbrev definitions for SIMULA. |
| 129 | Please note that the standard definitions are required | 157 | Please note that the standard definitions are required |
| 130 | for SIMULA mode to function correctly.") | 158 | for SIMULA mode to function correctly." |
| 159 | :type '(choice file (const nil)) | ||
| 160 | :group 'simula) | ||
| 131 | 161 | ||
| 132 | (defvar simula-mode-syntax-table nil | 162 | (defvar simula-mode-syntax-table nil |
| 133 | "Syntax table in SIMULA mode buffers.") | 163 | "Syntax table in SIMULA mode buffers.") |