@@ -790,7 +790,7 @@ name; otherwise continues tokenizing up to the token at point. FIXME."
790790 plot-body])
791791
792792 (splot-command
793- [ ; ; This capturing group lets `gnuplot-find-using-eldoc' know
793+ [ ; ; This capturing group lets `gnuplot-context-- find-using-eldoc' know
794794 ; ; that this is an splot command
795795 (capture :splot-command (kw (" spl" . " ot" )))
796796
@@ -1007,7 +1007,7 @@ name; otherwise continues tokenizing up to the token at point. FIXME."
10071007 [(kw " thru" ) expression])
10081008
10091009 (using-modifier
1010- [(:eldoc gnuplot-find-using-eldoc)
1010+ [(:eldoc gnuplot-context-- find-using-eldoc)
10111011 (kw (" u" . " sing" ))
10121012 (either
10131013 string
@@ -1720,9 +1720,9 @@ name; otherwise continues tokenizing up to the token at point. FIXME."
17201720; ; them. For normal use, they compile to no-ops.
17211721(eval-when-compile
17221722 (when (not (featurep 'gnuplot-debug-context ))
1723- (defmacro with- gnuplot-trace-buffer (&rest _ ) " No-op." '(progn nil ))
1724- (defmacro gnuplot-trace (&rest _ ) " No-op." '(progn nil ))
1725- (defmacro gnuplot-debug (&rest _ ) " No-op." '(progn nil ))))
1723+ (defmacro gnuplot-context--with -trace-buffer (&rest _ ) " No-op." '(progn nil ))
1724+ (defmacro gnuplot-context-- trace (&rest _ ) " No-op." '(progn nil ))
1725+ (defmacro gnuplot-context-- debug (&rest _ ) " No-op." '(progn nil ))))
17261726
17271727
17281728
@@ -1740,11 +1740,6 @@ Set by `gnuplot-context--match-pattern' using information from
17401740and info strings onto the stack as it runs, and scans the stack
17411741for the topmost entry when it reaches the token at point." )
17421742
1743- (defvar gnuplot-eldoc nil
1744- " ElDoc documentation string for the Gnuplot construction at point.
1745-
1746- Set by `gnuplot-context--match-pattern' . See also `gnuplot-info-at-point' ." )
1747-
17481743(defvar gnuplot-context--captures nil
17491744 " Alist of named capture groups for `gnuplot-mode' completion code.
17501745
@@ -1754,6 +1749,11 @@ name specified in the (capture NAME PATTERN) form in the
17541749list beginning the capture group, and END is the tail of the
17551750token list just after the end of the capture group." )
17561751
1752+ (defvar gnuplot-eldoc nil
1753+ " ElDoc documentation string for the Gnuplot construction at point.
1754+
1755+ Set by `gnuplot-context--match-pattern' . See also `gnuplot-info-at-point' ." )
1756+
17571757(defvar gnuplot-eldoc-hash nil
17581758 " ElDoc strings for `gnuplot-mode' .
17591759
@@ -1789,7 +1789,7 @@ there."
17891789 ; ; of conses (pc . tokens)
17901790 (progress '()))
17911791
1792- (with- gnuplot-trace-buffer (erase-buffer ))
1792+ (gnuplot-context--with -trace-buffer (erase-buffer ))
17931793
17941794 (when start-symbol ; HACK FIXME
17951795 (let ((look-for `(label , start-symbol )))
@@ -1815,7 +1815,7 @@ there."
18151815 (opcode (car inst))
18161816 (token (car tokens))
18171817 (end-of-tokens (null tokens)))
1818- (gnuplot-trace " %s\t %s\t %s\n " pc inst (and token (gnuplot-token-id token)))
1818+ (gnuplot-context-- trace " %s\t %s\t %s\n " pc inst (and token (gnuplot-token-id token)))
18191819
18201820 (cl-case opcode
18211821 ; ; (literal LITERAL NO-COMPLETE)
@@ -1824,7 +1824,7 @@ there."
18241824 (no-complete (cl-caddr inst)))
18251825 (cond (end-of-tokens
18261826 (unless no-complete
1827- (gnuplot-trace " \t pushing \" %s\" to completions\n " expect)
1827+ (gnuplot-context-- trace " \t pushing \" %s\" to completions\n " expect)
18281828 (push expect gnuplot-context--completions))
18291829 (fail))
18301830
@@ -1848,7 +1848,7 @@ there."
18481848 (let ((regexp (cadr inst))
18491849 (name (cl-caddr inst)))
18501850 (cond (end-of-tokens
1851- (gnuplot-trace " \t pushing \" %s\" to completions\n " name)
1851+ (gnuplot-context-- trace " \t pushing \" %s\" to completions\n " name)
18521852 (push name gnuplot-context--completions)
18531853 (fail))
18541854
@@ -1948,7 +1948,7 @@ there."
19481948 (if (not record)
19491949 (error " Gnuplot-match-tokens: no open capture group named %s " name)
19501950 (setf (cl-caddr record) tokens)
1951- (gnuplot-debug (gnuplot-dump-captures)))))
1951+ (gnuplot-context-- debug (gnuplot-dump-captures)))))
19521952
19531953 ; ; (check-progress): make sure not stuck in an infinite loop
19541954 ((check-progress)
@@ -1968,8 +1968,8 @@ there."
19681968 (when fail
19691969 (if (not backtrack) ; Out of backtracking stack: failed match
19701970 (throw 'return nil )
1971- (gnuplot-trace " \t *fail*\t %s\n " (length backtrack))
1972- (gnuplot-debug (gnuplot-dump-backtrack backtrack))
1971+ (gnuplot-context-- trace " \t *fail*\t %s\n " (length backtrack))
1972+ (gnuplot-context-- debug (gnuplot-dump-backtrack backtrack))
19731973 ; ; If we got as far as token-at-point before failing,
19741974 ; ; scan the stack for eldoc and info strings
19751975 (when (and end-of-tokens (not completing-p))
@@ -1984,13 +1984,13 @@ there."
19841984 gnuplot-context--captures bt-captures
19851985 progress bt-progress
19861986 fail nil )
1987- (gnuplot-debug (gnuplot-dump-progress progress)))))))))))
1987+ (gnuplot-context-- debug (gnuplot-dump-progress progress)))))))))))
19881988
19891989(defun gnuplot-context--scan-stack (stack tokens )
19901990 " Scan STACK for the most recently pushed eldoc and info strings."
1991- (gnuplot-trace " \t * scanning stack *\n " )
1992- (gnuplot-debug (gnuplot-backtrace stack))
1993- (gnuplot-debug (gnuplot-dump-captures))
1991+ (gnuplot-context-- trace " \t * scanning stack *\n " )
1992+ (gnuplot-context-- debug (gnuplot-backtrace stack))
1993+ (gnuplot-context-- debug (gnuplot-dump-captures))
19941994
19951995 (catch 'no-scan
19961996 (while (and stack
@@ -2014,20 +2014,20 @@ there."
20142014 ((functionp info) (funcall info))
20152015 (t info)))
20162016 (when gnuplot-info-at-point
2017- (gnuplot-trace " \t set info to \" %s\"\n " gnuplot-info-at-point)
2017+ (gnuplot-context-- trace " \t set info to \" %s\"\n " gnuplot-info-at-point)
20182018 (when (and (not gnuplot-eldoc) gnuplot-eldoc-hash)
20192019 (let ((eldoc
20202020 (car (gethash gnuplot-info-at-point gnuplot-eldoc-hash))))
20212021 (when eldoc
20222022 (setq gnuplot-eldoc eldoc)
2023- (gnuplot-trace " \t and set eldoc to \" %s\"\n " eldoc))))))))
2023+ (gnuplot-context-- trace " \t and set eldoc to \" %s\"\n " eldoc))))))))
20242024
20252025 ((eldoc)
20262026 (when (not gnuplot-eldoc)
20272027 (let ((eldoc (cadr item)))
20282028 (setq gnuplot-eldoc
20292029 (if (functionp eldoc) (funcall eldoc) eldoc))
2030- (gnuplot-trace " \t set eldoc to \" %s\"\n " gnuplot-eldoc)))))))
2030+ (gnuplot-context-- trace " \t set eldoc to \" %s\"\n " gnuplot-eldoc)))))))
20312031 (pop stack))))
20322032
20332033(defun gnuplot-context--capture-group (name )
@@ -2087,9 +2087,9 @@ there."
20872087 (info-lookup-interactive-arguments 'symbol )))
20882088 (setq gnuplot-info-at-point (car info))))
20892089 (when gnuplot-info-at-point
2090- (gnuplot--find-info-node gnuplot-info-at-point)))
2090+ (gnuplot-context- -find-info-node gnuplot-info-at-point)))
20912091
2092- (defun gnuplot--find-info-node (node )
2092+ (defun gnuplot-context- -find-info-node (node )
20932093 (save-window-excursion
20942094 (info (format " (gnuplot)%s " node)))
20952095 (gnuplot--adjust-info-display))
@@ -2100,7 +2100,7 @@ there."
21002100; ; ElDoc strings for "using" specs, which depend on other information
21012101; ; from the parsed command
21022102
2103- (defvar gnuplot-using-eldoc
2103+ (defvar gnuplot-context-- using-eldoc
21042104 '((" boxerrorbars" . " x:y:ydelta{:xdelta} | x:y:ylow:yhigh{:xdelta}" )
21052105 (" boxes" . " x:y{:x_width}" )
21062106 (" boxxyerrorbars" . " x:y:xdelta:ydelta | x:y:xlow:xhigh:ylow:yhigh" )
@@ -2128,7 +2128,7 @@ there."
21282128 (" xyerrorlines" . " x:y:xdelta:ydelta | x:y:xlow:xhigh:ylow:yhigh" ))
21292129 " Alist of ElDoc strings for Gnuplot \" using\" clauses in \" plot\" commands." )
21302130
2131- (defvar gnuplot-using-3d-eldoc
2131+ (defvar gnuplot-context-- using-3d-eldoc
21322132 (append
21332133 '((" fsteps" . " z | x:y:z" )
21342134 (" histeps" . " z | x:y:z" )
@@ -2140,10 +2140,10 @@ there."
21402140 (" lines" . " z | x:y:z" )
21412141 (" steps" . " z | x:y:z" )
21422142 (" vectors" . " x:y:z:xdelta:ydelta:zdelta" ))
2143- gnuplot-using-eldoc)
2143+ gnuplot-context-- using-eldoc)
21442144 " Alist of ElDoc strings for Gnuplot \" using\" clauses in \" splot\" commands." )
21452145
2146- (defun gnuplot-find-using-eldoc ()
2146+ (defun gnuplot-context-- find-using-eldoc ()
21472147 " Return ElDoc string for a Gnuplot \" using\" clause, based on plotting style.
21482148
21492149This will fail if the \" using\" clause comes before the \" with\"
@@ -2155,8 +2155,8 @@ clause."
21552155 (let ((with-style-string (gnuplot-token-id (car with-style))))
21562156 (setq column-description
21572157 (or (and 3d-p
2158- (cdr (assoc with-style-string gnuplot-using-3d-eldoc)))
2159- (cdr (assoc with-style-string gnuplot-using-eldoc))
2158+ (cdr (assoc with-style-string gnuplot-context-- using-3d-eldoc)))
2159+ (cdr (assoc with-style-string gnuplot-context-- using-eldoc))
21602160 " <columns>" ))))
21612161 (format " using %s {'format'} " column-description)))
21622162
0 commit comments