[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gnuplot 58a1cf5 024/184: Fixed horrible bug in gnuplot-in-
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gnuplot 58a1cf5 024/184: Fixed horrible bug in gnuplot-in-string/gnuplot-in-comment |
Date: |
Sun, 29 Aug 2021 11:03:08 -0400 (EDT) |
branch: elpa/gnuplot
commit 58a1cf5fa98d0b5c46038779b4cc3b61e13b33d2
Author: Jonathan Oddie <j.j.oddie@gmail.com>
Commit: Jonathan Oddie <j.j.oddie@gmail.com>
Fixed horrible bug in gnuplot-in-string/gnuplot-in-comment
I forgot that syntax-ppss needs a save-excursion around it. Oops.
---
gnuplot.el | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/gnuplot.el b/gnuplot.el
index 186aa94..d5118eb 100644
--- a/gnuplot.el
+++ b/gnuplot.el
@@ -1691,8 +1691,9 @@ limit passed by font-lock."
(t "#")))
(begin (search-forward-regexp re limit t)))
;; Skip over anything which is already inside a string
- (while (and (gnuplot-in-string (1- (point)))
- (setq begin (search-forward re limit t))))
+ (when (> (point) (point-min))
+ (while (and (gnuplot-in-string (1- (point)))
+ (setq begin (search-forward-regexp re limit t)))))
(if (not begin)
nil ; Nothing found on this line
@@ -1768,16 +1769,18 @@ limit passed by font-lock."
If WHERE is omitted, defaults to text at point.
This is a simple wrapper for `syntax-ppss'."
- (let ((parse-state (syntax-ppss where)))
- (nth 3 parse-state)))
+ (save-excursion
+ (let ((parse-state (syntax-ppss where)))
+ (nth 3 parse-state))))
(defun gnuplot-in-comment (&optional where)
"Returns non-nil if the text at WHERE is within a comment.
If WHERE is omitted, defaults to text at point.
This is a simple wrapper for `syntax-ppss'."
- (let ((parse-state (syntax-ppss where)))
- (nth 4 parse-state)))
+ (save-excursion
+ (let ((parse-state (syntax-ppss where)))
+ (nth 4 parse-state))))
(defun gnuplot-in-string-or-comment (&optional where)
(or (gnuplot-in-string where)
- [nongnu] elpa/gnuplot 2c6137c 159/184: Merge pull request #53 from conao3/add-github-actions, (continued)
- [nongnu] elpa/gnuplot 2c6137c 159/184: Merge pull request #53 from conao3/add-github-actions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 496c6e4 145/184: Change LICENSE; GPLv2 -> GPLv3, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 290c332 162/184: Revert "[WIP] Remove Xemacs support", ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot f73abe1 165/184: Merge pull request #57 from dkogan/fix-comint-process-echoes, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot fc302fd 167/184: set fail-fast strategy as false, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot ac8ab77 173/184: Move changelog to a dedicated org file., ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 1488629 174/184: Fix font-lock not loading., ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 5fd785c 178/184: Fix test runner, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 65b58b2 175/184: Fix cl deprecation (#68), ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 6a192ef 176/184: Fix more deprecated functions., ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 58a1cf5 024/184: Fixed horrible bug in gnuplot-in-string/gnuplot-in-comment,
ELPA Syncer <=
- [nongnu] elpa/gnuplot 0d9c0af 025/184: Better method for scanning strings/comments., ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 84933f0 029/184: Allow single quoted strings to include '' as an escape for ', ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot c97f028 078/184: use a defsubst instead of defmacro in debug-context, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot f710394 057/184: Add keys C-M-x (evaluate region) and C-j (evaluate line and newline), ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 54f3882 070/184: Silence another compiler warning by using with-current-buffer, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 35f3f8d 080/184: Avoid having text syntax-property changes mark buffer as modified, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot fdd3e1e 101/184: * README.org: update installation section for el-get users., ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 35a8a19 108/184: Check for `syntax-propertize-function' when defining syntax-table, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 4cd89ab 109/184: Replace ad-hoc scanning with syntax-propertize-rules, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 09ff207 131/184: Remove un-needed `gnuplot-context-mode-p` function, ELPA Syncer, 2021/08/29