]> git.eshelyaron.com Git - emacs.git/commitdiff
; cperl-mode.el: Improve discoverability of cperl-file-styles
authorHarald Jörg <haj@posteo.de>
Sat, 30 Dec 2023 20:50:22 +0000 (21:50 +0100)
committerEshel Yaron <me@eshelyaron.com>
Tue, 2 Jan 2024 07:56:12 +0000 (08:56 +0100)
* 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'.

(cherry picked from commit 1d278dc786c01cd3799a29156e3e1f8dda965318)

lisp/progmodes/cperl-mode.el

index d9d907b1846e31a9a99b043b94edb23812f21d05..c22897d02705d65e7e1a95e2ba80f0e923a49234 100644 (file)
   :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.