emacs-diffs
[Top][All Lists]
Advanced

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

master 00dbc5937d: Don't change indentation rules for `>=` and `=`


From: Mattias Engdegård
Subject: master 00dbc5937d: Don't change indentation rules for `>=` and `=`
Date: Thu, 30 Jun 2022 08:45:46 -0400 (EDT)

branch: master
commit 00dbc5937d3015e23285251f0417d4b508080ecc
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    Don't change indentation rules for `>=` and `=`
    
    * lisp/emacs-lisp/rx.el: `>=` and `=` are much more likely functions
    than RX constructs and the indentation machinery currently has
    no way to tell them apart.
    Suggested by Michael Herdeegen.
---
 lisp/emacs-lisp/rx.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el
index 07ede57d39..182e48d785 100644
--- a/lisp/emacs-lisp/rx.el
+++ b/lisp/emacs-lisp/rx.el
@@ -1112,10 +1112,12 @@ can expand to any number of values."
 
 ;; 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))
-(dolist (sym '( ** repeat))
-  (put sym 'lisp-indent-function 2))
+;; (`>=' and `=' are omitted because they are more likely to be used
+;; as Lisp functions than RX constructs.)
+(put 'group-n 'lisp-indent-function 1)
+(put 'submatch-n 'lisp-indent-function 1)
+(put '** 'lisp-indent-function 2)
+(put 'repeat 'lisp-indent-function 2)
 
 
 (defun rx--translate (item)



reply via email to

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