aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/perl-mode.el39
1 files changed, 15 insertions, 24 deletions
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index b5027ee3841..e01b32034b2 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -1,6 +1,6 @@
1;;; perl-mode.el --- Perl code editing commands for GNU Emacs 1;;; perl-mode.el --- Perl code editing commands for GNU Emacs
2 2
3;; Copyright (C) 1990, 1994 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1994, 2003 Free Software Foundation, Inc.
4 4
5;; Author: William F. Mann 5;; Author: William F. Mann
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -257,6 +257,7 @@ The expansion is entirely correct because it uses the C preprocessor."
257 ("\\$ ?{?^?[_a-zA-Z][_a-zA-Z0-9]*\\('\\)[_a-zA-Z]" (1 "_")) 257 ("\\$ ?{?^?[_a-zA-Z][_a-zA-Z0-9]*\\('\\)[_a-zA-Z]" (1 "_"))
258 ;; format statements 258 ;; format statements
259 ("^[ \t]*format.*=[ \t]*\\(\n\\)" (1 '(7))) 259 ("^[ \t]*format.*=[ \t]*\\(\n\\)" (1 '(7)))
260 ;; TODO: here-documents ("<<\\(\\sw\\|['\"]\\)")
260 ;; Funny things in sub arg specifications like `sub myfunc ($$)' 261 ;; Funny things in sub arg specifications like `sub myfunc ($$)'
261 ("\\<sub\\s-+\\S-+\\s-*(\\([^)]+\\))" 1 '(1)) 262 ("\\<sub\\s-+\\S-+\\s-*(\\([^)]+\\))" 1 '(1))
262 ;; regexp and funny quotes 263 ;; regexp and funny quotes
@@ -369,41 +370,33 @@ The expansion is entirely correct because it uses the C preprocessor."
369 370
370(defcustom perl-indent-level 4 371(defcustom perl-indent-level 4
371 "*Indentation of Perl statements with respect to containing block." 372 "*Indentation of Perl statements with respect to containing block."
372 :type 'integer 373 :type 'integer)
373 :group 'perl)
374(defcustom perl-continued-statement-offset 4 374(defcustom perl-continued-statement-offset 4
375 "*Extra indent for lines not starting new statements." 375 "*Extra indent for lines not starting new statements."
376 :type 'integer 376 :type 'integer)
377 :group 'perl)
378(defcustom perl-continued-brace-offset -4 377(defcustom perl-continued-brace-offset -4
379 "*Extra indent for substatements that start with open-braces. 378 "*Extra indent for substatements that start with open-braces.
380This is in addition to `perl-continued-statement-offset'." 379This is in addition to `perl-continued-statement-offset'."
381 :type 'integer 380 :type 'integer)
382 :group 'perl)
383(defcustom perl-brace-offset 0 381(defcustom perl-brace-offset 0
384 "*Extra indentation for braces, compared with other text in same context." 382 "*Extra indentation for braces, compared with other text in same context."
385 :type 'integer 383 :type 'integer)
386 :group 'perl)
387(defcustom perl-brace-imaginary-offset 0 384(defcustom perl-brace-imaginary-offset 0
388 "*Imagined indentation of an open brace that actually follows a statement." 385 "*Imagined indentation of an open brace that actually follows a statement."
389 :type 'integer 386 :type 'integer)
390 :group 'perl)
391(defcustom perl-label-offset -2 387(defcustom perl-label-offset -2
392 "*Offset of Perl label lines relative to usual indentation." 388 "*Offset of Perl label lines relative to usual indentation."
393 :type 'integer 389 :type 'integer)
394 :group 'perl)
395(defcustom perl-indent-continued-arguments nil 390(defcustom perl-indent-continued-arguments nil
396 "*If non-nil offset of argument lines relative to usual indentation. 391 "*If non-nil offset of argument lines relative to usual indentation.
397If nil, continued arguments are aligned with the first argument." 392If nil, continued arguments are aligned with the first argument."
398 :type '(choice integer (const nil)) 393 :type '(choice integer (const nil)))
399 :group 'perl)
400 394
401(defcustom perl-tab-always-indent t 395(defcustom perl-tab-always-indent tab-always-indent
402 "*Non-nil means TAB in Perl mode always indents the current line. 396 "Non-nil means TAB in Perl mode always indents the current line.
403Otherwise it inserts a tab character if you type it past the first 397Otherwise it inserts a tab character if you type it past the first
404nonwhite character on the line." 398nonwhite character on the line."
405 :type 'boolean 399 :type 'boolean)
406 :group 'perl)
407 400
408;; I changed the default to nil for consistency with general Emacs 401;; I changed the default to nil for consistency with general Emacs
409;; conventions -- rms. 402;; conventions -- rms.
@@ -412,13 +405,11 @@ nonwhite character on the line."
412For lines which don't need indenting, TAB either indents an 405For lines which don't need indenting, TAB either indents an
413existing comment, moves to end-of-line, or if at end-of-line already, 406existing comment, moves to end-of-line, or if at end-of-line already,
414create a new comment." 407create a new comment."
415 :type 'boolean 408 :type 'boolean)
416 :group 'perl)
417 409
418(defcustom perl-nochange ";?#\\|\f\\|\\s(\\|\\(\\w\\|\\s_\\)+:" 410(defcustom perl-nochange ";?#\\|\f\\|\\s(\\|\\(\\w\\|\\s_\\)+:"
419 "*Lines starting with this regular expression are not auto-indented." 411 "*Lines starting with this regular expression are not auto-indented."
420 :type 'regexp 412 :type 'regexp)
421 :group 'perl)
422 413
423;;;###autoload 414;;;###autoload
424(defun perl-mode () 415(defun perl-mode ()
@@ -893,7 +884,7 @@ With argument, repeat that many times; negative args move backward."
893 (or arg (setq arg 1)) 884 (or arg (setq arg 1))
894 (let ((first t)) 885 (let ((first t))
895 (while (and (> arg 0) (< (point) (point-max))) 886 (while (and (> arg 0) (< (point) (point-max)))
896 (let ((pos (point)) npos) 887 (let ((pos (point)))
897 (while (progn 888 (while (progn
898 (if (and first 889 (if (and first
899 (progn 890 (progn