]> git.eshelyaron.com Git - emacs.git/commit
* lisp/gnus/gnus.el (gnus-info): Define with `cl-defstruct`
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 29 Nov 2019 17:26:31 +0000 (12:26 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 29 Nov 2019 17:26:31 +0000 (12:26 -0500)
commitb1a69505843c593a3a757a614dea16e2a7185579
tree043919f98b2980e39924c5a52858da57f8cbb7bf
parent7fff418edf56244a1fcf54718523aa9b5cb3a854
* lisp/gnus/gnus.el (gnus-info): Define with `cl-defstruct`

This makes the accessors into (inlined) functions (instead of macros),
which simplifies some uses, and it makes the gnus-info-set-<foo>
macros redundant since we can use `setf` instead.  Remove them and
update all users.

(gnus-info-group, gnus-info-rank, gnus-info-read, gnus-info-marks)
(gnus-info-method, gnus-info-params): Auto-defined by defstruct.
(gnus-info-level, gnus-info-score): Define as a function.  Add gv-setter.
(gnus-info-set-group, gnus-info-set-rank, gnus-info-set-read): Remove,
use `setf` instead.
(gnus-info-set-marks, gnus-info-set-method, gnus-info-set-params):
Define as a function.
(gnus-info-set-entry): Delete function.
(gnus-info--grow-entry): New function, extracted from it.
(gnus-info--set-level, gnus-info--set-score): New functions, extracted
from the `gnus-info-set-level` and `gnus-info-set-score` which they replace.
(gnus-get-info): Define as a function.

* lisp/gnus/gnus-group.el (gnus-group-edit-group-done):
Use the `extend` arg of `gnus-info-set-method`.
(gnus-group-sort-selected-flat): eta-reduce.
15 files changed:
lisp/gnus/gnus-agent.el
lisp/gnus/gnus-group.el
lisp/gnus/gnus-int.el
lisp/gnus/gnus-sieve.el
lisp/gnus/gnus-start.el
lisp/gnus/gnus-sum.el
lisp/gnus/gnus.el
lisp/gnus/nndiary.el
lisp/gnus/nndraft.el
lisp/gnus/nnimap.el
lisp/gnus/nnir.el
lisp/gnus/nnmaildir.el
lisp/gnus/nnmairix.el
lisp/gnus/nnml.el
lisp/gnus/nnvirtual.el