diff options
| -rw-r--r-- | lisp/gnus/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/gnus/gnus.el | 18 |
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 @@ | |||
| 1 | 2012-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 | |||
| 1 | 2012-12-06 Sam Steingold <sds@gnu.org> | 6 | 2012-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. |
| 4362 | This will call one of the Gnus commands which is specified by the user | 4370 | This will call one of the Gnus commands which is specified by the user |
| 4363 | option `gnus-other-frame-function' (default `gnus') with the argument | 4371 | option `gnus-other-frame-function' (default `gnus') with the argument |
| 4364 | ARG if Gnus is not running, otherwise just pop up a Gnus frame. The | 4372 | ARG if Gnus is not running, otherwise pop up a Gnus frame and run the |
| 4365 | optional second argument DISPLAY should be a standard display string | 4373 | command specified by `gnus-other-frame-resume-function'. |
| 4374 | The optional second argument DISPLAY should be a standard display string | ||
| 4366 | such as \"unix:0\" to specify where to pop up a frame. If DISPLAY is | 4375 | such as \"unix:0\" to specify where to pop up a frame. If DISPLAY is |
| 4367 | omitted or the function `make-frame-on-display' is not available, the | 4376 | omitted or the function `make-frame-on-display' is not available, the |
| 4368 | current display is used." | 4377 | current 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 |