GNU bug report logs - #17948
24.3; cperl: Needs an equivalent to `c-file-style'

Previous Next

Package: emacs;

Reported by: Samuel Bronson <naesten <at> gmail.com>

Date: Sat, 5 Jul 2014 20:11:01 UTC

Severity: wishlist

Found in version 24.3

Done: Harald Jörg <haj <at> posteo.de>

Bug is archived. No further changes may be made.

Full log


Message #25 received at 17948 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Harald Jörg <haj <at> posteo.de>, 17948 <at> debbugs.gnu.org
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style'
Date: Fri, 5 Jan 2024 12:18:36 -0800
Harald Jörg <haj <at> posteo.de> writes:

> I suggest the following solution:
>
>  - A new command (proposed name: `cperl-file-style' in sync with the
>    option) sets the same set of variables as `cperl-set-style', but at
>    the same time makes them buffer-local.
>
>  - The `cperl-mode' command will call this new function if
>    the option `cperl-file-style' is set to a non-nil value.
>
>  - The command cperl-set-style is modified to set the
>    default-toplevel-value for each option.  This command will also be
>    used by the :set function of customize.
>
> So, if `cperl-file-style' is at its default value of nil, all variables
> stay global but can of course still individually appear in file or
> directory variables.  If `cperl-file-style' is set, it defines new
> defaults for all options.
>
> This does not allow to have "PBP-style, but with an indent level of 3"
> as a *customizable* default because cperl-file-style will override it,
> but I'd expect it to work if both options are set in the correct order
> in .dir-locals.el or file variables.
>
> Does that sound ok?  I can prepare a patch ~ this weekend.

Sounds good to me.




This bug report was last modified 1 year and 126 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.