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

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

[nongnu] elpa/gnuplot da61a96d90 03/11: Switch to lexical-binding


From: ELPA Syncer
Subject: [nongnu] elpa/gnuplot da61a96d90 03/11: Switch to lexical-binding
Date: Sun, 2 Jan 2022 11:58:18 -0500 (EST)

branch: elpa/gnuplot
commit da61a96d9080232405b011a1e745864ab67082c8
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Switch to lexical-binding
---
 gnuplot-context.el       | 10 +++++-----
 gnuplot-debug-context.el |  6 ++----
 gnuplot-gui.el           | 29 ++++++++++++++---------------
 gnuplot-test-context.el  |  4 +---
 gnuplot-tests.el         |  2 +-
 gnuplot.el               | 16 ++++++++--------
 6 files changed, 31 insertions(+), 36 deletions(-)

diff --git a/gnuplot-context.el b/gnuplot-context.el
index 00230ea1d0..e89f947f90 100644
--- a/gnuplot-context.el
+++ b/gnuplot-context.el
@@ -1,4 +1,4 @@
-;;; gnuplot-context.el -- context-sensitive help and completion for gnuplot
+;;; gnuplot-context.el -- context-sensitive help and completion for gnuplot 
-*- lexical-binding: t -*-
 
 ;; Copyright (C) 2012-2013 Jon Oddie <jonxfield@gmail.com>
 
