              (comment-kill (if (integerp argument) argument nil))
              (comment-indent)))
         (t (paredit-insert-comment))))
-
-;;; This is all a horrible, horrible hack, primarily for GNU Emacs 21,
-;;; in which there is no `comment-or-uncomment-region'.
-
-(defun paredit-initialize-comment-dwim ()
-  (require 'newcomment)
-  (if (not (fboundp 'comment-or-uncomment-region))
-      (defalias 'comment-or-uncomment-region
-        (lambda (beginning end &optional argument)
-         (interactive "*r\nP")
-         (funcall (if (save-excursion (goto-char beginning)
-                                      (comment-forward (point-max))
-                                      (<= end (point)))
-                      'uncomment-region
-                      'comment-region)
-                  beginning end argument))))
-  (defalias 'paredit-initialize-comment-dwim 'comment-normalize-vars)
-  (comment-normalize-vars))
  
 (defun paredit-comment-on-line-p ()
+  "True if there is a comment on the line following point.
+This is expected to be called only in `paredit-comment-dwim'; do not
+  call it elsewhere."
   (save-excursion
     (beginning-of-line)
     (let ((comment-p nil))
       ;; Search forward for a comment beginning.  If there is one, set
       ;; COMMENT-P to true; if not, it will be nil.
-      (while (progn (setq comment-p
-                          (search-forward ";" (point-at-eol)
-                                          ;; t -> no error
-                                          t))
-                    (and comment-p
-                         (or (paredit-in-string-p)
-                             (paredit-in-char-p (1- (point))))))
+      (while (progn
+               (setq comment-p          ;t -> no error
+                     (comment-search-forward (point-at-eol) t))
+               (and comment-p
+                    (or (paredit-in-string-p)
+                        (paredit-in-char-p (1- (point))))))
         (forward-char))
       comment-p)))
 

(defvar paredit-mode-map (make-sparse-keymap)
  "Keymap for the paredit minor mode.")

(define-minor-mode paredit-mode
  "Minor mode for pseudo-structurally editing Lisp code.
\\<paredit-mode-map>"
  :lighter " Paredit"
  ;; If we're enabling paredit-mode, the prefix to this code that

Automatically reindent the newly barfed S-expression with respect to
  its new enclosing form."
  (interactive)
  (paredit-lose-if-not-in-sexp 'paredit-forward-barf-sexp)
  (save-excursion
    (up-list)                           ; Up to the end of the list to
    (let ((close (char-before)))        ;   save and delete the closing
