Skip to content

Commit 6a192ef

Browse files
committed
Fix more deprecated functions.
1 parent 65b58b2 commit 6a192ef

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

gnuplot-context.el

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

448448
;; Symbols match token types or calls to other patterns
449449
((symbolp pat)
450-
(case pat
450+
(cl-case pat
451451
((any) `((any)))
452452
((name number string separator) `((token-type ,pat)))
453453
(t `((call ,pat)))))
@@ -460,11 +460,11 @@ name; otherwise continues tokenizing up to the token at point. FIXME."
460460
;; Other forms combine simpler patterns
461461
(t
462462
(let ((type (car pat)))
463-
(case type
463+
(cl-case type
464464
;; (sequence...): concatenate patterns, with optional eldoc
465465
;; and info strings
466466
((sequence)
467-
(destructuring-bind
467+
(cl-destructuring-bind
468468
(subpats eldoc info)
469469
(gnuplot-filter-arg-list (cdr pat))
470470
(let ((eldoc-push '()) (eldoc-pop '())
@@ -542,7 +542,7 @@ name; otherwise continues tokenizing up to the token at point. FIXME."
542542

543543
;; keywords
544544
((kw)
545-
(destructuring-bind (regex name)
545+
(cl-destructuring-bind (regex name)
546546
(gnuplot-keyword-helper (cdr pat))
547547
`((keyword ,regex ,name))))
548548

@@ -579,7 +579,7 @@ name; otherwise continues tokenizing up to the token at point. FIXME."
579579
(eldoc nil) (info nil))
580580
(dolist (item args)
581581
(let ((type (car-safe item)))
582-
(case type
582+
(cl-case type
583583
((:eldoc) (setq eldoc (cadr item)))
584584
((:no-info) (setq info :no-info)) ; inhibit stack scanning
585585
((:info) (setq info (cadr item)))
@@ -641,7 +641,7 @@ name; otherwise continues tokenizing up to the token at point. FIXME."
641641
(let ((name (car chunk))
642642
(code (cdr chunk)))
643643
(setf (aref object-code i) `(label ,name))
644-
(incf i)
644+
(cl-incf i)
645645
(puthash name i name->offset)
646646
(while code
647647
(setf (aref object-code i) (car code)
@@ -654,7 +654,7 @@ name; otherwise continues tokenizing up to the token at point. FIXME."
654654
(let ((pattern-name nil))
655655
(dotimes (i (length object-code))
656656
(let ((inst (aref object-code i)))
657-
(case (car inst)
657+
(cl-case (car inst)
658658
((label)
659659
(setq pattern-name (cadr inst)))
660660

@@ -1800,8 +1800,8 @@ there."
18001800
(when start-symbol ; HACK FIXME
18011801
(let ((look-for `(label ,start-symbol)))
18021802
(while (not (equal (aref instructions pc) look-for))
1803-
(incf pc))
1804-
(incf pc)))
1803+
(cl-incf pc))
1804+
(cl-incf pc)))
18051805

18061806
(setq gnuplot-completions nil
18071807
gnuplot-eldoc nil
@@ -1823,7 +1823,7 @@ there."
18231823
(end-of-tokens (null tokens)))
18241824
(gnuplot-trace "%s\t%s\t%s\n" pc inst (and token (gnuplot-token-id token)))
18251825

1826-
(case opcode
1826+
(cl-case opcode
18271827
;; (literal LITERAL NO-COMPLETE)
18281828
((literal)
18291829
(let ((expect (cadr inst))
@@ -1981,7 +1981,7 @@ there."
19811981
(when (and end-of-tokens (not completing-p))
19821982
(gnuplot-scan-stack stack tokens))
19831983

1984-
(destructuring-bind
1984+
(cl-destructuring-bind
19851985
(bt-stack bt-tokens bt-pc bt-captures bt-progress)
19861986
(pop backtrack)
19871987
(setq stack bt-stack
@@ -2006,7 +2006,7 @@ there."
20062006
(position (caddr item))) ; must progress by at least one token
20072007
(if (and (memq type '(info eldoc no-scan))
20082008
(not (eq position tokens)))
2009-
(case type
2009+
(cl-case type
20102010
((no-scan)
20112011
(throw 'no-scan nil))
20122012

gnuplot-test-context.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@
380380
(insert-file-contents fname)
381381
(gnuplot-mode)
382382
(message "Testing on file %s of %s: %s..."
383-
(incf n) n-files fname)
383+
(cl-incf n) n-files fname)
384384
(condition-case err
385385
(gnuplot-test-parse-buffer (current-buffer) fname)
386386
(error
@@ -419,9 +419,9 @@
419419
(gnuplot-match-pattern
420420
gnuplot-compiled-grammar
421421
tokens nil)))
422-
(incf gnuplot-test-count)
422+
(cl-incf gnuplot-test-count)
423423
(if (equal result '(nil))
424-
(incf gnuplot-test-success-count)
424+
(cl-incf gnuplot-test-success-count)
425425
(let ((cmd
426426
(buffer-substring
427427
(gnuplot-point-at-beginning-of-command)

gnuplot-tests.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ represented by a format-string with a single %s placeholder.
4242
4343
Returns non-nil if STRING is correctly recognised as a single
4444
string by `scan-sexps'."
45-
(destructuring-bind (prologue epilogue)
45+
(cl-destructuring-bind (prologue epilogue)
4646
(split-string context "%s")
4747
(with-temp-buffer
4848
(gnuplot-mode)
@@ -189,7 +189,7 @@ comment
189189

190190
(defun gnuplot-test-comment-in-context (comment context)
191191
"Non-nil if COMMENT is correctly recognised within CONTEXT in gnuplot-mode."
192-
(destructuring-bind (prologue epilogue)
192+
(cl-destructuring-bind (prologue epilogue)
193193
(split-string context "%s")
194194
(with-temp-buffer
195195
(gnuplot-mode)

0 commit comments

Comments
 (0)