 (defvar ddx-all-labels nil
   "All labels in the current buffer")
 
+(defvar ddx-label-re "^\\(\\sw+\\):"
+  "A regular expression for the definition site of a label")
+
 (defun ddx-collect-labels ()
   (set (make-local-variable 'ddx-all-labels)
        (make-hash-table :test 'equal))
   (save-excursion
     (beginning-of-buffer)
-     (while (re-search-forward "^\\(\\sw+\\):" nil t)
+     (while (re-search-forward ddx-label-re nil t)
        (let ((l (match-string-no-properties 1)))
          (puthash l t ddx-all-labels)))))
 

   "Major mode to edit decompiled DEX files."
   (set (make-local-variable 'font-lock-defaults)
        '(ddx-mode-font-lock-keywords))
   (use-local-map ddx-mode-map)
   (set-syntax-table ddx-mode-syntax-table)
   (set (make-local-variable 'ddx-highlighted-label) nil)
   (ddx-collect-labels)
   (ddx-reset-timer)
   (require 'javadoc))

(add-to-list 'auto-mode-alist (cons "\\.ddx$" 'ddx-mode))


                                        "registers" "annotation"
                                        "end" "source" "inner")) "\\>")
         font-lock-preprocessor-face)
   (cons "\\<[vp][[:digit:]]+\\>" font-lock-variable-name-face)))

(defvar ddx-mode-map
