[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gnuplot 08fe8e0 117/184: Try to make tests runnable on old
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gnuplot 08fe8e0 117/184: Try to make tests runnable on older Emacs |
Date: |
Sun, 29 Aug 2021 11:03:27 -0400 (EDT) |
branch: elpa/gnuplot
commit 08fe8e0bd9c9e76cfa97ff4d882b36af8cd4bb61
Author: joddie <jonxfield@gmail.com>
Commit: joddie <jonxfield@gmail.com>
Try to make tests runnable on older Emacs
---
gnuplot-test-context.el | 3 ++-
gnuplot-tests.el | 24 +++++++++++++-----------
2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/gnuplot-test-context.el b/gnuplot-test-context.el
index dfc7046..9fa2a05 100644
--- a/gnuplot-test-context.el
+++ b/gnuplot-test-context.el
@@ -24,7 +24,8 @@
(with-temp-buffer
(gnuplot-mode)
(insert string)
- (syntax-propertize (point-max))
+ (when (fboundp 'syntax-propertize)
+ (syntax-propertize (point-max)))
(goto-char (point-max))
(gnuplot-tokenize)))
diff --git a/gnuplot-tests.el b/gnuplot-tests.el
index 6c4e9bc..2333846 100644
--- a/gnuplot-tests.el
+++ b/gnuplot-tests.el
@@ -5,7 +5,7 @@
(require 'gnuplot)
(require 'ert)
-(require 'cl-lib)
+(eval-when-compile (require 'cl))
;; Hide an annoying interactive message during batch testing
(when (require 'nadvice nil t)
@@ -42,8 +42,8 @@ represented by a format-string with a single %s placeholder.
Returns non-nil if STRING is correctly recognised as a single
string by `scan-sexps'."
- (pcase-let
- ((`(,prologue ,epilogue) (split-string context "%s")))
+ (destructuring-bind (prologue epilogue)
+ (split-string context "%s")
(with-temp-buffer
(gnuplot-mode)
(let (start end)
@@ -53,7 +53,8 @@ string by `scan-sexps'."
(insert string)
(setq end (point))
(insert epilogue))
- (syntax-propertize (point-max))
+ (when (fboundp 'syntax-propertize)
+ (syntax-propertize (point-max)))
(string= (buffer-substring start (scan-sexps start 1))
string)))))
@@ -66,7 +67,7 @@ string-literal in multiple different contexts, as determined
by
(declare (indent 1))
`(ert-deftest ,name ()
,string
- ,@(cl-loop for context in gnuplot-string-test-contexts
+ ,@(loop for context in gnuplot-string-test-contexts
collect
`(should (gnuplot-test-string-in-context ,string ,context)))))
@@ -188,8 +189,8 @@ comment
(defun gnuplot-test-comment-in-context (comment context)
"Non-nil if COMMENT is correctly recognised within CONTEXT in gnuplot-mode."
- (pcase-let
- ((`(,prologue ,epilogue) (split-string context "%s")))
+ (destructuring-bind (prologue epilogue)
+ (split-string context "%s")
(with-temp-buffer
(gnuplot-mode)
(let (start end)
@@ -199,13 +200,14 @@ comment
(insert comment)
(setq end (point))
(insert epilogue))
- (syntax-propertize (point-max))
+ (when (fboundp 'syntax-propertize)
+ (syntax-propertize (point-max)))
(goto-char (1+ start))
- (cl-flet ((in-comment-p (position)
+ (flet ((in-comment-p (position)
(nth 4 (syntax-ppss position))))
(and
(not (in-comment-p start))
- (cl-loop for position from (1+ start) upto end
+ (loop for position from (1+ start) upto end
always (in-comment-p position))
(or (= end (point-max))
(not (in-comment-p (1+ end))))))))))
@@ -219,7 +221,7 @@ string-literal in multiple different contexts, as
determined by
(declare (indent 1))
`(ert-deftest ,name ()
,comment
- ,@(cl-loop for context in gnuplot-comment-test-contexts
+ ,@(loop for context in gnuplot-comment-test-contexts
collect
`(should (gnuplot-test-comment-in-context ,comment
,context)))))
- [nongnu] elpa/gnuplot 0134457 098/184: Add configure scripts, etc. back to repository for easier building, (continued)
- [nongnu] elpa/gnuplot 0134457 098/184: Add configure scripts, etc. back to repository for easier building, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 1b8e0e3 095/184: Update included info file for Gnuplot 4.6, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot d5eb309 102/184: Merge pull request #17 from yyr/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot ae7c4b4 104/184: readme tweaks, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 483a71f 103/184: Update documentation on installing, and tweak Makefile.dst, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 7350c9d 107/184: Use the syntax-propertize mechanism instead of after-change-functions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 4c5092a 115/184: Merge branch 'syntax-propertize', ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot edd779a 114/184: Fix context tests for syntax-propertize, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 156d6a9 120/184: Add option to send plot output to a dedicated buffer, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot ba3728a 113/184: Fix syntax-propertize rules for empty strings, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 08fe8e0 117/184: Try to make tests runnable on older Emacs,
ELPA Syncer <=
- [nongnu] elpa/gnuplot 7f53432 132/184: Clarify `gnuplot-comint-complete` docstring, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 2442835 127/184: Use completion-at-point in comint buffers in recent Emacs, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot f3734b6 136/184: Add Jon as author, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 3f28986 134/184: Fix compiler warnings, comments and docstrings, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 21f9046 135/184: Bind appropriate completion command in comint mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 3f569ef 137/184: Remove gnuplot-bug-report, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot a406143 140/184: Merge pull request #41 from conao3/re-pr-28, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 55e3f75 142/184: Merge pull request #42 from conao3/add-toolbar-make-button-check, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 3fc4020 147/184: solve package-lint/byte-compile/check-doc warnings, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 7830b22 156/184: Add configuration instructions in README.org. Remove dotemacs.el., ELPA Syncer, 2021/08/29