diff options
| author | Eric Abrahamsen | 2018-10-11 11:20:29 -0700 |
|---|---|---|
| committer | Eric Abrahamsen | 2018-10-11 11:20:29 -0700 |
| commit | a108eaa13c8f2af4d7de9fc788d1b780a5571cd6 (patch) | |
| tree | e7ad65c946e558866c520e9dced530118bd61292 | |
| parent | ce8b4584a3c69e5c4abad8a0a9c3781ce8c0c1f8 (diff) | |
| download | emacs-a108eaa13c8f2af4d7de9fc788d1b780a5571cd6.tar.gz emacs-a108eaa13c8f2af4d7de9fc788d1b780a5571cd6.zip | |
Fix bug with precious entries in Gnus registry
* lisp/registry.el (registry-collect-prune-candidates): This `cdr' was
an error: it meant that the last key in the precious list, would be
considered a nil. Since the precious list only contains the symbol
'mark by default, marks were never considered precious.
* doc/misc/gnus.texi (Store arbitrary data): Fix typo: "marks" should
be "mark".
| -rw-r--r-- | doc/misc/gnus.texi | 2 | ||||
| -rw-r--r-- | lisp/registry.el | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index db0534e8a68..7be888f3f26 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi | |||
| @@ -26159,7 +26159,7 @@ Get the data under @code{key} for message @code{id}. | |||
| 26159 | If any extra entries are precious, their presence will make the | 26159 | If any extra entries are precious, their presence will make the |
| 26160 | registry keep the whole entry forever, even if there are no groups for | 26160 | registry keep the whole entry forever, even if there are no groups for |
| 26161 | the Message-ID and if the size limit of the registry is reached. By | 26161 | the Message-ID and if the size limit of the registry is reached. By |
| 26162 | default this is just @code{(marks)} so the custom registry marks are | 26162 | default this is just @code{(mark)} so the custom registry marks are |
| 26163 | precious. | 26163 | precious. |
| 26164 | @end defvar | 26164 | @end defvar |
| 26165 | 26165 | ||
diff --git a/lisp/registry.el b/lisp/registry.el index 95097a4f1b7..04f3e7b974c 100644 --- a/lisp/registry.el +++ b/lisp/registry.el | |||
| @@ -358,7 +358,7 @@ return LIMIT such candidates. If SORTFUNC is provided, sort | |||
| 358 | entries first and return candidates from beginning of list." | 358 | entries first and return candidates from beginning of list." |
| 359 | (let* ((precious (oref db precious)) | 359 | (let* ((precious (oref db precious)) |
| 360 | (precious-p (lambda (entry-key) | 360 | (precious-p (lambda (entry-key) |
| 361 | (cdr (memq (car entry-key) precious)))) | 361 | (memq (car entry-key) precious))) |
| 362 | (data (oref db data)) | 362 | (data (oref db data)) |
| 363 | (candidates (cl-loop for k being the hash-keys of data | 363 | (candidates (cl-loop for k being the hash-keys of data |
| 364 | using (hash-values v) | 364 | using (hash-values v) |