Gnus development mailing list
 help / color / mirror / Atom feed
* delete-dups
       [not found] <E1P1RNX-00065o-00@quimby.gnus.org>
@ 2010-10-01  7:04 ` Katsumi Yamaoka
  2010-10-01 13:40   ` delete-dups Ted Zlatanov
  0 siblings, 1 reply; 5+ messages in thread
From: Katsumi Yamaoka @ 2010-10-01  7:04 UTC (permalink / raw)
  To: ding

Ted Zlatanov wrote:
>        via  6ace9d5942b93402b9468402592c545dbb92b007 (commit)
>        via  404c492543314455e4f96c80bb0372e1741f0906 (commit)
>       from  ca9880f98c58290a72dc5ad8efbe966bdea725a1 (commit)
[...]
> +;;;###autoload
> +(defun gnus-registry-install-nnregistry ()
> +  "Install the nnregistry refer method in `gnus-refer-article-method'."
> +  (interactive)
> +  (when (featurep 'nnregistry)
> +    (setq gnus-refer-article-method
> +          (delete-dups
[...]

Could you provide `gnus-delete-dups' or something for XEmacs 21.4?
XEmacs 21.5 and SXEmacs 22.1 (and Emacs >=22 of course) provide
`delete-dups' in subr.el, however XEmacs 21.4 doesn't.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: delete-dups
  2010-10-01  7:04 ` delete-dups Katsumi Yamaoka
@ 2010-10-01 13:40   ` Ted Zlatanov
  2010-10-04  5:14     ` delete-dups Katsumi Yamaoka
  0 siblings, 1 reply; 5+ messages in thread
From: Ted Zlatanov @ 2010-10-01 13:40 UTC (permalink / raw)
  To: ding

On Fri, 01 Oct 2010 16:04:45 +0900 Katsumi Yamaoka <yamaoka@jpl.org> wrote: 

KY> Ted Zlatanov wrote:
>> via  6ace9d5942b93402b9468402592c545dbb92b007 (commit)
>> via  404c492543314455e4f96c80bb0372e1741f0906 (commit)
>> from  ca9880f98c58290a72dc5ad8efbe966bdea725a1 (commit)
KY> [...]
>> +;;;###autoload
>> +(defun gnus-registry-install-nnregistry ()
>> +  "Install the nnregistry refer method in `gnus-refer-article-method'."
>> +  (interactive)
>> +  (when (featurep 'nnregistry)
>> +    (setq gnus-refer-article-method
>> +          (delete-dups
KY> [...]

KY> Could you provide `gnus-delete-dups' or something for XEmacs 21.4?
KY> XEmacs 21.5 and SXEmacs 22.1 (and Emacs >=22 of course) provide
KY> `delete-dups' in subr.el, however XEmacs 21.4 doesn't.

Old version:

;;;###autoload
(defun gnus-registry-install-nnregistry ()
  "Install the nnregistry refer method in `gnus-refer-article-method'."
  (interactive)
  (when (featurep 'nnregistry)
    (setq gnus-refer-article-method
          (delete-dups
           (append
            (if (listp gnus-refer-article-method)
                gnus-refer-article-method
              (list gnus-refer-article-method))
            (list 'nnregistry))))))


How about this rewrite, will that work in XEmacs?  It seems like those
two helper functions should be in ELisp but I don't know where they are
hiding.

;;;###autoload
(defun gnus-registry-install-nnregistry ()
  "Install the nnregistry refer method in `gnus-refer-article-method'."
  (interactive)
  (when (featurep 'nnregistry)
    (setq gnus-refer-article-method
          (gnus-set-append-to-set-or-element
           gnus-refer-article-method
           'nnregistry))))

(defun gnus-make-list (element)
  "Return ELEMENT if it's a list or makes a list of it."
  (if (listp element) element (list element)))

(defun gnus-set-append-to-set-or-element (set-or-element tail)
  "Append TAIL to SET-OR-ELEMENT, which can be a set or a single atom."
  (let ((set (gnus-make-list set-or-element)))
    (if (member tail set)
        set
      (append set (list tail)))))




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: delete-dups
  2010-10-01 13:40   ` delete-dups Ted Zlatanov
@ 2010-10-04  5:14     ` Katsumi Yamaoka
  2010-10-04 16:44       ` delete-dups Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Katsumi Yamaoka @ 2010-10-04  5:14 UTC (permalink / raw)
  To: ding

Ted Zlatanov wrote:
> On Fri, 01 Oct 2010 16:04:45 +0900 Katsumi Yamaoka <yamaoka@jpl.org> wrote:
[...]
KY> Could you provide `gnus-delete-dups' or something for XEmacs 21.4?
KY> XEmacs 21.5 and SXEmacs 22.1 (and Emacs >=22 of course) provide
KY> `delete-dups' in subr.el, however XEmacs 21.4 doesn't.

> Old version:
[...]
> How about this rewrite, will that work in XEmacs?  It seems like those
> two helper functions should be in ELisp but I don't know where they are
> hiding.
[...]

It should work.  Thanks.  Otherwise:

(defun gnus-registry-install-nnregistry ()
  "Install the nnregistry refer method in `gnus-refer-article-method'."
  (interactive)
  (if (listp gnus-refer-article-method)
      (unless (memq 'nnregistry gnus-refer-article-method)
	(setq gnus-refer-article-method
	      (append gnus-refer-article-method '(nnregistry))))
    (unless (eq 'nnregistry gnus-refer-article-method)
      (setq gnus-refer-article-method
	    (list gnus-refer-article-method 'nnregistry)))))

or

(defalias 'gnus-delete-dups
  (if (fboundp 'delete-dups)
      'delete-dups
    (lambda (list)
      ... copy of Emacs 24's delete-dups definition ...)))

And make gnus-registry-install-nnregistry use it.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: delete-dups
  2010-10-04  5:14     ` delete-dups Katsumi Yamaoka
@ 2010-10-04 16:44       ` Lars Magne Ingebrigtsen
  2010-10-05  4:07         ` delete-dups Katsumi Yamaoka
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-10-04 16:44 UTC (permalink / raw)
  To: ding

Katsumi Yamaoka <yamaoka@jpl.org> writes:

> It should work.  Thanks.  Otherwise:
>
> (defun gnus-registry-install-nnregistry ()

Please go ahead and install, I think.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: delete-dups
  2010-10-04 16:44       ` delete-dups Lars Magne Ingebrigtsen
@ 2010-10-05  4:07         ` Katsumi Yamaoka
  0 siblings, 0 replies; 5+ messages in thread
From: Katsumi Yamaoka @ 2010-10-05  4:07 UTC (permalink / raw)
  To: ding

Lars Magne Ingebrigtsen wrote:
> Katsumi Yamaoka <yamaoka@jpl.org> writes:
>> It should work.  Thanks.  Otherwise:
>> (defun gnus-registry-install-nnregistry ()

> Please go ahead and install, I think.  :-)

Installed.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-10-05  4:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <E1P1RNX-00065o-00@quimby.gnus.org>
2010-10-01  7:04 ` delete-dups Katsumi Yamaoka
2010-10-01 13:40   ` delete-dups Ted Zlatanov
2010-10-04  5:14     ` delete-dups Katsumi Yamaoka
2010-10-04 16:44       ` delete-dups Lars Magne Ingebrigtsen
2010-10-05  4:07         ` delete-dups Katsumi Yamaoka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).