Variable: gnuplot-context-sensitive-mode

gnuplot-context-sensitive-mode is a buffer-local variable defined in gnuplot-context.el.

Documentation

Non-nil if Gnuplot-Context-Sensitive mode is enabled.

Use the command gnuplot-context-sensitive-mode(var)/gnuplot-context-sensitive-mode(fun) to change this variable.

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/xvcy7r1jiw71avhnh6kmin403kpqrdhc-emacs-packages-deps/share/emacs/site-lisp/elpa/gnuplot-20260623.1111/gnuplot-context.el
(define-minor-mode gnuplot-context-sensitive-mode
  "Use context-sensitive completion and help in `gnuplot-mode'.

When context-sensitive mode is enabled, `gnuplot-mode' tries to
provide more useful completions and help suggestions for built-in
keywords and functions by parsing each command as you type.  It
attempts to take into account Gnuplot's many abbreviated
keywords.  For example, with point at the end of a line reading
\"plot \\='datafile\\=' w \", typing \\[completion-at-point] will pop
up a list of plotting styles.

Key bindings:

\\[completion-at-point] will complete the keyword at point based
on its context in the command. To make keyword completion work on
pressing TAB, set `tab-always-indent' to `complete'.

\\[gnuplot-context-info-at-point] will try to find the most relevant
Gnuplot info node for the construction at point, prompting for a
node name if nothing is found.

\\[gnuplot-context-help-at-point] will pop up a brief summary of the
syntax at point in the minibuffer. To have one-line syntax
summaries appear in the echo area as you type, toggle
`eldoc-mode'.

To choose whether to use this mode by default in Gnuplot buffers,
customize the variable
`gnuplot-use-context-sensitive-completion'."
  :interactive (gnuplot-mode gnuplot-comint-mode)
  :keymap
  `((,(kbd "C-c C-/") . gnuplot-context-help-at-point)
    (,(kbd "C-c C-d") . gnuplot-context-info-at-point))
  (unless (derived-mode-p 'gnuplot-mode 'gnuplot-comint-mode)
    (message "Gnuplot context-sensitive mode works only in Gnuplot-mode buffers")
    (setq gnuplot-context-sensitive-mode nil))
  (if gnuplot-context-sensitive-mode
      (progn
        (remove-hook 'completion-at-point-functions #'gnuplot-completion-at-point-info-look t)
        (add-hook 'completion-at-point-functions #'gnuplot-context-completion-at-point nil t)
        (add-hook 'eldoc-documentation-functions #'gnuplot-context-eldoc-function nil 'local))
    (add-hook 'completion-at-point-functions #'gnuplot-completion-at-point-info-look nil t)
    (remove-hook 'completion-at-point-functions #'gnuplot-context-completion-at-point t)
    (remove-hook 'eldoc-documentation-functions #'gnuplot-context-eldoc-function t)))