74
74
; ; features was to do a complete parse of the command line. So that's
75
75
; ; what this package does. Instead of building a parse tree, it
76
76
; ; matches up until the token at point, and then either makes a list
77
- ; ; of possible completions, or sets the variables `gnuplot-eldoc' and
78
- ; ; `gnuplot-info-at-point' based on where it is in the grammar at that
77
+ ; ; of possible completions, or sets the variables `gnuplot-context-- eldoc' and
78
+ ; ; `gnuplot-context-- info-at-point' based on where it is in the grammar at that
79
79
; ; point.
80
80
; ;
81
81
; ; The parsing/matching process happens in two phases: tokenizing
@@ -1732,7 +1732,7 @@ name; otherwise continues tokenizing up to the token at point. FIXME."
1732
1732
This is filled in by `gnuplot-context--match-pattern' when it reaches the
1733
1733
token before point." )
1734
1734
1735
- (defvar gnuplot-info-at-point nil
1735
+ (defvar gnuplot-context-- info-at-point nil
1736
1736
" Relevant page of the Gnuplot info manual for the construction at point.
1737
1737
1738
1738
Set by `gnuplot-context--match-pattern' using information from
@@ -1749,7 +1749,7 @@ name specified in the (capture NAME PATTERN) form in the
1749
1749
list beginning the capture group, and END is the tail of the
1750
1750
token list just after the end of the capture group." )
1751
1751
1752
- (defvar gnuplot-eldoc nil
1752
+ (defvar gnuplot-context-- eldoc nil
1753
1753
" ElDoc documentation string for the Gnuplot construction at point.
1754
1754
1755
1755
Set by `gnuplot-context--match-pattern' . See also `gnuplot-info-at-point' ." )
@@ -1770,8 +1770,8 @@ This function parses TOKENS by simulating a stack machine with
1770
1770
unlimited backtracking. If COMPLETING-P is non-nil, it stops
1771
1771
before the token at point and collects a list of the next tokens
1772
1772
that it would accept in `gnuplot-context--completions' . If COMPLETING-P is
1773
- nil, it parses up to the token at point and sets `gnuplot-eldoc'
1774
- and `gnuplot-info-at-point' based on the contents of the stack
1773
+ nil, it parses up to the token at point and sets `gnuplot-context-- eldoc'
1774
+ and `gnuplot-context-- info-at-point' based on the contents of the stack
1775
1775
there."
1776
1776
(catch 'return
1777
1777
(let ((pc 0 ) ; Program counter
@@ -1798,8 +1798,8 @@ there."
1798
1798
(cl-incf pc)))
1799
1799
1800
1800
(setq gnuplot-context--completions nil
1801
- gnuplot-eldoc nil
1802
- gnuplot-info-at-point nil
1801
+ gnuplot-context-- eldoc nil
1802
+ gnuplot-context-- info-at-point nil
1803
1803
gnuplot-context--captures nil )
1804
1804
1805
1805
(cl-flet ((advance
@@ -1994,7 +1994,7 @@ there."
1994
1994
1995
1995
(catch 'no-scan
1996
1996
(while (and stack
1997
- (not (and gnuplot-info-at-point gnuplot-eldoc)))
1997
+ (not (and gnuplot-context-- info-at-point gnuplot-context- -eldoc)))
1998
1998
(let* ((item (car stack))
1999
1999
(type (car item))
2000
2000
(position (cl-caddr item))) ; must progress by at least one token
@@ -2005,29 +2005,29 @@ there."
2005
2005
(throw 'no-scan nil ))
2006
2006
2007
2007
((info )
2008
- (when (not gnuplot-info-at-point)
2008
+ (when (not gnuplot-context-- info-at-point)
2009
2009
(let ((info (cadr item)))
2010
- (setq gnuplot-info-at-point
2010
+ (setq gnuplot-context-- info-at-point
2011
2011
(cond
2012
2012
((eq info 'first-token )
2013
2013
(gnuplot-token-id (car position)))
2014
2014
((functionp info) (funcall info))
2015
2015
(t info)))
2016
- (when gnuplot-info-at-point
2017
- (gnuplot-context--trace " \t set info to \" %s\"\n " gnuplot-info-at-point)
2018
- (when (and (not gnuplot-eldoc) gnuplot-eldoc-hash)
2016
+ (when gnuplot-context-- info-at-point
2017
+ (gnuplot-context--trace " \t set info to \" %s\"\n " gnuplot-context-- info-at-point)
2018
+ (when (and (not gnuplot-context-- eldoc) gnuplot-eldoc-hash)
2019
2019
(let ((eldoc
2020
- (car (gethash gnuplot-info-at-point gnuplot-eldoc-hash))))
2020
+ (car (gethash gnuplot-context-- info-at-point gnuplot-eldoc-hash))))
2021
2021
(when eldoc
2022
- (setq gnuplot-eldoc eldoc)
2022
+ (setq gnuplot-context-- eldoc eldoc)
2023
2023
(gnuplot-context--trace " \t and set eldoc to \" %s\"\n " eldoc))))))))
2024
2024
2025
2025
((eldoc)
2026
- (when (not gnuplot-eldoc)
2026
+ (when (not gnuplot-context-- eldoc)
2027
2027
(let ((eldoc (cadr item)))
2028
- (setq gnuplot-eldoc
2028
+ (setq gnuplot-context-- eldoc
2029
2029
(if (functionp eldoc) (funcall eldoc) eldoc))
2030
- (gnuplot-context--trace " \t set eldoc to \" %s\"\n " gnuplot-eldoc)))))))
2030
+ (gnuplot-context--trace " \t set eldoc to \" %s\"\n " gnuplot-context-- eldoc)))))))
2031
2031
(pop stack))))
2032
2032
2033
2033
(defun gnuplot-context--capture-group (name )
@@ -2064,30 +2064,30 @@ there."
2064
2064
(defun gnuplot-eldoc-function (&rest _ )
2065
2065
" Return the ElDoc string for the Gnuplot construction at point."
2066
2066
(gnuplot-context--parse-at-point nil )
2067
- gnuplot-eldoc)
2067
+ gnuplot-context-- eldoc)
2068
2068
2069
2069
(defun gnuplot-help-function ()
2070
2070
" Pop up the extended documentation for the construction at point."
2071
2071
(interactive )
2072
2072
(gnuplot-context--parse-at-point nil )
2073
- (if (and gnuplot-info-at-point gnuplot-eldoc-hash)
2073
+ (if (and gnuplot-context-- info-at-point gnuplot-eldoc-hash)
2074
2074
(let ((eldoc
2075
- (cadr (gethash gnuplot-info-at-point gnuplot-eldoc-hash))))
2075
+ (cadr (gethash gnuplot-context-- info-at-point gnuplot-eldoc-hash))))
2076
2076
(if eldoc (message eldoc)))))
2077
2077
2078
2078
; ; Info lookup
2079
2079
(defun gnuplot-info-at-point (&optional query )
2080
2080
" Open the relevant gnuplot info page for the construction at point."
2081
2081
(interactive " P" )
2082
- (setq gnuplot-info-at-point nil )
2082
+ (setq gnuplot-context-- info-at-point nil )
2083
2083
(unless query
2084
2084
(gnuplot-context--parse-at-point nil ))
2085
- (if (or query (not gnuplot-info-at-point))
2085
+ (if (or query (not gnuplot-context-- info-at-point))
2086
2086
(let ((info
2087
2087
(info-lookup-interactive-arguments 'symbol )))
2088
- (setq gnuplot-info-at-point (car info))))
2089
- (when gnuplot-info-at-point
2090
- (gnuplot-context--find-info-node gnuplot-info-at-point)))
2088
+ (setq gnuplot-context-- info-at-point (car info))))
2089
+ (when gnuplot-context-- info-at-point
2090
+ (gnuplot-context--find-info-node gnuplot-context-- info-at-point)))
2091
2091
2092
2092
(defun gnuplot-context--find-info-node (node )
2093
2093
(save-window-excursion
0 commit comments