Subject: bug#1833: closed (Re: bug#1833: 23.0.60; Bug in custom-set-variables sorting)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 11 Jul 2011 02:00:04 +0000

Your bug report

#1833: 23.0.60; Bug in custom-set-variables sorting

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
1833: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1833
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#1833: 23.0.60; Bug in custom-set-variables sorting
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Sun, 10 Jul 2011 21:59:21 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

This simply is not comprehensible without a recipe that shows the
problem. I do not believe anyone could or should do anything without
such, therefore I am closing it. If you reply with a recipe that shows
the problem, the report can be reopened. From the Emacs manual
"Checklist for Bug Reports":

     And if we can't understand what bug you are trying to fix, or why
     your patch should be an improvement, we mustn't install it.

Subject: 23.0.60; Bug in custom-set-variables sorting
From: "Lennart Borgman" <[email-masked]>
To: [email-masked]
Date: Fri, 9 Jan 2009 21:55:55 +0100

I believe there is a bug the sorting routine in
custom-theme-set-variables. The comparision of two symbols does not
take the dependency list in account if the symbols compared are not
mentioned in their dependency list. However that breaks, eh, what do
you call it ..., transity.

In other words if one of the two symbols compared has a dependency
list and the other not then the first symbols must be sorted after the
second. It should look something like this:

  ;; Move minor modes and variables with explicit requires to the end.
  (setq args
	(sort args
	      (lambda (a1 a2)
		(let* ((sym1 (car a1))
		       (sym2 (car a2))
		       (dep1 (get sym1 'custom-dependencies))
		       (dep2 (get sym2 'custom-dependencies))
		       (1-then-2 (memq sym1 dep2))
		       (2-then-1 (memq sym2 dep1)))
		  (cond ((and 1-then-2 2-then-1)
			 (error "Circular custom dependency between `%s' and `%s'"
				sym1 sym2))
			(2-then-1 nil)
			;; 1 is a dependency of 2, so needs to be set first.
			1-then-2
			;; Put minor modes and symbols with :require last.
			;; Putting minor modes last ensures that the mode
			;; function will see other customized values rather
			;; than default values.
			(t (or (and dep2 (not dep1))
                               (nth 3 a2)
                               (eq (get sym2 'custom-set)
                                   'custom-set-minor-mode))))))))

In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
 of 2009-01-04
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags
-Ic:/g/include -fno-crossjumping'