@@ -1721,9 +1721,9 @@ name; otherwise continues tokenizing up to the token at 
point.  FIXME."
 ;; them. For normal use, they compile to no-ops.
 (eval-when-compile
   (when (not (featurep 'gnuplot-debug-context))
-    (defmacro with-gnuplot-trace-buffer (&rest args) "No-op." '(progn nil))
-    (defmacro gnuplot-trace (&rest args) "No-op." '(progn nil))
-    (defmacro gnuplot-debug (&rest args) "No-op." '(progn nil))))
+    (defmacro with-gnuplot-trace-buffer (&rest _) "No-op." '(progn nil))
+    (defmacro gnuplot-trace (&rest _) "No-op." '(progn nil))
+    (defmacro gnuplot-debug (&rest _) "No-op." '(progn nil))))
 
 
 
@@ -1984,7 +1984,7 @@ there."
 (defun gnuplot-scan-stack (stack tokens)
   "Scan STACK for the most recently pushed eldoc and info strings."
   (gnuplot-trace "\t* scanning stack *\n")
-  (gnuplot-debug (gnuplot-backtrace))
+  (gnuplot-debug (gnuplot-backtrace stack))
   (gnuplot-debug (gnuplot-dump-captures))
 
   (catch 'no-scan
diff --git a/gnuplot-debug-context.el b/gnuplot-debug-context.el
index 8ac2dbdfd7..daf2298d33 100644
--- a/gnuplot-debug-context.el
+++ b/gnuplot-debug-context.el
@@ -1,6 +1,4 @@
-;;
-;; debugging utilities for the gnuplot-mode context matcher
-;;
+;; debugging utilities for the gnuplot-mode context matcher -*- 
lexical-binding: t -*-
 
 (require 'gnuplot-test-context) ; for gnuplot-simplify-tokens
 
@@ -56,7 +54,7 @@
 (defmacro gnuplot-trace (&rest args)
   `(with-gnuplot-trace-buffer (insert (format ,@args))))
 
-(defun gnuplot-backtrace ()
+(defun gnuplot-backtrace (stack)
   (if stack
       (with-gnuplot-trace-buffer
        (insert "\n-- * backtrace: * --\n")
diff --git a/gnuplot-gui.el b/gnuplot-gui.el
index 2854ca59fa..061284e9ff 100644
--- a/gnuplot-gui.el
+++ b/gnuplot-gui.el
@@ -1,4 +1,4 @@
-;;;; gnuplot-gui.el -- GUI interface to setting options in gnuplot-mode
+;;;; gnuplot-gui.el -- GUI interface to setting options in gnuplot-mode -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 1998-2000 Bruce Ravel
 
@@ -935,7 +935,6 @@ Note that \"cntrparam\" is not currently supported."
              "Argument popup will no longer appear after insertions.")))
 
 
-(defun gnuplot-gui-y-n (foo))
 (defalias 'gnuplot-gui-y-n 'y-or-n-p)
 
 (defun gnuplot-gui-correct-command (word set term begin)
@@ -1316,7 +1315,7 @@ SAVE-FRAME is non-nil when the widgets are being reset."
                  :button-face 'gnuplot-gui-button-face
                  :help-echo "Push this button to set options"
                  :notify
-                 (lambda (widget &rest ignore)
+                 (lambda (widget &rest _ignore)
                    (kill-buffer (get-buffer-create "*Gnuplot GUI*"))
                    (delete-frame)
                    (select-frame gnuplot-current-frame)
@@ -1356,7 +1355,7 @@ SAVE-FRAME is non-nil when the widgets are being reset."
                  :button-face 'gnuplot-gui-button-face
                  :doc item
                  :notify
-                 (lambda (widget &rest ignore)
+                 (lambda (widget &rest _ignore)
                    (let ((word (widget-get widget :doc)))
                      (gnuplot-gui-set-alist word gnuplot-gui-current-string)
                      (gnuplot-gui-prompt-for-frame word t))))
@@ -1366,7 +1365,7 @@ SAVE-FRAME is non-nil when the widgets are being reset."
                  :button-face 'gnuplot-gui-button-face
                  :doc item
                  :notify
-                 (lambda (widget &rest ignore)
+                 (lambda (widget &rest _ignore)
                    (let* ((word (widget-get widget :doc))
                           (alist (cdr (assoc word gnuplot-gui-all-types))))
                      (while alist
@@ -1379,7 +1378,7 @@ SAVE-FRAME is non-nil when the widgets are being reset."
   (widget-create 'push-button :value "Cancel"
                  :help-echo "Quit setting options and dismiss frame"
                  :button-face 'gnuplot-gui-button-face
-                 :notify (lambda (widget &rest ignore)
+                 :notify (lambda (_widget &rest _ignore)
                            (kill-buffer (get-buffer-create "*Gnuplot GUI*"))
                            (setq gnuplot-gui-alist nil
                                  gnuplot-gui-current-string nil)
@@ -1429,7 +1428,7 @@ menu.  STARRED is true if this a 'list* widget."
                 :button-prefix "[" :button-suffix "]"
                 :help-echo (format "Mouse-2 to view the %S menu" (downcase 
item))
                 :notify
-                (lambda (widget &rest ignore)
+                (lambda (widget &rest _ignore)
                   (let ((lab (if (widget-get widget :doc)
                                  (concat (downcase (widget-get widget :tag)) " 
")
                                "" )))
@@ -1454,7 +1453,7 @@ the numerical argument."
     (widget-create 'editable-field
                    :size 2 :tag item :value default :doc prefix
                    :help-echo (format "Insert new value of %S here" help-label)
-                   :notify (lambda (widget &rest ignore)
+                   :notify (lambda (widget &rest _ignore)
                              (let ((val (widget-value widget))
                                    (pre (concat (widget-get widget :doc) " ")))
                                (setcdr (assoc (widget-get widget :tag)
@@ -1490,7 +1489,7 @@ prefix for the string.  STARRED is t if quotes are not to 
be used."
      'editable-field
      :size width :tag item :doc prefix :value default
      :help-echo (format "Insert new value of %S here" help-label)
-     :notify (lambda (widget &rest ignore)
+     :notify (lambda (widget &rest _ignore)
                (let ((val (widget-value widget))
                      (q gnuplot-quote-character)
                      (p (widget-get widget :doc)) )
@@ -1524,7 +1523,7 @@ prefix for the string."
   (widget-create 'editable-field
                  :size (/ (frame-width) 3) :tag item :value default
                  :help-echo (format "Insert new format string here")
-                 :notify (lambda (widget &rest ignore)
+                 :notify (lambda (widget &rest _ignore)
                            (let ((val (widget-value widget)))
                              (setcdr (assoc (widget-get widget :tag)
                                             gnuplot-gui-alist)
@@ -1578,7 +1577,7 @@ the default value for the argument.  TAG is non-nil if 
ITEM rather than
                :doc item :help-echo "Insert a filename here"
                :complete 'gnuplot-gui-file-completion
                :notify
-               (lambda (widget &rest ignore)
+               (lambda (widget &rest _ignore)
                  (setcdr (assoc (widget-get widget :doc) gnuplot-gui-alist)
                          (format "%s%s%s" gnuplot-quote-character
                                  (widget-value widget)
@@ -1588,7 +1587,7 @@ the default value for the argument.  TAG is non-nil if 
ITEM rather than
      'push-button :value "Browse"
      :doc item :help-echo "Browse directories for a filename."
      :parent widg
-     :notify (lambda (widget &rest ignore)
+     :notify (lambda (widget &rest _ignore)
                (let ((fname (file-relative-name (read-file-name "File: ")
                                                 default-directory))
                      (q gnuplot-quote-character))
@@ -1614,7 +1613,7 @@ the default value for the argument."
    :format "%{%t%}:\n%v\t  %i\n"
    :entry-format "\t  %i %d %v\n"
    :button-face 'gnuplot-gui-labels-face
-   :notify (lambda (widget &rest ignore)
+   :notify (lambda (widget &rest _ignore)
              (setcdr (assoc (upcase (widget-get widget :tag))
                             gnuplot-gui-alist)
                      (widget-value widget)))))
@@ -1631,7 +1630,7 @@ is non-nil if this is a 'range widget."
                  :size 4 :tag item :value (car default)
                  :help-echo (format "Insert the first value of the %S here"
                                     (downcase item))
-                 :notify (lambda (widget &rest ignore)
+                 :notify (lambda (widget &rest _ignore)
                            (setcar (cdr (assoc (widget-get widget :tag)
                                                gnuplot-gui-alist))
                                    (format "%s" (widget-value widget)))))
@@ -1640,7 +1639,7 @@ is non-nil if this is a 'range widget."
                  :size 4 :tag item :value (cdr default)
                  :help-echo (format "Insert the second value of the %S here"
                                     (downcase item))
-                 :notify (lambda (widget &rest ignore)
+                 :notify (lambda (widget &rest _ignore)
                            (setcdr (cdr (assoc (widget-get widget :tag)
                                                gnuplot-gui-alist))
                                    (format "%s" (widget-value widget)))))
diff --git a/gnuplot-test-context.el b/gnuplot-test-context.el
index eb08223bdb..48dd73104d 100644
--- a/gnuplot-test-context.el
+++ b/gnuplot-test-context.el
@@ -1,6 +1,4 @@
-;;
-;; automated tests for gnuplot-mode context matching
-;;
+;; automated tests for gnuplot-mode context matching  -*- lexical-binding: t 
-*-
 
 (require 'gnuplot-context)
 
diff --git a/gnuplot-tests.el b/gnuplot-tests.el
index 5f73703f89..84bd65f53b 100644
--- a/gnuplot-tests.el
+++ b/gnuplot-tests.el
@@ -1,4 +1,4 @@
-;;; Tests for gnuplot-mode.
+;;; Tests for gnuplot-mode. -*- lexical-binding: t -*-
 
 ;;; Currently these attempt to cover the correct identification of
 ;;; string and comment syntax.
diff --git a/gnuplot.el b/gnuplot.el
index 39a5dd3eaf..f6c9c314f4 100644
--- a/gnuplot.el
+++ b/gnuplot.el
@@ -1,4 +1,4 @@
-;;; gnuplot.el --- Major-mode and interactive frontend for gnuplot
+;;; gnuplot.el --- Major-mode and interactive frontend for gnuplot -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 1998, 2011 Phil Type and Bruce Ravel, 1999-2012 Bruce Ravel
 
@@ -335,7 +335,7 @@ suggestions."
   :group 'gnuplot
   :type 'boolean
   :initialize 'custom-set-default
-  :set (lambda (sym value)
+  :set (lambda (_sym value)
          (dolist (buffer (buffer-list))
            (with-current-buffer buffer
              (when (derived-mode-p 'gnuplot-mode 'gnuplot-comint-mode)
@@ -358,7 +358,7 @@ symbol `complete' in gnuplot-mode buffers."
   :group 'gnuplot
   :type 'boolean)
 
-(defun gnuplot-set-display-mode (variable value &rest args)
+(defun gnuplot-set-display-mode (variable value &rest _args)
   "Customize :set function for `gnuplot-inline-image-mode'.
 Set VARIABLE to VALUE.  ARGS is optional args."
   (if (and (eq variable 'gnuplot-inline-image-mode)
@@ -1345,7 +1345,7 @@ this function is attached to `gnuplot-after-plot-hook'"
   (if (> gnuplot-buffer-max-size 0)
       (with-current-buffer gnuplot-buffer
         (let ((gnuplot-lines (count-lines (point-min) (point-max))))
-          (dotimes (tmp (- gnuplot-lines gnuplot-buffer-max-size))
+          (dotimes (_n (- gnuplot-lines gnuplot-buffer-max-size))
             (goto-char (point-min))
             (delete-region (line-beginning-position) (1+ (line-end-position))))
           (goto-char (point-max))))))
@@ -1457,7 +1457,7 @@ buffer."
   (regexp-opt '("gnuplot> " "multiplot> "))
   "Regexp for recognizing the GNUPLOT prompt.")
 
-(defun gnuplot-protect-prompt-fn (string)
+(defun gnuplot-protect-prompt-fn (_string)
   "Prevent the Gnuplot prompt from being deleted or overwritten.
 STRING is the text as originally inserted in the comint buffer."
   (save-excursion
@@ -1580,7 +1580,7 @@ gnuplot process buffer will be displayed in a window."
 
 (defvar gnuplot-inhibit-filter nil)
 
-(defun gnuplot-insert-inline-image-output (string)
+(defun gnuplot-insert-inline-image-output (_string)
   "Insert Gnuplot graphical output STRING in the gnuplot-comint buffer.
 
 Called via `comint-preoutput-filter-functions' hook when
@@ -1778,7 +1778,7 @@ ARG is optional arg."
   (if (not arg) (setq arg 1))
   (if (> arg 0)
       (catch 'bob               ; go to beginning of ARGth prev. defun
-        (dotimes (n arg)
+        (dotimes (_n arg)
           (when (= (point)
                    (gnuplot-point-at-beginning-of-continuation))
             (forward-line -1)
@@ -1790,7 +1790,7 @@ ARG is optional arg."
         t)
 
     (catch 'eob                   ; find beginning of (-ARG)th following defun
-      (dotimes (n (- arg))
+      (dotimes (_n (- arg))
         (gnuplot-end-of-continuation)
         (forward-line)
         (if (eobp) (throw 'eob t))



reply via email to

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