From: "Harald Jörg" <haj@posteo.de>
To: 17948@debbugs.gnu.org
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
Stefan Kangas <stefankangas@gmail.com>
Subject: bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style'
Date: Wed, 03 Jan 2024 19:02:57 +0000 [thread overview]
Message-ID: <87r0iyz1cu.fsf@oook.m.uunet.de> (raw)
In-Reply-To: <87egxzpnxh.fsf@naesten.mooo.com>
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.
--
Cheers,
haj
next prev parent reply other threads:[~2024-01-03 19:02 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 [this message]
2024-01-05 20:18 ` Stefan Kangas
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0iyz1cu.fsf@oook.m.uunet.de \
--to=haj@posteo.de \
--cc=17948@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=stefankangas@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.