 (defvar erlang-menu-base-items
   '(("Indent"
      (("Indent Line" erlang-indent-command)
-      ("Indent Region " erlang-indent-region
-       (if erlang-xemacs-p (mark) mark-active))
+      ("Indent Region " erlang-indent-region mark-active)
       ("Indent Clause" erlang-indent-clause)
       ("Indent Function" erlang-indent-function)
       ("Indent Buffer" erlang-indent-current-buffer)))
     ("Edit"
      (("Fill Comment" erlang-fill-paragraph)
-      ("Comment Region" comment-region
-       (if erlang-xemacs-p (mark) mark-active))
-      ("Uncomment Region" erlang-uncomment-region
-       (if erlang-xemacs-p (mark) mark-active))
+      ("Comment Region" comment-region mark-active)
+      ("Uncomment Region" erlang-uncomment-region mark-active)
       nil
       ("Beginning of Function" erlang-beginning-of-function)
       ("End of Function" erlang-end-of-function)

  (make-local-variable 'indent-region-function)
  (setq indent-region-function 'erlang-indent-region)
  (set (make-local-variable 'comment-indent-function) 'erlang-comment-indent)
  (if (<= 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)
  (set (make-local-variable 'imenu-prev-index-position-function)

                        (find-file-noselect file)))))

     ((string-match ":" modtagname)
      (progn
        (erlang-tags-install-module-check)
        (unwind-protect
            (funcall (symbol-function 'find-tag)
                     modtagname next-p regexp-p)
          (erlang-tags-remove-module-check))))
     (t
      (funcall (symbol-function 'find-tag) modtagname next-p regexp-p)))
    (current-buffer)))                  ; Return the new buffer.
