1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

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)
(soap-inspect-current-item):
* lisp/net/telnet.el (telnet-remote-echoes)
(telnet-interrupt-string, telnet-count): Prefer defvar-local.
This commit is contained in:
Stefan Kangas 2021-01-31 16:30:55 +01:00
parent a5885d9d63
commit 21d9303c61
4 changed files with 12 additions and 25 deletions

View 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'.

View 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."

View file

@ -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.")
(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

View 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.")