7474; ; features was to do a complete parse of the command line. So that's
7575; ; what this package does. Instead of building a parse tree, it
7676; ; 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
7979; ; point.
8080; ;
8181; ; The parsing/matching process happens in two phases: tokenizing
@@ -1732,7 +1732,7 @@ name; otherwise continues tokenizing up to the token at point. FIXME."
17321732This is filled in by `gnuplot-context--match-pattern' when it reaches the
17331733token before point." )
17341734
1735- (defvar gnuplot-info-at-point nil
1735+ (defvar gnuplot-context-- info-at-point nil
17361736 " Relevant page of the Gnuplot info manual for the construction at point.
17371737
17381738Set by `gnuplot-context--match-pattern' using information from
@@ -1749,7 +1749,7 @@ name specified in the (capture NAME PATTERN) form in the
17491749list beginning the capture group, and END is the tail of the
17501750token list just after the end of the capture group." )
17511751
1752- (defvar gnuplot-eldoc nil
1752+ (defvar gnuplot-context-- eldoc nil
17531753 " ElDoc documentation string for the Gnuplot construction at point.
17541754
17551755Set 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
17701770unlimited backtracking. If COMPLETING-P is non-nil, it stops
17711771before the token at point and collects a list of the next tokens
17721772that 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
17751775there."
17761776 (catch 'return
17771777 (let ((pc 0 ) ; Program counter
@@ -1798,8 +1798,8 @@ there."
17981798 (cl-incf pc)))
17991799
18001800 (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
18031803 gnuplot-context--captures nil )
18041804
18051805 (cl-flet ((advance
@@ -1994,7 +1994,7 @@ there."
19941994
19951995 (catch 'no-scan
19961996 (while (and stack
1997- (not (and gnuplot-info-at-point gnuplot-eldoc)))
1997+ (not (and gnuplot-context-- info-at-point gnuplot-context- -eldoc)))
19981998 (let* ((item (car stack))
19991999 (type (car item))
20002000 (position (cl-caddr item))) ; must progress by at least one token
@@ -2005,29 +2005,29 @@ there."
20052005 (throw 'no-scan nil ))
20062006
20072007 ((info )
2008- (when (not gnuplot-info-at-point)
2008+ (when (not gnuplot-context-- info-at-point)
20092009 (let ((info (cadr item)))
2010- (setq gnuplot-info-at-point
2010+ (setq gnuplot-context-- info-at-point
20112011 (cond
20122012 ((eq info 'first-token )
20132013 (gnuplot-token-id (car position)))
20142014 ((functionp info) (funcall info))
20152015 (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)
20192019 (let ((eldoc
2020- (car (gethash gnuplot-info-at-point gnuplot-eldoc-hash))))
2020+ (car (gethash gnuplot-context-- info-at-point gnuplot-eldoc-hash))))
20212021 (when eldoc
2022- (setq gnuplot-eldoc eldoc)
2022+ (setq gnuplot-context-- eldoc eldoc)
20232023 (gnuplot-context--trace " \t and set eldoc to \" %s\"\n " eldoc))))))))
20242024
20252025 ((eldoc)
2026- (when (not gnuplot-eldoc)
2026+ (when (not gnuplot-context-- eldoc)
20272027 (let ((eldoc (cadr item)))
2028- (setq gnuplot-eldoc
2028+ (setq gnuplot-context-- eldoc
20292029 (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)))))))
20312031 (pop stack))))
20322032
20332033(defun gnuplot-context--capture-group (name )
@@ -2064,30 +2064,30 @@ there."
20642064(defun gnuplot-eldoc-function (&rest _ )
20652065 " Return the ElDoc string for the Gnuplot construction at point."
20662066 (gnuplot-context--parse-at-point nil )
2067- gnuplot-eldoc)
2067+ gnuplot-context-- eldoc)
20682068
20692069(defun gnuplot-help-function ()
20702070 " Pop up the extended documentation for the construction at point."
20712071 (interactive )
20722072 (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)
20742074 (let ((eldoc
2075- (cadr (gethash gnuplot-info-at-point gnuplot-eldoc-hash))))
2075+ (cadr (gethash gnuplot-context-- info-at-point gnuplot-eldoc-hash))))
20762076 (if eldoc (message eldoc)))))
20772077
20782078; ; Info lookup
20792079(defun gnuplot-info-at-point (&optional query )
20802080 " Open the relevant gnuplot info page for the construction at point."
20812081 (interactive " P" )
2082- (setq gnuplot-info-at-point nil )
2082+ (setq gnuplot-context-- info-at-point nil )
20832083 (unless query
20842084 (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))
20862086 (let ((info
20872087 (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)))
20912091
20922092(defun gnuplot-context--find-info-node (node )
20932093 (save-window-excursion
0 commit comments