]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't change indentation rules for `>=` and `=`
authorMattias Engdegård <mattiase@acm.org>
Thu, 30 Jun 2022 12:31:47 +0000 (14:31 +0200)
committerMattias Engdegård <mattiase@acm.org>
Thu, 30 Jun 2022 12:41:20 +0000 (14:41 +0200)
* 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

index 07ede57d393ddcef0dc920b0b2db9c9ec37fa155..182e48d78564f8fd1a80af0e8aa82ded4855cdb8 100644 (file)
@@ -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)