diff options
| author | Stefan Kangas | 2021-01-31 03:19:41 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2021-01-31 04:44:30 +0100 |
| commit | fc66ec33226aeed0b745356363ed952c8ff1f7fd (patch) | |
| tree | d9f29a8b44ac663d30f458eec3353d603adc7c9c | |
| parent | 44eb87cd0a8d7fb529e36b0aca9a3fc92d419822 (diff) | |
| download | emacs-fc66ec33226aeed0b745356363ed952c8ff1f7fd.tar.gz emacs-fc66ec33226aeed0b745356363ed952c8ff1f7fd.zip | |
Prefer defvar-local in erc
* lisp/erc/erc-backend.el (erc-server-current-nick)
(erc-server-process, erc-session-server, erc-session-connector)
(erc-session-port, erc-server-announced-name)
(erc-server-version, erc-server-parameters)
(erc-server-connected, erc-server-reconnect-count)
(erc-server-quitting, erc-server-reconnecting)
(erc-server-timed-out, erc-server-banned)
(erc-server-error-occurred, erc-server-lines-sent)
(erc-server-last-peers, erc-server-last-sent-time)
(erc-server-last-ping-time, erc-server-last-received-time)
(erc-server-lag, erc-server-filter-data, erc-server-duplicates)
(erc-server-processing-p, erc-server-flood-last-message)
(erc-server-flood-queue, erc-server-flood-timer)
(erc-server-ping-handler):
* lisp/erc/erc-capab.el (erc-capab-identify-activated)
(erc-capab-identify-sent):
* lisp/erc/erc-dcc.el (erc-dcc-byte-count, erc-dcc-entry-data)
(erc-dcc-file-name):
* lisp/erc/erc-ezbounce.el (erc-ezb-session-list):
* lisp/erc/erc-join.el (erc--autojoin-timer):
* lisp/erc/erc-netsplit.el (erc-netsplit-list):
* lisp/erc/erc-networks.el (erc-network):
* lisp/erc/erc-notify.el (erc-last-ison, erc-last-ison-time):
* lisp/erc/erc-ring.el (erc-input-ring, erc-input-ring-index):
* lisp/erc/erc-stamp.el (erc-timestamp-last-inserted)
(erc-timestamp-last-inserted-left)
(erc-timestamp-last-inserted-right):
* lisp/erc/erc.el (erc-session-password, erc-channel-users)
(erc-server-users, erc-channel-topic, erc-channel-modes)
(erc-insert-marker, erc-input-marker, erc-last-saved-position)
(erc-dbuf, erc-active-buffer, erc-default-recipients)
(erc-session-user-full-name, erc-channel-user-limit)
(erc-channel-key, erc-invitation, erc-channel-list)
(erc-bad-nick, erc-logged-in, erc-default-nicks)
(erc-nick-change-attempt-count, erc-send-input-line-function)
(erc-channel-new-member-names, erc-channel-banlist)
(erc-current-message-catalog): Prefer defvar-local.
| -rw-r--r-- | lisp/erc/erc-backend.el | 84 | ||||
| -rw-r--r-- | lisp/erc/erc-capab.el | 6 | ||||
| -rw-r--r-- | lisp/erc/erc-dcc.el | 9 | ||||
| -rw-r--r-- | lisp/erc/erc-ezbounce.el | 3 | ||||
| -rw-r--r-- | lisp/erc/erc-join.el | 3 | ||||
| -rw-r--r-- | lisp/erc/erc-netsplit.el | 3 | ||||
| -rw-r--r-- | lisp/erc/erc-networks.el | 3 | ||||
| -rw-r--r-- | lisp/erc/erc-notify.el | 6 | ||||
| -rw-r--r-- | lisp/erc/erc-ring.el | 6 | ||||
| -rw-r--r-- | lisp/erc/erc-stamp.el | 9 | ||||
| -rw-r--r-- | lisp/erc/erc.el | 75 |
11 files changed, 69 insertions, 138 deletions
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 487dc7692ef..4cabd42f532 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el | |||
| @@ -120,38 +120,31 @@ | |||
| 120 | 120 | ||
| 121 | ;;; User data | 121 | ;;; User data |
| 122 | 122 | ||
| 123 | (defvar erc-server-current-nick nil | 123 | (defvar-local erc-server-current-nick nil |
| 124 | "Nickname on the current server. | 124 | "Nickname on the current server. |
| 125 | Use `erc-current-nick' to access this.") | 125 | Use `erc-current-nick' to access this.") |
| 126 | (make-variable-buffer-local 'erc-server-current-nick) | ||
| 127 | 126 | ||
| 128 | ;;; Server attributes | 127 | ;;; Server attributes |
| 129 | 128 | ||
| 130 | (defvar erc-server-process nil | 129 | (defvar-local erc-server-process nil |
| 131 | "The process object of the corresponding server connection.") | 130 | "The process object of the corresponding server connection.") |
| 132 | (make-variable-buffer-local 'erc-server-process) | ||
| 133 | 131 | ||
| 134 | (defvar erc-session-server nil | 132 | (defvar-local erc-session-server nil |
| 135 | "The server name used to connect to for this session.") | 133 | "The server name used to connect to for this session.") |
| 136 | (make-variable-buffer-local 'erc-session-server) | ||
| 137 | 134 | ||
| 138 | (defvar erc-session-connector nil | 135 | (defvar-local erc-session-connector nil |
| 139 | "The function used to connect to this session (nil for the default).") | 136 | "The function used to connect to this session (nil for the default).") |
| 140 | (make-variable-buffer-local 'erc-session-connector) | ||
| 141 | 137 | ||
| 142 | (defvar erc-session-port nil | 138 | (defvar-local erc-session-port nil |
| 143 | "The port used to connect to.") | 139 | "The port used to connect to.") |
| 144 | (make-variable-buffer-local 'erc-session-port) | ||
| 145 | 140 | ||
| 146 | (defvar erc-server-announced-name nil | 141 | (defvar-local erc-server-announced-name nil |
| 147 | "The name the server announced to use.") | 142 | "The name the server announced to use.") |
| 148 | (make-variable-buffer-local 'erc-server-announced-name) | ||
| 149 | 143 | ||
| 150 | (defvar erc-server-version nil | 144 | (defvar-local erc-server-version nil |
| 151 | "The name and version of the server's ircd.") | 145 | "The name and version of the server's ircd.") |
| 152 | (make-variable-buffer-local 'erc-server-version) | ||
| 153 | 146 | ||
| 154 | (defvar erc-server-parameters nil | 147 | (defvar-local erc-server-parameters nil |
| 155 | "Alist listing the supported server parameters. | 148 | "Alist listing the supported server parameters. |
| 156 | 149 | ||
| 157 | This is only set if the server sends 005 messages saying what is | 150 | This is only set if the server sends 005 messages saying what is |
| @@ -177,86 +170,70 @@ RFC2812 - server supports RFC 2812 features | |||
| 177 | SILENCE=10 - supports the SILENCE command, maximum allowed number of entries | 170 | SILENCE=10 - supports the SILENCE command, maximum allowed number of entries |
| 178 | TOPICLEN=160 - maximum allowed topic length | 171 | TOPICLEN=160 - maximum allowed topic length |
| 179 | WALLCHOPS - supports sending messages to all operators in a channel") | 172 | WALLCHOPS - supports sending messages to all operators in a channel") |
| 180 | (make-variable-buffer-local 'erc-server-parameters) | ||
| 181 | 173 | ||
| 182 | ;;; Server and connection state | 174 | ;;; Server and connection state |
| 183 | 175 | ||
| 184 | (defvar erc-server-ping-timer-alist nil | 176 | (defvar erc-server-ping-timer-alist nil |
| 185 | "Mapping of server buffers to their specific ping timer.") | 177 | "Mapping of server buffers to their specific ping timer.") |
| 186 | 178 | ||
| 187 | (defvar erc-server-connected nil | 179 | (defvar-local erc-server-connected nil |
| 188 | "Non-nil if the current buffer has been used by ERC to establish | 180 | "Non-nil if the current buffer has been used by ERC to establish |
| 189 | an IRC connection. | 181 | an IRC connection. |
| 190 | 182 | ||
| 191 | If you wish to determine whether an IRC connection is currently | 183 | If you wish to determine whether an IRC connection is currently |
| 192 | active, use the `erc-server-process-alive' function instead.") | 184 | active, use the `erc-server-process-alive' function instead.") |
| 193 | (make-variable-buffer-local 'erc-server-connected) | ||
| 194 | 185 | ||
| 195 | (defvar erc-server-reconnect-count 0 | 186 | (defvar-local erc-server-reconnect-count 0 |
| 196 | "Number of times we have failed to reconnect to the current server.") | 187 | "Number of times we have failed to reconnect to the current server.") |
| 197 | (make-variable-buffer-local 'erc-server-reconnect-count) | ||
| 198 | 188 | ||
| 199 | (defvar erc-server-quitting nil | 189 | (defvar-local erc-server-quitting nil |
| 200 | "Non-nil if the user requests a quit.") | 190 | "Non-nil if the user requests a quit.") |
| 201 | (make-variable-buffer-local 'erc-server-quitting) | ||
| 202 | 191 | ||
| 203 | (defvar erc-server-reconnecting nil | 192 | (defvar-local erc-server-reconnecting nil |
| 204 | "Non-nil if the user requests an explicit reconnect, and the | 193 | "Non-nil if the user requests an explicit reconnect, and the |
| 205 | current IRC process is still alive.") | 194 | current IRC process is still alive.") |
| 206 | (make-variable-buffer-local 'erc-server-reconnecting) | ||
| 207 | 195 | ||
| 208 | (defvar erc-server-timed-out nil | 196 | (defvar-local erc-server-timed-out nil |
| 209 | "Non-nil if the IRC server failed to respond to a ping.") | 197 | "Non-nil if the IRC server failed to respond to a ping.") |
| 210 | (make-variable-buffer-local 'erc-server-timed-out) | ||
| 211 | 198 | ||
| 212 | (defvar erc-server-banned nil | 199 | (defvar-local erc-server-banned nil |
| 213 | "Non-nil if the user is denied access because of a server ban.") | 200 | "Non-nil if the user is denied access because of a server ban.") |
| 214 | (make-variable-buffer-local 'erc-server-banned) | ||
| 215 | 201 | ||
| 216 | (defvar erc-server-error-occurred nil | 202 | (defvar-local erc-server-error-occurred nil |
| 217 | "Non-nil if the user triggers some server error.") | 203 | "Non-nil if the user triggers some server error.") |
| 218 | (make-variable-buffer-local 'erc-server-error-occurred) | ||
| 219 | 204 | ||
| 220 | (defvar erc-server-lines-sent nil | 205 | (defvar-local erc-server-lines-sent nil |
| 221 | "Line counter.") | 206 | "Line counter.") |
| 222 | (make-variable-buffer-local 'erc-server-lines-sent) | ||
| 223 | 207 | ||
| 224 | (defvar erc-server-last-peers '(nil . nil) | 208 | (defvar-local erc-server-last-peers '(nil . nil) |
| 225 | "Last peers used, both sender and receiver. | 209 | "Last peers used, both sender and receiver. |
| 226 | Those are used for /MSG destination shortcuts.") | 210 | Those are used for /MSG destination shortcuts.") |
| 227 | (make-variable-buffer-local 'erc-server-last-peers) | ||
| 228 | 211 | ||
| 229 | (defvar erc-server-last-sent-time nil | 212 | (defvar-local erc-server-last-sent-time nil |
| 230 | "Time the message was sent. | 213 | "Time the message was sent. |
| 231 | This is useful for flood protection.") | 214 | This is useful for flood protection.") |
| 232 | (make-variable-buffer-local 'erc-server-last-sent-time) | ||
| 233 | 215 | ||
| 234 | (defvar erc-server-last-ping-time nil | 216 | (defvar-local erc-server-last-ping-time nil |
| 235 | "Time the last ping was sent. | 217 | "Time the last ping was sent. |
| 236 | This is useful for flood protection.") | 218 | This is useful for flood protection.") |
| 237 | (make-variable-buffer-local 'erc-server-last-ping-time) | ||
| 238 | 219 | ||
| 239 | (defvar erc-server-last-received-time nil | 220 | (defvar-local erc-server-last-received-time nil |
| 240 | "Time the last message was received from the server. | 221 | "Time the last message was received from the server. |
| 241 | This is useful for detecting hung connections.") | 222 | This is useful for detecting hung connections.") |
| 242 | (make-variable-buffer-local 'erc-server-last-received-time) | ||
| 243 | 223 | ||
| 244 | (defvar erc-server-lag nil | 224 | (defvar-local erc-server-lag nil |
| 245 | "Calculated server lag time in seconds. | 225 | "Calculated server lag time in seconds. |
| 246 | This variable is only set in a server buffer.") | 226 | This variable is only set in a server buffer.") |
| 247 | (make-variable-buffer-local 'erc-server-lag) | ||
| 248 | 227 | ||
| 249 | (defvar erc-server-filter-data nil | 228 | (defvar-local erc-server-filter-data nil |
| 250 | "The data that arrived from the server | 229 | "The data that arrived from the server |
| 251 | but has not been processed yet.") | 230 | but has not been processed yet.") |
| 252 | (make-variable-buffer-local 'erc-server-filter-data) | ||
| 253 | 231 | ||
| 254 | (defvar erc-server-duplicates (make-hash-table :test 'equal) | 232 | (defvar-local erc-server-duplicates (make-hash-table :test 'equal) |
| 255 | "Internal variable used to track duplicate messages.") | 233 | "Internal variable used to track duplicate messages.") |
| 256 | (make-variable-buffer-local 'erc-server-duplicates) | ||
| 257 | 234 | ||
| 258 | ;; From Circe | 235 | ;; From Circe |
| 259 | (defvar erc-server-processing-p nil | 236 | (defvar-local erc-server-processing-p nil |
| 260 | "Non-nil when we're currently processing a message. | 237 | "Non-nil when we're currently processing a message. |
| 261 | 238 | ||
| 262 | When ERC receives a private message, it sets up a new buffer for | 239 | When ERC receives a private message, it sets up a new buffer for |
| @@ -267,23 +244,19 @@ network exceptions. So, if someone sends you two messages | |||
| 267 | quickly after each other, ispell is started for the first, but | 244 | quickly after each other, ispell is started for the first, but |
| 268 | might take long enough for the second message to be processed | 245 | might take long enough for the second message to be processed |
| 269 | first.") | 246 | first.") |
| 270 | (make-variable-buffer-local 'erc-server-processing-p) | ||
| 271 | 247 | ||
| 272 | (defvar erc-server-flood-last-message 0 | 248 | (defvar-local erc-server-flood-last-message 0 |
| 273 | "When we sent the last message. | 249 | "When we sent the last message. |
| 274 | See `erc-server-flood-margin' for an explanation of the flood | 250 | See `erc-server-flood-margin' for an explanation of the flood |
| 275 | protection algorithm.") | 251 | protection algorithm.") |
| 276 | (make-variable-buffer-local 'erc-server-flood-last-message) | ||
| 277 | 252 | ||
| 278 | (defvar erc-server-flood-queue nil | 253 | (defvar-local erc-server-flood-queue nil |
| 279 | "The queue of messages waiting to be sent to the server. | 254 | "The queue of messages waiting to be sent to the server. |
| 280 | See `erc-server-flood-margin' for an explanation of the flood | 255 | See `erc-server-flood-margin' for an explanation of the flood |
| 281 | protection algorithm.") | 256 | protection algorithm.") |
| 282 | (make-variable-buffer-local 'erc-server-flood-queue) | ||
| 283 | 257 | ||
| 284 | (defvar erc-server-flood-timer nil | 258 | (defvar-local erc-server-flood-timer nil |
| 285 | "The timer to resume sending.") | 259 | "The timer to resume sending.") |
| 286 | (make-variable-buffer-local 'erc-server-flood-timer) | ||
| 287 | 260 | ||
| 288 | ;;; IRC protocol and misc options | 261 | ;;; IRC protocol and misc options |
| 289 | 262 | ||
| @@ -453,9 +426,8 @@ If this is set to nil, never try to reconnect." | |||
| 453 | :type '(choice (const :tag "Disabled" nil) | 426 | :type '(choice (const :tag "Disabled" nil) |
| 454 | (integer :tag "Seconds"))) | 427 | (integer :tag "Seconds"))) |
| 455 | 428 | ||
| 456 | (defvar erc-server-ping-handler nil | 429 | (defvar-local erc-server-ping-handler nil |
| 457 | "This variable holds the periodic ping timer.") | 430 | "This variable holds the periodic ping timer.") |
| 458 | (make-variable-buffer-local 'erc-server-ping-handler) | ||
| 459 | 431 | ||
| 460 | ;;;; Helper functions | 432 | ;;;; Helper functions |
| 461 | 433 | ||
diff --git a/lisp/erc/erc-capab.el b/lisp/erc/erc-capab.el index 06d4fbd9f6a..4e4d012545a 100644 --- a/lisp/erc/erc-capab.el +++ b/lisp/erc/erc-capab.el | |||
| @@ -113,13 +113,11 @@ character not found in IRC nicknames to avoid confusion." | |||
| 113 | 113 | ||
| 114 | ;;; Variables: | 114 | ;;; Variables: |
| 115 | 115 | ||
| 116 | (defvar erc-capab-identify-activated nil | 116 | (defvar-local erc-capab-identify-activated nil |
| 117 | "CAPAB IDENTIFY-MSG has been activated.") | 117 | "CAPAB IDENTIFY-MSG has been activated.") |
| 118 | (make-variable-buffer-local 'erc-capab-identify-activated) | ||
| 119 | 118 | ||
| 120 | (defvar erc-capab-identify-sent nil | 119 | (defvar-local erc-capab-identify-sent nil |
| 121 | "CAPAB IDENTIFY-MSG and IDENTIFY-CTCP messages have been sent.") | 120 | "CAPAB IDENTIFY-MSG and IDENTIFY-CTCP messages have been sent.") |
| 122 | (make-variable-buffer-local 'erc-capab-identify-sent) | ||
| 123 | 121 | ||
| 124 | ;;; Functions: | 122 | ;;; Functions: |
| 125 | 123 | ||
diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el index 590785e91c2..9dedd3cda86 100644 --- a/lisp/erc/erc-dcc.el +++ b/lisp/erc/erc-dcc.el | |||
| @@ -538,8 +538,7 @@ PROC is the server process." | |||
| 538 | nil '(notice error) 'active | 538 | nil '(notice error) 'active |
| 539 | 'dcc-get-notfound ?n nick ?f filename)))) | 539 | 'dcc-get-notfound ?n nick ?f filename)))) |
| 540 | 540 | ||
| 541 | (defvar erc-dcc-byte-count nil) | 541 | (defvar-local erc-dcc-byte-count nil) |
| 542 | (make-variable-buffer-local 'erc-dcc-byte-count) | ||
| 543 | 542 | ||
| 544 | (defun erc-dcc-do-LIST-command (proc) | 543 | (defun erc-dcc-do-LIST-command (proc) |
| 545 | "This is the handler for the /dcc list command. | 544 | "This is the handler for the /dcc list command. |
| @@ -751,9 +750,8 @@ the matching regexp, or nil if none found." | |||
| 751 | 'dcc-malformed ?n nick ?u login ?h host ?q query))))) | 750 | 'dcc-malformed ?n nick ?u login ?h host ?q query))))) |
| 752 | 751 | ||
| 753 | 752 | ||
| 754 | (defvar erc-dcc-entry-data nil | 753 | (defvar-local erc-dcc-entry-data nil |
| 755 | "Holds the `erc-dcc-list' entry for this DCC connection.") | 754 | "Holds the `erc-dcc-list' entry for this DCC connection.") |
| 756 | (make-variable-buffer-local 'erc-dcc-entry-data) | ||
| 757 | 755 | ||
| 758 | ;;; SEND handling | 756 | ;;; SEND handling |
| 759 | 757 | ||
| @@ -905,8 +903,7 @@ other client." | |||
| 905 | :group 'erc-dcc | 903 | :group 'erc-dcc |
| 906 | :type 'integer) | 904 | :type 'integer) |
| 907 | 905 | ||
| 908 | (defvar erc-dcc-file-name nil) | 906 | (defvar-local erc-dcc-file-name nil) |
| 909 | (make-variable-buffer-local 'erc-dcc-file-name) | ||
| 910 | 907 | ||
| 911 | (defun erc-dcc-get-file (entry file parent-proc) | 908 | (defun erc-dcc-get-file (entry file parent-proc) |
| 912 | "Set up a transfer from the remote client to the local over a TCP connection. | 909 | "Set up a transfer from the remote client to the local over a TCP connection. |
diff --git a/lisp/erc/erc-ezbounce.el b/lisp/erc/erc-ezbounce.el index 62238dd4344..8378ff53742 100644 --- a/lisp/erc/erc-ezbounce.el +++ b/lisp/erc/erc-ezbounce.el | |||
| @@ -61,9 +61,8 @@ The alist's format is as follows: | |||
| 61 | "Alist of actions to take on NOTICEs from EZBounce.") | 61 | "Alist of actions to take on NOTICEs from EZBounce.") |
| 62 | 62 | ||
| 63 | 63 | ||
| 64 | (defvar erc-ezb-session-list '() | 64 | (defvar-local erc-ezb-session-list '() |
| 65 | "List of detached EZBounce sessions.") | 65 | "List of detached EZBounce sessions.") |
| 66 | (make-variable-buffer-local 'erc-ezb-session-list) | ||
| 67 | 66 | ||
| 68 | (defvar erc-ezb-inside-session-listing nil | 67 | (defvar erc-ezb-inside-session-listing nil |
| 69 | "Indicate whether current notices are expected to be EZB session listings.") | 68 | "Indicate whether current notices are expected to be EZB session listings.") |
diff --git a/lisp/erc/erc-join.el b/lisp/erc/erc-join.el index 947b2949690..e6e50707830 100644 --- a/lisp/erc/erc-join.el +++ b/lisp/erc/erc-join.el | |||
| @@ -105,8 +105,7 @@ servers, presumably in the same domain." | |||
| 105 | :group 'erc-autojoin | 105 | :group 'erc-autojoin |
| 106 | :type 'boolean) | 106 | :type 'boolean) |
| 107 | 107 | ||
| 108 | (defvar erc--autojoin-timer nil) | 108 | (defvar-local erc--autojoin-timer nil) |
| 109 | (make-variable-buffer-local 'erc--autojoin-timer) | ||
| 110 | 109 | ||
| 111 | (defun erc-autojoin-channels-delayed (server nick buffer) | 110 | (defun erc-autojoin-channels-delayed (server nick buffer) |
| 112 | "Attempt to autojoin channels. | 111 | "Attempt to autojoin channels. |
diff --git a/lisp/erc/erc-netsplit.el b/lisp/erc/erc-netsplit.el index 9fd3cfe1cc4..37fc4cf16c1 100644 --- a/lisp/erc/erc-netsplit.el +++ b/lisp/erc/erc-netsplit.el | |||
| @@ -82,12 +82,11 @@ Args: PROC is the process the netjoin originated from and | |||
| 82 | :group 'erc-hooks | 82 | :group 'erc-hooks |
| 83 | :type 'hook) | 83 | :type 'hook) |
| 84 | 84 | ||
| 85 | (defvar erc-netsplit-list nil | 85 | (defvar-local erc-netsplit-list nil |
| 86 | "This is a list of the form | 86 | "This is a list of the form |
| 87 | \((\"a.b.c.d e.f.g\" TIMESTAMP FIRST-JOIN \"nick1\" ... \"nickn\") ...) | 87 | \((\"a.b.c.d e.f.g\" TIMESTAMP FIRST-JOIN \"nick1\" ... \"nickn\") ...) |
| 88 | where FIRST-JOIN is t or nil, depending on whether or not the first | 88 | where FIRST-JOIN is t or nil, depending on whether or not the first |
| 89 | join from that split has been detected or not.") | 89 | join from that split has been detected or not.") |
| 90 | (make-variable-buffer-local 'erc-netsplit-list) | ||
| 91 | 90 | ||
| 92 | (defun erc-netsplit-install-message-catalogs () | 91 | (defun erc-netsplit-install-message-catalogs () |
| 93 | (erc-define-catalog | 92 | (erc-define-catalog |
diff --git a/lisp/erc/erc-networks.el b/lisp/erc/erc-networks.el index 9c2bb9dfee3..9926255e3aa 100644 --- a/lisp/erc/erc-networks.el +++ b/lisp/erc/erc-networks.el | |||
| @@ -722,9 +722,8 @@ MATCHER is used to find a corresponding network to a server while | |||
| 722 | (regexp) | 722 | (regexp) |
| 723 | (const :tag "Network has no common server ending" nil))))) | 723 | (const :tag "Network has no common server ending" nil))))) |
| 724 | 724 | ||
| 725 | (defvar erc-network nil | 725 | (defvar-local erc-network nil |
| 726 | "The name of the network you are connected to (a symbol).") | 726 | "The name of the network you are connected to (a symbol).") |
| 727 | (make-variable-buffer-local 'erc-network) | ||
| 728 | 727 | ||
| 729 | ;; Functions: | 728 | ;; Functions: |
| 730 | 729 | ||
diff --git a/lisp/erc/erc-notify.el b/lisp/erc/erc-notify.el index 098049edc68..e133e05a7d3 100644 --- a/lisp/erc/erc-notify.el +++ b/lisp/erc/erc-notify.el | |||
| @@ -75,13 +75,11 @@ strings." | |||
| 75 | 75 | ||
| 76 | ;;;; Internal variables | 76 | ;;;; Internal variables |
| 77 | 77 | ||
| 78 | (defvar erc-last-ison nil | 78 | (defvar-local erc-last-ison nil |
| 79 | "Last ISON information received through `erc-notify-timer'.") | 79 | "Last ISON information received through `erc-notify-timer'.") |
| 80 | (make-variable-buffer-local 'erc-last-ison) | ||
| 81 | 80 | ||
| 82 | (defvar erc-last-ison-time 0 | 81 | (defvar-local erc-last-ison-time 0 |
| 83 | "Last time ISON was sent to the server in `erc-notify-timer'.") | 82 | "Last time ISON was sent to the server in `erc-notify-timer'.") |
| 84 | (make-variable-buffer-local 'erc-last-ison-time) | ||
| 85 | 83 | ||
| 86 | ;;;; Setup | 84 | ;;;; Setup |
| 87 | 85 | ||
diff --git a/lisp/erc/erc-ring.el b/lisp/erc/erc-ring.el index 3813eafe004..71a9f8ef3da 100644 --- a/lisp/erc/erc-ring.el +++ b/lisp/erc/erc-ring.el | |||
| @@ -53,16 +53,14 @@ be recalled using M-p and M-n." | |||
| 53 | (define-key erc-mode-map "\M-p" 'undefined) | 53 | (define-key erc-mode-map "\M-p" 'undefined) |
| 54 | (define-key erc-mode-map "\M-n" 'undefined))) | 54 | (define-key erc-mode-map "\M-n" 'undefined))) |
| 55 | 55 | ||
| 56 | (defvar erc-input-ring nil "Input ring for erc.") | 56 | (defvar-local erc-input-ring nil "Input ring for erc.") |
| 57 | (make-variable-buffer-local 'erc-input-ring) | ||
| 58 | 57 | ||
| 59 | (defvar erc-input-ring-index nil | 58 | (defvar-local erc-input-ring-index nil |
| 60 | "Position in the input ring for erc. | 59 | "Position in the input ring for erc. |
| 61 | If nil, the input line is blank and the user is conceptually after | 60 | If nil, the input line is blank and the user is conceptually after |
| 62 | the most recently added item in the ring. If an integer, the input | 61 | the most recently added item in the ring. If an integer, the input |
| 63 | line is non-blank and displays the item from the ring indexed by this | 62 | line is non-blank and displays the item from the ring indexed by this |
| 64 | variable.") | 63 | variable.") |
| 65 | (make-variable-buffer-local 'erc-input-ring-index) | ||
| 66 | 64 | ||
| 67 | (defun erc-input-ring-setup () | 65 | (defun erc-input-ring-setup () |
| 68 | "Do the setup required so that we can use comint style input rings. | 66 | "Do the setup required so that we can use comint style input rings. |
diff --git a/lisp/erc/erc-stamp.el b/lisp/erc/erc-stamp.el index c7dfb0807bc..2c42a18081e 100644 --- a/lisp/erc/erc-stamp.el +++ b/lisp/erc/erc-stamp.el | |||
| @@ -191,21 +191,18 @@ or `erc-send-modify-hook'." | |||
| 191 | (list (lambda (_window _before dir) | 191 | (list (lambda (_window _before dir) |
| 192 | (erc-echo-timestamp dir ct)))))))) | 192 | (erc-echo-timestamp dir ct)))))))) |
| 193 | 193 | ||
| 194 | (defvar erc-timestamp-last-inserted nil | 194 | (defvar-local erc-timestamp-last-inserted nil |
| 195 | "Last timestamp inserted into the buffer.") | 195 | "Last timestamp inserted into the buffer.") |
| 196 | (make-variable-buffer-local 'erc-timestamp-last-inserted) | ||
| 197 | 196 | ||
| 198 | (defvar erc-timestamp-last-inserted-left nil | 197 | (defvar-local erc-timestamp-last-inserted-left nil |
| 199 | "Last timestamp inserted into the left side of the buffer. | 198 | "Last timestamp inserted into the left side of the buffer. |
| 200 | This is used when `erc-insert-timestamp-function' is set to | 199 | This is used when `erc-insert-timestamp-function' is set to |
| 201 | `erc-timestamp-left-and-right'") | 200 | `erc-timestamp-left-and-right'") |
| 202 | (make-variable-buffer-local 'erc-timestamp-last-inserted-left) | ||
| 203 | 201 | ||
| 204 | (defvar erc-timestamp-last-inserted-right nil | 202 | (defvar-local erc-timestamp-last-inserted-right nil |
| 205 | "Last timestamp inserted into the right side of the buffer. | 203 | "Last timestamp inserted into the right side of the buffer. |
| 206 | This is used when `erc-insert-timestamp-function' is set to | 204 | This is used when `erc-insert-timestamp-function' is set to |
| 207 | `erc-timestamp-left-and-right'") | 205 | `erc-timestamp-left-and-right'") |
| 208 | (make-variable-buffer-local 'erc-timestamp-last-inserted-right) | ||
| 209 | 206 | ||
| 210 | (defcustom erc-timestamp-only-if-changed-flag t | 207 | (defcustom erc-timestamp-only-if-changed-flag t |
| 211 | "Insert timestamp only if its value changed since last insertion. | 208 | "Insert timestamp only if its value changed since last insertion. |
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index bb68173b6dc..37e4cc39d53 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el | |||
| @@ -270,9 +270,8 @@ A typical value would be \((\"#emacs\" \"QUIT\" \"JOIN\") | |||
| 270 | :group 'erc-ignore | 270 | :group 'erc-ignore |
| 271 | :type 'erc-message-type) | 271 | :type 'erc-message-type) |
| 272 | 272 | ||
| 273 | (defvar erc-session-password nil | 273 | (defvar-local erc-session-password nil |
| 274 | "The password used for the current session.") | 274 | "The password used for the current session.") |
| 275 | (make-variable-buffer-local 'erc-session-password) | ||
| 276 | 275 | ||
| 277 | (defcustom erc-disconnected-hook nil | 276 | (defcustom erc-disconnected-hook nil |
| 278 | "Run this hook with arguments (NICK IP REASON) when disconnected. | 277 | "Run this hook with arguments (NICK IP REASON) when disconnected. |
| @@ -337,18 +336,16 @@ Functions are passed a buffer as the first argument." | |||
| 337 | :type 'hook) | 336 | :type 'hook) |
| 338 | 337 | ||
| 339 | 338 | ||
| 340 | (defvar erc-channel-users nil | 339 | (defvar-local erc-channel-users nil |
| 341 | "A hash table of members in the current channel, which | 340 | "A hash table of members in the current channel, which |
| 342 | associates nicknames with cons cells of the form: | 341 | associates nicknames with cons cells of the form: |
| 343 | \(USER . MEMBER-DATA) where USER is a pointer to an | 342 | \(USER . MEMBER-DATA) where USER is a pointer to an |
| 344 | erc-server-user struct, and MEMBER-DATA is a pointer to an | 343 | erc-server-user struct, and MEMBER-DATA is a pointer to an |
| 345 | erc-channel-user struct.") | 344 | erc-channel-user struct.") |
| 346 | (make-variable-buffer-local 'erc-channel-users) | ||
| 347 | 345 | ||
| 348 | (defvar erc-server-users nil | 346 | (defvar-local erc-server-users nil |
| 349 | "A hash table of users on the current server, which associates | 347 | "A hash table of users on the current server, which associates |
| 350 | nicknames with erc-server-user struct instances.") | 348 | nicknames with erc-server-user struct instances.") |
| 351 | (make-variable-buffer-local 'erc-server-users) | ||
| 352 | 349 | ||
| 353 | (defun erc-downcase (string) | 350 | (defun erc-downcase (string) |
| 354 | "Convert STRING to IRC standard conforming downcase." | 351 | "Convert STRING to IRC standard conforming downcase." |
| @@ -632,23 +629,19 @@ See also: `erc-get-channel-user-list'." | |||
| 632 | (or (not nicky) | 629 | (or (not nicky) |
| 633 | (string-lessp nickx nicky)))))))) | 630 | (string-lessp nickx nicky)))))))) |
| 634 | 631 | ||
| 635 | (defvar erc-channel-topic nil | 632 | (defvar-local erc-channel-topic nil |
| 636 | "A topic string for the channel. Should only be used in channel-buffers.") | 633 | "A topic string for the channel. Should only be used in channel-buffers.") |
| 637 | (make-variable-buffer-local 'erc-channel-topic) | ||
| 638 | 634 | ||
| 639 | (defvar erc-channel-modes nil | 635 | (defvar-local erc-channel-modes nil |
| 640 | "List of strings representing channel modes. | 636 | "List of strings representing channel modes. |
| 641 | E.g. (\"i\" \"m\" \"s\" \"b Quake!*@*\") | 637 | E.g. (\"i\" \"m\" \"s\" \"b Quake!*@*\") |
| 642 | \(not sure the ban list will be here, but why not)") | 638 | \(not sure the ban list will be here, but why not)") |
| 643 | (make-variable-buffer-local 'erc-channel-modes) | ||
| 644 | 639 | ||
| 645 | (defvar erc-insert-marker nil | 640 | (defvar-local erc-insert-marker nil |
| 646 | "The place where insertion of new text in erc buffers should happen.") | 641 | "The place where insertion of new text in erc buffers should happen.") |
| 647 | (make-variable-buffer-local 'erc-insert-marker) | ||
| 648 | 642 | ||
| 649 | (defvar erc-input-marker nil | 643 | (defvar-local erc-input-marker nil |
| 650 | "The marker where input should be inserted.") | 644 | "The marker where input should be inserted.") |
| 651 | (make-variable-buffer-local 'erc-input-marker) | ||
| 652 | 645 | ||
| 653 | (defun erc-string-no-properties (string) | 646 | (defun erc-string-no-properties (string) |
| 654 | "Return a copy of STRING will all text-properties removed." | 647 | "Return a copy of STRING will all text-properties removed." |
| @@ -900,9 +893,8 @@ directory in the list." | |||
| 900 | :group 'erc-scripts | 893 | :group 'erc-scripts |
| 901 | :type 'boolean) | 894 | :type 'boolean) |
| 902 | 895 | ||
| 903 | (defvar erc-last-saved-position nil | 896 | (defvar-local erc-last-saved-position nil |
| 904 | "A marker containing the position the current buffer was last saved at.") | 897 | "A marker containing the position the current buffer was last saved at.") |
| 905 | (make-variable-buffer-local 'erc-last-saved-position) | ||
| 906 | 898 | ||
| 907 | (defcustom erc-kill-buffer-on-part nil | 899 | (defcustom erc-kill-buffer-on-part nil |
| 908 | "Kill the channel buffer on PART. | 900 | "Kill the channel buffer on PART. |
| @@ -1271,8 +1263,7 @@ See also `erc-show-my-nick'." | |||
| 1271 | (defvar erc-debug-log-file (expand-file-name "ERC.debug") | 1263 | (defvar erc-debug-log-file (expand-file-name "ERC.debug") |
| 1272 | "Debug log file name.") | 1264 | "Debug log file name.") |
| 1273 | 1265 | ||
| 1274 | (defvar erc-dbuf nil) | 1266 | (defvar-local erc-dbuf nil) |
| 1275 | (make-variable-buffer-local 'erc-dbuf) | ||
| 1276 | 1267 | ||
| 1277 | (defmacro define-erc-module (name alias doc enable-body disable-body | 1268 | (defmacro define-erc-module (name alias doc enable-body disable-body |
| 1278 | &optional local-p) | 1269 | &optional local-p) |
| @@ -1462,11 +1453,10 @@ If BUFFER is nil, the current buffer is used." | |||
| 1462 | 1453 | ||
| 1463 | ;; Last active buffer, to print server messages in the right place | 1454 | ;; Last active buffer, to print server messages in the right place |
| 1464 | 1455 | ||
| 1465 | (defvar erc-active-buffer nil | 1456 | (defvar-local erc-active-buffer nil |
| 1466 | "The current active buffer, the one where the user typed the last command. | 1457 | "The current active buffer, the one where the user typed the last command. |
| 1467 | Defaults to the server buffer, and should only be set in the | 1458 | Defaults to the server buffer, and should only be set in the |
| 1468 | server buffer.") | 1459 | server buffer.") |
| 1469 | (make-variable-buffer-local 'erc-active-buffer) | ||
| 1470 | 1460 | ||
| 1471 | (defun erc-active-buffer () | 1461 | (defun erc-active-buffer () |
| 1472 | "Return the value of `erc-active-buffer' for the current server. | 1462 | "Return the value of `erc-active-buffer' for the current server. |
| @@ -1820,52 +1810,41 @@ all channel buffers on all servers." | |||
| 1820 | 1810 | ||
| 1821 | ;; Some local variables | 1811 | ;; Some local variables |
| 1822 | 1812 | ||
| 1823 | (defvar erc-default-recipients nil | 1813 | (defvar-local erc-default-recipients nil |
| 1824 | "List of default recipients of the current buffer.") | 1814 | "List of default recipients of the current buffer.") |
| 1825 | (make-variable-buffer-local 'erc-default-recipients) | ||
| 1826 | 1815 | ||
| 1827 | (defvar erc-session-user-full-name nil | 1816 | (defvar-local erc-session-user-full-name nil |
| 1828 | "Full name of the user on the current server.") | 1817 | "Full name of the user on the current server.") |
| 1829 | (make-variable-buffer-local 'erc-session-user-full-name) | ||
| 1830 | 1818 | ||
| 1831 | (defvar erc-channel-user-limit nil | 1819 | (defvar-local erc-channel-user-limit nil |
| 1832 | "Limit of users per channel.") | 1820 | "Limit of users per channel.") |
| 1833 | (make-variable-buffer-local 'erc-channel-user-limit) | ||
| 1834 | 1821 | ||
| 1835 | (defvar erc-channel-key nil | 1822 | (defvar-local erc-channel-key nil |
| 1836 | "Key needed to join channel.") | 1823 | "Key needed to join channel.") |
| 1837 | (make-variable-buffer-local 'erc-channel-key) | ||
| 1838 | 1824 | ||
| 1839 | (defvar erc-invitation nil | 1825 | (defvar-local erc-invitation nil |
| 1840 | "Last invitation channel.") | 1826 | "Last invitation channel.") |
| 1841 | (make-variable-buffer-local 'erc-invitation) | ||
| 1842 | 1827 | ||
| 1843 | (defvar erc-away nil | 1828 | (defvar-local erc-away nil |
| 1844 | "Non-nil indicates that we are away. | 1829 | "Non-nil indicates that we are away. |
| 1845 | 1830 | ||
| 1846 | Use `erc-away-time' to access this if you might be in a channel | 1831 | Use `erc-away-time' to access this if you might be in a channel |
| 1847 | buffer rather than a server buffer.") | 1832 | buffer rather than a server buffer.") |
| 1848 | (make-variable-buffer-local 'erc-away) | ||
| 1849 | 1833 | ||
| 1850 | (defvar erc-channel-list nil | 1834 | (defvar-local erc-channel-list nil |
| 1851 | "Server channel list.") | 1835 | "Server channel list.") |
| 1852 | (make-variable-buffer-local 'erc-channel-list) | ||
| 1853 | 1836 | ||
| 1854 | (defvar erc-bad-nick nil | 1837 | (defvar-local erc-bad-nick nil |
| 1855 | "Non-nil indicates that we got a `nick in use' error while connecting.") | 1838 | "Non-nil indicates that we got a `nick in use' error while connecting.") |
| 1856 | (make-variable-buffer-local 'erc-bad-nick) | ||
| 1857 | 1839 | ||
| 1858 | (defvar erc-logged-in nil | 1840 | (defvar-local erc-logged-in nil |
| 1859 | "Non-nil indicates that we are logged in.") | 1841 | "Non-nil indicates that we are logged in.") |
| 1860 | (make-variable-buffer-local 'erc-logged-in) | ||
| 1861 | 1842 | ||
| 1862 | (defvar erc-default-nicks nil | 1843 | (defvar-local erc-default-nicks nil |
| 1863 | "The local copy of `erc-nick' - the list of nicks to choose from.") | 1844 | "The local copy of `erc-nick' - the list of nicks to choose from.") |
| 1864 | (make-variable-buffer-local 'erc-default-nicks) | ||
| 1865 | 1845 | ||
| 1866 | (defvar erc-nick-change-attempt-count 0 | 1846 | (defvar-local erc-nick-change-attempt-count 0 |
| 1867 | "Used to keep track of how many times an attempt at changing nick is made.") | 1847 | "Used to keep track of how many times an attempt at changing nick is made.") |
| 1868 | (make-variable-buffer-local 'erc-nick-change-attempt-count) | ||
| 1869 | 1848 | ||
| 1870 | (defun erc-migrate-modules (mods) | 1849 | (defun erc-migrate-modules (mods) |
| 1871 | "Migrate old names of ERC modules to new ones." | 1850 | "Migrate old names of ERC modules to new ones." |
| @@ -2764,8 +2743,7 @@ present." | |||
| 2764 | (let ((prop-val (erc-get-parsed-vector position))) | 2743 | (let ((prop-val (erc-get-parsed-vector position))) |
| 2765 | (and prop-val (member (erc-response.command prop-val) list)))) | 2744 | (and prop-val (member (erc-response.command prop-val) list)))) |
| 2766 | 2745 | ||
| 2767 | (defvar erc-send-input-line-function 'erc-send-input-line) | 2746 | (defvar-local erc-send-input-line-function 'erc-send-input-line) |
| 2768 | (make-variable-buffer-local 'erc-send-input-line-function) | ||
| 2769 | 2747 | ||
| 2770 | (defun erc-send-input-line (target line &optional force) | 2748 | (defun erc-send-input-line (target line &optional force) |
| 2771 | "Send LINE to TARGET. | 2749 | "Send LINE to TARGET. |
| @@ -3181,12 +3159,11 @@ were most recently invited. See also `invitation'." | |||
| 3181 | (defalias 'erc-cmd-CHANNEL 'erc-cmd-JOIN) | 3159 | (defalias 'erc-cmd-CHANNEL 'erc-cmd-JOIN) |
| 3182 | (defalias 'erc-cmd-J 'erc-cmd-JOIN) | 3160 | (defalias 'erc-cmd-J 'erc-cmd-JOIN) |
| 3183 | 3161 | ||
| 3184 | (defvar erc-channel-new-member-names nil | 3162 | (defvar-local erc-channel-new-member-names nil |
| 3185 | "If non-nil, a names list is currently being received. | 3163 | "If non-nil, a names list is currently being received. |
| 3186 | 3164 | ||
| 3187 | If non-nil, this variable is a hash-table that associates | 3165 | If non-nil, this variable is a hash-table that associates |
| 3188 | received nicks with t.") | 3166 | received nicks with t.") |
| 3189 | (make-variable-buffer-local 'erc-channel-new-member-names) | ||
| 3190 | 3167 | ||
| 3191 | (defun erc-cmd-NAMES (&optional channel) | 3168 | (defun erc-cmd-NAMES (&optional channel) |
| 3192 | "Display the users in CHANNEL. | 3169 | "Display the users in CHANNEL. |
| @@ -3833,7 +3810,7 @@ If CHANNEL is not specified, clear the topic for the default channel." | |||
| 3833 | 3810 | ||
| 3834 | ;;; Banlists | 3811 | ;;; Banlists |
| 3835 | 3812 | ||
| 3836 | (defvar erc-channel-banlist nil | 3813 | (defvar-local erc-channel-banlist nil |
| 3837 | "A list of bans seen for the current channel. | 3814 | "A list of bans seen for the current channel. |
| 3838 | 3815 | ||
| 3839 | Each ban is an alist of the form: | 3816 | Each ban is an alist of the form: |
| @@ -3841,7 +3818,6 @@ Each ban is an alist of the form: | |||
| 3841 | 3818 | ||
| 3842 | The property `received-from-server' indicates whether | 3819 | The property `received-from-server' indicates whether |
| 3843 | or not the ban list has been requested from the server.") | 3820 | or not the ban list has been requested from the server.") |
| 3844 | (make-variable-buffer-local 'erc-channel-banlist) | ||
| 3845 | (put 'erc-channel-banlist 'received-from-server nil) | 3821 | (put 'erc-channel-banlist 'received-from-server nil) |
| 3846 | 3822 | ||
| 3847 | (defun erc-cmd-BANLIST () | 3823 | (defun erc-cmd-BANLIST () |
| @@ -6783,8 +6759,7 @@ functions." | |||
| 6783 | ""))))) | 6759 | ""))))) |
| 6784 | 6760 | ||
| 6785 | 6761 | ||
| 6786 | (defvar erc-current-message-catalog 'english) | 6762 | (defvar-local erc-current-message-catalog 'english) |
| 6787 | (make-variable-buffer-local 'erc-current-message-catalog) | ||
| 6788 | 6763 | ||
| 6789 | (defun erc-retrieve-catalog-entry (entry &optional catalog) | 6764 | (defun erc-retrieve-catalog-entry (entry &optional catalog) |
| 6790 | "Retrieve ENTRY from CATALOG. | 6765 | "Retrieve ENTRY from CATALOG. |