From: "Kevin Greiner" <kevin.greiner@compsol.cc>
Cc: <semi-gnus-ja@meadowy.org>
Subject: Re: gnus-agent-read-local
Date: Mon, 29 May 2006 09:01:39 -0500 [thread overview]
Message-ID: <200605290901.AA34537584@mail.ev1.net> (raw)
Binding obarray to my-obarray while calling read will avoid
creating an initial global symbol. I've made the change and
checked it in.
Thanks for catching this...
Kevin
---------- Original Message ----------------------------------
From: Katsumi Yamaoka <yamaoka@jpl.org>
Date: Mon, 29 May 2006 10:13:01 +0900
>Hi,
>
>YAGI Tatsuya reported that there is a bug in the
>`gnus-agent-read-local' function. When it reads a
>"~/News/agent/BACKEND/SERVER/agent.lib/local" file, many group
>names listed in that file will be bound as global symbols. For
>instance, if the file contains the following entry,
>
>gnu\.emacs\.gnus 1234 5678
>
>the variable `gnu\.emacs\.gnus' will be bound globally and set
>to the value `(1234 . 5678)'. As long as I understand, all such
>symbols should be in the private obarray. Actually, the code
>will do so if the first element of each entry is a string.
>However, it doesn't, since all they are now just symbols.
>Here's an extract of the `gnus-agent-read-local' function:
>
>--8<---------------cut here---------------start------------->8---
> (setq group (read cur)
> min (read cur)
> max (read cur))
>
> (when (stringp group)
> (setq group (intern group my-obarray)))
>
> ;; NOTE: The '+ 0' ensure that min and max are both
numerics.
> (set group (cons (+ 0 min) (+ 0 max)))
>--8<---------------cut here---------------end--------------->8---
>
>I think the middle part should be replaced with
>
>--8<---------------cut here---------------start------------->8---
> (if (stringp group)
> (setq group (intern group my-obarray))
> (setq group (intern (symbol-name group) my-
obarray)))
>--8<---------------cut here---------------end--------------->8---
>
>or simply with
>
>--8<---------------cut here---------------start------------->8---
> (setq group (intern (symbol-name group) my-obarray))
>--8<---------------cut here---------------end--------------->8---
>
>However, I'm not sure the other functions work correctly
>assuming those variables are the ones in the private obarray,
>not global variables. Could anyone fix this properly?
>
>Regards,
>
>
________________________________________________________________
Sent via the EV1 webmail system at mail.ev1.net
next reply other threads:[~2006-05-29 14:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-29 14:01 Kevin Greiner [this message]
2006-05-29 14:27 ` gnus-agent-read-local Katsumi Yamaoka
-- strict thread matches above, loose matches on Subject: below --
2006-05-29 16:39 gnus-agent-read-local Kevin Greiner
[not found] <u7j49jaz2.fsf@ybb.ne.jp>
2006-05-29 1:13 ` gnus-agent-read-local Katsumi Yamaoka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200605290901.AA34537584@mail.ev1.net \
--to=kevin.greiner@compsol.cc \
--cc=semi-gnus-ja@meadowy.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).