diff options
| author | Stefan Kangas | 2021-01-31 16:30:55 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2021-01-31 20:08:25 +0100 |
| commit | 21d9303c61ce5ecc81fd7ea96aeb94b5b03bee79 (patch) | |
| tree | ffee2fe6ba7f7085858615723181d6f1f8508cb9 | |
| parent | a5885d9d633f0a0e2e23d5d9f48d6b70a6301442 (diff) | |
| download | emacs-21d9303c61ce5ecc81fd7ea96aeb94b5b03bee79.tar.gz emacs-21d9303c61ce5ecc81fd7ea96aeb94b5b03bee79.zip | |
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.
| -rw-r--r-- | lisp/net/browse-url.el | 3 | ||||
| -rw-r--r-- | lisp/net/rcirc.el | 15 | ||||
| -rw-r--r-- | lisp/net/soap-inspect.el | 8 | ||||
| -rw-r--r-- | 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 7b72a713623..58f01d5bf98 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." | |||
| 481 | "Hook run after `browse-url-of-file' has asked a browser to load a file." | 481 | "Hook run after `browse-url-of-file' has asked a browser to load a file." |
| 482 | :type 'hook) | 482 | :type 'hook) |
| 483 | 483 | ||
| 484 | (defvar browse-url-temp-file-name nil) | 484 | (defvar-local browse-url-temp-file-name nil) |
| 485 | (make-variable-buffer-local 'browse-url-temp-file-name) | ||
| 486 | 485 | ||
| 487 | (defcustom browse-url-xterm-program "xterm" | 486 | (defcustom browse-url-xterm-program "xterm" |
| 488 | "The name of the terminal emulator used by `browse-url-text-xterm'. | 487 | "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 22348a1725c..58cc8b1be55 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -178,13 +178,11 @@ If nil, no maximum is applied." | |||
| 178 | :type '(choice (const :tag "No maximum" nil) | 178 | :type '(choice (const :tag "No maximum" nil) |
| 179 | (integer :tag "Number of characters"))) | 179 | (integer :tag "Number of characters"))) |
| 180 | 180 | ||
| 181 | (defvar rcirc-ignore-buffer-activity-flag nil | 181 | (defvar-local rcirc-ignore-buffer-activity-flag nil |
| 182 | "If non-nil, ignore activity in this buffer.") | 182 | "If non-nil, ignore activity in this buffer.") |
| 183 | (make-variable-buffer-local 'rcirc-ignore-buffer-activity-flag) | ||
| 184 | 183 | ||
| 185 | (defvar rcirc-low-priority-flag nil | 184 | (defvar-local rcirc-low-priority-flag nil |
| 186 | "If non-nil, activity in this buffer is considered low priority.") | 185 | "If non-nil, activity in this buffer is considered low priority.") |
| 187 | (make-variable-buffer-local 'rcirc-low-priority-flag) | ||
| 188 | 186 | ||
| 189 | (defcustom rcirc-omit-responses | 187 | (defcustom rcirc-omit-responses |
| 190 | '("JOIN" "PART" "QUIT" "NICK") | 188 | '("JOIN" "PART" "QUIT" "NICK") |
| @@ -1328,8 +1326,7 @@ Create the buffer if it doesn't exist." | |||
| 1328 | (rcirc-send-string process | 1326 | (rcirc-send-string process |
| 1329 | (concat command " :" args))))))) | 1327 | (concat command " :" args))))))) |
| 1330 | 1328 | ||
| 1331 | (defvar rcirc-parent-buffer nil) | 1329 | (defvar-local rcirc-parent-buffer nil) |
| 1332 | (make-variable-buffer-local 'rcirc-parent-buffer) | ||
| 1333 | (put 'rcirc-parent-buffer 'permanent-local t) | 1330 | (put 'rcirc-parent-buffer 'permanent-local t) |
| 1334 | (defvar rcirc-window-configuration nil) | 1331 | (defvar rcirc-window-configuration nil) |
| 1335 | (defun rcirc-edit-multiline () | 1332 | (defun rcirc-edit-multiline () |
| @@ -1501,10 +1498,8 @@ is found by looking up RESPONSE in `rcirc-response-formats'." | |||
| 1501 | ((or (rcirc-get-buffer process target) | 1498 | ((or (rcirc-get-buffer process target) |
| 1502 | (rcirc-any-buffer process)))))) | 1499 | (rcirc-any-buffer process)))))) |
| 1503 | 1500 | ||
| 1504 | (defvar rcirc-activity-types nil) | 1501 | (defvar-local rcirc-activity-types nil) |
| 1505 | (make-variable-buffer-local 'rcirc-activity-types) | 1502 | (defvar-local rcirc-last-sender nil) |
| 1506 | (defvar rcirc-last-sender nil) | ||
| 1507 | (make-variable-buffer-local 'rcirc-last-sender) | ||
| 1508 | 1503 | ||
| 1509 | (defcustom rcirc-omit-threshold 100 | 1504 | (defcustom rcirc-omit-threshold 100 |
| 1510 | "Lines since last activity from a nick before `rcirc-omit-responses' are omitted." | 1505 | "Lines since last activity from a nick before `rcirc-omit-responses' are omitted." |
diff --git a/lisp/net/soap-inspect.el b/lisp/net/soap-inspect.el index 604e35c07cf..9d4e440719d 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 | |||
| 206 | 206 | ||
| 207 | ;;; soap-inspect | 207 | ;;; soap-inspect |
| 208 | 208 | ||
| 209 | (defvar soap-inspect-previous-items nil | 209 | (defvar-local soap-inspect-previous-items nil |
| 210 | "A stack of previously inspected items in the *soap-inspect* buffer. | 210 | "A stack of previously inspected items in the *soap-inspect* buffer. |
| 211 | Used to implement the BACK button.") | 211 | Used to implement the BACK button.") |
| 212 | 212 | ||
| 213 | (defvar soap-inspect-current-item nil | 213 | (defvar-local soap-inspect-current-item nil |
| 214 | "The current item being inspected in the *soap-inspect* buffer.") | 214 | "The current item being inspected in the *soap-inspect* buffer.") |
| 215 | 215 | ||
| 216 | (progn | ||
| 217 | (make-variable-buffer-local 'soap-inspect-previous-items) | ||
| 218 | (make-variable-buffer-local 'soap-inspect-current-item)) | ||
| 219 | |||
| 220 | (defun soap-inspect (element) | 216 | (defun soap-inspect (element) |
| 221 | "Inspect a SOAP ELEMENT in the *soap-inspect* buffer. | 217 | "Inspect a SOAP ELEMENT in the *soap-inspect* buffer. |
| 222 | The buffer is populated with information about ELEMENT with links | 218 | The buffer is populated with information about ELEMENT with links |
diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el index 67f844428a7..44f535f01c9 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.") | |||
| 72 | 72 | ||
| 73 | (defvar telnet-prompt-pattern "^[^#$%>\n]*[#$%>] *") | 73 | (defvar telnet-prompt-pattern "^[^#$%>\n]*[#$%>] *") |
| 74 | (defvar telnet-replace-c-g nil) | 74 | (defvar telnet-replace-c-g nil) |
| 75 | (make-variable-buffer-local | 75 | (defvar-local telnet-remote-echoes t |
| 76 | (defvar telnet-remote-echoes t | 76 | "True if the telnet process will echo input.") |
| 77 | "True if the telnet process will echo input.")) | 77 | (defvar-local telnet-interrupt-string "\C-c" "String sent by C-c.") |
| 78 | (make-variable-buffer-local | ||
| 79 | (defvar telnet-interrupt-string "\C-c" "String sent by C-c.")) | ||
| 80 | 78 | ||
| 81 | (defvar telnet-count 0 | 79 | (defvar-local telnet-count 0 |
| 82 | "Number of output strings from telnet process while looking for password.") | 80 | "Number of output strings from telnet process while looking for password.") |
| 83 | (make-variable-buffer-local 'telnet-count) | ||
| 84 | 81 | ||
| 85 | (defvar telnet-program "telnet" | 82 | (defvar telnet-program "telnet" |
| 86 | "Program to run to open a telnet connection.") | 83 | "Program to run to open a telnet connection.") |