<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -185,7 +185,8 @@ function.&quot;
 
 ;; http://chopmo.blogspot.com/2008/09/quickly-jumping-to-symbols.html
 (defun textmate-goto-symbol ()
-  &quot;Will update the imenu index then use your completing read to jump to a symbol.&quot;
+  &quot;Update the imenu index and then use ido to select a symbol to navigate to.
+Symbols matching the text at point are put first in the completion list.&quot;
   (interactive)
   (imenu--make-index-alist)
   (let ((name-and-pos '())
@@ -210,7 +211,18 @@ function.&quot;
                                (add-to-list 'symbol-names name)
                                (add-to-list 'name-and-pos (cons name position))))))))
       (addsymbols imenu--index-alist))
-    (let* ((selected-symbol (textmate-completing-read &quot;Symbol: &quot; symbol-names))
+    ;; If there are matching symbols at point, put them at the beginning of `symbol-names'.
+    (let ((symbol-at-point (thing-at-point 'symbol)))
+      (when symbol-at-point
+        (let* ((regexp (concat (regexp-quote symbol-at-point) &quot;$&quot;))
+               (matching-symbols (delq nil (mapcar (lambda (symbol)
+                                                     (if (string-match regexp symbol) symbol))
+                                                   symbol-names))))
+          (when matching-symbols
+            (sort matching-symbols (lambda (a b) (&gt; (length a) (length b))))
+            (mapc (lambda (symbol) (setq symbol-names (cons symbol (delete symbol symbol-names))))
+                  matching-symbols)))))
+    (let* ((selected-symbol (ido-completing-read &quot;Symbol? &quot; symbol-names))
            (position (cdr (assoc selected-symbol name-and-pos))))
       (goto-char position))))
 </diff>
      <filename>textmate.el</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>acd201947250bfcb1a26138d175cf33a77779b1b</id>
    </parent>
  </parents>
  <author>
    <name>Augie Fackler</name>
    <email>durin42@gmail.com</email>
  </author>
  <url>http://github.com/defunkt/textmate.el/commit/44ee782f992fbd46c05a62bca6857e62d1e4cda3</url>
  <id>44ee782f992fbd46c05a62bca6857e62d1e4cda3</id>
  <committed-date>2009-09-19T10:59:47-07:00</committed-date>
  <authored-date>2009-09-15T15:20:34-07:00</authored-date>
  <message>I had an improved varation on this in my emacs setup. No idea where it is from.</message>
  <tree>914b4d63f24511c9480ad865c149ce8f31c1ab3d</tree>
  <committer>
    <name>Chris Wanstrath</name>
    <email>chris@ozmm.org</email>
  </committer>
</commit>
