diff options
| author | Eric Abrahamsen | 2019-07-03 12:53:43 -0700 |
|---|---|---|
| committer | Eric Abrahamsen | 2019-07-03 12:56:00 -0700 |
| commit | 619592df9ed4d54a63f653bf6912ecc44f46dc59 (patch) | |
| tree | 876cb55a354fd072289f28ea9695d1dfc0a884eb | |
| parent | 22760ab357dd8124c856b76a545e562917872d78 (diff) | |
| download | emacs-619592df9ed4d54a63f653bf6912ecc44f46dc59.tar.gz emacs-619592df9ed4d54a63f653bf6912ecc44f46dc59.zip | |
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
instead.
| -rw-r--r-- | lisp/gnus/gnus-start.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 85aefe0f5f6..d726ee5aaba 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el | |||
| @@ -1271,15 +1271,15 @@ string name) to insert this group after." | |||
| 1271 | (consp entry)) | 1271 | (consp entry)) |
| 1272 | (setq oldlevel (gnus-info-level (nth 1 entry))) | 1272 | (setq oldlevel (gnus-info-level (nth 1 entry))) |
| 1273 | (setq oldlevel (or oldlevel gnus-level-killed))) | 1273 | (setq oldlevel (or oldlevel gnus-level-killed))) |
| 1274 | (when (stringp previous) | ||
| 1275 | (setq previous (gnus-group-entry previous))) | ||
| 1276 | ;; Group is already subscribed. | 1274 | ;; Group is already subscribed. |
| 1277 | (unless (and (>= oldlevel gnus-level-zombie) | 1275 | (unless (and (>= oldlevel gnus-level-zombie) |
| 1278 | (gnus-group-entry group)) | 1276 | (gnus-group-entry group)) |
| 1279 | (unless (gnus-ephemeral-group-p group) | 1277 | (unless (gnus-ephemeral-group-p group) |
| 1280 | (gnus-dribble-enter | 1278 | (gnus-dribble-enter |
| 1281 | (format "(gnus-group-change-level %S %S %S %S %S)" | 1279 | (format "(gnus-group-change-level %S %S %S %S %S)" |
| 1282 | group level oldlevel previous fromkilled))) | 1280 | group level oldlevel |
| 1281 | (cadr (member previous gnus-group-list)) | ||
| 1282 | fromkilled))) | ||
| 1283 | 1283 | ||
| 1284 | ;; Then we remove the newgroup from any old structures, if needed. | 1284 | ;; Then we remove the newgroup from any old structures, if needed. |
| 1285 | ;; If the group was killed, we remove it from the killed or zombie | 1285 | ;; If the group was killed, we remove it from the killed or zombie |
| @@ -1341,6 +1341,8 @@ string name) to insert this group after." | |||
| 1341 | ;; at the head of `gnus-newsrc-alist'. | 1341 | ;; at the head of `gnus-newsrc-alist'. |
| 1342 | (push info (cdr gnus-newsrc-alist)) | 1342 | (push info (cdr gnus-newsrc-alist)) |
| 1343 | (puthash group (list num info) gnus-newsrc-hashtb) | 1343 | (puthash group (list num info) gnus-newsrc-hashtb) |
| 1344 | (when (stringp previous) | ||
| 1345 | (setq previous (gnus-group-entry previous))) | ||
| 1344 | (let* ((prev-idx (seq-position gnus-group-list (caadr previous))) | 1346 | (let* ((prev-idx (seq-position gnus-group-list (caadr previous))) |
| 1345 | (idx (if prev-idx | 1347 | (idx (if prev-idx |
| 1346 | (1+ prev-idx) | 1348 | (1+ prev-idx) |