         (t
          (delete-region (progn (forward-visible-line 0) (point))
                         (progn (forward-visible-line arg) (point))))))
-
-;; TODO remove when we get rid of emacs 23 support
-;; GNU Emacs 24 has prog-mode, older GNU Emacs do not, so
-;; copy its definition for those.
-(if (not (fboundp 'prog-mode))
-    (define-derived-mode prog-mode fundamental-mode "Prog"
-      "Major mode for editing source code."
-      (set (make-local-variable 'require-final-newline) mode-require-final-newline)
-      (set (make-local-variable 'parse-sexp-ignore-comments) t)
-      (setq bidi-paragraph-direction 'left-to-right)))
 
 (defun go-goto-opening-parenthesis (&optional _legacy-unused)
   "Move up one level of parentheses."

  (set (make-local-variable 'end-of-defun-function) #'go-end-of-defun)

  (set (make-local-variable 'parse-sexp-lookup-properties) t)
  (if (go--has-syntax-propertize-p)
      (set (make-local-variable 'syntax-propertize-function) #'go-propertize-syntax)
    (set (make-local-variable 'font-lock-syntactic-keywords)
         go--font-lock-syntactic-keywords)
    (set (make-local-variable 'font-lock-multiline) t))

  (if (boundp 'electric-indent-chars)
      (set (make-local-variable 'electric-indent-chars) '(?\n ?} ?\))))

      (- (point-max)
         (point-min))))

(defun go-previous-line-has-dangling-op-p ()
  "Return non-nil if the current line is a continuation line."
  (let* ((cur-line (line-number-at-pos))
