diff lisp/erc/erc-spelling.el @ 68814:fe9073ac802e

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-73 Creator: Michael Olson <mwolson@gnu.org> Merge from erc--emacs--0
author Miles Bader <miles@gnu.org>
date Sun, 12 Feb 2006 12:02:53 +0000
parents 86c478cccc57
children 7010bb070445
line wrap: on
line diff
--- a/lisp/erc/erc-spelling.el	Sun Feb 12 00:29:59 2006 +0000
+++ b/lisp/erc/erc-spelling.el	Sun Feb 12 12:02:53 2006 +0000
@@ -41,11 +41,13 @@
   ;; called AFTER the server buffer is initialized.
   ((add-hook 'erc-connect-pre-hook 'erc-spelling-init)
    (mapc (lambda (buffer)
-           (with-current-buffer buffer (erc-spelling-init)))
+           (when buffer
+             (with-current-buffer buffer (erc-spelling-init))))
          (erc-buffer-list)))
   ((remove-hook 'erc-connect-pre-hook 'erc-spelling-init)
    (mapc (lambda (buffer)
-           (with-current-buffer buffer (flyspell-mode 0)))
+           (when buffer
+             (with-current-buffer buffer (flyspell-mode 0))))
          (erc-buffer-list))))
 
 (defcustom erc-spelling-dictionaries nil