[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gnuplot 35a8a19 108/184: Check for `syntax-propertize-func
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gnuplot 35a8a19 108/184: Check for `syntax-propertize-function' when defining syntax-table |
Date: |
Sun, 29 Aug 2021 11:03:26 -0400 (EDT) |
branch: elpa/gnuplot
commit 35a8a19d8b23c5bebd10180a8cc6b049f33cf046
Author: joddie <jonxfield@gmail.com>
Commit: joddie <jonxfield@gmail.com>
Check for `syntax-propertize-function' when defining syntax-table
In pre-24 Emacs which lack `syntax-propertize', syntax parsing of
strings and comments can be done by the normal syntax-table mechanism,
which works OK except for the corner cases.
---
gnuplot.el | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/gnuplot.el b/gnuplot.el
index 3af5f31..88fce08 100644
--- a/gnuplot.el
+++ b/gnuplot.el
@@ -1664,19 +1664,21 @@ static char *help_btn[] = {
(modify-syntax-entry ?_ "w" table )
- ;; In GNU Emacs we scan for strings and comments ourselves in
- ;; `gnuplot-scan-after-change'. I can't get this to work in xemacs,
- ;; so there we'll make ", ', and # delimiters as normal, and use the
- ;; built-in parser
- (if (featurep 'xemacs)
+ ;; In GNU Emacs >=24 we can use `syntax-propertize-function' to
+ ;; accurately scan for strings and comments (see
+ ;; `gnuplot-syntax-propertize'). If there's no
+ ;; `syntax-propertize', fall back to using the built-in parser and
+ ;; making ", ', and # string or comment delimiters as normal.
+ (if (not (boundp 'syntax-propertize-function))
(progn
(modify-syntax-entry ?\' "\"" table)
(modify-syntax-entry ?# "<" table)
(modify-syntax-entry ?\n ">" table)
(modify-syntax-entry ?\\ "\\" table))
- ;; GNU Emacs: Make ", ', and # punctuation, so the built-in parser
- ;; doesn't interfere with them
+ ;; When syntax-propertize is available, ", ', and # should be
+ ;; punctuation so that the built-in parser doesn't interfere
+ ;; with the syntax-propertize search.
(modify-syntax-entry ?\" "." table)
(modify-syntax-entry ?\' "." table)
(modify-syntax-entry ?` "." table)
- [nongnu] elpa/gnuplot 65b58b2 175/184: Fix cl deprecation (#68), (continued)
- [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, 2021/08/29
- [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 <=
- [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
- [nongnu] elpa/gnuplot d6f8598 121/184: Cleanup inline-image mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot a885233 124/184: Cleanup workaround for window-full-height-p, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 99c3855 130/184: Move gnuplot-context-sensitive-mode into gnuplot.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 2ec49e9 139/184: Update GitHub url, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 4b267b8 146/184: Merge pull request #44 from conao3/change-license, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 4d04c86 150/184: remove weird char, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 8f2ddd0 148/184: untabify, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot fcf5f4b 160/184: [WIP] Start removing Xemacs, ELPA Syncer, 2021/08/29