branch: elpa/gnuplot
commit e4d19faf760f9f261339586f723859ce7869e760
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
Janitorial cleanup
---
admin/doc2texi.el | 10 ++++-----
gnuplot-context.el | 16 +++++++--------
gnuplot-gui.el | 48 +++++++++++++++++++++----------------------
test/gnuplot-debug-context.el | 4 ++--
4 files changed, 38 insertions(+), 40 deletions(-)
diff --git a/admin/doc2texi.el b/admin/doc2texi.el
index 1edd7891d8f..852cbb1a8aa 100644
--- a/admin/doc2texi.el
+++ b/admin/doc2texi.el
@@ -470,7 +470,7 @@ the end of `d2t-get-terminals'.")
(add-to-list 'd2t-terminal-list term)))))
(unless (member* system-configuration '("pc" "windows")
- :test 'string-match)
+ :test #'string-match)
(dolist (term '("x11" "tgif" "gpic" "regis" "t410x" "tex" "xlib"))
(add-to-list 'd2t-terminal-list term)))
@@ -630,10 +630,10 @@ appropriate sectioning and @node commands."
(unless (eobp)
(let* ((number (match-string 1))
(word (match-string 2))
- (node (apply #'string (append (substitute ?_ ? word :test
'char-equal) nil)))
+ (node (apply #'string (append (substitute ?_ ? word :test
#'char-equal) nil)))
(eol (save-excursion (end-of-line) (point-marker))))
;; some node names appear twice. make them unique.
- (while (member* node d2t-node-list :test 'string=)
+ (while (member* node d2t-node-list :test #'string=)
(setq node (concat node "_")))
(setq d2t-node-list (append d2t-node-list (list node)))
(beginning-of-line)
@@ -704,7 +704,7 @@ Dumps the resulting data into gnuplot-eldoc.el"
"\n\n%S\n%S\n(provide 'gnuplot-eldoc)\n;;; gnuplot-eldoc.el ends
here\n"
'(eval-when-compile (defvar gnuplot-eldoc-hash nil))
`(setq gnuplot-eldoc-hash
- (let ((tbl (make-hash-table :test 'equal))
+ (let ((tbl (make-hash-table :test #'equal))
(alist ',alist))
(while alist
(puthash (caar alist) (cdar alist) tbl)
@@ -871,7 +871,7 @@ This must be run after `d2t-first-column'."
(match-string 1)
","
(remove* ?^ (match-string 2)
- :test 'char-equal)
+ :test #'char-equal)
"}"))
(insert "@c ")))
;; translate <ul> </ul> to @itemize environment
diff --git a/gnuplot-context.el b/gnuplot-context.el
index 25831a61e1f..a8ef4ffa0df 100644
--- a/gnuplot-context.el
+++ b/gnuplot-context.el
@@ -472,7 +472,7 @@ name; otherwise continues tokenizing up to the token at
point. FIXME."
(t ; two patterns
(let* ((pat1 (cadr pat))
- (pat2 (cl-caddr pat))
+ (pat2 (caddr pat))
(pat1-c (gnuplot-context--compile-pattern pat1))
(pat2-c (gnuplot-context--compile-pattern pat2))
(pat1-l (length pat1-c))
@@ -509,7 +509,7 @@ name; otherwise continues tokenizing up to the token at
point. FIXME."
;; Syntactic sugar for delimited lists
((delimited-list)
(let* ((item (cadr pat))
- (sep (cl-caddr pat)))
+ (sep (caddr pat)))
(gnuplot-context--compile-pattern
`(sequence ,item (many (sequence ,sep ,item))))))
@@ -1799,7 +1799,7 @@ there."
;; (literal LITERAL NO-COMPLETE)
((literal)
(let ((expect (cadr inst))
- (no-complete (cl-caddr inst)))
+ (no-complete (caddr inst)))
(cond (end-of-tokens
(unless no-complete
(gnuplot-context--trace "\tpushing \"%s\" to
completions\n" expect)
@@ -1824,7 +1824,7 @@ there."
;; regexp-matches REGEXP, use NAME for completions
((keyword)
(let ((regexp (cadr inst))
- (name (cl-caddr inst)))
+ (name (caddr inst)))
(cond (end-of-tokens
(gnuplot-context--trace "\tpushing \"%s\" to
completions\n" name)
(push name gnuplot-context--completions)
@@ -1901,7 +1901,7 @@ there."
;; onto the stack
((push)
(let* ((type (cadr inst))
- (value (cl-caddr inst)))
+ (value (caddr inst)))
(push `(,type ,value ,tokens) stack)))
;; (pop TYPE): pop something off the stack
@@ -1925,7 +1925,7 @@ there."
(record (assoc name gnuplot-context--captures)))
(if (not record)
(error "Gnuplot-match-tokens: no open capture group named
%s" name)
- (setf (cl-caddr record) tokens)
+ (setf (caddr record) tokens)
(gnuplot-context--debug (gnuplot-dump-captures)))))
;; (check-progress): make sure not stuck in an infinite loop
@@ -1975,7 +1975,7 @@ there."
(not (and gnuplot-context--info-at-point
gnuplot-context--eldoc)))
(let* ((item (car stack))
(type (car item))
- (position (cl-caddr item))) ; must progress by at least one token
+ (position (caddr item))) ; must progress by at least one token
(if (and (memq type '(info eldoc no-scan))
(not (eq position tokens)))
(cl-case type
@@ -2013,7 +2013,7 @@ there."
(let ((record (assoc name gnuplot-context--captures)))
(if (not record) nil
(let ((begin (cadr record))
- (end (cl-caddr record))
+ (end (caddr record))
(accum '()))
(while (and begin (not (eq begin end)))
(push (pop begin) accum))
diff --git a/gnuplot-gui.el b/gnuplot-gui.el
index 756c0bdc898..a81de33c146 100644
--- a/gnuplot-gui.el
+++ b/gnuplot-gui.el
@@ -872,16 +872,14 @@ 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)
- (cl-member word '("plot" "splot" "fit")
- :test 'equal))
+ (member word '("plot" "splot" "fit")))
(equal word "test"))
(gnuplot-gui-set-frame-param 'height 32)
(gnuplot-gui-set-frame-param 'top 50))
(gnuplot-gui-prompt-for-frame word)
(when (or
(and (equal gnuplot-gui-plot-splot-fit-style
'complete)
- (cl-member word '("plot" "splot" "fit")
- :test 'equal))
+ (member word '("plot" "splot" "fit")))
(equal word "test"))
(gnuplot-gui-set-frame-param 'height old-height)
(gnuplot-gui-set-frame-param 'top old-top)) ))
@@ -946,8 +944,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 (cl-remove "\\s-+" list :test 'string-match)
- list (cl-remove "" list :test 'equal))
+ (setq list (cl-remove "\\s-+" list :test #'string-match)
+ list (remove "" list))
(while list ; concatinate parts of quoted string
(if (not (string-match "^\\([\]\[()'\"]\\)" (car list)))
(setq fixed-list (append fixed-list (list (car list))))
@@ -998,15 +996,15 @@ arguments."
(while temp-list
(cond
;; ---------------------------- list
- ((cl-member symbol '(list list*) :test 'equal)
+ ((memq symbol '(list list*))
(let* ((case-fold-search nil)
(match-cons (cl-member (concat "^" (car temp-list))
- values :test 'string-match)))
+ values :test #'string-match)))
(if (and (car match-cons) ; " " may be first elem. of list
(not (equal " " (car match-cons))))
(setq this-cons (cons tag (car match-cons))
arg-list (cl-remove (car temp-list) arg-list
- :test 'equal :count 1)
+ :test #'equal :count 1)
temp-list nil)
(setq temp-list (cdr temp-list)))))
;; ---------------------------- tag (first number in list)
@@ -1027,16 +1025,16 @@ arguments."
(string-match "^[-0-9.]+$" (cadr temp-list)))
(setq this-cons (cons tag (cadr temp-list))
arg-list (cl-remove (car temp-list) arg-list
- :test 'equal :count 1)
+ :test #'equal :count 1)
arg-list (cl-remove (cadr temp-list) arg-list
- :test 'equal :count 1)
+ :test #'equal :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 (cl-remove (car temp-list) arg-list
- :test 'equal :count 1)
+ :test #'equal :count 1)
temp-list nil))
(t
(setq temp-list (cdr temp-list)))))
@@ -1045,8 +1043,8 @@ arguments."
(if (and (equal prefix (car temp-list))
(string-match "^[-0-9.]+$" (cadr temp-list)))
(let ((this-car (cadr temp-list))
- (this-cdr (if (string-match "^[-0-9.]+$" (cl-caddr
temp-list))
- (cl-caddr temp-list) "")))
+ (this-cdr (if (string-match "^[-0-9.]+$" (caddr
temp-list))
+ (caddr temp-list) "")))
(setq this-cons (cons tag (cons this-car this-cdr))
temp-list nil))
(setq temp-list (cdr temp-list))))
@@ -1062,7 +1060,7 @@ arguments."
(cons tag (cons (match-string 1 (car temp-list))
(match-string 2 (car temp-list))))
arg-list (cl-remove (car temp-list) arg-list
- :test 'equal :count 1)
+ :test #'equal :count 1)
temp-list nil)
(setq temp-list (cdr temp-list)) ))
;; ---------------------------- labels
@@ -1072,7 +1070,7 @@ arguments."
")") ; closing paren
(car temp-list))
(let* ((list (split-string (car temp-list) "[ \t(),]+"))
- (list (cl-remove "" list :test 'equal))
+ (list (remove "" list))
(return ()))
(while list
(if (string-match "['\"]\\([^'\"]*\\)['\"]" (car list))
@@ -1084,18 +1082,18 @@ arguments."
(setq list (cdr list)) )
(setq this-cons (cons tag return)
arg-list (cl-remove (car temp-list) arg-list
- :test 'equal :count 1)
+ :test #'equal :count 1)
temp-list nil))
(setq temp-list (cdr temp-list))) )
;; ---------------------------- string, file, format
- ((cl-member symbol '(string file format) :test 'equal)
+ ((memq symbol '(string file format))
(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 (cl-remove (car temp-list) arg-list
- :test 'equal :count 1)
+ :test #'equal :count 1)
temp-list nil)
(setq temp-list (cdr temp-list)) ))
;; ---------------------------- string*
@@ -1103,9 +1101,9 @@ arguments."
(if (equal prefix (car temp-list))
(setq this-cons (cons tag (cadr temp-list))
arg-list (cl-remove (car temp-list) arg-list
- :test 'equal :count 1)
+ :test #'equal :count 1)
arg-list (cl-remove (cadr temp-list) arg-list
- :test 'equal :count 1)
+ :test #'equal :count 1)
temp-list nil)
(setq temp-list (cdr temp-list)) ) )
;; ---------------------------- other or unknown
@@ -1237,19 +1235,19 @@ SAVE-FRAME is non-nil when the widgets are being reset."
(widget-insert "\t") ; insert the appropriate widget
(cond
;;------------------------------ list, list* ------------
- ((cl-member (eval wtype) '(list list*) :test 'equal)
+ ((memq (eval wtype) '(list list*))
(let ((starred (if (equal (eval wtype) 'list*) t nil)))
(gnuplot-gui-menu-choice tag default list starred)))
;;------------------------------ number, tag, fontsize --
- ((cl-member (eval wtype) '(number tag fontsize) :test 'equal)
+ ((memq (eval wtype) '(number tag fontsize))
(gnuplot-gui-number tag default prefix))
;;------------------------------ position ---------------
;;------------------------------ range, pair ------------
- ((cl-member (eval wtype) '(range pair) :test 'equal)
+ ((memq (eval wtype) '(range pair))
(let ((is-range (equal (eval wtype) 'range)))
(gnuplot-gui-range tag default prefix is-range)))
;;------------------------------ string, string* --------
- ((cl-member (eval wtype) '(string string*) :test 'equal)
+ ((memq (eval wtype) '(string string*))
(let ((starred (if (equal (eval wtype) 'string) nil t)))
(gnuplot-gui-string tag default prefix starred)))
;;------------------------------ format -----------------
diff --git a/test/gnuplot-debug-context.el b/test/gnuplot-debug-context.el
index 37a79ee5f3e..3f86b6d57ac 100644
--- a/test/gnuplot-debug-context.el
+++ b/test/gnuplot-debug-context.el
@@ -63,7 +63,7 @@
(if (eq (car x) 'return)
x
(list (car x) (cadr x)
- (gnuplot-simplify-tokens (cl-caddr x)))))))
+ (gnuplot-simplify-tokens (caddr x)))))))
(insert "-- end backtrace --\n"))))
(defun gnuplot-dump-backtrack (backtrack)
@@ -71,7 +71,7 @@
(gnuplot-context--with-trace-buffer
(insert "\n-- * backtrack records: * --\n")
(dolist (x backtrack)
- (insert (format "%s\t%s\n" (cl-caddr x) (gnuplot-simplify-tokens
(cadr x)))))
+ (insert (format "%s\t%s\n" (caddr x) (gnuplot-simplify-tokens (cadr
x)))))
(insert "-- end backtrack records --\n\n"))))
(defun gnuplot-dump-progress (progress)