public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] emacs r1517 - gentoo-syntax
@ 2010-02-15 13:53 Ulrich Mueller (ulm)
  0 siblings, 0 replies; only message in thread
From: Ulrich Mueller (ulm) @ 2010-02-15 13:53 UTC (permalink / raw
  To: gentoo-commits

Author: ulm
Date: 2010-02-15 13:53:10 +0000 (Mon, 15 Feb 2010)
New Revision: 1517

Modified:
   gentoo-syntax/gentoo-syntax.el
Log:
Don't treat * specially since it sorts before all valid keyword characters.

Modified: gentoo-syntax/gentoo-syntax.el
===================================================================
--- gentoo-syntax/gentoo-syntax.el	2010-02-14 21:42:49 UTC (rev 1516)
+++ gentoo-syntax/gentoo-syntax.el	2010-02-15 13:53:10 UTC (rev 1517)
@@ -62,16 +62,14 @@
 ;; Predicate function for comparison of architecture keywords
 ;; (needed for variable definitions below)
 (defun ebuild-mode-arch-lessp (a b)
-  (let ((as (split-string (or (car-safe a) a) "-"))
-	(bs (split-string (or (car-safe b) b) "-")))
-    (cond ((equal as '("*")) t)
-	  ((equal bs '("*")) nil)
-	  ;; two-part keywords: first compare the OS (after hyphen, if any),
-	  ;; then the arch (before hyphen)
-	  ((not (string-equal (or (cadr as) "") (or (cadr bs) "")))
-	   (string-lessp (or (cadr as) "") (or (cadr bs) "")))
-	  (t
-	   (string-lessp (or (car as) "") (or (car bs) ""))))))
+  (let* ((tail (make-list 2 ""))
+	 (as (nconc (split-string (or (car-safe a) a) "-") tail))
+	 (bs (nconc (split-string (or (car-safe b) b) "-") tail)))
+    ;; two-part keywords: first compare the OS (after hyphen, if any),
+    ;; then the architecture (before hyphen)
+    (if (string-equal (cadr as) (cadr bs))
+	(string-lessp (car as) (car bs))
+      (string-lessp (cadr as) (cadr bs)))))
 
 (defvar ebuild-mode-portdir
   "/usr/portage"




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-02-15 13:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-15 13:53 [gentoo-commits] emacs r1517 - gentoo-syntax Ulrich Mueller (ulm)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox