]> git.eshelyaron.com Git - emacs.git/commitdiff
(fortran-mode-map): Don't bind M-;.
authorGlenn Morris <rgm@gnu.org>
Sat, 3 Nov 2007 03:03:31 +0000 (03:03 +0000)
committerGlenn Morris <rgm@gnu.org>
Sat, 3 Nov 2007 03:03:31 +0000 (03:03 +0000)
(fortran-mode): Set values for comment-region-function,
uncomment-region-function and comment-insert-comment-function.
(fortran-uncomment-region): New function.

lisp/ChangeLog
lisp/progmodes/fortran.el

index 286301247230ac1a050741adf0a5029cceeeb99e..3a723a52b700d1ab83e5bec15b2a0ef3e580023c 100644 (file)
@@ -1,3 +1,18 @@
+2007-11-03  Glenn Morris  <rgm@gnu.org>
+
+       * newcomment.el (comment-dwim): Call comment-insert-comment-function,
+       if defined, for blank lines.  Doc fix.
+
+       * progmodes/fortran.el (fortran-mode-map): Don't bind M-;.
+       (fortran-mode): Set values for comment-region-function,
+       uncomment-region-function and comment-insert-comment-function.
+       (fortran-uncomment-region): New function.
+
+       * textmodes/nroff-mode.el (nroff-mode): Set
+       comment-insert-comment-function rather than indent-line-function.
+       (nroff-indent-line-function): Remove.
+       (nroff-insert-comment-function): New function.
+
 2007-11-02  Michael Kifer  <kifer@cs.stonybrook.edu>
 
        * ediff-vers.el (ediff-vc-working-revision): Add a quote.
index 023e285659a0bfbface2d48e834c8ed7a670e70d..01c4c09c954242f25266bbe7b0d63273b78af6e5 100644 (file)
@@ -593,7 +593,8 @@ Used in the Fortran entry in `hs-special-modes-alist'.")
   (let ((map (make-sparse-keymap)))
     (define-key map ";"        'fortran-abbrev-start)
     (define-key map "\C-c;"    'fortran-comment-region)
-    (define-key map "\M-;"     'fortran-indent-comment)
+    ;; The default comment-dwim does at least as much as this.
+;;;    (define-key map "\M-;"     'fortran-indent-comment)
     (define-key map "\M-\n"    'fortran-split-line)
     (define-key map "\M-\C-n"  'fortran-end-of-block)
     (define-key map "\M-\C-p"  'fortran-beginning-of-block)
@@ -841,6 +842,11 @@ with no args, if that value is non-nil."
        ;; (concat "\\(\\)\\(![ \t]*\\|" fortran-comment-line-start-skip "\\)")
        "\\(\\)\\(?:^[CcDd*]\\|!\\)\\(?:\\([^ \t\n]\\)\\2+\\)?[ \t]*")
   (set (make-local-variable 'comment-indent-function) 'fortran-comment-indent)
+  (set (make-local-variable 'comment-region-function) 'fortran-comment-region)
+  (set (make-local-variable 'uncomment-region-function)
+       'fortran-uncomment-region)
+  (set (make-local-variable 'comment-insert-comment-function)
+       'fortran-indent-comment)
   (set (make-local-variable 'abbrev-all-caps) t)
   (set (make-local-variable 'normal-auto-fill-function) 'fortran-auto-fill)
   (set (make-local-variable 'indent-tabs-mode) (fortran-analyze-file-format))
@@ -981,6 +987,11 @@ With non-nil ARG, uncomments the region."
     (set-marker end-region-mark nil)
     (set-marker save-point nil)))
 
+;; uncomment-region calls this with 3 args.
+(defun fortran-uncomment-region (start end &optional ignored)
+  "Uncomment every line in the region."
+  (fortran-comment-region start end t))
+
 \f
 (defun fortran-abbrev-start ()
   "Typing ;\\[help-command] or ;? lists all the Fortran abbrevs.