Remove gnus-group-highlight-line from the default hook list
[gnus] / lisp / gnus-srvr.el
index 2b6f12e..2966212 100644 (file)
@@ -1,17 +1,17 @@
 ;;; gnus-srvr.el --- virtual server support for Gnus
 
 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-;;   2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;;   2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,9 +19,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
@@ -179,6 +177,7 @@ If nil, a faster, but more primitive, buffer is used instead."
   :group 'gnus-server-visual)
 ;; backward-compatibility alias
 (put 'gnus-server-agent-face 'face-alias 'gnus-server-agent)
+(put 'gnus-server-agent-face 'obsolete-face "22.1")
 
 (defface gnus-server-opened
   '((((class color) (background light)) (:foreground "Green3" :bold t))
@@ -188,6 +187,7 @@ If nil, a faster, but more primitive, buffer is used instead."
   :group 'gnus-server-visual)
 ;; backward-compatibility alias
 (put 'gnus-server-opened-face 'face-alias 'gnus-server-opened)
+(put 'gnus-server-opened-face 'obsolete-face "22.1")
 
 (defface gnus-server-closed
   '((((class color) (background light)) (:foreground "Steel Blue" :italic t))
@@ -198,6 +198,7 @@ If nil, a faster, but more primitive, buffer is used instead."
   :group 'gnus-server-visual)
 ;; backward-compatibility alias
 (put 'gnus-server-closed-face 'face-alias 'gnus-server-closed)
+(put 'gnus-server-closed-face 'obsolete-face "22.1")
 
 (defface gnus-server-denied
   '((((class color) (background light)) (:foreground "Red" :bold t))
@@ -207,6 +208,7 @@ If nil, a faster, but more primitive, buffer is used instead."
   :group 'gnus-server-visual)
 ;; backward-compatibility alias
 (put 'gnus-server-denied-face 'face-alias 'gnus-server-denied)
+(put 'gnus-server-denied-face 'obsolete-face "22.1")
 
 (defface gnus-server-offline
   '((((class color) (background light)) (:foreground "Orange" :bold t))
@@ -216,6 +218,7 @@ If nil, a faster, but more primitive, buffer is used instead."
   :group 'gnus-server-visual)
 ;; backward-compatibility alias
 (put 'gnus-server-offline-face 'face-alias 'gnus-server-offline)
+(put 'gnus-server-offline-face 'obsolete-face "22.1")
 
 (defvar gnus-server-font-lock-keywords
   '(("(\\(agent\\))" 1 'gnus-server-agent)
@@ -280,19 +283,23 @@ The following commands are available:
        ;; Insert the text.
        (eval gnus-server-line-format-spec))
      (list 'gnus-server (intern gnus-tmp-name)
-           'gnus-named-server (intern (gnus-method-to-server method))))))
+           'gnus-named-server (intern (gnus-method-to-server method t))))))
 
 (defun gnus-enter-server-buffer ()
   "Set up the server buffer."
   (gnus-server-setup-buffer)
   (gnus-configure-windows 'server)
-  (gnus-server-prepare))
+  ;; Usually `gnus-configure-windows' will finish with the
+  ;; `gnus-server-buffer' selected as the current buffer, but not always (I
+  ;; bumped into it when starting from a dedicated *Group* frame, and
+  ;; gnus-configure-windows opened *Server* into its own dedicated frame).
+  (with-current-buffer (get-buffer gnus-server-buffer)
+    (gnus-server-prepare)))
 
 (defun gnus-server-setup-buffer ()
   "Initialize the server buffer."
   (unless (get-buffer gnus-server-buffer)
-    (save-excursion
-      (set-buffer (gnus-get-buffer-create gnus-server-buffer))
+    (with-current-buffer (gnus-get-buffer-create gnus-server-buffer)
       (gnus-server-mode)