diff options
| author | Eric Abrahamsen | 2019-08-03 14:43:44 -0700 |
|---|---|---|
| committer | Eric Abrahamsen | 2019-08-03 14:43:44 -0700 |
| commit | c6b4eed80ae3529ada01ca6a5ef5d5b196e97bde (patch) | |
| tree | ac0083bdb77d3759276dc4a39333317b130db14b | |
| parent | da03988dd41e08060670d16b0e1db3ee4118d713 (diff) | |
| download | emacs-c6b4eed80ae3529ada01ca6a5ef5d5b196e97bde.tar.gz emacs-c6b4eed80ae3529ada01ca6a5ef5d5b196e97bde.zip | |
Fix ordering of Gnus groups after yanking
* lisp/gnus/gnus-start.el (gnus-group-change-level): Fix docstring to
note that the inserted group is inserted *before* the PREVIOUS
group. Fix indexing -- shouldn't have been adding one to the index.
| -rw-r--r-- | lisp/gnus/gnus-start.el | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index d726ee5aaba..0f91c4d9b4e 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el | |||
| @@ -1257,7 +1257,7 @@ or a list (if FROMKILLED is t, it's a list on the format (NUM | |||
| 1257 | INFO-LIST), otherwise it's a list in the format of the | 1257 | INFO-LIST), otherwise it's a list in the format of the |
| 1258 | `gnus-newsrc-hashtb' entries. LEVEL is the new level of the | 1258 | `gnus-newsrc-hashtb' entries. LEVEL is the new level of the |
| 1259 | group, OLDLEVEL is the old level and PREVIOUS is the group (a | 1259 | group, OLDLEVEL is the old level and PREVIOUS is the group (a |
| 1260 | string name) to insert this group after." | 1260 | string name) to insert this group before." |
| 1261 | (let (group info active num) | 1261 | (let (group info active num) |
| 1262 | ;; Glean what info we can from the arguments. | 1262 | ;; Glean what info we can from the arguments. |
| 1263 | (if (consp entry) | 1263 | (if (consp entry) |
| @@ -1343,10 +1343,8 @@ string name) to insert this group after." | |||
| 1343 | (puthash group (list num info) gnus-newsrc-hashtb) | 1343 | (puthash group (list num info) gnus-newsrc-hashtb) |
| 1344 | (when (stringp previous) | 1344 | (when (stringp previous) |
| 1345 | (setq previous (gnus-group-entry previous))) | 1345 | (setq previous (gnus-group-entry previous))) |
| 1346 | (let* ((prev-idx (seq-position gnus-group-list (caadr previous))) | 1346 | (let ((idx (or (seq-position gnus-group-list (caadr previous)) |
| 1347 | (idx (if prev-idx | 1347 | (length gnus-group-list)))) |
| 1348 | (1+ prev-idx) | ||
| 1349 | (length gnus-group-list)))) | ||
| 1350 | (push group (nthcdr idx gnus-group-list))) | 1348 | (push group (nthcdr idx gnus-group-list))) |
| 1351 | (gnus-dribble-enter | 1349 | (gnus-dribble-enter |
| 1352 | (format "(gnus-group-set-info '%S)" info) | 1350 | (format "(gnus-group-set-info '%S)" info) |