]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix previous cperl-file-style change
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 11 May 2022 14:47:53 +0000 (16:47 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 11 May 2022 14:47:53 +0000 (16:47 +0200)
* lisp/progmodes/cperl-mode.el (cperl--set-file-style): New function.
(cperl-mode): Add it to hack-local-variables-hook to really set
the cperl style.

lisp/progmodes/cperl-mode.el

index 76784562085467179d9b935373248cadf3058ced..5ed4832481cb9d91072c6c4a42765aa578f0a146 100644 (file)
@@ -1812,8 +1812,13 @@ or as help on variables `cperl-tips', `cperl-problems',
     (cperl-find-pods-heres))
   (when cperl-file-style
     (cperl-set-style cperl-file-style))
+  (add-hook 'hack-local-variables-hook #'cperl--set-file-style nil t)
   ;; Setup Flymake
   (add-hook 'flymake-diagnostic-functions #'perl-flymake nil t))
+
+(defun cperl--set-file-style ()
+  (when cperl-file-style
+    (cperl-set-style cperl-file-style)))
 \f
 ;; Fix for perldb - make default reasonable
 (defun cperl-db ()