[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gnuplot 65b58b2 175/184: Fix cl deprecation (#68)
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gnuplot 65b58b2 175/184: Fix cl deprecation (#68) |
Date: |
Sun, 29 Aug 2021 11:03:39 -0400 (EDT) |
branch: elpa/gnuplot
commit 65b58b2efadc9c9e99fb78ef22f5140f145168c4
Author: Maxime Tréca <16440823+mtreca@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Fix cl deprecation (#68)
---
gnuplot-context.el | 4 ++--
gnuplot-debug-context.el | 2 +-
gnuplot-gui.el | 44 ++++++++++++++++++++++----------------------
gnuplot-test-context.el | 2 +-
gnuplot-tests.el | 10 +++++-----
gnuplot.el | 6 ++----
6 files changed, 33 insertions(+), 35 deletions(-)
diff --git a/gnuplot-context.el b/gnuplot-context.el
index 6205534..26df87c 100644
--- a/gnuplot-context.el
+++ b/gnuplot-context.el
@@ -233,7 +233,7 @@
;; Library dependencies
(eval-when-compile
- (require 'cl)
+ (require 'cl-lib)
;; Prevent compiler warnings about undefined functions
(require 'gnuplot))
@@ -1808,7 +1808,7 @@ there."
gnuplot-info-at-point nil
gnuplot-captures nil)
- (flet ((advance
+ (cl-flet ((advance
()
(pop tokens)
(if (and (null tokens) (not completing-p))
diff --git a/gnuplot-debug-context.el b/gnuplot-debug-context.el
index 7d425e1..8bca418 100644
--- a/gnuplot-debug-context.el
+++ b/gnuplot-debug-context.el
@@ -99,7 +99,7 @@
(if gnuplot-captures
(with-gnuplot-trace-buffer
(insert "\n-- * capture groups: * --\n")
- (loop for c on gnuplot-captures
+ (cl-loop for c on gnuplot-captures
do
(let ((name (caar c))
(gnuplot-captures c))
diff --git a/gnuplot-gui.el b/gnuplot-gui.el
index f13decd..7a6ca67 100644
--- a/gnuplot-gui.el
+++ b/gnuplot-gui.el
@@ -68,7 +68,7 @@
(require 'widget)
(require 'wid-edit))
(error nil)))
-(require 'cl)
+(require 'cl-lib)
(eval-when-compile ; suppress some compiler warnings
(defvar gnuplot-quote-character nil)
(defvar gnuplot-info-display nil)
@@ -934,7 +934,7 @@ Note that \"cntrparam\" is not currently supported."
(old-top (gnuplot-gui-get-frame-param 'top)))
(when (or
(and (equal gnuplot-gui-plot-splot-fit-style
'complete)
- (member* word '("plot" "splot" "fit")
+ (cl-member word '("plot" "splot" "fit")
:test 'string=))
(equal word "test"))
(gnuplot-gui-set-frame-param 'height 32)
@@ -942,7 +942,7 @@ Note that \"cntrparam\" is not currently supported."
(gnuplot-gui-prompt-for-frame word)
(when (or
(and (equal gnuplot-gui-plot-splot-fit-style
'complete)
- (member* word '("plot" "splot" "fit")
+ (cl-member word '("plot" "splot" "fit")
:test 'string=))
(equal word "test"))
(gnuplot-gui-set-frame-param 'height old-height)
@@ -1011,8 +1011,8 @@ argument, for example an axis label or a font name. It
also replaces
bounding single quotes with double quotes, since double quotes are
used in `gnuplot-gui-all-types'."
(let (fixed-list quote quoted) ; remove blanks
- (setq list (remove* "\\s-+" list :test 'string-match)
- list (remove* "" list :test 'string=))
+ (setq list (cl-remove "\\s-+" list :test 'string-match)
+ list (cl-remove "" list :test 'string=))
(while list ; concatinate parts of quoted string
(if (not (string-match "^\\([\]\[()'\"]\\)" (car list)))
(setq fixed-list (append fixed-list (list (car list))))
@@ -1063,14 +1063,14 @@ arguments."
(while temp-list
(cond
;; ---------------------------- list
- ((member* symbol '(list list*) :test 'equal)
+ ((cl-member symbol '(list list*) :test 'equal)
(let* ((case-fold-search nil)
- (match-cons (member* (concat "^" (car temp-list))
+ (match-cons (cl-member (concat "^" (car temp-list))
values :test 'string-match)))
(if (and (car match-cons) ; " " may be first elem. of list
(not (string= " " (car match-cons))))
(setq this-cons (cons tag (car match-cons))
- arg-list (remove* (car temp-list) arg-list
+ arg-list (cl-remove (car temp-list) arg-list
:test 'string= :count 1)
temp-list nil)
(setq temp-list (cdr temp-list)))))
@@ -1091,16 +1091,16 @@ arguments."
(cond ((and (string= prefix (car temp-list))
(string-match "^[-0-9.]+$" (cadr temp-list)))
(setq this-cons (cons tag (cadr temp-list))
- arg-list (remove* (car temp-list) arg-list
+ arg-list (cl-remove (car temp-list) arg-list
:test 'string= :count 1)
- arg-list (remove* (cadr temp-list) arg-list
+ arg-list (cl-remove (cadr temp-list) arg-list
:test 'string= :count 1)
temp-list nil))
;; --------------------- number without prefix
((and (not prefix)
(string-match "^[-0-9.]+$" (car temp-list)))
(setq this-cons (cons tag (car temp-list))
- arg-list (remove* (car temp-list) arg-list
+ arg-list (cl-remove (car temp-list) arg-list
:test 'string= :count 1)
temp-list nil))
(t
@@ -1126,7 +1126,7 @@ arguments."
(setq this-cons
(cons tag (cons (match-string 1 (car temp-list))
(match-string 2 (car temp-list))))
- arg-list (remove* (car temp-list) arg-list
+ arg-list (cl-remove (car temp-list) arg-list
:test 'string= :count 1)
temp-list nil)
(setq temp-list (cdr temp-list)) ))
@@ -1137,7 +1137,7 @@ arguments."
")") ; closing paren
(car temp-list))
(let* ((list (split-string (car temp-list) "[ \t(),]+"))
- (list (remove* "" list :test 'string=))
+ (list (cl-remove "" list :test 'string=))
(return ()))
(while list
(if (string-match "['\"]\\([^'\"]*\\)['\"]" (car list))
@@ -1148,18 +1148,18 @@ arguments."
(setq return (append return (list "" (car list)))))
(setq list (cdr list)) )
(setq this-cons (cons tag return)
- arg-list (remove* (car temp-list) arg-list
+ arg-list (cl-remove (car temp-list) arg-list
:test 'string= :count 1)
temp-list nil))
(setq temp-list (cdr temp-list))) )
;; ---------------------------- string, file, format
- ((member* symbol '(string file format) :test 'equal)
+ ((cl-member symbol '(string file format) :test 'equal)
(if (string-match (concat "['\"]" ; opening quote
"\\([^'\"]*\\)" ; string
"['\"]") ; closing quote
(car temp-list))
(setq this-cons (cons tag (match-string 0 (car temp-list)))
- arg-list (remove* (car temp-list) arg-list
+ arg-list (cl-remove (car temp-list) arg-list
:test 'string= :count 1)
temp-list nil)
(setq temp-list (cdr temp-list)) ))
@@ -1167,9 +1167,9 @@ arguments."
((equal symbol 'string*)
(if (string= prefix (car temp-list))
(setq this-cons (cons tag (cadr temp-list))
- arg-list (remove* (car temp-list) arg-list
+ arg-list (cl-remove (car temp-list) arg-list
:test 'string= :count 1)
- arg-list (remove* (cadr temp-list) arg-list
+ arg-list (cl-remove (cadr temp-list) arg-list
:test 'string= :count 1)
temp-list nil)
(setq temp-list (cdr temp-list)) ) )
@@ -1301,19 +1301,19 @@ SAVE-FRAME is non-nil when the widgets are being reset."
(widget-insert "\t") ; insert the appropriate widget
(cond
;;------------------------------ list, list* ------------
- ((member* (eval wtype) '(list list*) :test 'equal)
+ ((cl-member (eval wtype) '(list list*) :test 'equal)
(let ((starred (if (equal (eval wtype) 'list*) t nil)))
(gnuplot-gui-menu-choice tag default list starred)))
;;------------------------------ number, tag, fontsize --
- ((member* (eval wtype) '(number tag fontsize) :test 'equal)
+ ((cl-member (eval wtype) '(number tag fontsize) :test 'equal)
(gnuplot-gui-number tag default prefix))
;;------------------------------ position ---------------
;;------------------------------ range, pair ------------
- ((member* (eval wtype) '(range pair) :test 'equal)
+ ((cl-member (eval wtype) '(range pair) :test 'equal)
(let ((is-range (equal (eval wtype) 'range)))
(gnuplot-gui-range tag default prefix is-range)))
;;------------------------------ string, string* --------
- ((member* (eval wtype) '(string string*) :test 'equal)
+ ((cl-member (eval wtype) '(string string*) :test 'equal)
(let ((starred (if (equal (eval wtype) 'string) nil t)))
(gnuplot-gui-string tag default prefix starred)))
;;------------------------------ format -----------------
diff --git a/gnuplot-test-context.el b/gnuplot-test-context.el
index 1b41c30..961114f 100644
--- a/gnuplot-test-context.el
+++ b/gnuplot-test-context.el
@@ -7,7 +7,7 @@
(require 'ert)
(eval-when-compile
- (require 'cl)
+ (require 'cl-lib)
(if (not (fboundp 'ert-deftest))
(defalias 'ert-deftest 'deftest))
diff --git a/gnuplot-tests.el b/gnuplot-tests.el
index 96fbde9..4c3b011 100644
--- a/gnuplot-tests.el
+++ b/gnuplot-tests.el
@@ -5,7 +5,7 @@
(require 'gnuplot)
(require 'ert)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
;; Hide an annoying interactive message during batch testing
(when (require 'nadvice nil t)
@@ -67,7 +67,7 @@ string-literal in multiple different contexts, as determined
by
(declare (indent 1))
`(ert-deftest ,name ()
,string
- ,@(loop for context in gnuplot-string-test-contexts
+ ,@(cl-loop for context in gnuplot-string-test-contexts
collect
`(should (gnuplot-test-string-in-context ,string ,context)))))
@@ -203,11 +203,11 @@ comment
(when (fboundp 'syntax-propertize)
(syntax-propertize (point-max)))
(goto-char (1+ start))
- (flet ((in-comment-p (position)
+ (cl-flet ((in-comment-p (position)
(nth 4 (syntax-ppss position))))
(and
(not (in-comment-p start))
- (loop for position from (1+ start) upto end
+ (cl-loop for position from (1+ start) upto end
always (in-comment-p position))
(or (= end (point-max))
(not (in-comment-p (1+ end))))))))))
@@ -221,7 +221,7 @@ string-literal in multiple different contexts, as
determined by
(declare (indent 1))
`(ert-deftest ,name ()
,comment
- ,@(loop for context in gnuplot-comment-test-contexts
+ ,@(cl-loop for context in gnuplot-comment-test-contexts
collect
`(should (gnuplot-test-comment-in-context ,comment ,context)))))
diff --git a/gnuplot.el b/gnuplot.el
index 76de056..f0cd62d 100644
--- a/gnuplot.el
+++ b/gnuplot.el
@@ -199,8 +199,7 @@
(require 'comint)
(require 'easymenu)
-;; TODO Fix deprecation
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(declare-function 'eldoc-add-command "eldoc")
@@ -603,9 +602,8 @@ non-nil."
(defvar gnuplot-mode-menu nil)
-;; TODO Fix deprecation
(defvar gnuplot-display-options-menu
- (flet ((make-image-setter (type)
+ (cl-flet ((make-image-setter (type)
`[,(concat (upcase type) " images")
(lambda () (interactive)
(gnuplot-set-image-format ,type))
:style toggle
- [nongnu] elpa/gnuplot 5fdef54 151/184: Merge pull request #47 from conao3/remove-weird-char, (continued)
- [nongnu] elpa/gnuplot 5fdef54 151/184: Merge pull request #47 from conao3/remove-weird-char, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 9894505 153/184: Ignore backward-sexp error when get completion, ELPA Syncer, 2021/08/29
- [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 <=
- [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, 2021/08/29