Mercurial > hg > xemacs-beta
comparison lisp/modes/cperl-mode.el @ 203:850242ba4a81 r20-3b28
Import from CVS: tag r20-3b28
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:02:21 +0200 |
parents | f53b5ca2e663 |
children | e45d5e7c476e |
comparison
equal
deleted
inserted
replaced
202:61eefc8fc970 | 203:850242ba4a81 |
---|---|
32 | 32 |
33 ;;; Corrections made by Ilya Zakharevich ilya@math.mps.ohio-state.edu | 33 ;;; Corrections made by Ilya Zakharevich ilya@math.mps.ohio-state.edu |
34 ;;; XEmacs changes by Peter Arius arius@informatik.uni-erlangen.de | 34 ;;; XEmacs changes by Peter Arius arius@informatik.uni-erlangen.de |
35 ;;; XEmacs 'delete key behavior handling added for XEmacs 20.x by | 35 ;;; XEmacs 'delete key behavior handling added for XEmacs 20.x by |
36 ;;; Gary D. Foster <Gary.Foster@corp.sun.com> | 36 ;;; Gary D. Foster <Gary.Foster@corp.sun.com> |
37 ;;; Karl M. Hegbloom <karlheg@inetarena.com> | |
37 | 38 |
38 ;; Original Vendor Version Number: (mostly based on...) | 39 ;; Original Vendor Version Number: (mostly based on...) |
39 ;; $Id: cperl-mode.el,v 1.13 1997/09/20 22:15:08 steve Exp $ | 40 ;; $Id: cperl-mode.el,v 1.14 1997/10/12 01:39:40 steve Exp $ |
40 | 41 |
41 ;; Increment the final digit once per XEmacs-only revision, the other | 42 ;; Increment the final digit once per XEmacs-only revision, the other |
42 ;; for merges. (sound ok?) | 43 ;; for merges. (sound ok?) |
43 ;;; XEmacs Version Number: 1.35-1 | 44 ;;; XEmacs Version Number: 1.35-1 |
44 | 45 |
933 :type 'sexp | 934 :type 'sexp |
934 :group 'perl) | 935 :group 'perl) |
935 | 936 |
936 | 937 |
937 ;;; Probably it is too late to set these guys already, but it can help later: | 938 ;;; Probably it is too late to set these guys already, but it can help later: |
938 | 939 ;;; #### |
939 (setq auto-mode-alist | 940 (setq auto-mode-alist |
940 (append '(("\\.\\([pP][Llm]\\|al\\)\\'" . perl-mode)) auto-mode-alist )) | 941 (append '(("\\.\\([pP][Llm]\\|al\\)\\'" . perl-mode)) auto-mode-alist )) |
941 (and (boundp 'interpreter-mode-alist) | 942 (and (boundp 'interpreter-mode-alist) |
942 (setq interpreter-mode-alist (append interpreter-mode-alist | 943 (setq interpreter-mode-alist (append interpreter-mode-alist |
943 '(("miniperl" . perl-mode))))) | 944 '(("miniperl" . perl-mode))))) |
1151 (cperl-hairy (or hairy t)) | 1152 (cperl-hairy (or hairy t)) |
1152 (t (symbol-value symbol)))) | 1153 (t (symbol-value symbol)))) |
1153 | 1154 |
1154 ;; provide an alias for working with emacs 19. the perl-mode that comes | 1155 ;; provide an alias for working with emacs 19. the perl-mode that comes |
1155 ;; with it is really bad, and this lets us seamlessly replace it. | 1156 ;; with it is really bad, and this lets us seamlessly replace it. |
1156 ;;;;;###autoload here please. | 1157 ;;;###autoload |
1157 (fset 'perl-mode 'cperl-mode) | 1158 (defalias 'perl-mode 'cperl-mode) |
1159 ;;;###autoload | |
1158 (defun cperl-mode () | 1160 (defun cperl-mode () |
1159 "Major mode for editing Perl code. | 1161 "Major mode for editing Perl code. |
1160 Expression and list commands understand all C brackets. | 1162 Expression and list commands understand all C brackets. |
1161 Tab indents for Perl code. | 1163 Tab indents for Perl code. |
1162 Paragraphs are separated by blank lines only. | 1164 Paragraphs are separated by blank lines only. |
4411 (case-fold-search (eq system-type 'emx)) | 4413 (case-fold-search (eq system-type 'emx)) |
4412 xs) | 4414 xs) |
4413 (save-excursion | 4415 (save-excursion |
4414 (cond (inbuffer nil) ; Already there | 4416 (cond (inbuffer nil) ; Already there |
4415 ((file-exists-p tags-file-name) | 4417 ((file-exists-p tags-file-name) |
4416 (visit-tags-table-buffer tags-file-name)) | 4418 (visit-tags-table-buffer)) |
4417 (t (set-buffer (find-file-noselect tags-file-name)))) | 4419 (t (set-buffer (find-file-noselect tags-file-name)))) |
4418 (cond | 4420 (cond |
4419 (dir | 4421 (dir |
4420 (cond ((eq erase 'ignore)) | 4422 (cond ((eq erase 'ignore)) |
4421 (erase | 4423 (erase |
5516 | 5518 |
5517 | 5519 |
5518 ;; Part from the original `cperl-lazy-*', and part from `eldoc' | 5520 ;; Part from the original `cperl-lazy-*', and part from `eldoc' |
5519 ;; Karl M. Hegbloom <karlheg@inetarena.com> | 5521 ;; Karl M. Hegbloom <karlheg@inetarena.com> |
5520 | 5522 |
5521 (defvar cperl-help nil | |
5522 "Non-nil means that the lazy-help handlers are installed now.") | |
5523 | |
5524 (defun cperl-help (&optional arg) | 5523 (defun cperl-help (&optional arg) |
5525 (interactive "p") | 5524 (interactive "p") |
5526 (cond ((and arg (<= arg 0)) | 5525 (cond ((and arg (<= arg 0)) |
5527 (remove-hook 'post-command-hook 'cperl-get-help-defer) | 5526 (remove-hook 'post-command-hook 'cperl-get-help-defer) |
5528 (remove-hook 'pre-command-hook 'cperl-refresh-echo-area) | 5527 (remove-hook 'pre-command-hook 'cperl-refresh-echo-area) |