[parent not found: <20220629152917.18CFDC01686@vcs2.savannah.gnu.org>]
* Re: master 3447e79f24 1/3: * lisp/emacs-lisp/rx.el: Indent some rx constructs correctly.
[not found] ` <20220629152917.18CFDC01686@vcs2.savannah.gnu.org>
@ 2022-06-30 11:30 ` Michael Heerdegen
2022-06-30 12:41 ` Mattias Engdegård
0 siblings, 1 reply; 10+ messages in thread
From: Michael Heerdegen @ 2022-06-30 11:30 UTC (permalink / raw)
To: emacs-devel; +Cc: Mattias Engdegård
Mattias Engdegård <mattiase@acm.org> writes:
> --- a/lisp/emacs-lisp/rx.el
> +++ b/lisp/emacs-lisp/rx.el
> @@ -1110,6 +1110,14 @@ can expand to any number of values."
> (append rx--builtin-forms rx--builtin-symbols)
> "List of built-in rx names. These cannot be redefined by the user.")
>
> +;; Declare Lisp indentation rules for constructs that take 1 or 2
> +;; parameters before a body of RX forms.
> +(dolist (sym '( group-n submatch-n = >=))
> + (put sym 'lisp-indent-function 1))
This is problematic: It changes the indentation behavior of the global
functions, depending on whether "rx.el" has been loaded. Multiline
calls of `=' or `>=' might be rare, but multiline `rx' subexps are rare
as well.
Can we delay such changes until we have some kind of context sensitive
indentation algorithm for Elisp?
TIA,
Michael.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: master 3447e79f24 1/3: * lisp/emacs-lisp/rx.el: Indent some rx constructs correctly.
2022-06-30 11:30 ` master 3447e79f24 1/3: * lisp/emacs-lisp/rx.el: Indent some rx constructs correctly Michael Heerdegen
@ 2022-06-30 12:41 ` Mattias Engdegård
2022-06-30 13:12 ` Michael Heerdegen
2022-06-30 14:46 ` Stefan Monnier
0 siblings, 2 replies; 10+ messages in thread
From: Mattias Engdegård @ 2022-06-30 12:41 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: emacs-devel
30 juni 2022 kl. 13.30 skrev Michael Heerdegen <michael_heerdegen@web.de>:
> This is problematic: It changes the indentation behavior of the global
> functions, depending on whether "rx.el" has been loaded. Multiline
> calls of `=' or `>=' might be rare, but multiline `rx' subexps are rare
> as well.
Thank you, it was an overreach. Will revert.
I'm assuming that setting indentation properties on the other symbols, `group-n`, `submatch-n`, `**` and `repeat`, is less objectionable.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: master 3447e79f24 1/3: * lisp/emacs-lisp/rx.el: Indent some rx constructs correctly.
2022-06-30 12:41 ` Mattias Engdegård
@ 2022-06-30 13:12 ` Michael Heerdegen
2022-06-30 13:17 ` Visuwesh
2022-06-30 13:24 ` Mattias Engdegård
2022-06-30 14:46 ` Stefan Monnier
1 sibling, 2 replies; 10+ messages in thread
From: Michael Heerdegen @ 2022-06-30 13:12 UTC (permalink / raw)
To: Mattias Engdegård; +Cc: emacs-devel
Mattias Engdegård <mattiase@acm.org> writes:
> I'm assuming that setting indentation properties on the other symbols,
> `group-n`, `submatch-n`, `**` and `repeat`, is less objectionable.
Not sure. Still effects `let' bindings:
(let ((repeat x
y
z)))
Oh - and `repeat' is even a command.
Michael.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: master 3447e79f24 1/3: * lisp/emacs-lisp/rx.el: Indent some rx constructs correctly.
2022-06-30 13:12 ` Michael Heerdegen
@ 2022-06-30 13:17 ` Visuwesh
2022-06-30 13:24 ` Mattias Engdegård
1 sibling, 0 replies; 10+ messages in thread
From: Visuwesh @ 2022-06-30 13:17 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: Mattias Engdegård, emacs-devel
[வியாழன் ஜூன் 30, 2022] Michael Heerdegen wrote:
> Mattias Engdegård <mattiase@acm.org> writes:
>
>> I'm assuming that setting indentation properties on the other symbols,
>> `group-n`, `submatch-n`, `**` and `repeat`, is less objectionable.
>
> Not sure. Still effects `let' bindings:
>
> (let ((repeat x
> y
> z)))
>
> Oh - and `repeat' is even a command.
>
Not sure if this is of much significance here but 'repeat' also appears
in defcustom :type.
> Michael.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: master 3447e79f24 1/3: * lisp/emacs-lisp/rx.el: Indent some rx constructs correctly.
2022-06-30 13:12 ` Michael Heerdegen
2022-06-30 13:17 ` Visuwesh
@ 2022-06-30 13:24 ` Mattias Engdegård
1 sibling, 0 replies; 10+ messages in thread
From: Mattias Engdegård @ 2022-06-30 13:24 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: emacs-devel
30 juni 2022 kl. 15.12 skrev Michael Heerdegen <michael_heerdegen@web.de>:
> Still effects `let' bindings:
>
> (let ((repeat x
> y
> z)))
Someone's changed the syntax of let bindings without telling me!
> Oh - and `repeat' is even a command.
Hardly one likely to be called from Lisp though.
However it does see some use as a defcustom type so I've elided it as well.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: master 3447e79f24 1/3: * lisp/emacs-lisp/rx.el: Indent some rx constructs correctly.
2022-06-30 12:41 ` Mattias Engdegård
2022-06-30 13:12 ` Michael Heerdegen
@ 2022-06-30 14:46 ` Stefan Monnier
2022-07-01 8:21 ` Mattias Engdegård
1 sibling, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2022-06-30 14:46 UTC (permalink / raw)
To: Mattias Engdegård; +Cc: Michael Heerdegen, emacs-devel
> I'm assuming that setting indentation properties on the other symbols,
> `group-n`, `submatch-n`, `**` and `repeat`, is less objectionable.
`group-n`, `submatch-n` sound specific enough, but the other two seem
too generic to my gut-feeling,
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: master 3447e79f24 1/3: * lisp/emacs-lisp/rx.el: Indent some rx constructs correctly.
2022-06-30 14:46 ` Stefan Monnier
@ 2022-07-01 8:21 ` Mattias Engdegård
0 siblings, 0 replies; 10+ messages in thread
From: Mattias Engdegård @ 2022-07-01 8:21 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Michael Heerdegen, emacs-devel
30 juni 2022 kl. 16.46 skrev Stefan Monnier <monnier@iro.umontreal.ca>:
> [`repeat` and `**`] seem too generic to my gut-feeling,
`**` doesn't seem excessively popular as function name so I'm keeping the rx indentation for now.
(But it would be a cool alternative name for `expt`. Which naturally gives us `***` for tetration, very useful!)
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-07-01 8:21 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <165651655670.29289.7898006751120870045@vcs2.savannah.gnu.org>
[not found] ` <20220629152917.48CBCC00BAF@vcs2.savannah.gnu.org>
2022-06-29 17:25 ` master e4df6203e2 3/3: More robust `gnu` pattern (bug#56249) Stefan Monnier
2022-06-29 18:15 ` Mattias Engdegård
2022-06-29 18:55 ` Stefan Monnier
[not found] ` <20220629152917.18CFDC01686@vcs2.savannah.gnu.org>
2022-06-30 11:30 ` master 3447e79f24 1/3: * lisp/emacs-lisp/rx.el: Indent some rx constructs correctly Michael Heerdegen
2022-06-30 12:41 ` Mattias Engdegård
2022-06-30 13:12 ` Michael Heerdegen
2022-06-30 13:17 ` Visuwesh
2022-06-30 13:24 ` Mattias Engdegård
2022-06-30 14:46 ` Stefan Monnier
2022-07-01 8:21 ` Mattias Engdegård
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).