aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Steingold2012-12-12 09:46:58 -0500
committerSam Steingold2012-12-12 09:46:58 -0500
commitd0efe6ec5bc90a206c194a429e6cdfd86a8fb3d5 (patch)
treeb0ecab638ff90ff87a79f29bda82a7f76da4b9e7
parent37f38bca1dbcce25b4f41928a249ecf937d795ff (diff)
downloademacs-d0efe6ec5bc90a206c194a429e6cdfd86a8fb3d5.tar.gz
emacs-d0efe6ec5bc90a206c194a429e6cdfd86a8fb3d5.zip
* lisp/gnus/gnus.el (gnus-other-frame-resume-function): Add user option.
(gnus-other-frame): Call `gnus-other-frame-resume-function' on resume.
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/gnus.el18
2 files changed, 19 insertions, 4 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 2d2d9318bd6..565096b6289 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
12012-12-12 Sam Steingold <sds@gnu.org>
2
3 * gnus.el (gnus-other-frame-resume-function): Add user option.
4 (gnus-other-frame): Call `gnus-other-frame-resume-function' on resume.
5
12012-12-06 Sam Steingold <sds@gnu.org> 62012-12-06 Sam Steingold <sds@gnu.org>
2 7
3 * gnus-start.el (gnus-before-resume-hook): Add. 8 * gnus-start.el (gnus-before-resume-hook): Add.
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 70e7f711f3d..753c5fb473e 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -2495,7 +2495,15 @@ Disabling the agent may result in noticeable loss of performance."
2495 :type 'boolean) 2495 :type 'boolean)
2496 2496
2497(defcustom gnus-other-frame-function 'gnus 2497(defcustom gnus-other-frame-function 'gnus
2498 "Function called by the command `gnus-other-frame'." 2498 "Function called by the command `gnus-other-frame' when starting Gnus."
2499 :group 'gnus-start
2500 :type '(choice (function-item gnus)
2501 (function-item gnus-no-server)
2502 (function-item gnus-slave)
2503 (function-item gnus-slave-no-server)))
2504
2505(defcustom gnus-other-frame-resume-function 'gnus-group-get-new-news
2506 "Function called by the command `gnus-other-frame' when resuming Gnus."
2499 :group 'gnus-start 2507 :group 'gnus-start
2500 :type '(choice (function-item gnus) 2508 :type '(choice (function-item gnus)
2501 (function-item gnus-no-server) 2509 (function-item gnus-no-server)
@@ -4361,8 +4369,9 @@ Used for `gnus-exit-gnus-hook' in `gnus-other-frame'."
4361 "Pop up a frame to read news. 4369 "Pop up a frame to read news.
4362This will call one of the Gnus commands which is specified by the user 4370This will call one of the Gnus commands which is specified by the user
4363option `gnus-other-frame-function' (default `gnus') with the argument 4371option `gnus-other-frame-function' (default `gnus') with the argument
4364ARG if Gnus is not running, otherwise just pop up a Gnus frame. The 4372ARG if Gnus is not running, otherwise pop up a Gnus frame and run the
4365optional second argument DISPLAY should be a standard display string 4373command specified by `gnus-other-frame-resume-function'.
4374The optional second argument DISPLAY should be a standard display string
4366such as \"unix:0\" to specify where to pop up a frame. If DISPLAY is 4375such as \"unix:0\" to specify where to pop up a frame. If DISPLAY is
4367omitted or the function `make-frame-on-display' is not available, the 4376omitted or the function `make-frame-on-display' is not available, the
4368current display is used." 4377current display is used."
@@ -4394,7 +4403,8 @@ current display is used."
4394 (make-frame-on-display display gnus-other-frame-parameters) 4403 (make-frame-on-display display gnus-other-frame-parameters)
4395 (make-frame gnus-other-frame-parameters)))) 4404 (make-frame gnus-other-frame-parameters))))
4396 (if alive 4405 (if alive
4397 (switch-to-buffer gnus-group-buffer) 4406 (progn (switch-to-buffer gnus-group-buffer)
4407 (funcall gnus-other-frame-resume-function arg))
4398 (funcall gnus-other-frame-function arg) 4408 (funcall gnus-other-frame-function arg)
4399 (add-hook 'gnus-exit-gnus-hook 'gnus-delete-gnus-frame) 4409 (add-hook 'gnus-exit-gnus-hook 'gnus-delete-gnus-frame)
4400 ;; One might argue that `gnus-delete-gnus-frame' should not be called 4410 ;; One might argue that `gnus-delete-gnus-frame' should not be called