[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Please do not deprecate perl-mode in favour of cperl-mode
|
From: |
Harald Jörg |
|
Subject: |
Re: Please do not deprecate perl-mode in favour of cperl-mode |
|
Date: |
Tue, 02 Jan 2024 17:18:07 +0000 |
Stefan Kangas writes:
> Harald Jörg <haj@posteo.de> writes:
>
>> I'd like to postpone that, though: I try to keep cperl-mode.el
>> compatible with Emacs 27 (currently Emacs 26, but I'll probably push
>> because of the new font-lock-faces in Emacs 27), and eventually make it
>> dual-life via GNU ELPA - and setopt is not available before Emacs 29.
>
> I don't think we need to wait until you bump the version to Emacs 29 to
> introduce this, as it doesn't specifically depend on `setopt'.
>
> In older versions, this will just have the same general limitations that
> defcustom :set had for aeons before Lars fixed this in Emacs 29: it
> won't fire unless you set the user option from `M-x customize' or use
> `customize-set-variable'.
Oh, I see. I misunderstood. That makes sense then.
The current implementation might need some reconsideration, though... I
have been playing around with it and am a bit confused.
As far as I understand it, `cperl-file-style' is supposed to be set in
.dir-locals.el. If I define it there as "PBP", then that style going to
be local in buffers visiting files from the same directory. Fine so
far.
However, the individual settings like `cperl-indent-level' are not
buffer-local, nor made buffer-local by cperl-set-style. Therefore, if I
run `cperl-set-style' in any buffer (or from a customize :set function
or from another .dir-locals.el), then it will override the value ... in
all buffers, regardless of their local style settings.
The C modes (which are the example after which cperl-file-style was
built) solve this with a special value 'set-from-style - I guess
cperl-mode needs something in the same spirit.
--
Cheers,
haj
- Re: Please do not deprecate perl-mode in favour of cperl-mode,
Harald Jörg <=