   ;; Make sure our functions are installed in TAGS files loaded
   ;; into Emacs while searching.
   (cond
-   ((>= erlang-emacs-major-version 20)
+   ((>= emacs-major-version 20)
     (setq erlang-tags-orig-format-functions
           (symbol-value 'tags-table-format-functions))
     (funcall (symbol-function 'set) 'tags-table-format-functions

  (make-local-variable 'indent-region-function)
  (setq indent-region-function 'erlang-indent-region)
  (set (make-local-variable 'comment-indent-function) 'erlang-comment-indent)
  (if (<= erlang-emacs-major-version 18)
      (set (make-local-variable 'comment-indent-hook) 'erlang-comment-indent))
  (set (make-local-variable 'parse-sexp-ignore-comments) t)
  (set (make-local-variable 'dabbrev-case-fold-search) nil)

(defun erlang-tags-remove-module-check ()
  "Remove our own tags search functions."
  (cond
   ((>= emacs-major-version 20)
    (funcall (symbol-function 'set)
             'tags-table-format-functions
             erlang-tags-orig-format-functions)
