<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -30,7 +30,8 @@ commands. And to all the other commands, too.
 
 The commands are displayed in an Ido completion buffer, ordered by
 relevance.  The 7 most recently executed commands come first, the rest
-are sorted by frequency of use and in alphabetical order.
+are sorted by frequency of use, command length and in alphabetical
+order.
 
 Ido completion in 10 seconds: Typing selects matching commands:
 e.g. 'lnmd' matches 'line-number-mode'. `C-s`/`C-r` switches to the</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -169,13 +169,17 @@ Must be set before initializing Smex.&quot;
 
 (defun smex-sorting-rules (command-item other-command-item)
   &quot;Returns true if COMMAND-ITEM should sort before OTHER-COMMAND-ITEM.&quot;
-  (let ((count       (or (cdr command-item)       0))
-        (other-count (or (cdr other-command-item) 0))
-        (name        (car command-item))
-        (other-name  (car other-command-item)))
-    (or (&gt; count other-count)              ; 1. Frequency of use
+  (let* ((count        (or (cdr command-item      ) 0))
+         (other-count  (or (cdr other-command-item) 0))
+         (name         (car command-item))
+         (other-name   (car other-command-item))
+         (length       (length (symbol-name name)))
+         (other-length (length (symbol-name other-name))))
+    (or (&gt; count other-count)                         ; 1. Frequency of use
         (and (= count other-count)
-             (string&lt; name other-name))))) ; 2. Alphabetical order
+             (or (&lt; length other-length)              ; 2. Command length
+                 (and (= length other-length)
+                      (string&lt; name other-name))))))) ; 3. Alphabetical order
 
 (defun smex-rank (command)
   (let ((command-item (assq command smex-cache)))</diff>
      <filename>smex.el</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e394dc16b1bf6469c5a54f5c7ec8bc711617a67f</id>
    </parent>
  </parents>
  <author>
    <name>Cornelius Mika</name>
    <email>cornelius.mika@gmail.com</email>
  </author>
  <url>http://github.com/nonsequitur/smex/commit/d83f137bd3947afcac07bf3c2e0916d4c3da68e2</url>
  <id>d83f137bd3947afcac07bf3c2e0916d4c3da68e2</id>
  <committed-date>2009-07-16T10:45:08-07:00</committed-date>
  <authored-date>2009-07-16T10:44:04-07:00</authored-date>
  <message>Sorting Rules: Consider command length.</message>
  <tree>8ab3410c314f710e320392338792c7ed28811044</tree>
  <committer>
    <name>Cornelius Mika</name>
    <email>cornelius.mika@gmail.com</email>
  </committer>
</commit>
