emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 9e131744fb: Fix previous cperl-file-style change


From: Lars Ingebrigtsen
Subject: master 9e131744fb: Fix previous cperl-file-style change
Date: Wed, 11 May 2022 10:48:09 -0400 (EDT)

branch: master
commit 9e131744fb17f18da23c18d4f91a140573cb1ad3
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix previous cperl-file-style change
    
    * 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 | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 7678456208..5ed4832481 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -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)))
 
 ;; Fix for perldb - make default reasonable
 (defun cperl-db ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]