changeset 51054:cd2cb7e0cc7e

(perl-tab-always-indent): Default to tab-always-indent. (perl-end-of-function): Remove unsed var `npos'.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sat, 17 May 2003 22:38:13 +0000
parents 964b7868500f
children b3d9bd5b31b8
files lisp/progmodes/perl-mode.el
diffstat 1 files changed, 15 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/perl-mode.el	Sat May 17 22:21:36 2003 +0000
+++ b/lisp/progmodes/perl-mode.el	Sat May 17 22:38:13 2003 +0000
@@ -1,6 +1,6 @@
 ;;; perl-mode.el --- Perl code editing commands for GNU Emacs
 
-;; Copyright (C) 1990, 1994  Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1994, 2003  Free Software Foundation, Inc.
 
 ;; Author: William F. Mann
 ;; Maintainer: FSF
@@ -257,6 +257,7 @@
     ("\\$ ?{?^?[_a-zA-Z][_a-zA-Z0-9]*\\('\\)[_a-zA-Z]" (1 "_"))
     ;; format statements
     ("^[ \t]*format.*=[ \t]*\\(\n\\)" (1 '(7)))
+    ;; TODO: here-documents ("<<\\(\\sw\\|['\"]\\)")
     ;; Funny things in sub arg specifications like `sub myfunc ($$)'
     ("\\<sub\\s-+\\S-+\\s-*(\\([^)]+\\))" 1 '(1))
     ;; regexp and funny quotes
@@ -369,41 +370,33 @@
 
 (defcustom perl-indent-level 4
   "*Indentation of Perl statements with respect to containing block."
-  :type 'integer
-  :group 'perl)
+  :type 'integer)
 (defcustom perl-continued-statement-offset 4
   "*Extra indent for lines not starting new statements."
-  :type 'integer
-  :group 'perl)
+  :type 'integer)
 (defcustom perl-continued-brace-offset -4
   "*Extra indent for substatements that start with open-braces.
 This is in addition to `perl-continued-statement-offset'."
-  :type 'integer
-  :group 'perl)
+  :type 'integer)
 (defcustom perl-brace-offset 0
   "*Extra indentation for braces, compared with other text in same context."
-  :type 'integer
-  :group 'perl)
+  :type 'integer)
 (defcustom perl-brace-imaginary-offset 0
   "*Imagined indentation of an open brace that actually follows a statement."
-  :type 'integer
-  :group 'perl)
+  :type 'integer)
 (defcustom perl-label-offset -2
   "*Offset of Perl label lines relative to usual indentation."
-  :type 'integer
-  :group 'perl)
+  :type 'integer)
 (defcustom perl-indent-continued-arguments nil
   "*If non-nil offset of argument lines relative to usual indentation.
 If nil, continued arguments are aligned with the first argument."
-  :type '(choice integer (const nil))
-  :group 'perl)
+  :type '(choice integer (const nil)))
 
-(defcustom perl-tab-always-indent t
-  "*Non-nil means TAB in Perl mode always indents the current line.
+(defcustom perl-tab-always-indent tab-always-indent
+  "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."
-  :type 'boolean
-  :group 'perl)
+  :type 'boolean)
 
 ;; I changed the default to nil for consistency with general Emacs
 ;; conventions -- rms.
@@ -412,13 +405,11 @@
 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."
-  :type 'boolean
-  :group 'perl)
+  :type 'boolean)
 
 (defcustom perl-nochange ";?#\\|\f\\|\\s(\\|\\(\\w\\|\\s_\\)+:"
   "*Lines starting with this regular expression are not auto-indented."
-  :type 'regexp
-  :group 'perl)
+  :type 'regexp)
 
 ;;;###autoload
 (defun perl-mode ()
@@ -893,7 +884,7 @@
   (or arg (setq arg 1))
   (let ((first t))
     (while (and (> arg 0) (< (point) (point-max)))
-      (let ((pos (point)) npos)
+      (let ((pos (point)))
 	(while (progn
 		(if (and first
 			 (progn