]> git.eshelyaron.com Git - emacs.git/commitdiff
erc.el (erc-rename-buffers): Use defcustom instead of defvar.
authorKelvin White <kwhite@gnu.org>
Fri, 3 Oct 2014 11:08:37 +0000 (07:08 -0400)
committerKelvin White <kwhite@gnu.org>
Fri, 3 Oct 2014 11:08:37 +0000 (07:08 -0400)
lisp/erc/ChangeLog
lisp/erc/erc.el

index 1ebef32f324041830f68c8e427b3c048edcf3312..300bcfc74da3c171a4fe7710c8e4e053ac53f34f 100644 (file)
@@ -1,3 +1,8 @@
+2014-10-03  Kelvin White  <kwhite@gnu.org>
+
+       * erc.el (erc-rename-buffers): Use defcustom instead of defvar for
+       buffer renaming configuration option.
+
 2014-10-02  Paul Eggert  <eggert@cs.ucla.edu>
 
        * erc.el (erc-nick-at-point): Fix format-string typo (Bug#17755).
index c916aea6954a6966610ddcdc5370c100cfd9b0e0..2825481c2a1d58081288d5ac0acd936cf1915076 100644 (file)
@@ -196,6 +196,11 @@ parameters and authentication."
   :set (lambda (sym val)
          (set sym (if (functionp val) (funcall val) val))))
 
+(defcustom erc-rename-buffers nil
+  "When this is set to t, buffers will be renamed to network name if available"
+  :group 'erc
+  :type 'boolean)
+
 (defvar erc-password nil
   "Password to use when authenticating to an IRC server.
 It is not strictly necessary to provide this, since ERC will
@@ -1792,10 +1797,6 @@ buffer rather than a server buffer.")
   "Used to keep track of how many times an attempt at changing nick is made.")
 (make-variable-buffer-local 'erc-nick-change-attempt-count)
 
-(defvar erc-rename-buffer-p nil
-  "When this is set to t, buffers will be renamed to network name if available")
-(make-variable-buffer-local 'erc-rename-buffer-p)
-
 (defun erc-migrate-modules (mods)
   "Migrate old names of ERC modules to new ones."
   ;; modify `transforms' to specify what needs to be changed
@@ -6231,7 +6232,7 @@ shortened server name instead."
                    "@" network-name))
           ((and network-name
                 (not (get-buffer network-name)))
-           (when erc-rename-buffer-p
+           (when erc-rename-buffers
             (rename-buffer network-name))
            network-name)
           (t (buffer-name (current-buffer))))))