Mercurial > emacs
comparison lisp/progmodes/perl-mode.el @ 20960:2f9b7d0689a9
Customized.
author | Stephen Eglen <stephen@gnu.org> |
---|---|
date | Sun, 22 Feb 1998 19:51:45 +0000 |
parents | f3f9df46d008 |
children | a22711be4750 |
comparison
equal
deleted
inserted
replaced
20959:9b831f34ff7d | 20960:2f9b7d0689a9 |
---|---|
96 ;; $DB'stop#' | 96 ;; $DB'stop#' |
97 ;; [$DB'line#' | 97 ;; [$DB'line#' |
98 ;; ] =~ s/;9$//; | 98 ;; ] =~ s/;9$//; |
99 | 99 |
100 ;;; Code: | 100 ;;; Code: |
101 | |
102 (defgroup perl nil | |
103 "Major mode for editing Perl code." | |
104 :prefix "perl-" | |
105 :group 'languages) | |
101 | 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 ()) |
105 | 110 |
216 | 221 |
217 (defvar perl-font-lock-keywords perl-font-lock-keywords-1 | 222 (defvar perl-font-lock-keywords perl-font-lock-keywords-1 |
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. |
253 Expression and list commands understand all Perl brackets. | 276 Expression and list commands understand all Perl brackets. |
254 Tab indents for Perl code. | 277 Tab indents for Perl code. |