[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 960ea2f 02/13: Avoid errors on false positives
From: |
Artur Malabarba |
Subject: |
[elpa] master 960ea2f 02/13: Avoid errors on false positives |
Date: |
Wed, 05 Aug 2015 21:54:08 +0000 |
branch: master
commit 960ea2ffaf1ac81dc618e7d3463f6385c32e6546
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>
Avoid errors on false positives
---
sotlisp.el | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/sotlisp.el b/sotlisp.el
index 37baa4b..d9d2492 100644
--- a/sotlisp.el
+++ b/sotlisp.el
@@ -172,16 +172,18 @@ See `sotlisp-define-function-abbrev'."
(skip-chars-backward (rx alnum))
(let* ((name (buffer-substring (point) r))
(expansion (gethash name sotlisp--function-table)))
- (delete-region (point) r)
- (if (sotlisp--function-quote-p)
- ;; After #' use the simple expansion.
- (insert (sotlisp--simplify-function-expansion expansion))
- ;; Inside a form, use the full expansion.
- (insert expansion)
- (when (string-match "\\$" expansion)
- (setq sotlisp--needs-moving t))))
- ;; Must be last.
- (sotlisp--post-expansion-cleanup)))
+ (if (not expansion)
+ (progn (goto-char r) nil)
+ (delete-region (point) r)
+ (if (sotlisp--function-quote-p)
+ ;; After #' use the simple expansion.
+ (insert (sotlisp--simplify-function-expansion expansion))
+ ;; Inside a form, use the full expansion.
+ (insert expansion)
+ (when (string-match "\\$" expansion)
+ (setq sotlisp--needs-moving t)))
+ ;; Must be last.
+ (sotlisp--post-expansion-cleanup)))))
(put 'sotlisp--expand-function 'no-self-insert t)
- [elpa] master updated (e18833b -> 0bb0ee6), Artur Malabarba, 2015/08/05
- [elpa] master 785d35c 01/13: After expanding, eat up space ahead if convenient, Artur Malabarba, 2015/08/05
- [elpa] master 960ea2f 02/13: Avoid errors on false positives,
Artur Malabarba <=
- [elpa] master f7b4937 04/13: Refactor whitespace detection, Artur Malabarba, 2015/08/05
- [elpa] master c1deb05 03/13: Don't use looking-back, Artur Malabarba, 2015/08/05
- [elpa] master 7f38383 05/13: Don't expand in strings or comments, Artur Malabarba, 2015/08/05
- [elpa] master b957752 07/13: Don't indent if the user is starting to type a comment. Fix #51, Artur Malabarba, 2015/08/05
- [elpa] master 1e6676a 06/13: Version bump, Artur Malabarba, 2015/08/05
- [elpa] master f2c0fe9 08/13: Don't indent if undo-in-progress, Artur Malabarba, 2015/08/05
- [elpa] master 6ccb05d 10/13: More abbrevs, Artur Malabarba, 2015/08/05
- [elpa] master 3557254 09/13: Version bump, Artur Malabarba, 2015/08/05
- [elpa] master 98fe00f 11/13: Version bump, Artur Malabarba, 2015/08/05
- [elpa] master 0bb0ee6 13/13: Merge commit '3557254c6873aeb0b5070248aa0faf2ff0d29d04', Artur Malabarba, 2015/08/05