[Top][All Lists]

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

master 21d9303 2/8: Prefer defvar-local in net/*.el

From: Stefan Kangas
Subject: master 21d9303 2/8: Prefer defvar-local in net/*.el
Date: Sun, 31 Jan 2021 15:02:49 -0500 (EST)

branch: master
commit 21d9303c61ce5ecc81fd7ea96aeb94b5b03bee79
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Prefer defvar-local in net/*.el
    * lisp/net/browse-url.el (browse-url-temp-file-name):
    * lisp/net/rcirc.el (rcirc-ignore-buffer-activity-flag)
    (rcirc-low-priority-flag, rcirc-parent-buffer)
    (rcirc-activity-types, rcirc-last-sender):
    * lisp/net/soap-inspect.el (soap-inspect-previous-items)
    * lisp/net/telnet.el (telnet-remote-echoes)
    (telnet-interrupt-string, telnet-count): Prefer defvar-local.
 lisp/net/browse-url.el   |  3 +--
 lisp/net/rcirc.el        | 15 +++++----------
 lisp/net/soap-inspect.el |  8 ++------
 lisp/net/telnet.el       | 11 ++++-------
 4 files changed, 12 insertions(+), 25 deletions(-)

diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 7b72a71..58f01d5 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -481,8 +481,7 @@ Used by the `browse-url-of-file' command."
   "Hook run after `browse-url-of-file' has asked a browser to load a file."
   :type 'hook)
-(defvar browse-url-temp-file-name nil)
-(make-variable-buffer-local 'browse-url-temp-file-name)
+(defvar-local browse-url-temp-file-name nil)
 (defcustom browse-url-xterm-program "xterm"
   "The name of the terminal emulator used by `browse-url-text-xterm'.
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 22348a1..58cc8b1 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -178,13 +178,11 @@ If nil, no maximum is applied."
   :type '(choice (const :tag "No maximum" nil)
                  (integer :tag "Number of characters")))
-(defvar rcirc-ignore-buffer-activity-flag nil
+(defvar-local rcirc-ignore-buffer-activity-flag nil
   "If non-nil, ignore activity in this buffer.")
-(make-variable-buffer-local 'rcirc-ignore-buffer-activity-flag)
-(defvar rcirc-low-priority-flag nil
+(defvar-local rcirc-low-priority-flag nil
   "If non-nil, activity in this buffer is considered low priority.")
-(make-variable-buffer-local 'rcirc-low-priority-flag)
 (defcustom rcirc-omit-responses
   '("JOIN" "PART" "QUIT" "NICK")
@@ -1328,8 +1326,7 @@ Create the buffer if it doesn't exist."
          (rcirc-send-string process
                             (concat command " :" args)))))))
-(defvar rcirc-parent-buffer nil)
-(make-variable-buffer-local 'rcirc-parent-buffer)
+(defvar-local rcirc-parent-buffer nil)
 (put 'rcirc-parent-buffer 'permanent-local t)
 (defvar rcirc-window-configuration nil)
 (defun rcirc-edit-multiline ()
@@ -1501,10 +1498,8 @@ is found by looking up RESPONSE in 
          ((or (rcirc-get-buffer process target)
               (rcirc-any-buffer process))))))
-(defvar rcirc-activity-types nil)
-(make-variable-buffer-local 'rcirc-activity-types)
-(defvar rcirc-last-sender nil)
-(make-variable-buffer-local 'rcirc-last-sender)
+(defvar-local rcirc-activity-types nil)
+(defvar-local rcirc-last-sender nil)
 (defcustom rcirc-omit-threshold 100
   "Lines since last activity from a nick before `rcirc-omit-responses' are 
diff --git a/lisp/net/soap-inspect.el b/lisp/net/soap-inspect.el
index 604e35c..9d4e440 100644
--- a/lisp/net/soap-inspect.el
+++ b/lisp/net/soap-inspect.el
@@ -206,17 +206,13 @@ This is a specialization of `soap-sample-value' for
 ;;; soap-inspect
-(defvar soap-inspect-previous-items nil
+(defvar-local soap-inspect-previous-items nil
   "A stack of previously inspected items in the *soap-inspect* buffer.
 Used to implement the BACK button.")
-(defvar soap-inspect-current-item nil
+(defvar-local soap-inspect-current-item nil
   "The current item being inspected in the *soap-inspect* buffer.")
-  (make-variable-buffer-local 'soap-inspect-previous-items)
-  (make-variable-buffer-local 'soap-inspect-current-item))
 (defun soap-inspect (element)
   "Inspect a SOAP ELEMENT in the *soap-inspect* buffer.
 The buffer is populated with information about ELEMENT with links
diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el
index 67f8444..44f535f 100644
--- a/lisp/net/telnet.el
+++ b/lisp/net/telnet.el
@@ -72,15 +72,12 @@ LOGIN-NAME, which is optional, says what to log in as on 
that machine.")
 (defvar telnet-prompt-pattern "^[^#$%>\n]*[#$%>] *")
 (defvar telnet-replace-c-g nil)
- (defvar telnet-remote-echoes t
-   "True if the telnet process will echo input."))
- (defvar telnet-interrupt-string "\C-c" "String sent by C-c."))
+(defvar-local telnet-remote-echoes t
+  "True if the telnet process will echo input.")
+(defvar-local telnet-interrupt-string "\C-c" "String sent by C-c.")
-(defvar telnet-count 0
+(defvar-local telnet-count 0
   "Number of output strings from telnet process while looking for password.")
-(make-variable-buffer-local 'telnet-count)
 (defvar telnet-program "telnet"
   "Program to run to open a telnet connection.")

reply via email to

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