aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKelvin White2014-10-03 07:08:37 -0400
committerKelvin White2014-10-03 07:08:37 -0400
commitefb615a7115d8cb1980e149da8d00ab627e639a1 (patch)
tree12fa098cf66d5874efa329dd307bcad1791d0980
parent955d5d047d1e15546bd9c548c0b966cb73300144 (diff)
downloademacs-efb615a7115d8cb1980e149da8d00ab627e639a1.tar.gz
emacs-efb615a7115d8cb1980e149da8d00ab627e639a1.zip
erc.el (erc-rename-buffers): Use defcustom instead of defvar.
-rw-r--r--lisp/erc/ChangeLog5
-rw-r--r--lisp/erc/erc.el11
2 files changed, 11 insertions, 5 deletions
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 1ebef32f324..300bcfc74da 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,8 @@
12014-10-03 Kelvin White <kwhite@gnu.org>
2
3 * erc.el (erc-rename-buffers): Use defcustom instead of defvar for
4 buffer renaming configuration option.
5
12014-10-02 Paul Eggert <eggert@cs.ucla.edu> 62014-10-02 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 * erc.el (erc-nick-at-point): Fix format-string typo (Bug#17755). 8 * erc.el (erc-nick-at-point): Fix format-string typo (Bug#17755).
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index c916aea6954..2825481c2a1 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -196,6 +196,11 @@ parameters and authentication."
196 :set (lambda (sym val) 196 :set (lambda (sym val)
197 (set sym (if (functionp val) (funcall val) val)))) 197 (set sym (if (functionp val) (funcall val) val))))
198 198
199(defcustom erc-rename-buffers nil
200 "When this is set to t, buffers will be renamed to network name if available"
201 :group 'erc
202 :type 'boolean)
203
199(defvar erc-password nil 204(defvar erc-password nil
200 "Password to use when authenticating to an IRC server. 205 "Password to use when authenticating to an IRC server.
201It is not strictly necessary to provide this, since ERC will 206It is not strictly necessary to provide this, since ERC will
@@ -1792,10 +1797,6 @@ buffer rather than a server buffer.")
1792 "Used to keep track of how many times an attempt at changing nick is made.") 1797 "Used to keep track of how many times an attempt at changing nick is made.")
1793(make-variable-buffer-local 'erc-nick-change-attempt-count) 1798(make-variable-buffer-local 'erc-nick-change-attempt-count)
1794 1799
1795(defvar erc-rename-buffer-p nil
1796 "When this is set to t, buffers will be renamed to network name if available")
1797(make-variable-buffer-local 'erc-rename-buffer-p)
1798
1799(defun erc-migrate-modules (mods) 1800(defun erc-migrate-modules (mods)
1800 "Migrate old names of ERC modules to new ones." 1801 "Migrate old names of ERC modules to new ones."
1801 ;; modify `transforms' to specify what needs to be changed 1802 ;; modify `transforms' to specify what needs to be changed
@@ -6231,7 +6232,7 @@ shortened server name instead."
6231 "@" network-name)) 6232 "@" network-name))
6232 ((and network-name 6233 ((and network-name
6233 (not (get-buffer network-name))) 6234 (not (get-buffer network-name)))
6234 (when erc-rename-buffer-p 6235 (when erc-rename-buffers
6235 (rename-buffer network-name)) 6236 (rename-buffer network-name))
6236 network-name) 6237 network-name)
6237 (t (buffer-name (current-buffer)))))) 6238 (t (buffer-name (current-buffer))))))