all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#1833: 23.0.60; Bug in custom-set-variables sorting
@ 2009-01-09 20:55 Lennart Borgman
  2011-07-08 11:25 ` Juanma Barranquero
  0 siblings, 1 reply; 13+ messages in thread
From: Lennart Borgman @ 2009-01-09 20:55 UTC (permalink / raw)
  To: emacs-pretest-bug

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'






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

end of thread, other threads:[~2011-07-11 16:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-09 20:55 bug#1833: 23.0.60; Bug in custom-set-variables sorting Lennart Borgman
2011-07-08 11:25 ` Juanma Barranquero
2011-07-08 22:28   ` Lennart Borgman
2011-07-08 23:19     ` Juanma Barranquero
2011-07-08 23:49       ` Lennart Borgman
2011-07-09  0:12         ` Juanma Barranquero
2011-07-09  0:23           ` Lennart Borgman
2011-07-09  0:27             ` Juanma Barranquero
2011-07-09  0:30               ` Lennart Borgman
2011-07-09  0:40                 ` Juanma Barranquero
2011-07-09  0:57                   ` Lennart Borgman
2011-07-11  1:59                   ` Glenn Morris
2011-07-11 16:02                     ` Lennart Borgman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.