 ;; Version: 0.2.0
 ;; Author: Mozilla
 ;; Url: https://github.com/mozilla/rust
-
-(eval-when-compile (require 'cl))
+;; Keywords: languages
+
+;;; Commentary:
+;;
+
+;;; Code:
+
 (eval-when-compile (require 'misc))
+
+;; for GNU Emacs < 24.3
+(eval-when-compile
+  (unless (fboundp 'setq-local)
+    (defmacro setq-local (var val)
+      "Set variable VAR to value VAL in current buffer."
+      (list 'set (list 'make-local-variable (list 'quote var)) val))))
 
 ;; Syntax definitions and helpers
 (defvar rust-mode-syntax-table
   (let ((table (make-syntax-table)))
 
     ;; Operators
-    (loop for i in '(?+ ?- ?* ?/ ?& ?| ?^ ?! ?< ?> ?~ ?@)
-          do (modify-syntax-entry i "." table))
+    (dolist (i '(?+ ?- ?* ?/ ?& ?| ?^ ?! ?< ?> ?~ ?@))
+      (modify-syntax-entry i "." table))
 
     ;; Strings
     (modify-syntax-entry ?\" "\"" table)

      (concat "^\\s-*\\(?:priv\\|pub\\)?\\s-*"
              (regexp-opt
               '("enum" "struct" "type" "mod" "use" "fn" "static" "impl"
                 "extern" "impl" "static" "trait"
                 ))))

(defun rust-beginning-of-defun (&optional arg)
  "Move backward to the beginning of the current defun.

                  (cons 'rustc rustc-compilation-regexps))
     (add-to-list 'compilation-error-regexp-alist 'rustc)))

(provide 'rust-mode)

;;; rust-mode.el ends here
