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

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

[elpa] externals/sotlisp d28cdf7 07/11: Only expand abbrev when (sotlisp


From: Stefan Monnier
Subject: [elpa] externals/sotlisp d28cdf7 07/11: Only expand abbrev when (sotlisp--whitespace-char-p last-command-event)
Date: Fri, 26 Mar 2021 22:43:54 -0400 (EDT)

branch: externals/sotlisp
commit d28cdf766e398465d958db729f1694a298969cca
Author: Artur Malabarba <artur@endlessparentheses.com>
Commit: Artur Malabarba <artur@endlessparentheses.com>

    Only expand abbrev when (sotlisp--whitespace-char-p last-command-event)
---
 sotlisp.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/sotlisp.el b/sotlisp.el
index 44a7089..1aa8b31 100644
--- a/sotlisp.el
+++ b/sotlisp.el
@@ -135,10 +135,12 @@ Returns non-nil if, after moving backwards by a sexp, 
either
 non-nil."
   (save-excursion
     (ignore-errors
-      (skip-chars-backward (rx alnum))
-      (and (sotlisp--code-p)
-           (or (sotlisp--function-form-p)
-               (sotlisp--function-quote-p))))))
+      (and (sotlisp--whitespace-char-p last-command-event)
+           (sotlisp--code-p)
+           (progn
+             (skip-chars-backward (rx alnum))
+             (or (sotlisp--function-form-p)
+                 (sotlisp--function-quote-p)))))))
 
 (defun sotlisp--whitespace-p ()
   "Non-nil if current `self-insert'ed char is whitespace."



reply via email to

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