mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-06 11:55:48 +00: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
5
etc/NEWS
5
etc/NEWS
@ -786,6 +786,11 @@ so automatically.
|
||||
|
||||
* Changes in Specialized Modes and Packages in Emacs 29.1
|
||||
|
||||
---
|
||||
*** New user option 'cperl-file-style'.
|
||||
The determines the indentation style to be used. This can also be
|
||||
used as a file-local variable.
|
||||
|
||||
---
|
||||
*** 'gud-go' is now bound to 'C-c C-v'.
|
||||
If given a prefix, it will query the user for an argument to use for
|
||||
|
@ -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…
Reference in New Issue
Block a user