From: Chong Yidong Date: Sun, 26 Jun 2011 03:42:22 +0000 (-0400) Subject: * lisp/progmodes/cperl-mode.el (cperl-mode): Derive from prog-mode. X-Git-Tag: emacs-pretest-24.0.90~104^2~152^2~397 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5fdd4046b937d06b695fb8794ec1cdeb46bdfd8f;p=emacs.git * lisp/progmodes/cperl-mode.el (cperl-mode): Derive from prog-mode. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5c65ed8cd13..dd0c187759e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-06-26 Chong Yidong + + * progmodes/cperl-mode.el (cperl-mode): Derive from prog-mode. + 2011-06-26 Glenn Morris * progmodes/f90.el (f90-critical-indent): New option. diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 8eb2d01c097..48df73a678f 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -1522,7 +1522,7 @@ the last)." (defvar compilation-error-regexp-alist) ;;;###autoload -(defun cperl-mode () +(define-derived-mode cperl-mode prog-mode "CPerl" "Major mode for editing Perl code. Expression and list commands understand all C brackets. Tab indents for Perl code. @@ -1695,9 +1695,6 @@ with no args. DO NOT FORGET to read micro-docs (available from `Perl' menu) or as help on variables `cperl-tips', `cperl-problems', `cperl-praise', `cperl-speed'." - (interactive) - (kill-all-local-variables) - (use-local-map cperl-mode-map) (if (cperl-val 'cperl-electric-linefeed) (progn (local-set-key "\C-J" 'cperl-linefeed) @@ -1710,8 +1707,6 @@ or as help on variables `cperl-tips', `cperl-problems', (cperl-define-key "\C-hf" 'cperl-info-on-current-command [(control h) f]) (cperl-define-key "\C-c\C-hf" 'cperl-info-on-command [(control c) (control h) f]))) - (setq major-mode cperl-use-major-mode) - (setq mode-name "CPerl") (let ((prev-a-c abbrevs-changed)) (define-abbrev-table 'cperl-mode-abbrev-table '( ("if" "if" cperl-electric-keyword 0)