diff options
| author | Stefan Monnier | 2020-01-04 18:07:23 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2020-01-04 18:07:23 -0500 |
| commit | 5669878d7fb9e8080f408ae66e657e28e059cf4c (patch) | |
| tree | 6221c4072235c8c244ab4d264c63f136895cda9d | |
| parent | add2b2da72babbc72134775499e14fc65da9bd44 (diff) | |
| download | emacs-5669878d7fb9e8080f408ae66e657e28e059cf4c.tar.gz emacs-5669878d7fb9e8080f408ae66e657e28e059cf4c.zip | |
* lisp/gnus/gnus-start.el (gnus-group-change-level): Simplify
* lisp/gnus/gnus-group.el (gnus-group-unsubscribe-group): Simplify.
| -rw-r--r-- | lisp/gnus/gnus-group.el | 10 | ||||
| -rw-r--r-- | lisp/gnus/gnus-start.el | 18 |
2 files changed, 14 insertions, 14 deletions
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index b89f040b435..da7db589ec3 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -3761,10 +3761,10 @@ group line." | |||
| 3761 | (newsrc | 3761 | (newsrc |
| 3762 | ;; Toggle subscription flag. | 3762 | ;; Toggle subscription flag. |
| 3763 | (gnus-group-change-level | 3763 | (gnus-group-change-level |
| 3764 | newsrc (if level level (if (<= (gnus-info-level (nth 1 newsrc)) | 3764 | newsrc (or level (if (<= (gnus-info-level (nth 1 newsrc)) |
| 3765 | gnus-level-subscribed) | 3765 | gnus-level-subscribed) |
| 3766 | (1+ gnus-level-subscribed) | 3766 | (1+ gnus-level-subscribed) |
| 3767 | gnus-level-default-subscribed))) | 3767 | gnus-level-default-subscribed))) |
| 3768 | (unless silent | 3768 | (unless silent |
| 3769 | (gnus-group-update-group group))) | 3769 | (gnus-group-update-group group))) |
| 3770 | ((and (stringp group) | 3770 | ((and (stringp group) |
| @@ -3773,7 +3773,7 @@ group line." | |||
| 3773 | ;; Add new newsgroup. | 3773 | ;; Add new newsgroup. |
| 3774 | (gnus-group-change-level | 3774 | (gnus-group-change-level |
| 3775 | group | 3775 | group |
| 3776 | (if level level gnus-level-default-subscribed) | 3776 | (or level gnus-level-default-subscribed) |
| 3777 | (or (and (member group gnus-zombie-list) | 3777 | (or (and (member group gnus-zombie-list) |
| 3778 | gnus-level-zombie) | 3778 | gnus-level-zombie) |
| 3779 | gnus-level-killed) | 3779 | gnus-level-killed) |
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 61319266ced..1fd2575ea1f 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el | |||
| @@ -1256,19 +1256,19 @@ INFO-LIST), otherwise it's a list in the format of the | |||
| 1256 | `gnus-newsrc-hashtb' entries. LEVEL is the new level of the | 1256 | `gnus-newsrc-hashtb' entries. LEVEL is the new level of the |
| 1257 | group, OLDLEVEL is the old level and PREVIOUS is the group (a | 1257 | group, OLDLEVEL is the old level and PREVIOUS is the group (a |
| 1258 | string name) to insert this group before." | 1258 | string name) to insert this group before." |
| 1259 | (let (group info active num) | 1259 | ;; Glean what info we can from the arguments. |
| 1260 | ;; Glean what info we can from the arguments. | 1260 | (let ((group (if (consp entry) |
| 1261 | (if (consp entry) | 1261 | (if fromkilled (nth 1 entry) (car (nth 1 entry))) |
| 1262 | (setq group (if fromkilled (nth 1 entry) (car (nth 1 entry)))) | 1262 | entry)) |
| 1263 | (setq group entry)) | 1263 | info active num) |
| 1264 | (when (and (stringp entry) | 1264 | (when (and (stringp entry) |
| 1265 | oldlevel | 1265 | oldlevel |
| 1266 | (< oldlevel gnus-level-zombie)) | 1266 | (< oldlevel gnus-level-zombie)) |
| 1267 | (setq entry (gnus-group-entry entry))) | 1267 | (setq entry (gnus-group-entry entry))) |
| 1268 | (if (and (not oldlevel) | 1268 | (setq oldlevel (if (and (not oldlevel) |
| 1269 | (consp entry)) | 1269 | (consp entry)) |
| 1270 | (setq oldlevel (gnus-info-level (nth 1 entry))) | 1270 | (gnus-info-level (nth 1 entry)) |
| 1271 | (setq oldlevel (or oldlevel gnus-level-killed))) | 1271 | (or oldlevel gnus-level-killed))) |
| 1272 | 1272 | ||
| 1273 | ;; This table is used for completion, so put a dummy entry there. | 1273 | ;; This table is used for completion, so put a dummy entry there. |
| 1274 | (unless (gethash group gnus-active-hashtb) | 1274 | (unless (gethash group gnus-active-hashtb) |