emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 3447e79f24 1/3: * lisp/emacs-lisp/rx.el: Indent some rx const


From: Michael Heerdegen
Subject: Re: master 3447e79f24 1/3: * lisp/emacs-lisp/rx.el: Indent some rx constructs correctly.
Date: Thu, 30 Jun 2022 13:30:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]