Subject: bug#947 closed by Glenn Morris <[email-masked]> (Re: bug#947: Recursive load of ido after unload-feature and reload)

From: [email-masked] (Emacs bug Tracking System)

This is an automatic notification regarding your bug report
which was filed against the emacs package:

#947: Recursive load of ido after unload-feature and reload

It has been closed by Glenn Morris <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Glenn Morris <[email-masked]> by
replying to this email.

-- 
947: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=947
Emacs Bug Tracking System
Contact [email-masked] with problems
>From [email-masked] Wed Sep 10 23:13:22 2008
From: Glenn Morris <[email-masked]>
To: "Juanma Barranquero" <[email-masked]>
Cc: [email-masked]
Subject: Re: bug#947: Recursive load of ido after unload-feature and reload
Date: Thu, 11 Sep 2008 02:11:29 -0400

"Juanma Barranquero" wrote:

> Yes, it apparently fixes the problem.

Installed.

>> so long as ido-mode is not enabled by default?

> What do you mean, "not enabled by default"?

So long as ido-mode the variable has a default value of nil, which I
imagine will always be true.

>From [email-masked] Tue Sep  9 07:29:49 2008
Date: Tue, 9 Sep 2008 16:29:40 +0200
From: "Juanma Barranquero" <[email-masked]>
To: "Emacs Bug Tracker" <[email-masked]>
Subject: Recursive load of ido after unload-feature and reload

Package: emacs
Severity: minor

emacs -Q -D
M-x ido-mode <RET>
M-x unload-feature <RET> ido <RET>
M-x ido-mode <RET>

Recursive load: "c:/emacs/trunk/lisp/ido.elc",
"c:/emacs/trunk/lisp/ido.elc", "c:/emacs/trunk/lisp/ido.elc",
"c:/emacs/trunk/lisp/ido.elc", "c:/emacs/trunk/lisp/ido.elc"

The problem is that after unloading ido, the variable ido-mode is
void, and calling ido-mode without an argument runs this code:

  (setq ido-mode
	(cond
	 ((null arg) (if ido-mode nil 'both))
         ; ...

and setting the variable ido-mode runs this code:

  :set #'(lambda (symbol value)
	   (ido-mode value))

so there's really a recursion.

I can think of several crude workarounds, but they aren't pretty and
I'm not sure they will play fair with customize.