]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/f90.el
(compilation-start): Resurrect the version for systems that don't support
[gnu-emacs] / lisp / progmodes / f90.el
index f93093bbce5a978d0c7cce801e9c7e6f39916634..a53e103c6f81ebb19294959973b1695e14960c93 100644 (file)
@@ -9,10 +9,10 @@
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,9 +20,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
@@ -442,7 +440,7 @@ The options are 'downcase-word, 'upcase-word, 'capitalize-word and nil."
 Set the match data so that subexpression 1,2 are the TYPE, and
 type-name parts, respectively."
   (let (found l)
-    (while (and (re-search-forward "\\<\\(\\(?:end[ \t]*\\)?type\\)[ \t]*"
+    (while (and (re-search-forward "\\<\\(\\(?:end[ \t]*\\)?type\\)\\>[ \t]*"
                                    limit t)
                 (not (setq found
                            (progn
@@ -637,7 +635,7 @@ Can be overridden by the value of `font-lock-maximum-decoration'.")
     (modify-syntax-entry ?=  "."  table)
     (modify-syntax-entry ?*  "."  table)
     (modify-syntax-entry ?/  "."  table)
-    ;; I think that the f95 standard leaves the behaviour of \
+    ;; I think that the f95 standard leaves the behavior of \
     ;; unspecified, but that f2k will require it to be non-special.
     ;; Use `f90-backslash-not-special' to change.
     (modify-syntax-entry ?\\ "\\" table) ; escape chars
@@ -655,7 +653,7 @@ Can be overridden by the value of `font-lock-maximum-decoration'.")
     (define-key map "\C-\M-p"  'f90-beginning-of-block)
     (define-key map "\C-\M-q"  'f90-indent-subprogram)
     (define-key map "\C-j"     'f90-indent-new-line) ; LFD equals C-j
-    (define-key map "\r"       'newline)
+;;;    (define-key map "\r"       'newline)
     (define-key map "\C-c\r"   'f90-break-line)
 ;;;  (define-key map [M-return] 'f90-break-line)
     (define-key map "\C-c\C-a" 'f90-previous-block)
@@ -665,7 +663,8 @@ Can be overridden by the value of `font-lock-maximum-decoration'.")
     (define-key map "\C-c\C-p" 'f90-previous-statement)
     (define-key map "\C-c\C-n" 'f90-next-statement)
     (define-key map "\C-c\C-w" 'f90-insert-end)
-    (define-key map "\t"       'f90-indent-line)
+    ;; Standard tab binding will call this, and also handle regions.
+;;;    (define-key map "\t"       'f90-indent-line)
     (define-key map ","        'f90-electric-insert)
     (define-key map "+"        'f90-electric-insert)
     (define-key map "-"        'f90-electric-insert)
@@ -1215,7 +1214,7 @@ NAME is nil if the statement has no label."
 NAME is non-nil only for type."
   (cond
    ((save-excursion
-      (and (looking-at "\\<type[ \t]*")
+      (and (looking-at "\\<type\\>[ \t]*")
            (goto-char (match-end 0))
            (not (looking-at "\\(is\\>\\|(\\)"))
            (or (looking-at "\\(\\sw+\\)")
@@ -1488,7 +1487,7 @@ Return (TYPE NAME), or nil if not found."
         matching-beg
       ;; Note this includes the case of an un-named main program,
       ;; in which case we go to (point-min).
-      (message "No beginning found.")
+      (if (interactive-p) (message "No beginning found"))
       nil)))
 
 (defun f90-end-of-subprogram ()
@@ -1496,7 +1495,7 @@ Return (TYPE NAME), or nil if not found."
 Return (TYPE NAME), or nil if not found."
   (interactive)
   (let ((case-fold-search t)
-        (count 1) 
+        (count 1)
         matching-end)
     (end-of-line)
     (while (and (> count 0)
@@ -1513,7 +1512,7 @@ Return (TYPE NAME), or nil if not found."
 ;;;    (forward-line 1)
     (if (zerop count)
         matching-end
-      (message "No end found.")
+      (if (interactive-p) (message "No end found"))
       nil)))