Anonymous avatar Anonymous committed 184275e

Created

Comments (0)

Files changed (28)

+1998-01-12  SL Baur  <steve@altair.xemacs.org>
+
+	* Makefile (CATEGORY): Update to newer package interface.
+
+1998-01-05  SL Baur  <steve@altair.xemacs.org>
+
+	* python-mode.el updated to 3.28.
+
+1998-01-03  SL Baur  <steve@altair.xemacs.org>
+
+	* Makefile: Update to newer package interface.
+
+1997-12-23  SL Baur  <steve@altair.xemacs.org>
+
+	* tcl.el (tcl-submit-bug-report): Remove compile time dependency
+	on reporter.
+
+	* Makefile: Created.
+
+# Makefile for Miscellaneous Programming modes lisp code
+
+# This file is part of XEmacs.
+
+# XEmacs is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2, or (at your option) any
+# later version.
+
+# XEmacs is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with XEmacs; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+VERSION = 1.02
+PACKAGE = prog-modes
+PKG_TYPE = single-file
+REQUIRES = mail-lib xemacs-base
+CATEGORY = prog
+
+ELCS = asm-mode.elc autoconf-mode.elc awk-mode.elc cl-indent.elc \
+	cperl-mode.elc eiffel3.elc f90.elc fortran-misc.elc fortran.elc \
+	icon.elc ksh-mode.elc m4-mode.elc make-mode.elc modula2.elc \
+	pascal.elc perl-mode.elc postscript.elc prolog.elc python-mode.elc \
+	rexx-mode.elc simula.elc tcl.elc teco.elc verilog-mode.elc \
+	vrml-mode.elc
+
+include ../../XEmacs.rules
+
+all:: $(ELCS) auto-autoloads.elc custom-load.elc
+
+srckit: srckit-std
+
+binkit: binkit-sourceonly
+;;; asm-mode.el --- mode for editing assembler code
+
+;; Copyright (C) 1991 Free Software Foundation, Inc.
+
+;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
+;; Maintainer: FSF
+;; Keywords: tools, languages
+
+;; This file is part of XEmacs.
+
+;; XEmacs is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; XEmacs is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with XEmacs; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 19.34.
+
+;;; Commentary:
+
+;; This mode was written by Eric S. Raymond <esr@snark.thyrsus.com>,
+;; inspired by an earlier asm-mode by Martin Neitzel.
+
+;; This minor mode is based on text mode.  It defines a private abbrev table
+;; that can be used to save abbrevs for assembler mnemonics.  It binds just
+;; five keys:
+;;
+;;	TAB		tab to next tab stop
+;;	:		outdent preceding label, tab to tab stop
+;;	comment char	place or move comment
+;;			asm-comment-char specifies which character this is;
+;;			you can use a different character in different
+;;			Asm mode buffers.
+;;	C-j, C-m	newline and tab to tab stop
+;;
+;; Code is indented to the first tab stop level.
+
+;; This mode runs two hooks:
+;;   1) An asm-mode-set-comment-hook before the part of the initialization
+;; depending on asm-comment-char, and
+;;   2) an asm-mode-hook at the end of initialization.
+
+;;; Code:
+
+(defgroup asm nil
+  "Assembler programming"
+  :group 'languages)
+
+
+(defcustom asm-comment-char ?;
+  "*The comment-start character assumed by Asm mode."
+  :type 'sexp
+  :group 'asm)
+
+;; XEmacs change (This is the primary difference, why was this
+;;  feature removed? -sb)
+(defcustom asm-support-c-comments-p t
+  "*Support C style comments.  If t C style comments will be
+supported.  This is mainly for the benefit of font-lock."
+  :type 'boolean
+  :group 'asm)
+
+(defcustom asm-mode-syntax-table nil
+  "Syntax table used while in Asm mode.")
+
+(defvar asm-mode-abbrev-table nil
+  "Abbrev table used while in Asm mode.")
+(define-abbrev-table 'asm-mode-abbrev-table ())
+
+(defvar asm-mode-map nil
+  "Keymap for Asm mode.")
+
+(if asm-mode-map
+    nil
+  ;; XEmacs change
+  (setq asm-mode-map (make-sparse-keymap 'asm-mode-map))
+  ;; Note that the comment character isn't set up until asm-mode is called.
+  (define-key asm-mode-map ":"		'asm-colon)
+  (define-key asm-mode-map "\C-c;"	'comment-region)
+  (define-key asm-mode-map "\C-i"	'tab-to-tab-stop)
+  (define-key asm-mode-map "\C-j"	'asm-newline)
+  (define-key asm-mode-map "\C-m"	'asm-newline)
+  )
+
+(defconst asm-font-lock-keywords
+ '(("^\\(\\(\\sw\\|\\s_\\)+\\)\\>:?[ \t]*\\(\\sw+\\)?"
+    (1 font-lock-function-name-face) (3 font-lock-keyword-face nil t))
+   ("^\\s +\\(\\(\\sw\\|\\s_\\)+\\)" 1 font-lock-keyword-face))
+ "Additional expressions to highlight in Assembler mode.")
+
+;; XEmacs change
+(put 'asm-mode 'font-lock-defaults '(asm-font-lock-keywords))
+(defvar asm-code-level-empty-comment-pattern nil)
+(defvar asm-flush-left-empty-comment-pattern nil)
+(defvar asm-inline-empty-comment-pattern nil)
+
+;;;###autoload
+(defun asm-mode ()
+  "Major mode for editing typical assembler code.
+Features a private abbrev table and the following bindings:
+
+\\[asm-colon]\toutdent a preceding label, tab to next tab stop.
+\\[tab-to-tab-stop]\ttab to next tab stop.
+\\[asm-newline]\tnewline, then tab to next tab stop.
+\\[asm-comment]\tsmart placement of assembler comments.
+
+The character used for making comments is set by the variable
+`asm-comment-char' (which defaults to `?;').
+
+Alternatively, you may set this variable in `asm-mode-set-comment-hook',
+which is called near the beginning of mode initialization.
+
+Turning on Asm mode runs the hook `asm-mode-hook' at the end of initialization.
+
+Special commands:
+\\{asm-mode-map}
+"
+  (interactive)
+  (kill-all-local-variables)
+  (setq mode-name "Assembler")
+  (setq major-mode 'asm-mode)
+  (setq local-abbrev-table asm-mode-abbrev-table)
+  (make-local-variable 'font-lock-defaults)
+  (setq font-lock-defaults '(asm-font-lock-keywords))
+  (make-local-variable 'asm-mode-syntax-table)
+  (setq asm-mode-syntax-table (make-syntax-table))
+  (set-syntax-table asm-mode-syntax-table)
+
+  (run-hooks 'asm-mode-set-comment-hook)
+  ;; Make our own local child of asm-mode-map
+  ;; so we can define our own comment character.
+  ;; XEmacs change
+  (let ((ourmap (make-sparse-keymap)))
+    (set-keymap-parents ourmap (list asm-mode-map))
+    (use-local-map ourmap))
+  (local-set-key (vector asm-comment-char) 'asm-comment)
+  ;; XEmacs change
+  (if asm-support-c-comments-p
+      (progn
+	(modify-syntax-entry ?/ ". 14" asm-mode-syntax-table)
+	(modify-syntax-entry ?* ". 23" asm-mode-syntax-table)
+	(modify-syntax-entry asm-comment-char "< b" asm-mode-syntax-table)
+	(modify-syntax-entry ?\n "> b" asm-mode-syntax-table))
+    (progn
+      (modify-syntax-entry asm-comment-char
+			   "<" asm-mode-syntax-table)
+      (modify-syntax-entry ?\n
+			   ">" asm-mode-syntax-table)))
+  (let ((cs (regexp-quote (char-to-string asm-comment-char))))
+    (make-local-variable 'comment-start)
+    (setq comment-start (concat cs " "))
+    (make-local-variable 'comment-start-skip)
+    (setq comment-start-skip (concat cs "+[ \t]*"))
+    (setq asm-inline-empty-comment-pattern (concat "^.+" cs "+ *$"))
+    (setq asm-code-level-empty-comment-pattern (concat "^[\t ]+" cs cs " *$"))
+    (setq asm-flush-left-empty-comment-pattern (concat "^" cs cs cs " *$"))
+    )
+  (make-local-variable 'comment-end)
+  (setq comment-end "")
+  (make-local-variable 'comment-column)
+  (setq comment-column 32)
+  (setq fill-prefix "\t")
+  (run-hooks 'asm-mode-hook))
+
+(defun asm-colon ()
+  "Insert a colon; if it follows a label, delete the label's indentation."
+  (interactive)
+  (save-excursion
+    (beginning-of-line)
+    (if (looking-at "[ \t]+\\(\\sw\\|\\s_\\)+$")
+	(delete-horizontal-space)))
+  (insert ":")
+  (tab-to-tab-stop)
+  )
+
+(defun asm-newline ()
+  "Insert LFD + fill-prefix, to bring us back to code-indent level."
+  (interactive)
+  (if (eolp) (delete-horizontal-space))
+  (insert "\n")
+  (tab-to-tab-stop)
+  )
+
+(defun asm-line-matches (pattern &optional withcomment)
+  (save-excursion
+    (beginning-of-line)
+    (looking-at pattern)))
+
+(defun asm-pop-comment-level ()
+  ;; Delete an empty comment ending current line.  Then set up for a new one,
+  ;; on the current line if it was all comment, otherwise above it
+  (end-of-line)
+  (delete-horizontal-space)
+  (while (= (preceding-char) asm-comment-char)
+    (delete-backward-char 1))
+  (delete-horizontal-space)
+  (if (bolp)
+      nil
+    (beginning-of-line)
+    (open-line 1))
+  )
+
+
+(defun asm-comment ()
+  "Convert an empty comment to a `larger' kind, or start a new one.
+These are the known comment classes:
+
+   1 -- comment to the right of the code (at the comment-column)
+   2 -- comment on its own line, indented like code
+   3 -- comment on its own line, beginning at the left-most column.
+
+Suggested usage:  while writing your code, trigger asm-comment
+repeatedly until you are satisfied with the kind of comment."
+  (interactive)
+  (cond
+
+   ;; Blank line?  Then start comment at code indent level.
+   ((asm-line-matches "^[ \t]*$")
+    (delete-horizontal-space)
+    (tab-to-tab-stop)
+    (insert asm-comment-char comment-start))
+
+   ;; Nonblank line with no comment chars in it?
+   ;; Then start a comment at the current comment column
+   ((asm-line-matches (format "^[^%c\n]+$" asm-comment-char))
+    (indent-for-comment))
+
+   ;; Flush-left comment present?  Just insert character.
+   ((asm-line-matches asm-flush-left-empty-comment-pattern)
+    (insert asm-comment-char))
+
+   ;; Empty code-level comment already present?
+   ;; Then start flush-left comment, on line above if this one is nonempty. 
+   ((asm-line-matches asm-code-level-empty-comment-pattern)
+    (asm-pop-comment-level)
+    (insert asm-comment-char asm-comment-char comment-start))
+
+   ;; Empty comment ends line?
+   ;; Then make code-level comment, on line above if this one is nonempty. 
+   ((asm-line-matches asm-inline-empty-comment-pattern)
+    (asm-pop-comment-level)
+    (tab-to-tab-stop)
+    (insert asm-comment-char comment-start))
+
+   ;; If all else fails, insert character
+   (t
+    (insert asm-comment-char))
+
+   )
+  (end-of-line))
+
+;;; asm-mode.el ends here
+;;; autoconf-mode.el --- autoconf code editing commands for Emacs
+
+;; Author: Martin Buchholz (mrb@eng.sun.com)
+;; Maintainer: Martin Buchholz
+;; Keywords: languages, faces, m4, configure
+
+;; This file is part of XEmacs
+
+;; XEmacs is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; XEmacs is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with XEmacs; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: not in FSF.
+
+;;; Commentary:
+
+;; A major mode for editing autoconf input (like configure.in).
+;; Derived from m4-mode.el by Andrew Csillag (drew@staff.prodigy.com)
+
+;;; Code:
+
+;;thank god for make-regexp.el!
+(defvar autoconf-font-lock-keywords
+  `(("\\bdnl \\(.*\\)"  1 font-lock-comment-face t)
+    ("\\$[0-9*#@]" . font-lock-variable-name-face)
+    ("\\b\\(m4_\\)?\\(builtin\\|change\\(com\\|quote\\|word\\)\\|d\\(e\\(bug\\(file\\|mode\\)\\|cr\\|f\\(ine\\|n\\)\\)\\|iv\\(ert\\|num\\)\\|nl\\|umpdef\\)\\|e\\(rrprint\\|syscmd\\|val\\)\\|f\\(ile\\|ormat\\)\\|gnu\\|i\\(f\\(def\\|else\\)\\|n\\(c\\(lude\\|r\\)\\|d\\(ex\\|ir\\)\\)\\)\\|l\\(en\\|ine\\)\\|m\\(4\\(exit\\|wrap\\)\\|aketemp\\)\\|p\\(atsubst\\|opdef\\|ushdef\\)\\|regexp\\|s\\(hift\\|include\\|ubstr\\|ys\\(cmd\\|val\\)\\)\\|tra\\(ceo\\(ff\\|n\\)\\|nslit\\)\\|un\\(d\\(efine\\|ivert\\)\\|ix\\)\\)\\b" . font-lock-keyword-face)
+    "default font-lock-keywords")
+)
+
+(defvar autoconf-mode-syntax-table nil
+  "syntax table used in autoconf mode")
+(setq autoconf-mode-syntax-table (make-syntax-table))
+(modify-syntax-entry ?\" "\""  autoconf-mode-syntax-table)
+;;(modify-syntax-entry ?\' "\""  autoconf-mode-syntax-table)
+(modify-syntax-entry ?#  "<\n" autoconf-mode-syntax-table)
+(modify-syntax-entry ?\n ">#"  autoconf-mode-syntax-table)
+(modify-syntax-entry ?\( "."   autoconf-mode-syntax-table)
+(modify-syntax-entry ?\) "."   autoconf-mode-syntax-table)
+(modify-syntax-entry ?\[ "(]"  autoconf-mode-syntax-table)
+(modify-syntax-entry ?\] ")["  autoconf-mode-syntax-table)
+(modify-syntax-entry ?*  "."   autoconf-mode-syntax-table)
+(modify-syntax-entry ?_  "_"   autoconf-mode-syntax-table)
+
+(defvar autoconf-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map "\C-c\C-c" 'comment-region)
+    map))
+
+;;;###autoload
+(defun autoconf-mode ()
+  "A major-mode to edit autoconf input files like configure.in
+\\{autoconf-mode-map}
+"
+  (interactive)
+  (kill-all-local-variables)
+  (use-local-map autoconf-mode-map)
+
+  (make-local-variable 'comment-start)
+  (setq comment-start "dnl")
+  (make-local-variable 'parse-sexp-ignore-comments)
+  (setq parse-sexp-ignore-comments t)
+
+  (make-local-variable	'font-lock-defaults)  
+  (setq major-mode 'autoconf-mode)
+  (setq mode-name "Autoconf")
+  (setq font-lock-defaults `(autoconf-font-lock-keywords nil))
+  (set-syntax-table autoconf-mode-syntax-table)
+  (run-hooks 'autoconf-mode-hook))
+
+(provide 'autoconf-mode)
+
+;;; autoconf-mode.el ends here
+;;; awk-mode.el --- AWK code editing commands for Emacs
+
+;; Copyright (C) 1988, 1994 Free Software Foundation, Inc.
+
+;; Maintainer: FSF
+;; Keywords: unix, languages
+
+;; This file is part of XEmacs.
+
+;; XEmacs is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; XEmacs is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with XEmacs; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 19.34.
+
+;;; Commentary:
+
+;; Sets up C-mode with support for awk-style #-comments and a lightly
+;; hacked syntax table.
+
+;;; Code:
+
+(defvar awk-mode-syntax-table nil
+  "Syntax table in use in Awk-mode buffers.")
+
+(if awk-mode-syntax-table
+    ()
+  (setq awk-mode-syntax-table (make-syntax-table))
+  (modify-syntax-entry ?\\ "\\" awk-mode-syntax-table)
+  (modify-syntax-entry ?\n ">   " awk-mode-syntax-table)
+  (modify-syntax-entry ?\f ">   " awk-mode-syntax-table)
+  (modify-syntax-entry ?\# "<   " awk-mode-syntax-table)
+  (modify-syntax-entry ?/ "." awk-mode-syntax-table)
+  (modify-syntax-entry ?* "." awk-mode-syntax-table)
+  (modify-syntax-entry ?+ "." awk-mode-syntax-table)
+  (modify-syntax-entry ?- "." awk-mode-syntax-table)
+  (modify-syntax-entry ?= "." awk-mode-syntax-table)
+  (modify-syntax-entry ?% "." awk-mode-syntax-table)
+  (modify-syntax-entry ?< "." awk-mode-syntax-table)
+  (modify-syntax-entry ?> "." awk-mode-syntax-table)
+  (modify-syntax-entry ?& "." awk-mode-syntax-table)
+  (modify-syntax-entry ?| "." awk-mode-syntax-table)
+  (modify-syntax-entry ?\' "\"" awk-mode-syntax-table))
+
+(defvar awk-mode-abbrev-table nil
+  "Abbrev table in use in Awk-mode buffers.")
+(define-abbrev-table 'awk-mode-abbrev-table ())
+
+;;;###autoload
+(defun awk-mode ()
+  "Major mode for editing AWK code.
+This is much like C mode except for the syntax of comments.  It uses
+the same keymap as C mode and has the same variables for customizing
+indentation.  It has its own abbrev table and its own syntax table.
+
+Turning on AWK mode calls the value of the variable `awk-mode-hook'
+with no args, if that value is non-nil."
+  (interactive)
+  (kill-all-local-variables)
+  (require 'cc-mode)
+  (use-local-map c-mode-map)
+  (setq major-mode 'awk-mode)
+  (setq mode-name "AWK")
+  (setq local-abbrev-table awk-mode-abbrev-table)
+  (set-syntax-table awk-mode-syntax-table)
+  (make-local-variable 'paragraph-start)
+  (setq paragraph-start (concat "$\\|" page-delimiter))
+  (make-local-variable 'paragraph-separate)
+  (setq paragraph-separate paragraph-start)
+  (make-local-variable 'paragraph-ignore-fill-prefix)
+  (setq paragraph-ignore-fill-prefix t)
+  (make-local-variable 'indent-line-function)
+  (setq indent-line-function 'c-indent-line)
+  (make-local-variable 'require-final-newline)
+  (setq require-final-newline t)
+  (make-local-variable 'comment-start)
+  (setq comment-start "# ")
+  (make-local-variable 'comment-end)
+  (setq comment-end "")
+  (make-local-variable 'comment-column)
+  (setq comment-column 32)
+  (make-local-variable 'comment-start-skip)
+  (setq comment-start-skip "#+ *")
+  (make-local-variable 'comment-indent-function)
+  (setq comment-indent-function 'c-comment-indent)
+  (run-hooks 'awk-mode-hook))
+
+;;; awk-mode.el ends here
+;;; cl-indent.el --- enhanced lisp-indent mode
+
+;; Copyright (C) 1987 Free Software Foundation, Inc.
+
+;; Author: Richard Mlynarik <mly@eddie.mit.edu>
+;; Created: July 1987
+;; Maintainer: FSF
+;; Keywords: lisp, tools
+
+;; This file is part of XEmacs.
+
+;; XEmacs is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; XEmacs is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with XEmacs; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 19.34
+
+;;; Commentary:
+
+;; This package supplies a single entry point, common-lisp-indent-function,
+;; which performs indentation in the preferred style for Common Lisp code.
+;; To enable it:
+;;
+;; (setq lisp-indent-function 'common-lisp-indent-function)
+
+;;>> TODO
+;; :foo
+;;   bar
+;; :baz
+;;   zap
+;; &key (like &body)??
+
+;; &rest 1 in lambda-lists doesn't work
+;;  -- really want (foo bar
+;;                  baz)
+;;     not (foo bar
+;;              baz)
+;;  Need something better than &rest for such cases
+
+;;; Code:
+
+(defgroup lisp-indent nil
+  "Enhanced lisp-indent mode."
+  :group 'lisp)
+
+
+(defcustom lisp-indent-maximum-backtracking 3
+  "*Maximum depth to backtrack out from a sublist for structured indentation.
+If this variable is  0, no backtracking will occur and forms such as flet
+may not be correctly indented."
+  :type 'integer
+  :group 'lisp-indent)
+
+(defcustom lisp-tag-indentation 1
+  "*Indentation of tags relative to containing list.
+This variable is used by the function `lisp-indent-tagbody'."
+  :type 'integer
+  :group 'lisp-indent)
+
+(defcustom lisp-tag-body-indentation 3
+  "*Indentation of non-tagged lines relative to containing list.
+This variable is used by the function `lisp-indent-tagbody' to indent normal
+lines (lines without tags).
+The indentation is relative to the indentation of the parenthesis enclosing
+the special form.  If the value is t, the body of tags will be indented
+as a block at the same indentation as the first s-expression following
+the tag.  In this case, any forms before the first tag are indented
+by `lisp-body-indent'."
+  :type 'integer
+  :group 'lisp-indent)
+
+
+;;;###autoload
+(defun common-lisp-indent-function (indent-point state)
+  (let ((normal-indent (current-column)))
+    ;; Walk up list levels until we see something
+    ;;  which does special things with subforms.
+    (let ((depth 0)
+          ;; Path describes the position of point in terms of
+          ;;  list-structure with respect to containing lists.
+          ;; `foo' has a path of (0 4 1) in `((a b c (d foo) f) g)'
+          (path ())
+          ;; set non-nil when somebody works out the indentation to use
+          calculated
+          (last-point indent-point)
+          ;; the position of the open-paren of the innermost containing list
+          (containing-form-start (elt state 1))
+          ;; the column of the above
+          sexp-column)
+      ;; Move to start of innermost containing list
+      (goto-char containing-form-start)
+      (setq sexp-column (current-column))
+      ;; Look over successively less-deep containing forms
+      (while (and (not calculated)
+                  (< depth lisp-indent-maximum-backtracking))
+        (let ((containing-sexp (point)))
+          (forward-char 1)
+          (parse-partial-sexp (point) indent-point 1 t)
+          ;; Move to the car of the relevant containing form
+          (let (tem function method)
+            (if (not (looking-at "\\sw\\|\\s_"))
+                ;; This form doesn't seem to start with a symbol
+                (setq function nil method nil)
+              (setq tem (point))
+              (forward-sexp 1)
+              (setq function (downcase (buffer-substring tem (point))))
+              (goto-char tem)
+              (setq tem (intern-soft function)
+                    method (get tem 'common-lisp-indent-function))
+              (cond ((and (null method)
+                          (string-match ":[^:]+" function))
+                     ;; The pleblisp package feature
+                     (setq function (substring function
+                                               (1+ (match-beginning 0)))
+                           method (get (intern-soft function)
+                                       'common-lisp-indent-function)))
+                    ((and (null method))
+                     ;; backwards compatibility
+                     (setq method (get tem 'lisp-indent-function)))))
+            (let ((n 0))
+              ;; How far into the containing form is the current form?
+              (if (< (point) indent-point)
+                  (while (condition-case ()
+                             (progn
+                               (forward-sexp 1)
+                               (if (>= (point) indent-point)
+                                   nil
+                                 (parse-partial-sexp (point)
+                                                     indent-point 1 t)
+                                 (setq n (1+ n))
+                                 t))
+                           (error nil))))
+              (setq path (cons n path)))
+
+            ;; backwards compatibility.
+            (cond ((null function))
+                  ((null method)
+                   (if (null (cdr path))
+                       ;; (package prefix was stripped off above)
+                       (setq method (cond ((string-match "\\`def"
+                                                         function)
+                                           '(4 (&whole 4 &rest 1) &body))
+                                          ((string-match "\\`\\(with\\|do\\)-"
+                                                         function)
+                                           '(4 &body))))))
+                  ;; backwards compatibility.  Bletch.
+                  ((eq method 'defun)
+                   (setq method '(4 (&whole 4 &rest 1) &body))))
+
+            (cond ((and (memq (char-after (1- containing-sexp)) '(?\' ?\`))
+                        (not (eql (char-after (- containing-sexp 2)) ?\#)))
+                   ;; No indentation for "'(...)" elements
+                   (setq calculated (1+ sexp-column)))
+		  ((or (eql (char-after (1- containing-sexp)) ?\,)
+		       (and (eql (char-after (1- containing-sexp)) ?\@)
+			    (eql (char-after (- containing-sexp 2)) ?\,)))
+		   ;; ",(...)" or ",@(...)"
+		   (setq calculated normal-indent))
+                  ((eql (char-after (1- containing-sexp)) ?\#)
+                   ;; "#(...)"
+                   (setq calculated (1+ sexp-column)))
+                  ((null method))
+                  ((integerp method)
+                   ;; convenient top-level hack.
+                   ;;  (also compatible with lisp-indent-function)
+                   ;; The number specifies how many `distinguished'
+                   ;;  forms there are before the body starts
+                   ;; Equivalent to (4 4 ... &body)
+                   (setq calculated (cond ((cdr path)
+                                           normal-indent)
+                                          ((<= (car path) method)
+                                           ;; `distinguished' form
+                                           (list (+ sexp-column 4)
+                                                 containing-form-start))
+                                          ((= (car path) (1+ method))
+                                           ;; first body form.
+                                           (+ sexp-column lisp-body-indent))
+                                          (t
+                                           ;; other body form
+                                           normal-indent))))
+                  ((symbolp method)
+                   (setq calculated (funcall method
+                                             path state indent-point
+                                             sexp-column normal-indent)))
+                  (t
+                   (setq calculated (lisp-indent-259
+                                      method path state indent-point
+                                      sexp-column normal-indent)))))
+          (goto-char containing-sexp)
+          (setq last-point containing-sexp)
+          (if (not calculated)
+              (condition-case ()
+                   (progn (backward-up-list 1)
+                          (setq depth (1+ depth)))
+                (error (setq depth lisp-indent-maximum-backtracking))))))
+      calculated)))
+
+
+(defun lisp-indent-report-bad-format (m)
+  (error "%s has a badly-formed %s property: %s"
+         ;; Love those free variable references!!
+         function 'common-lisp-indent-function m))
+
+;; Blame the crufty control structure on dynamic scoping
+;;  -- not on me!
+(defun lisp-indent-259 (method path state indent-point
+                        sexp-column normal-indent)
+  (catch 'exit
+    (let ((p path)
+          (containing-form-start (elt state 1))
+          n tem tail)
+      ;; Isn't tail-recursion wonderful?
+      (while p
+        ;; This while loop is for destructuring.
+        ;; p is set to (cdr p) each iteration.
+        (if (not (consp method)) (lisp-indent-report-bad-format method))
+        (setq n (1- (car p))
+              p (cdr p)
+              tail nil)
+        (while n
+          ;; This while loop is for advancing along a method
+          ;; until the relevant (possibly &rest/&body) pattern
+          ;; is reached.
+          ;; n is set to (1- n) and method to (cdr method)
+          ;; each iteration.
+          (setq tem (car method))
+
+          (or (eq tem 'nil)             ;default indentation
+;             (eq tem '&lambda)         ;abbrev for (&whole 4 (&rest 1))
+              (and (eq tem '&body) (null (cdr method)))
+              (and (eq tem '&rest)
+                   (consp (cdr method)) (null (cdr (cdr method))))
+              (integerp tem)            ;explicit indentation specified
+              (and (consp tem)          ;destructuring
+                   (eq (car tem) '&whole)
+                   (or (symbolp (car (cdr tem)))
+                       (integerp (car (cdr tem)))))
+              (and (symbolp tem)        ;a function to call to do the work.
+                   (null (cdr method)))
+              (lisp-indent-report-bad-format method))
+
+          (cond ((and tail (not (consp tem)))
+                 ;; indent tail of &rest in same way as first elt of rest
+                 (throw 'exit normal-indent))
+                ((eq tem '&body)
+                 ;; &body means (&rest <lisp-body-indent>)
+                 (throw 'exit
+                   (if (and (= n 0)     ;first body form
+                            (null p))   ;not in subforms
+                       (+ sexp-column
+                          lisp-body-indent)
+                       normal-indent)))
+                ((eq tem '&rest)
+                 ;; this pattern holds for all remaining forms
+                 (setq tail (> n 0)
+                       n 0
+                       method (cdr method)))
+                ((> n 0)
+                 ;; try next element of pattern
+                 (setq n (1- n)
+                       method (cdr method))
+                 (if (< n 0)
+                     ;; Too few elements in pattern.
+                     (throw 'exit normal-indent)))
+                ((eq tem 'nil)
+                 (throw 'exit (list normal-indent containing-form-start)))
+;               ((eq tem '&lambda)
+;                ;; abbrev for (&whole 4 &rest 1)
+;                (throw 'exit
+;                  (cond ((null p)
+;                         (list (+ sexp-column 4) containing-form-start))
+;                        ((null (cdr p))
+;                         (+ sexp-column 1))
+;                        (t normal-indent))))
+                ((integerp tem)
+                 (throw 'exit
+                   (if (null p)         ;not in subforms
+                       (list (+ sexp-column tem) containing-form-start)
+                       normal-indent)))
+                ((symbolp tem)          ;a function to call
+                 (throw 'exit
+                   (funcall tem path state indent-point
+                            sexp-column normal-indent)))
+                (t
+                 ;; must be a destructing frob
+                 (if (not (null p))
+                     ;; descend
+                     (setq method (cdr (cdr tem))
+                           n nil)
+                   (setq tem (car (cdr tem)))
+                   (throw 'exit
+                     (cond (tail
+                            normal-indent)
+                           ((eq tem 'nil)
+                            (list normal-indent
+                                  containing-form-start))
+                           ((integerp tem)
+                            (list (+ sexp-column tem)
+                                  containing-form-start))
+                           (t
+                            (funcall tem path state indent-point
+                                     sexp-column normal-indent))))))))))))
+
+(defun lisp-indent-tagbody (path state indent-point sexp-column normal-indent)
+  (if (not (null (cdr path)))
+      normal-indent
+    (save-excursion
+      (goto-char indent-point)
+      (beginning-of-line)
+      (skip-chars-forward " \t")
+      (list (cond ((looking-at "\\sw\\|\\s_")
+                   ;; a tagbody tag
+                   (+ sexp-column lisp-tag-indentation))
+                  ((integerp lisp-tag-body-indentation)
+                   (+ sexp-column lisp-tag-body-indentation))
+                  ((eq lisp-tag-body-indentation 't)
+                   (condition-case ()
+                       (progn (backward-sexp 1) (current-column))
+                     (error (1+ sexp-column))))
+                  (t (+ sexp-column lisp-body-indent)))
+;            (cond ((integerp lisp-tag-body-indentation)
+;                   (+ sexp-column lisp-tag-body-indentation))
+;                  ((eq lisp-tag-body-indentation 't)
+;                   normal-indent)
+;                  (t
+;                   (+ sexp-column lisp-body-indent)))
+            (elt state 1)
+            ))))
+
+(defun lisp-indent-do (path state indent-point sexp-column normal-indent)
+  (if (>= (car path) 3)
+      (let ((lisp-tag-body-indentation lisp-body-indent))
+        (funcall (function lisp-indent-tagbody)
+		 path state indent-point sexp-column normal-indent))
+    (funcall (function lisp-indent-259)
+	     '((&whole nil &rest
+ 		;; the following causes weird indentation
+ 		;;(&whole 1 1 2 nil)
+		)
+	       (&whole nil &rest 1))
+	     path state indent-point sexp-column normal-indent)))
+
+(defun lisp-indent-function-lambda-hack (path state indent-point
+                                         sexp-column normal-indent)
+  ;; indent (function (lambda () <newline> <body-forms>)) kludgily.
+  (if (or (cdr path) ; wtf?
+          (> (car path) 3))
+      ;; line up under previous body form
+      normal-indent
+    ;; line up under function rather than under lambda in order to
+    ;;  conserve horizontal space.  (Which is what #' is for.)
+    (condition-case ()
+        (save-excursion
+          (backward-up-list 2)
+          (forward-char 1)
+          (if (looking-at "\\(lisp:+\\)?function\\(\\Sw\\|\\S_\\)")
+              (+ lisp-body-indent -1 (current-column))
+              (+ sexp-column lisp-body-indent)))
+       (error (+ sexp-column lisp-body-indent)))))
+
+;; XEmacs change
+(defun lisp-indent-defmethod (path state indent-point
+                              sexp-column normal-indent)
+  ;; Look for a method combination specifier...
+  (let* ((combined (if (and (>= (car path) 3)
+                            (null (cdr path)))
+                       (save-excursion
+                         (goto-char (car (cdr state)))
+                         (forward-char)
+                         (forward-sexp)
+                         (forward-sexp)
+                         (forward-sexp)
+                         (backward-sexp)
+                         (if (looking-at ":")
+                             t
+                             nil))
+                       nil))
+	 (method (if combined
+		     '(4 4 (&whole 4 &rest 1) &body)
+		     '(4 (&whole 4 &rest 1) &body))))
+    (funcall (function lisp-indent-259)
+	     method
+	     path state indent-point sexp-column normal-indent)))
+
+
+(let ((l '((block 1)
+	   (catch 1)
+           (case        (4 &rest (&whole 2 &rest 1)))
+           (ccase . case) (ecase . case)
+           (typecase . case) (etypecase . case) (ctypecase . case)
+           (catch 1)
+           (cond        (&rest (&whole 2 &rest 1)))
+           (block 1)
+           (defvar      (4 2 2))
+           (defconstant . defvar) (defparameter . defvar)
+           (define-modify-macro
+                        (4 &body))
+           (define-setf-method
+                        (4 (&whole 4 &rest 1) &body))
+           (defsetf     (4 (&whole 4 &rest 1) 4 &body))
+           (defun       (4 (&whole 4 &rest 1) &body))
+           (defmacro . defun) (deftype . defun)
+	   ;; XEmacs change
+           (defmethod lisp-indent-defmethod)
+           (defstruct   ((&whole 4 &rest (&whole 2 &rest 1))
+                         &rest (&whole 2 &rest 1)))
+           (destructuring-bind
+                        ((&whole 6 &rest 1) 4 &body))
+           (do          lisp-indent-do)
+           (do* . do)
+           (dolist      ((&whole 4 2 1) &body))
+           (dotimes . dolist)
+           (eval-when	1)
+           (flet        ((&whole 4 &rest (&whole 1 (&whole 4 &rest 1) &body))
+                         &body))
+           (labels . flet)
+           (macrolet . flet)
+           ;; `else-body' style
+           (if          (nil nil &body))
+           ;; single-else style (then and else equally indented)
+           (if          (&rest nil))
+           ;(lambda     ((&whole 4 &rest 1) &body))
+           (lambda      ((&whole 4 &rest 1)
+                         &rest lisp-indent-function-lambda-hack))
+           (let         ((&whole 4 &rest (&whole 1 1 2)) &body))
+           (let* . let)
+           (compiler-let . let) ;barf
+           (locally	1)
+           ;(loop ...)
+           (multiple-value-bind
+                        ((&whole 6 &rest 1) 4 &body))
+           (multiple-value-call
+			(4 &body))
+           (multiple-value-list 1)
+           (multiple-value-prog1 1)
+           (multiple-value-setq
+			(4 2))
+           ;; Combines the worst features of BLOCK, LET and TAGBODY
+           (prog        ((&whole 4 &rest 1) &rest lisp-indent-tagbody))
+           (prog* . prog)
+           (prog1 1)
+           (prog2 2)
+           (progn 0)
+           (progv       (4 4 &body))
+           (return 0)
+           (return-from (nil &body))
+           (tagbody     lisp-indent-tagbody)
+           (throw 1)
+           (unless 1)
+           (unwind-protect
+                        (5 &body))
+           (when 1))))
+  (while l
+    (put (car (car l)) 'common-lisp-indent-function
+         (if (symbolp (cdr (car l)))
+             (get (cdr (car l)) 'common-lisp-indent-function)
+             (car (cdr (car l)))))
+    (setq l (cdr l))))
+
+
+;(defun foo (x)
+;  (tagbody
+;   foo
+;     (bar)
+;   baz
+;     (when (losing)
+;       (with-big-loser
+;           (yow)
+;         ((lambda ()
+;            foo)
+;          big)))
+;     (flet ((foo (bar baz zap)
+;              (zip))
+;            (zot ()
+;              quux))
+;       (do ()
+;           ((lose)
+;            (foo 1))
+;         (quux)
+;        foo
+;         (lose))
+;       (cond ((x)
+;              (win 1 2
+;                   (foo)))
+;             (t
+;              (lose
+;                3))))))
+          
+
+;(put 'while    'common-lisp-indent-function 1)
+;(put 'defwrapper'common-lisp-indent-function ...)
+;(put 'def 'common-lisp-indent-function ...)
+;(put 'defflavor        'common-lisp-indent-function ...)
+;(put 'defsubst 'common-lisp-indent-function ...)
+
+;(put 'with-restart 'common-lisp-indent-function '((1 4 ((* 1))) (2 &body)))
+;(put 'restart-case 'common-lisp-indent-function '((1 4) (* 2 ((0 1) (* 1)))))
+;(put 'define-condition 'common-lisp-indent-function '((1 6) (2 6 ((* 1))) (3 4 ((* 1))) (4 &body)))
+;(put 'with-condition-handler 'common-lisp-indent-function '((1 4 ((* 1))) (2 &body)))
+;(put 'condition-case 'common-lisp-indent-function '((1 4) (* 2 ((0 1) (1 3) (2 &body)))))
+
+;;; cl-indent.el ends here
+;;; cperl-mode.el --- Perl code editing commands for XEmacs
+
+;; Copyright (C) 1985-1996 Bob Olson, Ilya Zakharevich
+;; Copyright (C) 1997 granted to FSF for changes made by
+;; Karl M. Hegbloom <karlheg@inetarena.com>
+
+;; Author:  Bob Olson, Ilya Zakharevich
+;; Maintainer:  Karl M. Hegbloom <karlheg@inetarena.com>
+;; Keywords:  languages
+
+;; This file is part of XEmacs. It may be distributed either under the
+;; same terms as XEmacs, or under the same terms as Perl. You should
+;; have received a copy of Perl Artistic license along with the Perl
+;; distribution.
+
+;; XEmacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Corrections made by Ilya Zakharevich ilya@math.mps.ohio-state.edu
+;;; XEmacs changes by Peter Arius arius@informatik.uni-erlangen.de
+;;; XEmacs 'delete key behavior handling added for XEmacs 20.x by
+;;; Gary D. Foster <Gary.Foster@corp.sun.com>
+;;; Karl M. Hegbloom <karlheg@inetarena.com>
+
+;; Original Vendor Version Number:  (mostly based on...)
+;; $Id$
+
+;; Increment the final digit once per XEmacs-only revision, the other
+;; for merges.  (sound ok?)
+;;;  XEmacs Version Number: 1.41-1
+
+;;; Commentary:
+
+;; This code started from the following message of long time ago (IZ):
+
+;; From: olson@mcs.anl.gov (Bob Olson)
+;; Newsgroups: comp.lang.perl
+;; Subject: cperl-mode: Another perl mode for Gnuemacs
+;; Date: 14 Aug 91 15:20:01 GMT
+
+;; This mode should autoload when you edit a perl file under XEmacs.
+
+;;; DO NOT FORGET to read micro-docs. (available from `Perl' menu). <<<<<<
+;;; or as help on variables `cperl-tips', `cperl-problems',         <<<<<<
+;;; `cperl-non-problems', `cperl-praise'.                           <<<<<<
+
+;;; The mode information (on C-h m) provides some customization help.
+;;; If you use font-lock feature of this mode, it is advisable to use
+;;; either lazy-lock-mode or fast-lock-mode (available on ELisp
+;;; archive in files lazy-lock.el and fast-lock.el). I prefer lazy-lock.
+
+;;; Faces used now: three faces for first-class and second-class keywords
+;;; and control flow words, one for each: comments, string, labels,
+;;; functions definitions and packages, arrays, hashes, and variable
+;;; definitions. If you do not see all these faces, your font-lock does
+;;; not define them, so you need to define them manually.
+
+;;; If you have a grayscale monitor, and do not have the variable
+;;; font-lock-display-type bound to 'grayscale, insert 
+
+;;; (setq font-lock-display-type 'grayscale)
+
+;;; into your .xemacs/init.el file.
+
+;;;; ? what about this `imenu' stuff?  Is it worth it?
+
+;;;; This mode supports font-lock, imenu and mode-compile. In the
+;;;; hairy version font-lock is on, but you should activate imenu
+;;;; yourself (note that mode-compile is not standard yet). Well, you
+;;;; can use imenu from keyboard anyway (M-x imenu), but it is better
+;;;; to bind it like that:
+
+;; (define-key global-map [M-S-down-mouse-3] 'imenu)
+
+;;; In fact the version of font-lock that this version supports can be
+;;; much newer than the version you actually have. This means that a
+;;; lot of faces can be set up, but are not visible on your screen
+;;; since the coloring rules for this faces are not defined.
+
+;;; Updates: ========================================
+
+;;; Made less hairy by default: parentheses not electric, 
+;;; linefeed not magic. Bug with abbrev-mode corrected.
+
+;;;; After 1.4:
+;;;  Better indentation:
+;;;  subs inside braces should work now, 
+;;;  Toplevel braces obey customization.
+;;;  indent-for-comment knows about bad cases, cperl-indent-for-comment
+;;;  moves cursor to a correct place.
+;;;  cperl-indent-exp written from the scratch! Slow... (quadratic!) :-( 
+;;;        (50 secs on DB::DB (sub of 430 lines), 486/66)
+;;;  Minor documentation fixes.
+;;;  Imenu understands packages as prefixes (including nested).
+;;;  Hairy options can be switched off one-by-one by setting to null.
+;;;  Names of functions and variables changed to conform to `cperl-' style.
+
+;;;; After 1.5:
+;;;  Some bugs with indentation of labels (and embedded subs) corrected.
+;;;  `cperl-indent-region' done (slow :-()).
+;;;  `cperl-fill-paragraph' done.
+;;;  Better package support for `imenu'.
+;;;  Progress indicator for indentation (with `imenu' loaded).
+;;;  `Cperl-set' was busted, now setting the individual hairy option 
+;;;     should be better.
+
+;;;; After 1.6:
+;;; `cperl-set-style' done.
+;;; `cperl-check-syntax' done.
+;;; Menu done.
+;;; New config variables `cperl-close-paren-offset' and `cperl-comment-column'.
+;;; Bugs with `cperl-auto-newline' corrected.
+;;; `cperl-electric-lbrace' can work with `cperl-auto-newline' in situation 
+;;; like $hash{.
+
+;;;; 1.7 XEmacs (arius@informatik.uni-erlangen.de):
+;;; - use `next-command-event', if `next-command-events' does not exist
+;;; - use `find-face' as def. of `is-face'
+;;; - corrected def. of `x-color-defined-p'
+;;; - added const defs for font-lock-comment-face,
+;;;   font-lock-keyword-face and font-lock-function-name-face
+;;; - added def. of font-lock-variable-name-face
+;;; - added (require 'easymenu) inside an `eval-when-compile'
+;;; - replaced 4-argument `substitute-key-definition' with ordinary
+;;;   `define-key's
+;;; - replaced `mark-active' in menu definition by `cperl-use-region-p'.
+;;; Todo (at least):
+;;; - use emacs-vers.el (http://www.cs.utah.edu/~eeide/emacs/emacs-vers.el.gz)
+;;;   for portable code?
+;;; - should `cperl-mode' do a 
+;;;	(if (featurep 'easymenu) (easy-menu-add cperl-menu))
+;;;   or should this be left to the user's `cperl-mode-hook'?
+
+;;; Some bugs introduced by the above fix corrected (IZ ;-).
+;;; Some bugs under XEmacs introduced by the correction corrected.
+
+;;; Some more can remain since there are two many different variants. 
+;;; Please feedback!
+
+;;; We do not support fontification of arrays and hashes under 
+;;; obsolete font-lock any more. Upgrade.
+
+;;;; after 1.8 Minor bug with parentheses.
+;;;; after 1.9 Improvements from Joe Marzot.
+;;;; after 1.10
+;;;  Does not need easymenu to compile under XEmacs.
+;;;  `vc-insert-headers' should work better.
+;;;  Should work with 19.29 and 19.12.
+;;;  Small improvements to fontification.
+;;;  Expansion of keywords does not depend on C-? being backspace.
+
+;;; after 1.10+
+;;; 19.29 and 19.12 supported.
+;;; `cperl-font-lock-enhanced' deprecated. Use font-lock-extra.el.
+;;; Support for font-lock-extra.el.
+
+;;;; After 1.11:
+;;; Tools submenu.
+;;; Support for perl5-info.
+;;; `imenu-go-find-at-position' in Tools requires imenu-go.el (see hints above)
+;;; Imenu entries do not work with stock imenu.el. Patch sent to maintainers.
+;;; Fontifies `require a if b;', __DATA__.
+;;; Arglist for auto-fill-mode was incorrect.
+
+;;;; After 1.12:
+;;; `cperl-lineup-step' and `cperl-lineup' added: lineup constructions 
+;;; vertically.
+;;; `cperl-do-auto-fill' updated for 19.29 style.
+;;; `cperl-info-on-command' now has a default.
+;;; Workaround for broken C-h on XEmacs.
+;;; VC strings escaped.
+;;; C-h f now may prompt for function name instead of going on,
+;;; controlled by `cperl-info-on-command-no-prompt'.
+
+;;;; After 1.13:
+;;; Msb buffer list includes perl files
+;;; Indent-for-comment uses indent-to
+;;; Can write tag files using etags.
+
+;;;; After 1.14:
+;;; Recognizes (tries to ;-) {...} which are not blocks during indentation.
+;;; `cperl-close-paren-offset' affects ?\] too (and ?\} if not block)
+;;; Bug with auto-filling comments started with "##" corrected.
+
+;;;; Very slow now: on DB::DB 0.91, 486/66:
+
+;;;Function Name                             Call Count  Elapsed Time  Average Time
+;;;========================================  ==========  ============  ============
+;;;cperl-block-p                             469         3.7799999999  0.0080597014
+;;;cperl-get-state                           505         163.39000000  0.3235445544
+;;;cperl-comment-indent                      12          0.0299999999  0.0024999999
+;;;cperl-backward-to-noncomment              939         4.4599999999  0.0047497337
+;;;cperl-calculate-indent                    505         172.22000000  0.3410297029
+;;;cperl-indent-line                         505         172.88000000  0.3423366336
+;;;cperl-use-region-p                        40          0.0299999999  0.0007499999
+;;;cperl-indent-exp                          1           177.97000000  177.97000000
+;;;cperl-to-comment-or-eol                   1453        3.9800000000  0.0027391603
+;;;cperl-backward-to-start-of-continued-exp  9           0.0300000000  0.0033333333
+;;;cperl-indent-region                       1           177.94000000  177.94000000
+
+;;;; After 1.15:
+;;; Takes into account white space after opening parentheses during indent.
+;;; May highlight pods and here-documents: see `cperl-pod-here-scan',
+;;; `cperl-pod-here-fontify', `cperl-pod-face'. Does not use this info
+;;; for indentation so far.
+;;; Fontification updated to 19.30 style. 
+;;; The change 19.29->30 did not add all the required functionality,
+;;;     but broke "font-lock-extra.el". Get "choose-color.el" from
+;;;       ftp://ftp.math.ohio-state.edu/pub/users/ilya/emacs
+
+;;;; After 1.16:
+;;;       else # comment
+;;;    recognized as a start of a block.
+;;;  Two different font-lock-levels provided.
+;;;  `cperl-pod-head-face' introduced. Used for highlighting.
+;;;  `imenu' marks pods, +Packages moved to the head. 
+
+;;;; After 1.17:
+;;;  Scan for pods highlights here-docs too.
+;;;  Note that the tag of here-doc may be rehighlighted later by lazy-lock.
+;;;  Only one here-doc-tag per line is supported, and one in comment
+;;;  or a string may break fontification.
+;;;  POD headers were supposed to fill one line only.
+
+;;;; After 1.18:
+;;;  `font-lock-keywords' were set in 19.30 style _always_. Current scheme 
+;;;    may  break under XEmacs.
+;;;  `cperl-calculate-indent' dis suppose that `parse-start' was defined.
+;;;  `fontified' tag is added to fontified text as well as `lazy-lock' (for
+;;;    compatibility with older lazy-lock.el) (older one overfontifies
+;;;    something nevertheless :-().
+;;;  Will not indent something inside pod and here-documents.
+;;;  Fontifies the package name after import/no/bootstrap.
+;;;  Added new entry to menu with meta-info about the mode.
+
+;;;; After 1.19:
+;;;  Prefontification works much better with 19.29. Should be checked
+;;;   with 19.30 as well.
+;;;  Some misprints in docs corrected.
+;;;  Now $a{-text} and -text => "blah" are fontified as strings too.
+;;;  Now the pod search is much stricter, so it can help you to find
+;;;    pod sections which are broken because of whitespace before =blah
+;;;    - just observe the fontification.
+
+;;;; After 1.20
+;;;  Anonymous subs are indented with respect to the level of
+;;;    indentation of `sub' now.
+;;;  {} is recognized as hash after `bless' and `return'.
+;;;  Anonymous subs are split by `cperl-linefeed' as well.
+;;;  Electric parens embrace a region if present.
+;;;  To make `cperl-auto-newline' useful,
+;;;    `cperl-auto-newline-after-colon' is introduced.
+;;;  `cperl-electric-parens' is now t or nul. The old meaning is moved to
+;;;  `cperl-electric-parens-string'.
+;;;  `cperl-toggle-auto-newline' introduced, put on C-c C-a.
+;;;  `cperl-toggle-abbrev' introduced, put on C-c C-k.
+;;;  `cperl-toggle-electric' introduced, put on C-c C-e.
+;;;  Beginning-of-defun-regexp was not anchored.
+
+;;;; After 1.21
+;;;  Auto-newline grants `cperl-extra-newline-before-brace' if "{" is typed
+;;;    after ")".
+;;;  {} is recognized as expression after `tr' and friends.
+
+;;;; After 1.22
+;;;  Entry Hierarchy added to imenu. Very primitive so far.
+;;;  One needs newer `imenu-go'.el. A patch to `imenu' is needed as well.
+;;;  Writes its own TAGS files.
+;;;  Class viewer based on TAGS files. Does not trace @ISA so far.
+;;;  19.31: Problems with scan for PODs corrected.
+;;;  First POD header correctly fontified.
+;;;  I needed (setq imenu-use-keymap-menu t) to get good imenu in 19.31.
+;;;  Apparently it makes a lot of hierarchy code obsolete...
+
+;;;; After 1.23
+;;;  Tags filler now scans *.xs as well.
+;;;  The info from *.xs scan is used by the hierarchy viewer.
+;;;  Hierarchy viewer documented.
+;;;  Bug in 19.31 imenu documented.
+
+;;;; After 1.24
+;;;  New location for info-files mentioned,
+;;;  Electric-; should work better.
+;;;  Minor bugs with POD marking.
+
+;;;; After 1.25 (probably not...)
+;;;  `cperl-info-page' introduced.  
+;;;  To make `uncomment-region' working, `comment-region' would
+;;;  not insert extra space.
+;;;  Here documents delimiters better recognized 
+;;;  (empty one, and non-alphanums in quotes handled). May be wrong with 1<<14?
+;;;  `cperl-db' added, used in menu.
+;;;  imenu scan removes text-properties, for better debugging
+;;;    - but the bug is in 19.31 imenu.
+;;;  formats highlighted by font-lock and prescan, embedded comments
+;;;  are not treated.
+;;;  POD/friends scan merged in one pass.
+;;;  Syntax class is not used for analyzing the code, only char-syntax
+;;;  may be checked against _ or'ed with w.
+;;;  Syntax class of `:' changed to be _.
+;;;  `cperl-find-bad-style' added.
+
+;;;; After 1.25
+;;;  When search for here-documents, we ignore commented << in simplest cases.
+;;;  `cperl-get-help' added, available on C-h v and from menu.
+;;;  Auto-help added. Default with `cperl-hairy', switchable on/off
+;;;   with startup variable `cperl-lazy-help-time' and from
+;;;   menu. Requires `run-with-idle-timer'.
+;;;  Highlighting of @abc{@efg} was wrong - interchanged two regexps.
+
+;;;; After 1.27
+;;;  Indentation: At toplevel after a label - fixed.
+;;;  1.27 was put to archives in binary mode ===> DOSish :-(
+
+;;;; After 1.28
+;;;  Thanks to Martin Buchholz <mrb@Eng.Sun.COM>: misprints in
+;;;  comments and docstrings corrected, XEmacs support cleaned up.
+;;;  The closing parenths would enclose the region into matching
+;;;  parens under the same conditions as the opening ones.
+;;;  Minor updates to `cperl-short-docs'.
+;;;  Will not consider <<= as start of here-doc.
+
+;;;; After 1.29
+;;;  Added an extra advice to look into Micro-docs. ;-).
+;;;  Enclosing of region when you press a closing parenth is regulated by
+;;;  `cperl-electric-parens-string'.
+;;;  Minor updates to `cperl-short-docs'.
+;;;  `initialize-new-tags-table' called only if present (Does this help
+;;;     with generation of tags under XEmacs?).
+;;;  When creating/updating tag files, new info is written at the old place,
+;;;     or at the end (is this a wanted behaviour? I need this in perl build directory).
+
+;;;; After 1.30
+;;;  All the keywords from keywords.pl included (maybe with dummy explanation).
+;;;  No auto-help inside strings, comment, here-docs, formats, and pods.
+;;;  Shrinkwrapping of info, regulated by `cperl-max-help-size',
+;;;  `cperl-shrink-wrap-info-frame'.
+;;;  Info on variables as well.
+;;;  Recognision of HERE-DOCS improved yet more.
+;;;  Autonewline works on `}' without warnings.
+;;;  Autohelp works again on $_[0].
+
+;;;; After 1.31
+;;;  perl-descr.el found its author - hi, Johan!
+;;;  Some support for correct indent after here-docs and friends (may
+;;;  be superseeded by eminent change to Emacs internals).
+;;;  Should work with older Emaxen as well ( `-style stuff removed).
+
+;;;; After 1.32
+
+;;;  Started to add support for `syntax-table' property (should work
+;;;  with patched Emaxen), controlled by
+;;;  `cperl-use-syntax-table-text-property'. Currently recognized:
+;;;    All quote-like operators: m, s, y, tr, qq, qw, qx, q,
+;;;    // in most frequent context: 
+;;;          after block or
+;;;                    ~ { ( = | & + - * ! , ;
+;;;          or 
+;;;                    while if unless until and or not xor split grep map
+;;;    Here-documents, formats, PODs, 
+;;;    ${...}
+;;;    'abc$'
+;;;    sub a ($); sub a ($) {}
+;;;  (provide 'cperl-mode) was missing!
+;;;  `cperl-after-expr-p' is now much smarter after `}'.
+;;;  `cperl-praise' added to mini-docs.
+;;;  Utilities try to support subs-with-prototypes.
+
+;;;; After 1.32.1
+;;;  `cperl-after-expr-p' is now much smarter after "() {}" and "word {}":
+;;;     if word is "else, map, grep".
+;;;  Updated for new values of syntax-table constants.
+;;;  Uses `help-char' (at last!) (disabled, does not work?!)
+;;;  A couple of regexps where missing _ in character classes.
+;;;  -s could be considered as start of regexp, 1../blah/ was not,
+;;;  as was not /blah/ at start of file.
+
+;;;; After 1.32.2
+;;;  "\C-hv" was wrongly "\C-hf"
+;;;  C-hv was not working on `[index()]' because of [] in skip-chars-*.
+;;;  `__PACKAGE__' supported.
+;;;  Thanks for Greg Badros: `cperl-lazy-unstall' is more complete,
+;;;  `cperl-get-help' is made compatible with `query-replace'.
+
+;;;; As of Apr 15, development version of 19.34 supports
+;;;; `syntax-table' text properties. Try setting
+;;;; `cperl-use-syntax-table-text-property'.
+
+;;;; After 1.32.3
+;;;  We scan for s{}[] as well (in simplest situations).
+;;;  We scan for $blah'foo as well.
+;;;  The default is to use `syntax-table' text property if Emacs is good enough.
+;;;  `cperl-lineup' is put on C-M-| (=C-M-S-\\).
+;;;  Start of `cperl-beautify-regexp'.
+
+;;;; After 1.32.4
+;;; `cperl-tags-hier-init' did not work in text-mode.
+;;; `cperl-noscan-files-regexp' had a misprint.
+;;; Generation of Class Hierarchy was broken due to a bug in `x-popup-menu'
+;;;  in 19.34.
+
+;;;; After 1.33:
+;;; my,local highlight vars after {} too.
+;;; TAGS could not be created before imenu was loaded.
+;;; `cperl-indent-left-aligned-comments' created.
+;;; Logic of `cperl-indent-exp' changed a little bit, should be more
+;;;  robust w.r.t. multiline strings.
+;;; Recognition of blah'foo takes into account strings.
+;;; Added '.al' to the list of Perl extensions.
+;;; Class hierarchy is "mostly" sorted (need to rethink algorthm
+;;;  of pruning one-root-branch subtrees to get yet better sorting.)
+;;; Regeneration of TAGS was busted.
+;;; Can use `syntax-table' property when generating TAGS
+;;;  (governed by  `cperl-use-syntax-table-text-property-for-tags').
+
+;;;; After 1.35:
+;;; Can process several =pod/=cut sections one after another.
+;;; Knows of `extproc' when under `emx', indents with `__END__' and `__DATA__'.
+;;; `cperl-under-as-char' implemented (XEmacs people like broken behaviour).
+;;; Beautifier for regexps fixed.
+;;; `cperl-beautify-level', `cperl-contract-level' coded
+;;;
+;;;; Emacs's 20.2 problems:
+;;; `imenu.el' has bugs, `imenu-add-to-menubar' does not work.
+;;; Couple of others problems with 20.2 were reported, my ability to check/fix
+;;; them is very reduced now.
+
+;;;; After 1.36:
+;;;  'C-M-|' in XEmacs fixed
+
+;;;; After 1.37:
+;;;  &&s was not recognized as start of regular expression;
+;;;  Will "preprocess" the contents of //e part of s///e too;
+;;;  What to do with s# blah # foo #e ?
+;;;  Should handle s;blah;foo;; better.
+;;;  Now the only known problems with regular expression recognition:
+;;;;;;;  s<foo>/bar/	- different delimiters (end ignored)
+;;;;;;;  s/foo/\\bar/	- backslash at start of subst (made into one chunk)
+;;;;;;;  s/foo//	- empty subst (made into one chunk + '/')
+;;;;;;;  s/foo/(bar)/	- start-group at start of subst (internal group will not match backwards)
+
+;;;; After 1.38:
+;;;  We highlight closing / of s/blah/foo/e;
+;;;  This handles s# blah # foo #e too;
+;;;  s//blah/, s///, s/blah// works again, and s#blah## too, the algorithm
+;;;   is much simpler now;
+;;;  Next round of changes: s\\\ works, s<blah>/foo/, 
+;;;   comments between the first and the second part allowed
+;;;  Another problem discovered:
+;;;;;;;  s[foo] <blah>e	- e part delimited by different <> (will not match)
+;;;  `cperl-find-pods-heres' somehow maybe called when string-face is undefined
+;;;   - put a stupid workaround for 20.1
+
+;;;; After 1.39:
+;;;  Could indent here-docs for comments;
+;;;  These problems fixed:
+;;;;;;;  s/foo/\\bar/	- backslash at start of subst (made into two chunk)
+;;;;;;;  s[foo] <blah>e	- "e" part delimited by "different" <> (will match)
+;;;  Matching brackets honor prefices, may expand abbreviations;
+;;;  When expanding abbrevs, will remove last char only after
+;;;    self-inserted whitespace;
+;;;  More convenient "Refress hard constructs" in menu;
+;;;  `cperl-add-tags-recurse', `cperl-add-tags-recurse-noxs'
+;;;    added (for -batch mode);
+;;;  Better handling of errors when scanning for Perl constructs;
+;;;;;;;  Possible "problem" with class hierarchy in Perl distribution 
+;;;;;;;    directory: ./ext duplicates ./lib;
+;;;  Write relative paths for generated TAGS;
+
+;;;; After 1.40:
+;;;  s  /// may be separated by "\n\f" too;
+;;;  `s  #blah' recognized as a comment;
+;;;  Would highlight s/abc//s wrong;
+;;;  Debugging code in `cperl-electric-keywords' was leaking a message;
+
+(defconst cperl-xemacs-p (string-match "XEmacs\\|Lucid" emacs-version))
+
+
+;;---------------------------------------------------------
+(defgroup perl nil
+  "CPerl mode 1.35 with XEmacs enhancements."
+  :prefix "cperl"
+  :group 'languages)
+
+;;-----------------------------------------------
+(defgroup cperl-indent nil
+  "CPerl indention control variables."
+  :prefix "cperl"
+  :group 'perl)
+
+(defcustom cperl-tab-always-indent t
+  "*Non-nil means TAB in CPerl mode should always reindent the current line,
+regardless of where in the line point is when the TAB command is used."
+  :type 'boolean
+  :group 'cperl-indent)
+
+(defcustom cperl-extra-newline-before-brace nil
+  "*Non-nil means that if, elsif, while, until, else, for, foreach
+and do constructs look like:
+
+	if ()
+	{
+	}
+
+instead of:
+
+	if () {
+	}
+"
+  :type 'boolean
+  :group 'cperl-indent)
+
+(defcustom cperl-indent-level 2
+  "*Indentation of CPerl statements with respect to containing block."
+  :type '(choice (const 1) (const 2) (const 4) (const 6) (const 8))
+  :group 'cperl-indent)
+
+(defcustom cperl-lineup-step nil
+  "*`cperl-lineup' will always lineup at multiple of this number.
+If `nil', the value of `cperl-indent-level' will be used."
+  :type '(choice (const nil) (const 1) (const 2) (const 4) (const 6) (const 8))
+  :group 'cperl-indent)
+
+(defcustom cperl-brace-imaginary-offset 0
+  "*Imagined indentation of a Perl open brace that actually follows a statement.
+An open brace following other text is treated as if it were this far
+to the right of the start of its line."
+  :type '(choice (const 0) (const 1) (const 2) (const 4) (const 6) (const 8))
+  :group 'cperl-indent)
+
+(defcustom cperl-brace-offset 0
+  "*Extra indentation for braces, compared with other text in same context."
+  :type '(choice (const 0) (const 1) (const 2) (const 4) (const 6) (const 8))
+  :group 'cperl-indent)
+
+(defcustom cperl-label-offset -2
+  "*Offset of CPerl label lines relative to usual indentation."
+  :type '(choice (const -4) (const -2) (const -1))
+  :group 'cperl-indent)
+
+(defcustom cperl-min-label-indent 1
+  "*Minimal offset of CPerl label lines."
+  :type '(choice (const 1) (const 2) (const 4))
+  :group 'cperl-indent)
+
+(defcustom cperl-continued-statement-offset 2
+  "*Extra indent for lines not starting new statements."
+  :type '(choice (const 2) (const 4) (const 6) (const 8))
+  :group 'cperl-indent)
+
+(defcustom cperl-continued-brace-offset 0
+  "*Extra indent for substatements that start with open-braces.
+This is in addition to cperl-continued-statement-offset."
+  :type '(choice (const 0) (const 1) (const 2) (const 4) (const 6) (const 8))
+  :group 'cperl-indent)
+
+(defcustom cperl-close-paren-offset -1
+  "*Extra indent for substatements that start with close-parenthesis."
+  :type '(choice (const -4) (const -3) (const -2) (const -1) (const 0))
+  :group 'cperl-indent)
+
+(defcustom cperl-regexp-indent-step nil
+  "*indentation used when beautifying regexps.
+If `nil', the value of `cperl-indent-level' will be used."
+  :type '(choice (const nil) (const 0) (const 2) (const 4) (const 6) (const 8))
+  :group 'cperl-indent)
+
+(defcustom cperl-indent-left-aligned-comments t
+  "*Non-nil means that the comment starting in leftmost column should indent."
+  :type 'boolean
+  :group 'cperl-indent)
+
+;;-------------------------------------------
+
+(defcustom cperl-hairy nil
+  "*Not-nil means all the bells and whistles are enabled in CPerl."
+  :type 'boolean
+  :group 'perl)
+
+(defcustom cperl-auto-newline nil
+  "*Non-nil means automatically newline before and after braces,
+and after colons and semicolons, inserted in CPerl code. The following
+\\[cperl-electric-backspace] will remove the inserted whitespace.
+Insertion after colons requires both this variable and 
+`cperl-auto-newline-after-colon' set."
+  :type 'boolean
+  :group 'perl)
+
+(defcustom cperl-auto-newline-after-colon nil
+  "*Non-nil means automatically newline even after colons.
+Subject to `cperl-auto-newline' setting."
+  :type 'boolean
+  :group 'perl)
+
+;;--------------------------------------
+(defgroup cperl-electric nil
+  "Customizable electric behaviour."
+  :prefix "cperl"
+  :group 'perl)
+
+(defcustom cperl-electric-lbrace-space nil
+  "*Non-nil (and non-null) means { after $ in CPerl buffers should be preceded by ` '.
+Can be overwritten by `cperl-hairy' if nil."
+  :type 'boolean
+  :group 'cperl-electric)
+
+(defcustom cperl-electric-parens-string "({[]})<"
+  "*String of parentheses that should be electric in CPerl."
+  :type 'string
+  :group 'cperl-electric)
+
+(defcustom cperl-electric-parens nil
+  "*Non-nil (and non-null) means parentheses should be electric in CPerl.
+Can be overwritten by `cperl-hairy' if nil."
+  :type 'boolean
+  :group 'cperl-electric)
+
+(defcustom cperl-electric-parens-mark (and window-system
+					   (boundp 'zmacs-regions)
+					   zmacs-regions)
+  "*Not-nil means that electric parens look for active mark.
+Default is yes if there is visual feedback on mark."
+  :type 'boolean
+  :group 'cperl-electric)
+
+(defcustom cperl-electric-linefeed nil
+  "*If true, LFD should be hairy in CPerl, otherwise C-c LFD is hairy.
+In any case these two mean plain and hairy linefeeds together.
+Can be overwritten by `cperl-hairy' if nil."
+  :type 'boolean
+  :group 'cperl-electric)
+
+(defcustom cperl-electric-keywords nil
+  "*Not-nil (and non-null) means keywords are electric in CPerl.
+Can be overwritten by `cperl-hairy' if nil."
+  :type 'boolean
+  :group 'cperl-electric)
+;;-------------------------
+
+(defcustom cperl-comment-column 32
+  "*Column to put comments in CPerl (use \\[cperl-indent]' to lineup with code)."
+  :type 'integer
+  :group 'perl)
+
+(defcustom cperl-vc-header-alist '((RCS "$rcs = ' $Id\$ ' ;")
+				   (CVS "$cvs = ' $Id\$ ' ;")
+				   (SCCS "$sccs = '%W\%' ;"))
+  "*What to use as `vc-header-alist' in CPerl.")
+
+
+(defcustom cperl-info-on-command-no-prompt nil
+  "*Not-nil (and non-null) means not to prompt on C-h f.
+The opposite behaviour is always available if prefixed with C-c.
+Can be overwritten by `cperl-hairy' if nil."
+  :type 'boolean
+  :group 'perl)
+
+(defcustom cperl-help nil
+  "*Not-nil (and non-null) means to show Auto help."
+  :type 'boolean
+  :group 'perl)
+
+(defvar cperl-lazy-help-time nil
+  "*Not-nil (and non-null) means to show lazy help after given idle time.")
+
+(defcustom cperl-font-lock (and (boundp 'font-lock-auto-fontify)
+				font-lock-auto-fontify)
+  "*Non-nil (and non-null) means CPerl buffers will use font-lock-mode.
+Can be overwritten by `cperl-hairy' if nil.  If never set, it will be
+set to the value of `font-lock-auto-fontify'."
+  :type 'boolean
+  :group 'perl)
+
+;;--------------------------------------------
+(defgroup cperl-faces nil
+  "Font lock faces for CPerl mode."
+  :group 'perl
+  :group 'faces)
+
+(defface cperl-pod-face
+    '((((type x) (class color)) (:foreground "brown4") )
+      (t (:foreground "yellow")))
+  "*The face used for POD highlighting."
+  :group 'cperl-faces)
+
+(defface cperl-pod-head-face
+  '((((type x) (class color)) (:foreground "steelblue"))
+    (t (:foreground blue)))
+  "*The face used for POD headers."
+  :group 'cperl-faces)
+
+(defface cperl-here-face 
+  '((((type x) (class color)) (:foreground "green4"))
+    (t (:foreground "green")))
+  "*The result of evaluation of this expression is used for here-docs highlighting."
+  :group 'cperl-faces)
+
+(defcustom cperl-pod-here-fontify '(featurep 'font-lock)
+  "*Not-nil after evaluation means to highlight pod and here-docs sections."
+  :type 'boolean
+  :group 'perl)
+
+(defcustom cperl-pod-here-scan t
+  "*Not-nil means look for pod and here-docs sections during startup.
+You can always make lookup from menu or using \\[cperl-find-pods-heres]."
+  :type 'boolean
+  :group 'perl)
+
+(defcustom cperl-imenu-addback nil
+  "*Not-nil means add backreferences to generated `imenu's.
+May require patched `imenu' and `imenu-go'."
+  :type 'boolean
+  :group 'perl)
+
+(defcustom cperl-max-help-size 66
+  "*Non-nil means shrink-wrapping of info-buffer allowed up to these percents."
+  :type 'integer
+  :group 'perl)
+
+(defcustom cperl-shrink-wrap-info-frame t
+  "*Non-nil means shrink-wrapping of info-buffer-frame allowed."
+  :type 'boolean
+  :group 'perl)
+
+(defcustom cperl-info-page "perl"
+  "*Name of the info page containing perl docs.
+Older version of this page was called `perl5', newer `perl'."
+  :type 'string
+  :group 'perl)
+
+(defvar cperl-use-syntax-table-text-property nil
+  "Temporary kludge until I find everything connected to this so I can
+  either rip it out or implement it in XEmacs.")
+
+;;(defcustom cperl-use-syntax-table-text-property 
+;;    (boundp 'parse-sexp-lookup-properties)
+;;  "*Non-nil means CPerl sets up and uses `syntax-table' text property."
+;;  :type 'boolean
+;;  :group 'perl)
+
+(defvar cperl-use-syntax-table-text-property-for-tags 
+  cperl-use-syntax-table-text-property
+  "*Non-nil means: set up and use `syntax-table' text property generating TAGS.")
+
+(defcustom cperl-scan-files-regexp "\\.\\([pP][Llm]\\|xs\\)$"
+  "*Regexp to match files to scan when generating TAGS."
+  :type 'regexp
+  :group 'perl)
+
+(defcustom cperl-noscan-files-regexp "/\\(\\.\\.?\\|SCCS\\|RCS\\|CVS\\|blib\\)$"
+  "*Regexp to match files/dirs to skip when generating TAGS."
+  :type 'regexp
+  :group 'perl)
+
+(defcustom cperl-regexp-indent-step nil
+  "*indentation used when beautifying regexps.
+If `nil', the value of `cperl-indent-level' will be used."
+  :type 'boolean
+  :group 'perl)
+
+(defcustom cperl-indent-left-aligned-comments t
+  "*Non-nil means that the comment starting in leftmost column should indent."
+  :type 'boolean
+  :group 'perl)
+
+(defcustom cperl-under-as-char t
+  "*Non-nil means that the _ (underline) should be treated as word char."
+  :type 'boolean
+  :group 'perl)
+
+
+;;; Short extra-docs.
+
+(defvar cperl-tips 'please-ignore-this-line
+  "Get newest version of this package from
+  ftp://ftp.math.ohio-state.edu/pub/users/ilya/emacs
+and/or
+  ftp://ftp.math.ohio-state.edu/pub/users/ilya/perl
+
+ This particular version has been modified for XEmacs 20.
+
+Get support packages choose-color.el (or font-lock-extra.el before
+19.30), imenu-go.el from the same place.  \(Look for other files there
+too... ;-) Get a patch for imenu.el in 19.29.  Note that for 19.30 and
+later you should use choose-color.el *instead* of font-lock-extra.el 
+\(and you will not get smart highlighting in C :-().
+
+Note that to enable Compile choices in the menu you need to install
+mode-compile.el.
+
+Get perl5-info from 
+  $CPAN/doc/manual/info/perl-info.tar.gz
+older version was on
+  http://www.metronet.com:70/9/perlinfo/perl5/manual/perl5-info.tar.gz
+
+If you use imenu-go, run imenu on perl5-info buffer (you can do it
+from CPerl menu). If many files are related, generate TAGS files from
+Tools/Tags submenu in CPerl menu.
+
+If some class structure is too complicated, use Tools/Hierarchy-view
+from CPerl menu, or hierarchic view of imenu. The second one uses the
+current buffer only, the first one requires generation of TAGS from
+CPerl/Tools/Tags menu beforehand.
+
+Run CPerl/Tools/Insert-spaces-if-needed to fix your lazy typing.
+
+Switch auto-help on/off with CPerl/Tools/Auto-help.
+
+Before reporting (non-)problems look in the problem section on what I
+know about them.")
+
+(defvar cperl-problems 'please-ignore-this-line
+"Emacs has a _very_ restricted syntax parsing engine. 
+
+It may be corrected on the level of C code, please look in the
+`non-problems' section if you want to volunteer.
+
+CPerl mode tries to corrects some Emacs misunderstandings, however,
+for efficiency reasons the degree of correction is different for
+different operations. The partially corrected problems are: POD
+sections, here-documents, regexps. The operations are: highlighting,
+indentation, electric keywords, electric braces. 
+
+This may be confusing, since the regexp s#//#/#\; may be highlighted
+as a comment, but it will be recognized as a regexp by the indentation
+code. Or the opposite case, when a pod section is highlighted, but
+may break the indentation of the following code (though indentation
+should work if the balance of delimiters is not broken by POD).
+
+The main trick (to make $ a \"backslash\") makes constructions like
+${aaa} look like unbalanced braces. The only trick I can think of is
+to insert it as $ {aaa} (legal in perl5, not in perl4). 
+
+Similar problems arise in regexps, when /(\\s|$)/ should be rewritten
+as /($|\\s)/. Note that such a transposition is not always possible
+:-(.  " )
+
+(defvar cperl-non-problems 'please-ignore-this-line
+"As you know from `problems' section, Perl syntax is too hard for CPerl.
+
+Most the time, if you write your own code, you may find an equivalent
+\(and almost as readable) expression.
+
+Try to help CPerl: add comments with embedded quotes to fix CPerl
+misunderstandings about the end of quotation:
+
+$a='500$';      # ';
+
+You won't need it too often. The reason: $ \"quotes\" the following
+character (this saves a life a lot of times in CPerl), thus due to
+Emacs parsing rules it does not consider tick (i.e., ' ) after a
+dollar as a closing one, but as a usual character.
+
+Now the indentation code is pretty wise. The only drawback is that it
+relies on Emacs parsing to find matching parentheses. And Emacs
+*cannot* match parentheses in Perl 100% correctly. So
+	1 if s#//#/#;
+will not break indentation, but
+	1 if ( s#//#/# );
+will.
+
+By similar reasons
+	s\"abc\"def\";
+will confuse CPerl a lot.
+
+If you still get wrong indentation in situation that you think the
+code should be able to parse, try:
+
+a) Check what Emacs thinks about balance of your parentheses.
+b) Supply the code to me (IZ).
+
+Pods are treated _very_ rudimentally. Here-documents are not treated
+at all (except highlighting and inhibiting indentation). (This may
+change some time. RMS approved making syntax lookup recognize text
+attributes, but volunteers are needed to change Emacs C code.)
+
+To speed up coloring the following compromises exist:
+   a) sub in $mypackage::sub may be highlighted.
+   b) -z in [a-z] may be highlighted.
+   c) if your regexp contains a keyword (like \"s\"), it may be highlighted.
+
+
+Imenu in 19.31 is broken. Set `imenu-use-keymap-menu' to t, and remove
+`car' before `imenu-choose-buffer-index' in `imenu'.
+")
+
+(defvar cperl-praise 'please-ignore-this-line
+  "RMS asked me to list good things about CPerl. Here they go:
+
+0) It uses the newest `syntax-table' property ;-);
+
+1) It does 99% of Perl syntax correct (as opposed to 80-90% in Perl
+mode - but the latter number may have improved too in last years) even 
+without `syntax-table' property; When using this property, it should 
+handle 99.995% of lines correct - or somesuch.
+
+2) It is generally belived to be \"the most user-friendly Emacs
+package\" whatever it may mean (I doubt that the people who say similar
+things tried _all_ the rest of Emacs ;-), but this was not a lonely
+voice);
+
+3) Everything is customizable, one-by-one or in a big sweep;
+
+4) It has many easily-accessable \"tools\":
+        a) Can run program, check syntax, start debugger;
+        b) Can lineup vertically \"middles\" of rows, like `=' in
+                a  = b;
+                cc = d;
+        c) Can insert spaces where this impoves readability (in one
+                interactive sweep over the buffer);
+        d) Has support for imenu, including:
+                1) Separate unordered list of \"interesting places\";
+                2) Separate TOC of POD sections;
+                3) Separate list of packages;
+                4) Hierarchical view of methods in (sub)packages;
+                5) and functions (by the full name - with package);
+        e) Has an interface to INFO docs for Perl; The interface is
+                very flexible, including shrink-wrapping of
+                documentation buffer/frame;
+        f) Has a builtin list of one-line explanations for perl constructs.
+        g) Can show these explanations if you stay long enough at the
+                corresponding place (or on demand);
+        h) Has an enhanced fontification (using 3 or 4 additional faces
+                comparing to font-lock - basically, different
+                namespaces in Perl have different colors);
+        i) Can construct TAGS basing on its knowledge of Perl syntax,
+                the standard menu has 6 different way to generate
+                TAGS (if by directory, .xs files - with C-language
+                bindings - are included in the scan);
+        j) Can build a hierarchical view of classes (via imenu) basing
+                on generated TAGS file;
+        k) Has electric parentheses, electric newlines, uses Abbrev
+                for electric logical constructs
+                        while () {}
+                with different styles of expansion (context sensitive
+                to be not so bothering). Electric parentheses behave
+                \"as they should\" in a presence of a visible region.
+        l) Changes msb.el \"on the fly\" to insert a group \"Perl files\";
+
+5) The indentation engine was very smart, but most of tricks may be
+not needed anymore with the support for `syntax-table' property. Has
+progress indicator for indentation (with `imenu' loaded).
+
+6) Indent-region improves inline-comments as well;
+
+7) Fill-paragraph correctly handles multi-line comments;
+")
+
+
+
+;;; Portability stuff:
+
+(defmacro cperl-define-key (fsf-key definition &optional xemacs-key)
+  (` (define-key cperl-mode-map
+       (, (if xemacs-key
+	      (` (if cperl-xemacs-p (, xemacs-key) (, fsf-key)))
+	    fsf-key))
+       (, definition))))
+
+(defvar del-back-ch (car (append (where-is-internal 'delete-backward-char)
+				 (where-is-internal 'backward-delete-char-untabify)))
+  "Character generated by key bound to delete-backward-char.")
+
+(and (vectorp del-back-ch) (= (length del-back-ch) 1) 
+     (setq del-back-ch (aref del-back-ch 0)))
+
+(if cperl-xemacs-p
+    (progn
+      ;; "Active regions" are on: use region only if active
+      ;; "Active regions" are off: use region unconditionally
+      (defun cperl-use-region-p ()
+	(if zmacs-regions (mark) t))
+      (defun cperl-mark-active () (mark)))
+  (defun cperl-use-region-p ()
+    (if transient-mark-mode mark-active t))
+  (defun cperl-mark-active () mark-active))
+
+(defsubst cperl-enable-font-lock ()
+  (or cperl-xemacs-p window-system))
+
+(if (boundp 'unread-command-events)
+    (if cperl-xemacs-p
+	(defun cperl-putback-char (c)	; XEmacs >= 19.12
+	  (setq unread-command-events (list (character-to-event c))))
+      (defun cperl-putback-char (c)	; Emacs 19
+	(setq unread-command-events (list c))))
+  (defun cperl-putback-char (c)		; XEmacs <= 19.11
+    (setq unread-command-event (character-to-event c))))
+
+(or (fboundp 'uncomment-region)
+    (defun uncomment-region (beg end)
+      (interactive "r")
+      (comment-region beg end -1)))
+
+(defvar cperl-do-not-fontify
+  (if (string< emacs-version "19.30")
+      'fontified
+    'lazy-lock)
+  "Text property which inhibits refontification.")
+
+(defsubst cperl-put-do-not-fontify (from to)
+  (put-text-property (max (point-min) (1- from))
+		     to cperl-do-not-fontify t))
+
+(defcustom cperl-mode-hook nil
+  "Hook run by `cperl-mode'."
+  :type 'sexp
+  :group 'perl)
+
+
+;;; Probably it is too late to set these guys already, but it can help later:
+;;; ####
+(setq auto-mode-alist
+      (append '(("\\.\\([pP][Llm]\\|al\\)\\'" . perl-mode))  auto-mode-alist ))
+(and (boundp 'interpreter-mode-alist)
+     (setq interpreter-mode-alist (append interpreter-mode-alist
+					  '(("miniperl" . perl-mode)))))
+(if (fboundp 'eval-when-compile)
+    (eval-when-compile
+      (condition-case nil
+	  (require 'imenu)
+	(error nil))
+      (condition-case nil
+	  (require 'easymenu)
+	(error nil))
+      ;; Calling `cperl-enable-font-lock' below doesn't compile on XEmacs,
+      ;; macros instead of defsubsts don't work on Emacs, so we do the
+      ;; expansion manually. Any other suggestions?
+      (if (or (string-match "XEmacs\\|Lucid" emacs-version)
+	      window-system)
+	  (require 'font-lock))
+      (require 'cl)
+      ))
+
+(defvar cperl-mode-abbrev-table nil
+  "Abbrev table in use in Cperl-mode buffers.")
+
+(add-hook 'edit-var-mode-alist '(perl-mode (regexp . "^cperl-")))
+
+(defvar cperl-mode-map () "Keymap used in CPerl mode.")
+
+(if cperl-mode-map nil
+  (setq cperl-mode-map (make-sparse-keymap))
+  (cperl-define-key "{" 'cperl-electric-lbrace)
+  (cperl-define-key "[" 'cperl-electric-paren)
+  (cperl-define-key "(" 'cperl-electric-paren)
+  (cperl-define-key "<" 'cperl-electric-paren)
+  (cperl-define-key "}" 'cperl-electric-brace)
+  (cperl-define-key "]" 'cperl-electric-rparen)
+  (cperl-define-key ")" 'cperl-electric-rparen)
+  (cperl-define-key ";" 'cperl-electric-semi)
+  (cperl-define-key ":" 'cperl-electric-terminator)
+  (cperl-define-key "\C-cf" 'cperl-find-pods-heres)
+  (cperl-define-key "\C-j" 'newline-and-indent)
+  (cperl-define-key "\C-c\C-j" 'cperl-linefeed)
+  (cperl-define-key "\C-c\C-a" 'cperl-toggle-auto-newline)
+  (cperl-define-key "\C-c\C-k" 'cperl-toggle-abbrev)
+  (cperl-define-key "\C-c\C-e" 'cperl-toggle-electric)
+  (cperl-define-key "\e\C-q" 'cperl-indent-exp) ; Usually not bound
+  (cperl-define-key [?\C-\M-\|] 'cperl-lineup
+		    [(control meta |)])
+  ;;(cperl-define-key "\M-q" 'cperl-fill-paragraph)
+  ;;(cperl-define-key "\e;" 'cperl-indent-for-comment)
+  (if cperl-xemacs-p
+      (progn
+        (cperl-define-key 'backspace 'cperl-electric-backspace)
+        (cperl-define-key 'delete 'cperl-electric-delete))
+      (cperl-define-key "\177" 'cperl-electric-backspace))
+  (cperl-define-key "\t" 'cperl-indent-command)
+  ;; don't clobber the backspace binding:
+  (cperl-define-key "\C-c\C-hf" 'cperl-info-on-current-command
+		    [(control c) (control h) f])
+  (cperl-define-key "\C-hf"
+		    ;;(concat (char-to-string help-char) "f") ; does not work
+		    'cperl-info-on-command
+		    [(control h) f])
+  (cperl-define-key "\C-hv"
+		    ;;(concat (char-to-string help-char) "v") ; does not work
+		    'cperl-get-help
+		    [(control h) v])
+  (if (and cperl-xemacs-p 
+	   (<= emacs-minor-version 11) (<= emacs-major-version 19))
+      (progn
+	;; substitute-key-definition is usefulness-deenhanced...
+	(cperl-define-key "\M-q" 'cperl-fill-paragraph)
+	(cperl-define-key "\e;" 'cperl-indent-for-comment)
+	(cperl-define-key "\e\C-\\" 'cperl-indent-region))
+    (substitute-key-definition
+     'indent-sexp 'cperl-indent-exp
+     cperl-mode-map global-map)
+    (substitute-key-definition
+     'fill-paragraph 'cperl-fill-paragraph
+     cperl-mode-map global-map)
+    (substitute-key-definition
+     'indent-region 'cperl-indent-region
+     cperl-mode-map global-map)
+    (substitute-key-definition
+     'indent-for-comment 'cperl-indent-for-comment
+     cperl-mode-map global-map)))
+
+(defvar cperl-menu)
+(condition-case nil
+    (progn
+      (require 'easymenu)
+      (easy-menu-define cperl-menu cperl-mode-map "Menu for CPerl mode"
+         '("Perl"
+	   ["Beginning of function" beginning-of-defun t]
+	   ["End of function" end-of-defun t]
+	   ["Mark function" mark-defun t]
+	   ["Indent expression" cperl-indent-exp t]
+	   ["Fill paragraph/comment" cperl-fill-paragraph t]
+	   "----"
+	   ["Line up a construction" cperl-lineup (cperl-use-region-p)]
+	   ["Beautify a regexp" cperl-beautify-regexp
+	    cperl-use-syntax-table-text-property]
+	   ["Beautify a group in regexp" cperl-beautify-level
+	    cperl-use-syntax-table-text-property]
+	   ["Contract a group in regexp" cperl-contract-level
+	    cperl-use-syntax-table-text-property]
+	   ["Refresh \"hard\" constructions" cperl-find-pods-heres t]
+	   "----"
+	   ["Indent region" cperl-indent-region (cperl-use-region-p)]
+	   ["Comment region" cperl-comment-region (cperl-use-region-p)]
+	   ["Uncomment region" cperl-uncomment-region (cperl-use-region-p)]
+	   "----"
+	   ["Run" mode-compile (fboundp 'mode-compile)]
+	   ["Kill" mode-compile-kill (and (fboundp 'mode-compile-kill)
+					  (get-buffer "*compilation*"))]
+	   ["Next error" next-error (get-buffer "*compilation*")]
+	   ["Check syntax" cperl-check-syntax (fboundp 'mode-compile)]
+	   "----"
+	   ["Debugger" cperl-db t]
+	   "----"
+	   ("Tools"
+	    ["Imenu" imenu (fboundp 'imenu)]
+	    ["Insert spaces if needed" cperl-find-bad-style t]
+	    ["Class Hierarchy from TAGS" cperl-tags-hier-init t]
+	    ;;["Update classes" (cperl-tags-hier-init t) tags-table-list]
+	    ["Imenu on info" cperl-imenu-on-info (featurep 'imenu)]
+	    ("Tags"
+;;;	     ["Create tags for current file" cperl-etags t]
+;;;	     ["Add tags for current file" (cperl-etags t) t]
+;;;	     ["Create tags for Perl files in directory" (cperl-etags nil t) t]
+;;;	     ["Add tags for Perl files in directory" (cperl-etags t t) t]
+;;;	     ["Create tags for Perl files in (sub)directories" 
+;;;	      (cperl-etags nil 'recursive) t]
+;;;	     ["Add tags for Perl files in (sub)directories"
+;;;	      (cperl-etags t 'recursive) t]) 
+;;;; cperl-write-tags (&optional file erase recurse dir inbuffer)
+	     ["Create tags for current file" (cperl-write-tags nil t) t]
+	     ["Add tags for current file" (cperl-write-tags) t]
+	     ["Create tags for Perl files in directory" 
+	      (cperl-write-tags nil t nil t) t]
+	     ["Add tags for Perl files in directory" 
+	      (cperl-write-tags nil nil nil t) t]
+	     ["Create tags for Perl files in (sub)directories" 
+	      (cperl-write-tags nil t t t) t]
+	     ["Add tags for Perl files in (sub)directories"
+	      (cperl-write-tags nil nil t t) t])
+	    ["Define word at point" imenu-go-find-at-position 
+	     (fboundp 'imenu-go-find-at-position)]
+	    ["Help on function" cperl-info-on-command t]
+	    ["Help on function at point" cperl-info-on-current-command t]
+	    ["Help on symbol at point" cperl-get-help t]
+	    )
+	   ("Toggle..."
+	    ["Auto-help" cperl-toggle-help :style toggle :selected cperl-help]
+	    ["Auto newline" cperl-toggle-auto-newline t]
+	    ["Electric parens" cperl-toggle-electric t]
+	    ["Electric keywords" cperl-toggle-abbrev t]
+	    )
+	   ("Indent styles..."
+	    ["GNU" (cperl-set-style "GNU") t]
+	    ["C++" (cperl-set-style "C++") t]
+	    ["FSF" (cperl-set-style "FSF") t]
+	    ["BSD" (cperl-set-style "BSD") t]
+	    ["Whitesmith" (cperl-set-style "Whitesmith") t]
+	    )
+	   ("Micro-docs"
+	    ["Tips" (describe-variable 'cperl-tips) t]
+	    ["Problems" (describe-variable 'cperl-problems) t]
+	    ["Non-problems" (describe-variable 'cperl-non-problems) t]
+	    ["Praise" (describe-variable 'cperl-praise) t]))))
+  (error nil))
+
+(autoload 'c-macro-expand "cmacexp"
+  "Display the result of expanding all C macros occurring in the region.
+The expansion is entirely correct because it uses the C preprocessor."
+  t)
+
+(defvar cperl-mode-syntax-table nil
+  "Syntax table in use in Cperl-mode buffers.")
+
+(defvar cperl-string-syntax-table nil
+  "Syntax table in use in Cperl-mode string-like chunks.")
+
+(if cperl-mode-syntax-table
+    ()
+  (setq cperl-mode-syntax-table (make-syntax-table))
+  (modify-syntax-entry ?\\ "\\" cperl-mode-syntax-table)
+  (modify-syntax-entry ?/ "." cperl-mode-syntax-table)
+  (modify-syntax-entry ?* "." cperl-mode-syntax-table)
+  (modify-syntax-entry ?+ "." cperl-mode-syntax-table)
+  (modify-syntax-entry ?- "." cperl-mode-syntax-table)
+  (modify-syntax-entry ?= "." cperl-mode-syntax-table)
+  (modify-syntax-entry ?% "." cperl-mode-syntax-table)
+  (modify-syntax-entry ?< "." cperl-mode-syntax-table)
+  (modify-syntax-entry ?> "." cperl-mode-syntax-table)
+  (modify-syntax-entry ?& "." cperl-mode-syntax-table)
+  (modify-syntax-entry ?$ "\\" cperl-mode-syntax-table)
+  (modify-syntax-entry ?\n ">" cperl-mode-syntax-table)
+  (modify-syntax-entry ?# "<" cperl-mode-syntax-table)
+  (modify-syntax-entry ?' "\"" cperl-mode-syntax-table)
+  (modify-syntax-entry ?` "\"" cperl-mode-syntax-table)
+  (if cperl-under-as-char
+      (modify-syntax-entry ?_ "w" cperl-mode-syntax-table))
+  (modify-syntax-entry ?: "_" cperl-mode-syntax-table)
+  (modify-syntax-entry ?| "." cperl-mode-syntax-table)
+  (setq cperl-string-syntax-table (copy-syntax-table cperl-mode-syntax-table))
+  (modify-syntax-entry ?$ "." cperl-string-syntax-table)
+  (modify-syntax-entry ?# "." cperl-string-syntax-table) ; (?# comment )
+)
+
+
+
+;; Make customization possible "in reverse"
+;;(defun cperl-set (symbol to)
+;;  (or (eq (symbol-value symbol) 'null) (set symbol to)))
+(defsubst cperl-val (symbol &optional default hairy)
+  (cond
+   ((eq (symbol-value symbol) 'null) default)
+   (cperl-hairy (or hairy t))
+   (t (symbol-value symbol))))
+
+
+;; ??? What is this for?
+(defvar cperl-faces-init)
+
+;; provide an alias for working with emacs 19.  the perl-mode that comes
+;; with it is really bad, and this lets us seamlessly replace it.
+;;;###autoload
+(defalias 'perl-mode 'cperl-mode)
+;;;###autoload
+(defun cperl-mode ()
+  "Major mode for editing Perl code.
+Expression and list commands understand all C brackets.
+Tab indents for Perl code.
+Paragraphs are separated by blank lines only.
+Delete converts tabs to spaces as it moves back.
+
+Various characters in Perl almost always come in pairs: {}, (), [],
+sometimes <>. When the user types the first, she gets the second as
+well, with optional special formatting done on {}.  (Disabled by
+default.)  You can always quote (with \\[quoted-insert]) the left
+\"paren\" to avoid the expansion. The processing of < is special,
+since most the time you mean \"less\". Cperl mode tries to guess
+whether you want to type pair <>, and inserts is if it
+appropriate. You can set `cperl-electric-parens-string' to the string that
+contains the parenths from the above list you want to be electrical.
+Electricity of parenths is controlled by `cperl-electric-parens'.
+You may also set `cperl-electric-parens-mark' to have electric parens
+look for active mark and \"embrace\" a region if possible.'
+
+CPerl mode provides expansion of the Perl control constructs:
+   if, else, elsif, unless, while, until, for, and foreach.
+=========(Disabled by default, see `cperl-electric-keywords'.)
+The user types the keyword immediately followed by a space, which causes
+the construct to be expanded, and the user is positioned where she is most
+likely to want to be.
+eg. when the user types a space following \"if\" the following appears in
+the buffer:
+            if () {     or   if ()
+            }                 {
+                              }