Commit 88215d24 authored by Eric Abrahamsen's avatar Eric Abrahamsen

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.
parent 3a1d7227
Pipeline #336 failed with stage
in 3 seconds
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment