emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/sotlisp ed2356a 11/11: Merge pull request #12 from yuha


From: Stefan Monnier
Subject: [elpa] externals/sotlisp ed2356a 11/11: Merge pull request #12 from yuhan0/patch-1
Date: Fri, 26 Mar 2021 22:43:55 -0400 (EDT)

branch: externals/sotlisp
commit ed2356a325c7a4a88ec1bd31381c8666e8997e97
Merge: cc5730c f7add76
Author: Artur Malabarba <Malabarba@users.noreply.github.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #12 from yuhan0/patch-1
    
    Detect argument lists in more places
---
 sotlisp.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/sotlisp.el b/sotlisp.el
index 839b357..cdcfb1f 100644
--- a/sotlisp.el
+++ b/sotlisp.el
@@ -100,7 +100,12 @@
   "Non-nil if point is at the start of a sexp.
 Specially, avoids matching inside argument lists."
   (and (eq (char-before) ?\()
-       (not (sotlisp--looking-back 
"(\\(defun\\s-+.*\\|\\(lambda\\|dolist\\|dotimes\\)\\s-+\\)("))
+       (not (sotlisp--looking-back
+             (rx (or (seq (? "cl-") (or "defun" "defmacro" "defsubst") (? "*")
+                          symbol-end (* any))
+                     (seq (or "lambda" "dolist" "dotimes")
+                          symbol-end (+ (syntax whitespace))))
+                 "(")))
        (save-excursion
          (forward-char -1)
          (condition-case nil
@@ -109,7 +114,7 @@ Specially, avoids matching inside argument lists."
                (forward-sexp -1)
                (not
                 (looking-at-p (rx (* (or (syntax word) (syntax symbol) "-"))
-                                  "let" symbol-end))))
+                                  "let" (? "*") symbol-end))))
            (error t)))
        (not (string-match (rx (syntax symbol)) (string last-command-event)))))
 



reply via email to

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