Skip to content

Commit e4d19fa

Browse files
committed
Janitorial cleanup
1 parent 43e9674 commit e4d19fa

File tree

4 files changed

+38
-40
lines changed

4 files changed

+38
-40
lines changed

admin/doc2texi.el

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ the end of `d2t-get-terminals'.")
470470
(add-to-list 'd2t-terminal-list term)))))
471471

472472
(unless (member* system-configuration '("pc" "windows")
473-
:test 'string-match)
473+
:test #'string-match)
474474
(dolist (term '("x11" "tgif" "gpic" "regis" "t410x" "tex" "xlib"))
475475
(add-to-list 'd2t-terminal-list term)))
476476

@@ -630,10 +630,10 @@ appropriate sectioning and @node commands."
630630
(unless (eobp)
631631
(let* ((number (match-string 1))
632632
(word (match-string 2))
633-
(node (apply #'string (append (substitute ?_ ? word :test 'char-equal) nil)))
633+
(node (apply #'string (append (substitute ?_ ? word :test #'char-equal) nil)))
634634
(eol (save-excursion (end-of-line) (point-marker))))
635635
;; some node names appear twice. make them unique.
636-
(while (member* node d2t-node-list :test 'string=)
636+
(while (member* node d2t-node-list :test #'string=)
637637
(setq node (concat node "_")))
638638
(setq d2t-node-list (append d2t-node-list (list node)))
639639
(beginning-of-line)
@@ -704,7 +704,7 @@ Dumps the resulting data into gnuplot-eldoc.el"
704704
"\n\n%S\n%S\n(provide 'gnuplot-eldoc)\n;;; gnuplot-eldoc.el ends here\n"
705705
'(eval-when-compile (defvar gnuplot-eldoc-hash nil))
706706
`(setq gnuplot-eldoc-hash
707-
(let ((tbl (make-hash-table :test 'equal))
707+
(let ((tbl (make-hash-table :test #'equal))
708708
(alist ',alist))
709709
(while alist
710710
(puthash (caar alist) (cdar alist) tbl)
@@ -871,7 +871,7 @@ This must be run after `d2t-first-column'."
871871
(match-string 1)
872872
","
873873
(remove* ?^ (match-string 2)
874-
:test 'char-equal)
874+
:test #'char-equal)
875875
"}"))
876876
(insert "@c ")))
877877
;; translate <ul> </ul> to @itemize environment

gnuplot-context.el

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ name; otherwise continues tokenizing up to the token at point. FIXME."
472472

473473
(t ; two patterns
474474
(let* ((pat1 (cadr pat))
475-
(pat2 (cl-caddr pat))
475+
(pat2 (caddr pat))
476476
(pat1-c (gnuplot-context--compile-pattern pat1))
477477
(pat2-c (gnuplot-context--compile-pattern pat2))
478478
(pat1-l (length pat1-c))
@@ -509,7 +509,7 @@ name; otherwise continues tokenizing up to the token at point. FIXME."
509509
;; Syntactic sugar for delimited lists
510510
((delimited-list)
511511
(let* ((item (cadr pat))
512-
(sep (cl-caddr pat)))
512+
(sep (caddr pat)))
513513
(gnuplot-context--compile-pattern
514514
`(sequence ,item (many (sequence ,sep ,item))))))
515515

@@ -1799,7 +1799,7 @@ there."
17991799
;; (literal LITERAL NO-COMPLETE)
18001800
((literal)
18011801
(let ((expect (cadr inst))
1802-
(no-complete (cl-caddr inst)))
1802+
(no-complete (caddr inst)))
18031803
(cond (end-of-tokens
18041804
(unless no-complete
18051805
(gnuplot-context--trace "\tpushing \"%s\" to completions\n" expect)
@@ -1824,7 +1824,7 @@ there."
18241824
;; regexp-matches REGEXP, use NAME for completions
18251825
((keyword)
18261826
(let ((regexp (cadr inst))
1827-
(name (cl-caddr inst)))
1827+
(name (caddr inst)))
18281828
(cond (end-of-tokens
18291829
(gnuplot-context--trace "\tpushing \"%s\" to completions\n" name)
18301830
(push name gnuplot-context--completions)
@@ -1901,7 +1901,7 @@ there."
19011901
;; onto the stack
19021902
((push)
19031903
(let* ((type (cadr inst))
1904-
(value (cl-caddr inst)))
1904+
(value (caddr inst)))
19051905
(push `(,type ,value ,tokens) stack)))
19061906

19071907
;; (pop TYPE): pop something off the stack
@@ -1925,7 +1925,7 @@ there."
19251925
(record (assoc name gnuplot-context--captures)))
19261926
(if (not record)
19271927
(error "Gnuplot-match-tokens: no open capture group named %s" name)
1928-
(setf (cl-caddr record) tokens)
1928+
(setf (caddr record) tokens)
19291929
(gnuplot-context--debug (gnuplot-dump-captures)))))
19301930

19311931
;; (check-progress): make sure not stuck in an infinite loop
@@ -1975,7 +1975,7 @@ there."
19751975
(not (and gnuplot-context--info-at-point gnuplot-context--eldoc)))
19761976
(let* ((item (car stack))
19771977
(type (car item))
1978-
(position (cl-caddr item))) ; must progress by at least one token
1978+
(position (caddr item))) ; must progress by at least one token
19791979
(if (and (memq type '(info eldoc no-scan))
19801980
(not (eq position tokens)))
19811981
(cl-case type
@@ -2013,7 +2013,7 @@ there."
20132013
(let ((record (assoc name gnuplot-context--captures)))
20142014
(if (not record) nil
20152015
(let ((begin (cadr record))
2016-
(end (cl-caddr record))
2016+
(end (caddr record))
20172017
(accum '()))
20182018
(while (and begin (not (eq begin end)))
20192019
(push (pop begin) accum))

gnuplot-gui.el

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -872,16 +872,14 @@ Note that \"cntrparam\" is not currently supported."
872872
(old-top (gnuplot-gui-get-frame-param 'top)))
873873
(when (or
874874
(and (equal gnuplot-gui-plot-splot-fit-style 'complete)
875-
(cl-member word '("plot" "splot" "fit")
876-
:test 'equal))
875+
(member word '("plot" "splot" "fit")))
877876
(equal word "test"))
878877
(gnuplot-gui-set-frame-param 'height 32)
879878
(gnuplot-gui-set-frame-param 'top 50))
880879
(gnuplot-gui-prompt-for-frame word)
881880
(when (or
882881
(and (equal gnuplot-gui-plot-splot-fit-style 'complete)
883-
(cl-member word '("plot" "splot" "fit")
884-
:test 'equal))
882+
(member word '("plot" "splot" "fit")))
885883
(equal word "test"))
886884
(gnuplot-gui-set-frame-param 'height old-height)
887885
(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
946944
bounding single quotes with double quotes, since double quotes are
947945
used in `gnuplot-gui-all-types'."
948946
(let (fixed-list quote quoted) ; remove blanks
949-
(setq list (cl-remove "\\s-+" list :test 'string-match)
950-
list (cl-remove "" list :test 'equal))
947+
(setq list (cl-remove "\\s-+" list :test #'string-match)
948+
list (remove "" list))
951949
(while list ; concatinate parts of quoted string
952950
(if (not (string-match "^\\([\]\[()'\"]\\)" (car list)))
953951
(setq fixed-list (append fixed-list (list (car list))))
@@ -998,15 +996,15 @@ arguments."
998996
(while temp-list
999997
(cond
1000998
;; ---------------------------- list
1001-
((cl-member symbol '(list list*) :test 'equal)
999+
((memq symbol '(list list*))
10021000
(let* ((case-fold-search nil)
10031001
(match-cons (cl-member (concat "^" (car temp-list))
1004-
values :test 'string-match)))
1002+
values :test #'string-match)))
10051003
(if (and (car match-cons) ; " " may be first elem. of list
10061004
(not (equal " " (car match-cons))))
10071005
(setq this-cons (cons tag (car match-cons))
10081006
arg-list (cl-remove (car temp-list) arg-list
1009-
:test 'equal :count 1)
1007+
:test #'equal :count 1)
10101008
temp-list nil)
10111009
(setq temp-list (cdr temp-list)))))
10121010
;; ---------------------------- tag (first number in list)
@@ -1027,16 +1025,16 @@ arguments."
10271025
(string-match "^[-0-9.]+$" (cadr temp-list)))
10281026
(setq this-cons (cons tag (cadr temp-list))
10291027
arg-list (cl-remove (car temp-list) arg-list
1030-
:test 'equal :count 1)
1028+
:test #'equal :count 1)
10311029
arg-list (cl-remove (cadr temp-list) arg-list
1032-
:test 'equal :count 1)
1030+
:test #'equal :count 1)
10331031
temp-list nil))
10341032
;; --------------------- number without prefix
10351033
((and (not prefix)
10361034
(string-match "^[-0-9.]+$" (car temp-list)))
10371035
(setq this-cons (cons tag (car temp-list))
10381036
arg-list (cl-remove (car temp-list) arg-list
1039-
:test 'equal :count 1)
1037+
:test #'equal :count 1)
10401038
temp-list nil))
10411039
(t
10421040
(setq temp-list (cdr temp-list)))))
@@ -1045,8 +1043,8 @@ arguments."
10451043
(if (and (equal prefix (car temp-list))
10461044
(string-match "^[-0-9.]+$" (cadr temp-list)))
10471045
(let ((this-car (cadr temp-list))
1048-
(this-cdr (if (string-match "^[-0-9.]+$" (cl-caddr temp-list))
1049-
(cl-caddr temp-list) "")))
1046+
(this-cdr (if (string-match "^[-0-9.]+$" (caddr temp-list))
1047+
(caddr temp-list) "")))
10501048
(setq this-cons (cons tag (cons this-car this-cdr))
10511049
temp-list nil))
10521050
(setq temp-list (cdr temp-list))))
@@ -1062,7 +1060,7 @@ arguments."
10621060
(cons tag (cons (match-string 1 (car temp-list))
10631061
(match-string 2 (car temp-list))))
10641062
arg-list (cl-remove (car temp-list) arg-list
1065-
:test 'equal :count 1)
1063+
:test #'equal :count 1)
10661064
temp-list nil)
10671065
(setq temp-list (cdr temp-list)) ))
10681066
;; ---------------------------- labels
@@ -1072,7 +1070,7 @@ arguments."
10721070
")") ; closing paren
10731071
(car temp-list))
10741072
(let* ((list (split-string (car temp-list) "[ \t(),]+"))
1075-
(list (cl-remove "" list :test 'equal))
1073+
(list (remove "" list))
10761074
(return ()))
10771075
(while list
10781076
(if (string-match "['\"]\\([^'\"]*\\)['\"]" (car list))
@@ -1084,28 +1082,28 @@ arguments."
10841082
(setq list (cdr list)) )
10851083
(setq this-cons (cons tag return)
10861084
arg-list (cl-remove (car temp-list) arg-list
1087-
:test 'equal :count 1)
1085+
:test #'equal :count 1)
10881086
temp-list nil))
10891087
(setq temp-list (cdr temp-list))) )
10901088
;; ---------------------------- string, file, format
1091-
((cl-member symbol '(string file format) :test 'equal)
1089+
((memq symbol '(string file format))
10921090
(if (string-match (concat "['\"]" ; opening quote
10931091
"\\([^'\"]*\\)" ; string
10941092
"['\"]") ; closing quote
10951093
(car temp-list))
10961094
(setq this-cons (cons tag (match-string 0 (car temp-list)))
10971095
arg-list (cl-remove (car temp-list) arg-list
1098-
:test 'equal :count 1)
1096+
:test #'equal :count 1)
10991097
temp-list nil)
11001098
(setq temp-list (cdr temp-list)) ))
11011099
;; ---------------------------- string*
11021100
((equal symbol 'string*)
11031101
(if (equal prefix (car temp-list))
11041102
(setq this-cons (cons tag (cadr temp-list))
11051103
arg-list (cl-remove (car temp-list) arg-list
1106-
:test 'equal :count 1)
1104+
:test #'equal :count 1)
11071105
arg-list (cl-remove (cadr temp-list) arg-list
1108-
:test 'equal :count 1)
1106+
:test #'equal :count 1)
11091107
temp-list nil)
11101108
(setq temp-list (cdr temp-list)) ) )
11111109
;; ---------------------------- other or unknown
@@ -1237,19 +1235,19 @@ SAVE-FRAME is non-nil when the widgets are being reset."
12371235
(widget-insert "\t") ; insert the appropriate widget
12381236
(cond
12391237
;;------------------------------ list, list* ------------
1240-
((cl-member (eval wtype) '(list list*) :test 'equal)
1238+
((memq (eval wtype) '(list list*))
12411239
(let ((starred (if (equal (eval wtype) 'list*) t nil)))
12421240
(gnuplot-gui-menu-choice tag default list starred)))
12431241
;;------------------------------ number, tag, fontsize --
1244-
((cl-member (eval wtype) '(number tag fontsize) :test 'equal)
1242+
((memq (eval wtype) '(number tag fontsize))
12451243
(gnuplot-gui-number tag default prefix))
12461244
;;------------------------------ position ---------------
12471245
;;------------------------------ range, pair ------------
1248-
((cl-member (eval wtype) '(range pair) :test 'equal)
1246+
((memq (eval wtype) '(range pair))
12491247
(let ((is-range (equal (eval wtype) 'range)))
12501248
(gnuplot-gui-range tag default prefix is-range)))
12511249
;;------------------------------ string, string* --------
1252-
((cl-member (eval wtype) '(string string*) :test 'equal)
1250+
((memq (eval wtype) '(string string*))
12531251
(let ((starred (if (equal (eval wtype) 'string) nil t)))
12541252
(gnuplot-gui-string tag default prefix starred)))
12551253
;;------------------------------ format -----------------

test/gnuplot-debug-context.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@
6363
(if (eq (car x) 'return)
6464
x
6565
(list (car x) (cadr x)
66-
(gnuplot-simplify-tokens (cl-caddr x)))))))
66+
(gnuplot-simplify-tokens (caddr x)))))))
6767
(insert "-- end backtrace --\n"))))
6868

6969
(defun gnuplot-dump-backtrack (backtrack)
7070
(if backtrack
7171
(gnuplot-context--with-trace-buffer
7272
(insert "\n-- * backtrack records: * --\n")
7373
(dolist (x backtrack)
74-
(insert (format "%s\t%s\n" (cl-caddr x) (gnuplot-simplify-tokens (cadr x)))))
74+
(insert (format "%s\t%s\n" (caddr x) (gnuplot-simplify-tokens (cadr x)))))
7575
(insert "-- end backtrack records --\n\n"))))
7676

7777
(defun gnuplot-dump-progress (progress)

0 commit comments

Comments
 (0)