]> git.eshelyaron.com Git - emacs.git/commitdiff
Small fix to writing Gnus dribble change-level entries
authorEric Abrahamsen <eric@ericabrahamsen.net>
Wed, 3 Jul 2019 19:53:43 +0000 (12:53 -0700)
committerEric Abrahamsen <eric@ericabrahamsen.net>
Wed, 3 Jul 2019 19:56:00 +0000 (12:56 -0700)
* 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
  instead.

lisp/gnus/gnus-start.el

index 85aefe0f5f681ade311222e3a81e8214c2ceb685..d726ee5aabae64224b4a29b918866324de3b1eed 100644 (file)
@@ -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)
        (gnus-dribble-enter
         (format "(gnus-group-change-level %S %S %S %S %S)"
-                group level oldlevel previous fromkilled)))
+                group level oldlevel
+                (cadr (member previous gnus-group-list))
+                fromkilled)))
 
       ;; 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)