]> git.eshelyaron.com Git - emacs.git/commitdiff
Prefer defvar-local in net/*.el
authorStefan Kangas <stefan@marxist.se>
Sun, 31 Jan 2021 15:30:55 +0000 (16:30 +0100)
committerStefan Kangas <stefan@marxist.se>
Sun, 31 Jan 2021 19:08:25 +0000 (20:08 +0100)
* 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)
(soap-inspect-current-item):
* lisp/net/telnet.el (telnet-remote-echoes)
(telnet-interrupt-string, telnet-count): Prefer defvar-local.

lisp/net/browse-url.el
lisp/net/rcirc.el
lisp/net/soap-inspect.el
lisp/net/telnet.el

index 7b72a71362392c99a64cb31158b357be9fcf3a00..58f01d5bf98c4bb781d50ad78f930581dddd4d54 100644 (file)
@@ -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'.
index 22348a1725c2bc570408b9ed034f96fdaaffbd26..58cc8b1be550c1094a651f0f3f3846885cc014d4 100644 (file)
@@ -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 `rcirc-response-formats'."
          ((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 omitted."
index 604e35c07cf530ba36f0e2768c9dd7ec487877aa..9d4e440719d6007b41b4c08c949074d4dca00fd9 100644 (file)
@@ -206,17 +206,13 @@ This is a specialization of `soap-sample-value' for
 \f
 ;;; 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.")
 
-(progn
-  (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
index 67f844428a756fbcb60aa52eb8f19cbfeb4d350d..44f535f01c9c1415a2f43a65507fc7202630e735 100644 (file)
@@ -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)
-(make-variable-buffer-local
- (defvar telnet-remote-echoes t
-   "True if the telnet process will echo input."))
-(make-variable-buffer-local
- (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.")