comparison lisp/progmodes/cperl-mode.el @ 36602:4bcc2745d610

(cperl-msb-fix, cperl-get-help-defer): Check major-mode for `cperl-mode' as well.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 06 Mar 2001 21:55:33 +0000
parents 2a84d5417fbd
children 44748506225d
comparison
equal deleted inserted replaced
36601:2a84d5417fbd 36602:4bcc2745d610
1556 (last (nth (1- l) msb-menu-cond)) 1556 (last (nth (1- l) msb-menu-cond))
1557 (precdr (nthcdr (- l 2) msb-menu-cond)) ; cdr of this is last 1557 (precdr (nthcdr (- l 2) msb-menu-cond)) ; cdr of this is last
1558 (handle (1- (nth 1 last)))) 1558 (handle (1- (nth 1 last))))
1559 (setcdr precdr (list 1559 (setcdr precdr (list
1560 (list 1560 (list
1561 '(eq major-mode 'perl-mode) 1561 '(memq major-mode '(cperl-mode perl-mode))
1562 handle 1562 handle
1563 "Perl Files (%d)") 1563 "Perl Files (%d)")
1564 last)))) 1564 last))))
1565 1565
1566 ;; This is used by indent-for-comment 1566 ;; This is used by indent-for-comment
4297 ;; Need to init anyway: 4297 ;; Need to init anyway:
4298 (or cperl-faces-init (cperl-init-faces)) 4298 (or cperl-faces-init (cperl-init-faces))
4299 (add-hook 'font-lock-mode-hook 4299 (add-hook 'font-lock-mode-hook
4300 (function 4300 (function
4301 (lambda () 4301 (lambda ()
4302 (if (or 4302 (if (memq major-mode '(perl-mode cperl-mode))
4303 (eq major-mode 'perl-mode)
4304 (eq major-mode 'cperl-mode))
4305 (progn 4303 (progn
4306 (or cperl-faces-init (cperl-init-faces))))))) 4304 (or cperl-faces-init (cperl-init-faces)))))))
4307 (if (fboundp 'eval-after-load) 4305 (if (fboundp 'eval-after-load)
4308 (eval-after-load 4306 (eval-after-load
4309 "ps-print" 4307 "ps-print"
6853 6851
6854 (defun cperl-lazy-hook () 6852 (defun cperl-lazy-hook ()
6855 (setq cperl-help-shown nil)) 6853 (setq cperl-help-shown nil))
6856 6854
6857 (defun cperl-get-help-defer () 6855 (defun cperl-get-help-defer ()
6858 (if (not (eq major-mode 'perl-mode)) nil 6856 (when (memq major-mode '(perl-mode cperl-mode))
6859 (let ((cperl-message-on-help-error nil) (cperl-help-from-timer t)) 6857 (let ((cperl-message-on-help-error nil) (cperl-help-from-timer t))
6860 (cperl-get-help) 6858 (cperl-get-help)
6861 (setq cperl-help-shown t)))) 6859 (setq cperl-help-shown t))))
6862 (cperl-lazy-install))) 6860 (cperl-lazy-install)))
6863 6861