Mercurial > hg > xemacs-beta
comparison lisp/modes/cperl-mode.el @ 155:43dd3413c7c7 r20-3b4
Import from CVS: tag r20-3b4
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:39:39 +0200 |
parents | 25f70ba0133c |
children | 6b37e6ddd302 |
comparison
equal
deleted
inserted
replaced
154:94141801dd7e | 155:43dd3413c7c7 |
---|---|
30 | 30 |
31 | 31 |
32 ;;; Corrections made by Ilya Zakharevich ilya@math.mps.ohio-state.edu | 32 ;;; Corrections made by Ilya Zakharevich ilya@math.mps.ohio-state.edu |
33 ;;; XEmacs changes by Peter Arius arius@informatik.uni-erlangen.de | 33 ;;; XEmacs changes by Peter Arius arius@informatik.uni-erlangen.de |
34 | 34 |
35 ;; $Id: cperl-mode.el,v 1.7 1997/05/29 23:49:50 steve Exp $ | 35 ;; $Id: cperl-mode.el,v 1.8 1997/06/06 00:57:17 steve Exp $ |
36 | 36 |
37 ;;; To use this mode put the following into your .emacs file: | 37 ;;; To use this mode put the following into your .emacs file: |
38 | 38 |
39 ;; (autoload 'perl-mode "cperl-mode" "alternate mode for editing Perl programs" t) | 39 ;; (autoload 'perl-mode "cperl-mode" "alternate mode for editing Perl programs" t) |
40 | 40 |
711 (cperl-define-key "\C-c\C-k" 'cperl-toggle-abbrev) | 711 (cperl-define-key "\C-c\C-k" 'cperl-toggle-abbrev) |
712 (cperl-define-key "\C-c\C-e" 'cperl-toggle-electric) | 712 (cperl-define-key "\C-c\C-e" 'cperl-toggle-electric) |
713 (cperl-define-key "\e\C-q" 'cperl-indent-exp) ; Usually not bound | 713 (cperl-define-key "\e\C-q" 'cperl-indent-exp) ; Usually not bound |
714 ;;(cperl-define-key "\M-q" 'cperl-fill-paragraph) | 714 ;;(cperl-define-key "\M-q" 'cperl-fill-paragraph) |
715 ;;(cperl-define-key "\e;" 'cperl-indent-for-comment) | 715 ;;(cperl-define-key "\e;" 'cperl-indent-for-comment) |
716 ;; GDF - don't clobber the DEL binding... | 716 (cperl-define-key "\177" 'cperl-electric-backspace) |
717 ;; (cperl-define-key "\177" 'cperl-electric-backspace) | |
718 (cperl-define-key "\t" 'cperl-indent-command) | 717 (cperl-define-key "\t" 'cperl-indent-command) |
719 ;; don't clobber the backspace binding: | 718 ;; don't clobber the backspace binding: |
720 (cperl-define-key "\C-hf" 'cperl-info-on-command [(control h) f]) | 719 (cperl-define-key "\C-hf" 'cperl-info-on-command [(control h) f]) |
721 (cperl-define-key "\C-c\C-hf" 'cperl-info-on-current-command | 720 (cperl-define-key "\C-c\C-hf" 'cperl-info-on-current-command |
722 [(control c) (control h) f]) | 721 [(control c) (control h) f]) |
990 | 989 |
991 Turning on CPerl mode calls the hooks in the variable `cperl-mode-hook' | 990 Turning on CPerl mode calls the hooks in the variable `cperl-mode-hook' |
992 with no args." | 991 with no args." |
993 (interactive) | 992 (interactive) |
994 (kill-all-local-variables) | 993 (kill-all-local-variables) |
995 (make-local-hook 'backspace-or-delete-hook) | |
996 (add-hook 'backspace-or-delete-hook 'cperl-electric-backspace nil t) | |
997 ;;(if cperl-hairy | 994 ;;(if cperl-hairy |
998 ;; (progn | 995 ;; (progn |
999 ;; (cperl-set 'cperl-font-lock cperl-hairy) | 996 ;; (cperl-set 'cperl-font-lock cperl-hairy) |
1000 ;; (cperl-set 'cperl-electric-lbrace-space cperl-hairy) | 997 ;; (cperl-set 'cperl-electric-lbrace-space cperl-hairy) |
1001 ;; (cperl-set 'cperl-electric-parens "{[(<") | 998 ;; (cperl-set 'cperl-electric-parens "{[(<") |
1561 (if (eq last-command 'cperl-electric-lbrace) | 1558 (if (eq last-command 'cperl-electric-lbrace) |
1562 (skip-chars-forward " \t\n")) | 1559 (skip-chars-forward " \t\n")) |
1563 (setq p (point)) | 1560 (setq p (point)) |
1564 (skip-chars-backward " \t\n") | 1561 (skip-chars-backward " \t\n") |
1565 (delete-region (point) p)) | 1562 (delete-region (point) p)) |
1566 (backward-delete-char-untabify (prefix-numeric-value arg))) | 1563 (if (fboundp 'backspace-or-delete) |
1567 t) | 1564 (backspace-or-delete (prefix-numeric-value arg)) |
1565 (backward-delete-char-untabify (prefix-numeric-value arg))))) | |
1568 | 1566 |
1569 (defun cperl-inside-parens-p () | 1567 (defun cperl-inside-parens-p () |
1570 (condition-case () | 1568 (condition-case () |
1571 (save-excursion | 1569 (save-excursion |
1572 (save-restriction | 1570 (save-restriction |