mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Add new user option 'cperl-file-style'
* lisp/progmodes/cperl-mode.el (cperl-file-style): New user option (bug#17948). (cperl-mode): Mention it. (cperl-style-alist): Mention it.
This commit is contained in:
parent
45ccad3569
commit
cf1e1584d9
2 changed files with 26 additions and 4 deletions
|
|
@ -558,6 +558,19 @@ 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"))
|
||||
:version "29.1")
|
||||
;;;###autoload(put 'cperl-file-style 'safe-local-variable 'stringp)
|
||||
|
||||
(defcustom cperl-ps-print-face-properties
|
||||
'((font-lock-keyword-face nil nil bold shadow)
|
||||
(font-lock-variable-name-face nil nil bold)
|
||||
|
|
@ -1660,9 +1673,11 @@ Settings for classic indent-styles: K&R BSD=C++ GNU PBP PerlStyle=Whitesmith
|
|||
`cperl-continued-statement-offset' 5 4 2 4 4
|
||||
|
||||
CPerl knows several indentation styles, and may bulk set the
|
||||
corresponding variables. Use \\[cperl-set-style] to do this. Use
|
||||
\\[cperl-set-style-back] to restore the memorized preexisting values
|
||||
\(both available from menu). See examples in `cperl-style-examples'.
|
||||
corresponding variables. Use \\[cperl-set-style] to do this or
|
||||
set the `cperl-file-style' user option. Use
|
||||
\\[cperl-set-style-back] to restore the memorized preexisting
|
||||
values \(both available from menu). See examples in
|
||||
`cperl-style-examples'.
|
||||
|
||||
Part of the indentation style is how different parts of if/elsif/else
|
||||
statements are broken into lines; in CPerl, this is reflected on how
|
||||
|
|
@ -1795,6 +1810,8 @@ or as help on variables `cperl-tips', `cperl-problems',
|
|||
(when (and cperl-pod-here-scan
|
||||
(not cperl-syntaxify-by-font-lock))
|
||||
(cperl-find-pods-heres))
|
||||
(when cperl-file-style
|
||||
(cperl-set-style cperl-file-style))
|
||||
;; Setup Flymake
|
||||
(add-hook 'flymake-diagnostic-functions #'perl-flymake nil t))
|
||||
|
||||
|
|
@ -6313,7 +6330,7 @@ else
|
|||
)
|
||||
("Current"))
|
||||
"List of variables to set to get a particular indentation style.
|
||||
Should be used via `cperl-set-style' or via Perl menu.
|
||||
Should be used via `cperl-set-style', `cperl-file-style' or via Perl menu.
|
||||
|
||||
See examples in `cperl-style-examples'.")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue