[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 0d9d2ba 26/34: Don't search for prefix through string boun
From: |
Vitalie Spinu |
Subject: |
[elpa] master 0d9d2ba 26/34: Don't search for prefix through string boundary |
Date: |
Tue, 7 May 2019 16:05:31 -0400 (EDT) |
branch: master
commit 0d9d2bad327afc066f3ae26c17d22e84264bac6f
Author: Vitalie Spinu <address@hidden>
Commit: Vitalie Spinu <address@hidden>
Don't search for prefix through string boundary
---
company-math.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/company-math.el b/company-math.el
index e68eedc..7906337 100644
--- a/company-math.el
+++ b/company-math.el
@@ -139,8 +139,12 @@ corresponding unicode symbol."
(memq face allow-faces)))))
(when insertp
(save-excursion
- (when (looking-back regexp (point-at-bol) 'greedy)
- (match-string 0))))))
+ (let* ((ppss (syntax-ppss))
+ (min-point (if (nth 3 ppss)
+ (max (nth 8 ppss) (point-at-bol))
+ (point-at-bol))))
+ (when (looking-back regexp min-point 'greedy)
+ (match-string 0)))))))
(defun company-math--substitute-unicode (symbol)
"Substitute preceding latex command with with SYMBOL."
- [elpa] master e89ddb2 31/34: Enable latex backend in org-mode per default, (continued)
- [elpa] master e89ddb2 31/34: Enable latex backend in org-mode per default, Vitalie Spinu, 2019/05/07
- [elpa] master 6ffd24c 22/34: Implement unicode sub(super)scripting, Vitalie Spinu, 2019/05/07
- [elpa] master 1ab4b8e 29/34: Allow nil in sub/super-script prefix customization, Vitalie Spinu, 2019/05/07
- [elpa] master 982c4ef 28/34: Readme, Vitalie Spinu, 2019/05/07
- [elpa] master 92b9968 33/34: Fix checkdoc, Vitalie Spinu, 2019/05/07
- [elpa] master b585117 11/34: Edit before ELPA merge, Vitalie Spinu, 2019/05/07
- [elpa] master 6c08f80 09/34: Fix custom interface, Vitalie Spinu, 2019/05/07
- [elpa] master 2e24a08 18/34: Version 1.1, Vitalie Spinu, 2019/05/07
- [elpa] master 0815c9e 19/34: Readme fixes, Vitalie Spinu, 2019/05/07
- [elpa] master 21ac1c7 14/34: Update readme as per TeX-mode-hook problem, Vitalie Spinu, 2019/05/07
- [elpa] master 0d9d2ba 26/34: Don't search for prefix through string boundary,
Vitalie Spinu <=
- [elpa] master 34b4b52 25/34: Typo, Vitalie Spinu, 2019/05/07
- [elpa] master 7e7f8c7 30/34: Version 1.3, Vitalie Spinu, 2019/05/07