]> code.delx.au - gnu-emacs/commitdiff
* lisp/gnus/gnus.el (gnus-other-frame-resume-function): Add user option.
authorSam Steingold <sds@gnu.org>
Wed, 12 Dec 2012 14:46:58 +0000 (09:46 -0500)
committerSam Steingold <sds@gnu.org>
Wed, 12 Dec 2012 14:46:58 +0000 (09:46 -0500)
(gnus-other-frame): Call `gnus-other-frame-resume-function' on resume.

lisp/gnus/ChangeLog
lisp/gnus/gnus.el

index 2d2d9318bd6d5831282c88ca8418d5264647539f..565096b628936c59961e8bf585757e1d0fa1426e 100644 (file)
@@ -1,3 +1,8 @@
+2012-12-12  Sam Steingold  <sds@gnu.org>
+
+       * gnus.el (gnus-other-frame-resume-function): Add user option.
+       (gnus-other-frame): Call `gnus-other-frame-resume-function' on resume.
+
 2012-12-06  Sam Steingold  <sds@gnu.org>
 
        * gnus-start.el (gnus-before-resume-hook): Add.
index 70e7f711f3d426d8e61fdb31007011111d81764f..753c5fb473ea8cffd651eb6b9a9cf1db6c370209 100644 (file)
@@ -2495,7 +2495,15 @@ Disabling the agent may result in noticeable loss of performance."
   :type 'boolean)
 
 (defcustom gnus-other-frame-function 'gnus
-  "Function called by the command `gnus-other-frame'."
+  "Function called by the command `gnus-other-frame' when starting Gnus."
+  :group 'gnus-start
+  :type '(choice (function-item gnus)
+                (function-item gnus-no-server)
+                (function-item gnus-slave)
+                (function-item gnus-slave-no-server)))
+
+(defcustom gnus-other-frame-resume-function 'gnus-group-get-new-news
+  "Function called by the command `gnus-other-frame' when resuming Gnus."
   :group 'gnus-start
   :type '(choice (function-item gnus)
                 (function-item gnus-no-server)
@@ -4361,8 +4369,9 @@ Used for `gnus-exit-gnus-hook' in `gnus-other-frame'."
   "Pop up a frame to read news.
 This will call one of the Gnus commands which is specified by the user
 option `gnus-other-frame-function' (default `gnus') with the argument
-ARG if Gnus is not running, otherwise just pop up a Gnus frame.  The
-optional second argument DISPLAY should be a standard display string
+ARG if Gnus is not running, otherwise pop up a Gnus frame and run the
+command specified by `gnus-other-frame-resume-function'.
+The optional second argument DISPLAY should be a standard display string
 such as \"unix:0\" to specify where to pop up a frame.  If DISPLAY is
 omitted or the function `make-frame-on-display' is not available, the
 current display is used."
@@ -4394,7 +4403,8 @@ current display is used."
                 (make-frame-on-display display gnus-other-frame-parameters)
               (make-frame gnus-other-frame-parameters))))
       (if alive
-         (switch-to-buffer gnus-group-buffer)
+         (progn (switch-to-buffer gnus-group-buffer)
+           (funcall gnus-other-frame-resume-function arg))
        (funcall gnus-other-frame-function arg)
        (add-hook 'gnus-exit-gnus-hook 'gnus-delete-gnus-frame)
   ;; One might argue that `gnus-delete-gnus-frame' should not be called