emacs-diffs
[Top][All Lists]
Advanced

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

master 1d278dc786c: ; cperl-mode.el: Improve discoverability of cperl-fi


From: Harald Jörg
Subject: master 1d278dc786c: ; cperl-mode.el: Improve discoverability of cperl-file-styles
Date: Sat, 30 Dec 2023 15:54:52 -0500 (EST)

branch: master
commit 1d278dc786c01cd3799a29156e3e1f8dda965318
Author: Harald Jörg <haj@posteo.de>
Commit: Harald Jörg <haj@posteo.de>

    ; cperl-mode.el: Improve discoverability of cperl-file-styles
    
    * lisp/progmodes/cperl-mode.el (cperl-indentation-details):
    Mention the option `cperl-file-style' in the docstring.
    (cperl-file-style): Describe the available styles, and move the
    option to the group `cperl-indentatino-details'.
---
 lisp/progmodes/cperl-mode.el | 39 ++++++++++++++++++++++++---------------
 1 file changed, 24 insertions(+), 15 deletions(-)

diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index d9d907b1846..c22897d0270 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -104,7 +104,10 @@
   :version "20.3")
 
 (defgroup cperl-indentation-details nil
-  "Indentation."
+  "Indentation.
+The option `cperl-file-style' (which see) can be used to set
+several indentation options in one go, following popular
+indentation styles."
   :prefix "cperl-"
   :group 'cperl)
 
@@ -157,6 +160,26 @@ for constructs with multiline 
if/unless/while/until/for/foreach condition."
   :type 'boolean
   :group 'cperl-autoinsert-details)
 
+(defcustom cperl-file-style nil
+  "Indentation style to use in cperl-mode.
+\"PBP\" is the style recommended in the Book \"Perl Best
+Practices\" by Damian Conway.  \"CPerl\" is the traditional style
+of cperl-mode, and \"PerlStyle\" follows the Perl documentation
+in perlstyle.  The other styles have been developed for other
+programming languages, mostly C."
+  :type '(choice (const "PBP")
+                 (const "CPerl")
+                 (const "PerlStyle")
+                 (const "GNU")
+                 (const "C++")
+                 (const "K&R")
+                 (const "BSD")
+                 (const "Whitesmith")
+                 (const :tag "Default" nil))
+  :group 'cperl-indentation-details
+  :version "29.1")
+;;;###autoload(put 'cperl-file-style 'safe-local-variable 'stringp)
+
 (defcustom cperl-indent-level 2
   "Indentation of CPerl statements with respect to containing block."
   :type 'integer
@@ -537,20 +560,6 @@ This way enabling/disabling of menu items is more correct."
   :type 'boolean
   :group 'cperl-speed)
 
-(defcustom cperl-file-style nil
-  "Indentation style to use in cperl-mode."
-  :type '(choice (const "CPerl")
-                 (const "PBP")
-                 (const "PerlStyle")
-                 (const "GNU")
-                 (const "C++")
-                 (const "K&R")
-                 (const "BSD")
-                 (const "Whitesmith")
-                 (const :tag "Default" nil))
-  :version "29.1")
-;;;###autoload(put 'cperl-file-style 'safe-local-variable 'stringp)
-
 (defcustom cperl-fontify-trailer
   'perl-code
   "How to fontify text after an \"__END__\" or \"__DATA__\" token.



reply via email to

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