;cperl-mode.el: Allow running under Emacs >=27

I would like to advertise cperl-mode.el from the repository as a
workaround for bug#70948.  This can be achieved by safeguarding
the call to derived-mode-add-parents with a version check.

* lisp/progmodes/cperl-mode.el: Call derived-mode-add-parents only
if it is available.
This commit is contained in:
Harald Jörg 2024-05-16 21:55:07 +02:00
parent 650ee9e071
commit 96269209a3

View file

@ -1934,7 +1934,8 @@ or as help on variables `cperl-tips', `cperl-problems',
;; Setup Flymake
(add-hook 'flymake-diagnostic-functions #'perl-flymake nil t))
(derived-mode-add-parents 'cperl-mode '(perl-mode))
(when (fboundp 'derived-mode-add-parents) ; to run under Emacs <30
(derived-mode-add-parents 'cperl-mode '(perl-mode)))
(defun cperl--set-file-style ()
(when cperl-file-style