emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: lisp/mail/supercite.el: sc-select-attribution logic


From: Glenn Morris
Subject: Re: address@hidden: lisp/mail/supercite.el: sc-select-attribution logic is broken (patch included)]
Date: Thu, 26 May 2005 18:21:19 +0100
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Richard Stallman wrote:

> Is there someone here who can evaluate this proposed patch?
> I don't use supercite.

I used to use supercite. I think the complaint is correct, but the
patch

> - --- lisp/mail/supercite.el  2005-04-04 11:19:51.000000000 +0200
> +++ lisp/mail/supercite-dgms.el       2005-05-09 13:30:56.000000000 +0200
> @@ -1174,8 +1174,9 @@
>             (setq attribution attrib
>                   attriblist nil))
>            ((listp attrib)
> - -         (setq attribution (eval attrib)
> - -               attriblist nil))
> +           (setq attribution (eval attrib))
> +           (when attribution
> +             (setq attriblist nil))
>            (t (error "%s did not evaluate to a string or list!"
>                      "sc-attrib-selection-list"))
>            )))

is wrong since it leads to an infinite loop when (eval attrib) returns
nil. I suggest the following:

diff -c -c -w -r1.44 supercite.el
*** supercite.el        14 May 2005 11:27:40 -0000      1.44
--- supercite.el        26 May 2005 17:15:39 -0000
***************
*** 1183,1189 ****
                    attriblist nil))
             ((listp attrib)
              (setq attribution (eval attrib)
!                   attriblist nil))
             (t (error "%s did not evaluate to a string or list!"
                       "sc-attrib-selection-list"))
             )))
--- 1183,1190 ----
                    attriblist nil))
             ((listp attrib)
              (setq attribution (eval attrib)
!                   attriblist (if (stringp attribution) nil
!                                  (cdr attriblist))))
             (t (error "%s did not evaluate to a string or list!"
                       "sc-attrib-selection-list"))
             )))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]