summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-sum.el
diff options
context:
space:
mode:
authorEric Abrahamsen <eric@ericabrahamsen.net>2018-12-19 14:11:14 -0800
committerEric Abrahamsen <eric@ericabrahamsen.net>2018-12-19 14:11:14 -0800
commit88215d242f9a1741ae8b30298633c901932e4c8f (patch)
tree827397c4e4fb60e63f720b7ec7b309cc3e30b24e /lisp/gnus/gnus-sum.el
parent3a1d7227c24f59668dd0ed24527485d4010de2cb (diff)
downloademacs-88215d242f9a1741ae8b30298633c901932e4c8f.tar.gz
Make gnus-newsgroup-name local var available to gnus-summary-mode
* lisp/gnus/gnus-sum.el (gnus-summary-mode-group): New defvar for passing gnus-newsgroup-name (a local variable) into the body of gnus-summary-mode, so that it's available to gnus-summary-mode-hook.
Diffstat (limited to 'lisp/gnus/gnus-sum.el')
-rw-r--r--lisp/gnus/gnus-sum.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 3f5362ba17a..267b367ffff 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -3064,6 +3064,7 @@ The following commands are available:
(let ((gnus-summary-local-variables gnus-newsgroup-variables))
(gnus-summary-make-local-variables))
(gnus-summary-make-local-variables)
+ (setq gnus-newsgroup-name gnus-summary-mode-group)
(when (gnus-visual-p 'summary-menu 'menu)
(gnus-summary-make-menu-bar)
(gnus-summary-make-tool-bar))
@@ -3457,6 +3458,11 @@ display only a single character."
(point)
(current-buffer))))))
+(defvar gnus-summary-mode-group nil
+ "Variable for communication with `gnus-summary-mode'.
+Allows the `gnus-newsgroup-name' local variable to be set before
+the summary mode hooks are run.")
+
(defun gnus-summary-setup-buffer (group)
"Initialize summary buffer for GROUP.
This function does all setup work that relies on the specific
@@ -3476,10 +3482,10 @@ Returns non-nil if the setup was successful."
(not gnus-newsgroup-prepared))
(set-buffer (gnus-get-buffer-create buffer))
(setq gnus-summary-buffer (current-buffer))
- (gnus-summary-mode)
+ (let ((gnus-summary-mode-group group))
+ (gnus-summary-mode))
(when (gnus-group-quit-config group)
(set (make-local-variable 'gnus-single-article-buffer) nil))
- (setq gnus-newsgroup-name group)
(turn-on-gnus-mailing-list-mode)
;; These functions don't currently depend on GROUP, but might in
;; the future.