Skip to content

Commit 0b246cf

Browse files
committed
Formatting
1 parent 313cc4f commit 0b246cf

File tree

6 files changed

+37
-77
lines changed

6 files changed

+37
-77
lines changed

gnuplot-context.el

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,9 @@
253253
(let ((str (match-string-no-properties 0)))
254254
(forward-char (length str))
255255
(gnuplot-context--token-make :id str
256-
:type ',token-type
257-
:start (match-beginning 0)
258-
:end (match-end 0))))))
256+
:type ',token-type
257+
:start (match-beginning 0)
258+
:end (match-end 0))))))
259259
rules))))
260260

261261
(defun gnuplot-context--tokenize (&optional completing-p)
@@ -320,7 +320,6 @@ name; otherwise continues tokenizing up to the token at point. FIXME."
320320

321321
(nreverse tokens)))
322322

323-
324323

325324
;;;; The pattern and grammar compiler
326325
;;
@@ -410,7 +409,6 @@ name; otherwise continues tokenizing up to the token at point. FIXME."
410409
;; for debugging purposes.
411410
;;
412411

413-
414412
(eval-and-compile
415413
;; Compile a single pattern into a list of instructions. Leaves
416414
;; calls to other rules as symbolic instructions (call SYMBOL) and
@@ -503,7 +501,6 @@ name; otherwise continues tokenizing up to the token at point. FIXME."
503501
(gnuplot-context--compile-pattern
504502
`(sequence ,@pat1 (many ,@pat1)))))
505503

506-
507504
;; Optional (?)
508505
((maybe)
509506
(let* ((pat1 (cons 'sequence (cdr pat)))
@@ -1651,7 +1648,6 @@ name; otherwise continues tokenizing up to the token at point. FIXME."
16511648
"zzeroaxis")
16521649
(maybe linestyle-spec)])
16531650

1654-
16551651
;;; Other commands
16561652
(cd-command
16571653
["cd" string])
@@ -1715,7 +1711,6 @@ name; otherwise continues tokenizing up to the token at point. FIXME."
17151711
(defmacro gnuplot-context--trace (&rest _) "No-op." '(progn nil))
17161712
(defmacro gnuplot-context--debug (&rest _) "No-op." '(progn nil))))
17171713

1718-
17191714

17201715
;;;; Variables to be set via pattern matching
17211716
(defvar gnuplot-context--completions nil
@@ -1754,7 +1749,7 @@ These have to be compiled from the Gnuplot source tree using
17541749

17551750
;;;; The pattern matching machine
17561751
(defun gnuplot-context--match-pattern (instructions tokens completing-p
1757-
&optional start-symbol)
1752+
&optional start-symbol)
17581753
"Parse TOKENS, setting completions, info and ElDoc information.
17591754
17601755
This function parses TOKENS by simulating a stack machine with
@@ -1794,11 +1789,11 @@ there."
17941789
gnuplot-context--captures nil)
17951790

17961791
(cl-flet ((advance
1797-
()
1798-
(pop tokens)
1799-
(if (and (null tokens) (not completing-p))
1800-
(gnuplot-context--scan-stack stack tokens)))
1801-
(fail () (setq fail t)))
1792+
()
1793+
(pop tokens)
1794+
(if (and (null tokens) (not completing-p))
1795+
(gnuplot-context--scan-stack stack tokens)))
1796+
(fail () (setq fail t)))
18021797

18031798
;; Main loop
18041799
(while t

gnuplot-debug-context.el

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@
9898
(gnuplot-context--with-trace-buffer
9999
(insert "\n-- * capture groups: * --\n")
100100
(cl-loop for c on gnuplot-context--captures
101-
do
102-
(let ((name (caar c))
103-
(gnuplot-context--captures c))
104-
(insert (format "%s\t%s\n"
105-
name
106-
(mapconcat 'gnuplot-context--token-id
107-
(gnuplot-context--capture-group name)
108-
" ")))))
101+
do
102+
(let ((name (caar c))
103+
(gnuplot-context--captures c))
104+
(insert (format "%s\t%s\n"
105+
name
106+
(mapconcat 'gnuplot-context--token-id
107+
(gnuplot-context--capture-group name)
108+
" ")))))
109109
(insert "-- end capture groups --\n\n"))))
110110

111111
(provide 'gnuplot-debug-context)

gnuplot-gui.el

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ the first entry in the list be a blank string."
131131
(if (> (point) end) (goto-char end))
132132
(buffer-substring-no-properties begin (point)))))
133133

134-
135134

136135
;;; data structures containing regarding options in Gnuplot 3.7
137136

@@ -594,7 +593,6 @@ See the doc-string for `gnuplot-gui-all-types'.")
594593
'(("INITIAL FILE" 'file " " t)
595594
("UPDATED FILE" 'file " " t))) ))
596595

597-
598596
(defcustom gnuplot-gui-plot-splot-fit-style 'simple
599597
"Control the complexity of the GUI display for plot, splot, and fit.
600598
The values are \\='simple, which causes a limited set of plot, splot, or
@@ -605,7 +603,6 @@ parsing values already in the script buffer."
605603
:type '(radio (const :tag "Simple listing" simple)
606604
(const :tag "Complete listing" complete)))
607605

608-
609606
(defconst gnuplot-gui-plot-simple-list
610607
'(("X RANGE" 'range (" " . " ") ":")
611608
("Y RANGE" 'range (" " . " ") ":")
@@ -708,7 +705,6 @@ See the doc-string for `gnuplot-gui-all-types'.")
708705
gnuplot-gui-fit-full-list
709706
gnuplot-gui-fit-simple-list))) )
710707

711-
712708
(defvar gnuplot-gui-test-type nil)
713709
(setq gnuplot-gui-test-type
714710
(list (cons "test"
@@ -820,8 +816,6 @@ This alist is formed at load time by appending together
820816
(message "Using %s lists for plot, splot, and fit."
821817
gnuplot-gui-plot-splot-fit-style) )
822818

823-
824-
825819

826820
;;; user interface to the widget-y stuff
827821

@@ -921,7 +915,6 @@ Note that \"cntrparam\" is not currently supported."
921915
"Argument popup will appear after insertions."
922916
"Argument popup will no longer appear after insertions.")))
923917

924-
925918
(defalias 'gnuplot-gui-y-n 'y-or-n-p)
926919

927920
(defun gnuplot-gui-correct-command (word set term begin)
@@ -955,7 +948,6 @@ BEGIN is the beginning of the command."
955948
(insert "set "))))))
956949
(message nil))
957950

958-
959951

960952
;;; handle the actual arguments
961953

@@ -1022,12 +1014,12 @@ arguments."
10221014
((cl-member symbol '(list list*) :test 'equal)
10231015
(let* ((case-fold-search nil)
10241016
(match-cons (cl-member (concat "^" (car temp-list))
1025-
values :test 'string-match)))
1017+
values :test 'string-match)))
10261018
(if (and (car match-cons) ; " " may be first elem. of list
10271019
(not (string= " " (car match-cons))))
10281020
(setq this-cons (cons tag (car match-cons))
10291021
arg-list (cl-remove (car temp-list) arg-list
1030-
:test 'string= :count 1)
1022+
:test 'string= :count 1)
10311023
temp-list nil)
10321024
(setq temp-list (cdr temp-list)))))
10331025
;; ---------------------------- tag (first number in list)
@@ -1048,16 +1040,16 @@ arguments."
10481040
(string-match "^[-0-9.]+$" (cadr temp-list)))
10491041
(setq this-cons (cons tag (cadr temp-list))
10501042
arg-list (cl-remove (car temp-list) arg-list
1051-
:test 'string= :count 1)
1043+
:test 'string= :count 1)
10521044
arg-list (cl-remove (cadr temp-list) arg-list
1053-
:test 'string= :count 1)
1045+
:test 'string= :count 1)
10541046
temp-list nil))
10551047
;; --------------------- number without prefix
10561048
((and (not prefix)
10571049
(string-match "^[-0-9.]+$" (car temp-list)))
10581050
(setq this-cons (cons tag (car temp-list))
10591051
arg-list (cl-remove (car temp-list) arg-list
1060-
:test 'string= :count 1)
1052+
:test 'string= :count 1)
10611053
temp-list nil))
10621054
(t
10631055
(setq temp-list (cdr temp-list)))))
@@ -1083,7 +1075,7 @@ arguments."
10831075
(cons tag (cons (match-string 1 (car temp-list))
10841076
(match-string 2 (car temp-list))))
10851077
arg-list (cl-remove (car temp-list) arg-list
1086-
:test 'string= :count 1)
1078+
:test 'string= :count 1)
10871079
temp-list nil)
10881080
(setq temp-list (cdr temp-list)) ))
10891081
;; ---------------------------- labels
@@ -1105,7 +1097,7 @@ arguments."
11051097
(setq list (cdr list)) )
11061098
(setq this-cons (cons tag return)
11071099
arg-list (cl-remove (car temp-list) arg-list
1108-
:test 'string= :count 1)
1100+
:test 'string= :count 1)
11091101
temp-list nil))
11101102
(setq temp-list (cdr temp-list))) )
11111103
;; ---------------------------- string, file, format
@@ -1116,17 +1108,17 @@ arguments."
11161108
(car temp-list))
11171109
(setq this-cons (cons tag (match-string 0 (car temp-list)))
11181110
arg-list (cl-remove (car temp-list) arg-list
1119-
:test 'string= :count 1)
1111+
:test 'string= :count 1)
11201112
temp-list nil)
11211113
(setq temp-list (cdr temp-list)) ))
11221114
;; ---------------------------- string*
11231115
((equal symbol 'string*)
11241116
(if (string= prefix (car temp-list))
11251117
(setq this-cons (cons tag (cadr temp-list))
11261118
arg-list (cl-remove (car temp-list) arg-list
1127-
:test 'string= :count 1)
1119+
:test 'string= :count 1)
11281120
arg-list (cl-remove (cadr temp-list) arg-list
1129-
:test 'string= :count 1)
1121+
:test 'string= :count 1)
11301122
temp-list nil)
11311123
(setq temp-list (cdr temp-list)) ) )
11321124
;; ---------------------------- other or unknown
@@ -1136,7 +1128,6 @@ arguments."
11361128
(append gnuplot-gui-alist (list this-cons))))
11371129
(setq alist (cdr alist))) ))
11381130

1139-
11401131
(defun gnuplot-gui-post-process-alist (type)
11411132
"A few types need some additional processing.
11421133
\\='range, \\='pair, and \\='labels are cons or list valued and need to b made
@@ -1192,7 +1183,6 @@ into the buffer. TYPE is the object whose arguments are being set."
11921183
(gnuplot-gui-make-frame
11931184
option (cdr (assoc option gnuplot-gui-all-types)) save-frame) )
11941185

1195-
11961186
(defface gnuplot-gui-error-face '((((class color) (background light))
11971187
(:foreground "grey30"))
11981188
(((class color) (background dark))
@@ -1525,7 +1515,6 @@ prefix for the string."
15251515
:value "format")
15261516
(widget-insert "\n"))
15271517

1528-
15291518
;; swiped from widget-color-complete
15301519
(defun gnuplot-gui-file-completion (widget)
15311520
"Complete the filename in WIDGET."
@@ -1634,7 +1623,6 @@ is non-nil if this is a \\='range widget."
16341623
(widget-insert " " (make-string (- 39 (current-column)) ?.)
16351624
" (numeric values)\n"))
16361625

1637-
16381626
;; suppress compiler warning
16391627
;;(eval-when-compile (defun gnuplot-info-lookup-symbol (sym mode)))
16401628
(define-widget 'gnuplot-gui-info-link 'info-link

gnuplot-test-context.el

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,6 @@
327327
("cntrparam levels 10")
328328
("cntrparam levels incremental 100,50")))
329329

330-
331330

332331
;;
333332
;; test by parsing all the demos from the Gnuplot source tree

gnuplot-tests.el

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ string-literal in multiple different contexts, as determined by
6666
`(ert-deftest ,name ()
6767
,string
6868
,@(cl-loop for context in gnuplot-string-test-contexts
69-
collect
70-
`(should (gnuplot-test-string-in-context ,string ,context)))))
69+
collect
70+
`(should (gnuplot-test-string-in-context ,string ,context)))))
7171

7272

7373
;;;; Tests for double-quoted strings
@@ -201,11 +201,11 @@ comment
201201
(syntax-propertize (point-max))
202202
(goto-char (1+ start))
203203
(cl-flet ((in-comment-p (position)
204-
(nth 4 (syntax-ppss position))))
204+
(nth 4 (syntax-ppss position))))
205205
(and
206206
(not (in-comment-p start))
207207
(cl-loop for position from (1+ start) upto end
208-
always (in-comment-p position))
208+
always (in-comment-p position))
209209
(or (= end (point-max))
210210
(not (in-comment-p (1+ end))))))))))
211211

@@ -219,8 +219,8 @@ string-literal in multiple different contexts, as determined by
219219
`(ert-deftest ,name ()
220220
,comment
221221
,@(cl-loop for context in gnuplot-comment-test-contexts
222-
collect
223-
`(should (gnuplot-test-comment-in-context ,comment ,context)))))
222+
collect
223+
`(should (gnuplot-test-comment-in-context ,comment ,context)))))
224224

225225
(gnuplot-test-comment gnuplot-comment-simple
226226
"# a simple one-line comment")

0 commit comments

Comments
 (0)