emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/gnuplot da11bfa 128/184: New customize option `gnuplot-use


From: ELPA Syncer
Subject: [nongnu] elpa/gnuplot da11bfa 128/184: New customize option `gnuplot-use-context-sensitive-completion'
Date: Sun, 29 Aug 2021 11:03:30 -0400 (EDT)

branch: elpa/gnuplot
commit da11bfab4fc84d88a3a81bbd10b8e51ee85aa6d2
Author: joddie <jonxfield@gmail.com>
Commit: joddie <jonxfield@gmail.com>

    New customize option `gnuplot-use-context-sensitive-completion'
    
    This replaces the customize option for `gnuplot-context-sensitive-mode',
    whose behavior caused all sorts of headaches.
---
 gnuplot-context.el |  4 ++++
 gnuplot.el         | 34 ++++++----------------------------
 2 files changed, 10 insertions(+), 28 deletions(-)

diff --git a/gnuplot-context.el b/gnuplot-context.el
index 4ba8c10..1642578 100644
--- a/gnuplot-context.el
+++ b/gnuplot-context.el
@@ -296,6 +296,10 @@ syntax at point in the minibuffer. To have one-line syntax
 summaries appear in the echo area as you type, toggle
 `eldoc-mode' or customize `gnuplot-eldoc-mode'.
 
+To choose whether to use this mode by default in Gnuplot buffers,
+customize the variable
+`gnuplot-use-context-sensitive-completion'.
+
 Note: help strings for eldoc-mode and \\[gnuplot-help-function]
 need to be provided in an Emacs-readable form by the Gnuplot
 distribution. See gnuplot-context.el for details."
diff --git a/gnuplot.el b/gnuplot.el
index f9ad17c..a384c98 100644
--- a/gnuplot.el
+++ b/gnuplot.el
@@ -666,36 +666,14 @@ time that data is needed."
   '(radio (const :tag "Parse info file when gnuplot-mode starts"    
immediately)
          (const :tag "Parse info file the first time it is needed" deferred)))
 
-(defun gnuplot-set-context-mode (variable value)
-  "Turn context-sensitive mode on or off through Customize.
-
-Unlike the built-in custom-set-minor-mode, this avoids loading
-gnuplot-context if it is not being enabled."
-  (if (featurep 'gnuplot-context)
-      ;; Already loaded, OK to enable or disable
-      (gnuplot-context-sensitive-mode (if value 1 0))
-    ;; Not loaded; autoload gnuplot-context only if enabling
-    (if value
-        ;; Prevent recursive (require 'gnuplot) loop when running
-        ;; interpreted
-        (gnuplot--run-after-load
-         #'(lambda ()
-             (gnuplot-context-sensitive-mode 1)))
-      (setq gnuplot-context-sensitive-mode nil))))
-
-(defcustom gnuplot-context-sensitive-mode t
-  "Non-nil if contextual completion and help for gnuplot are enabled.
-
-With context-sensitive mode on, gnuplot-mode's tab completion and
-info file lookup try to parse the current command line to find
-the most useful completions or info pages.
-
-Don't set this variable from Lisp code; instead, use Customize or
-call the `gnuplot-context-sensitive-mode' function, which behaves
-like a minor mode."
+(defcustom gnuplot-use-context-sensitive-completion t
+  "Enable `gnuplot-context-sensitive-mode' by default in Gnuplot buffers.
+
+In context-sensitive mode, gnuplot-mode's tab completion and info
+file lookup try to parse the current command line to find the
+most useful completions or info pages."
   :group 'gnuplot
   :type 'boolean
-  :set 'gnuplot-set-context-mode
   :link '(emacs-commentary-link "gnuplot-context"))
 
 (defcustom gnuplot-eldoc-mode nil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]