Commit 619592df authored by Eric Abrahamsen's avatar Eric Abrahamsen

Small fix to writing Gnus dribble change-level entries

* lisp/gnus/gnus-start.el (gnus-group-change-level): PREVIOUS needs to
  still be a string when the dribble entry is written, so don't
  convert it to an entry until after that's done. Also, we're not
  meant to write PREVIOUS itself, we're meant to write the group that
  comes _after_ it in the sort-order of gnus-group-list, so do that
parent 22760ab3
Pipeline #2239 failed with stage
in 51 minutes and 32 seconds
......@@ -1271,15 +1271,15 @@ string name) to insert this group after."
(consp entry))
(setq oldlevel (gnus-info-level (nth 1 entry)))
(setq oldlevel (or oldlevel gnus-level-killed)))
(when (stringp previous)
(setq previous (gnus-group-entry previous)))
;; Group is already subscribed.
(unless (and (>= oldlevel gnus-level-zombie)
(gnus-group-entry group))
(unless (gnus-ephemeral-group-p group)
(format "(gnus-group-change-level %S %S %S %S %S)"
group level oldlevel previous fromkilled)))
group level oldlevel
(cadr (member previous gnus-group-list))
;; Then we remove the newgroup from any old structures, if needed.
;; If the group was killed, we remove it from the killed or zombie
......@@ -1341,6 +1341,8 @@ string name) to insert this group after."
;; at the head of `gnus-newsrc-alist'.
(push info (cdr gnus-newsrc-alist))
(puthash group (list num info) gnus-newsrc-hashtb)
(when (stringp previous)
(setq previous (gnus-group-entry previous)))
(let* ((prev-idx (seq-position gnus-group-list (caadr previous)))
(idx (if prev-idx
(1+ prev-idx)
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