unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefankangas@gmail.com>
To: "Harald Jörg" <haj@posteo.de>, 17948@debbugs.gnu.org
Cc: Lars Ingebrigtsen <larsi@gnus.org>
Subject: bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style'
Date: Fri, 5 Jan 2024 12:18:36 -0800	[thread overview]
Message-ID: <CADwFkm=Qnvxm7enOovGKAdjUNzqZbpRzKxyuLnWpJVQ05DdMWQ@mail.gmail.com> (raw)
In-Reply-To: <87r0iyz1cu.fsf@oook.m.uunet.de>

Harald Jörg <haj@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.





  reply	other threads:[~2024-01-05 20:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-05 20:10 bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style' Samuel Bronson
2022-05-11 14:29 ` Lars Ingebrigtsen
2024-01-02 17:33   ` Stefan Kangas
2024-01-03 19:02 ` Harald Jörg
2024-01-05 20:18   ` Stefan Kangas [this message]
2024-01-08  8:23     ` bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style' [PATCH] Harald Jörg
2024-01-08 12:51       ` Eli Zaretskii
2024-01-08 15:26         ` Harald Jörg
2024-01-08 19:27           ` Stefan Kangas
2024-01-09 16:06           ` bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style' john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-09 18:23             ` Harald Jörg
2024-03-08  8:13 ` bug#17948: Emacs bug control: close 17948 Harald Jörg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkm=Qnvxm7enOovGKAdjUNzqZbpRzKxyuLnWpJVQ05DdMWQ@mail.gmail.com' \
    --to=stefankangas@gmail.com \
    --cc=17948@debbugs.gnu.org \
    --cc=haj@posteo.de \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).