;;; fortran.el --- Fortran mode for GNU Emacs
-;; Copyright (C) 1986, 1993-1995, 1997-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1986, 1993-1995, 1997-2015 Free Software Foundation,
+;; Inc.
;; Author: Michael D. Prange <prange@erl.mit.edu>
;; Maintainer: Glenn Morris <rgm@gnu.org>
;; form. For editing Fortran 90 free format source, use `f90-mode'
;; (f90.el). It is meant to support the GNU Fortran language
;; implemented by g77 (its extensions to Fortran77 and
-;; interpretations, e.g. of blackslash in strings).
+;; interpretations, e.g. of backslash in strings).
;;; History:
(defcustom fortran-directive-re
"^[ \t]*#.*"
"Regexp to match a directive line.
-The matching text will be fontified with `font-lock-keyword-face'.
+The matching text will be fontified with `font-lock-preprocessor-face'.
The matching line will be given zero indentation."
:version "22.1"
:type 'regexp
;; Standard continuation character and in a TAB-formatted line.
'("^ \\{5\\}\\([^ 0\n]\\)" 1 font-lock-string-face)
'("^\t\\([1-9]\\)" 1 font-lock-string-face))
- `((,fortran-directive-re (0 font-lock-keyword-face t)))
+ `((,fortran-directive-re (0 font-lock-preprocessor-face t)))
;; `fortran-font-lock-keywords-2' without types (see above).
(cdr (nthcdr (length fortran-font-lock-keywords-1)
fortran-font-lock-keywords-2)))
;; An alternative is to match on THEN at a line end, eg:
;; ".*)[ \t]*then[ \t]*\\($\\|!\\)"
;; This would also match ELSE branches, though. This does not seem
- ;; right to me, because then one has neighbouring blocks that are
+ ;; right to me, because then one has neighboring blocks that are
;; not nested in each other.
"\\(if[ \t]*(\\(.*\\|"
".*\n\\([^if]*\\([^i].\\|.[^f]\\|.\\>\\)\\)\\)\\<then\\|"
["Reset to Saved" Custom-reset-saved :active t
:help "Reset all edited or set settings to saved"]
["Reset to Standard Settings" Custom-reset-standard :active t
- :help "Erase all cusomizations in buffer"]
+ :help "Erase all customizations in buffer"]
)
"--"
["Comment Region" fortran-comment-region mark-active]
fortran-column-ruler-fixed)
(save-excursion
(beginning-of-line)
- (if (eq (window-start (selected-window))
- (window-point (selected-window)))
+ (if (eq (window-start) (window-point))
(line-beginning-position 2)
(point)))
nil "Type SPC or any command to erase ruler."))
(scroll-bar-width (- (nth 2 window-edges)
(car window-edges)
(window-width))))
- (split-window-horizontally (+ fortran-line-length scroll-bar-width)))
+ (split-window-right (+ fortran-line-length scroll-bar-width)))
(other-window 1)
(switch-to-buffer " fortran-window-extra" t)
(select-window (previous-window))))
(defun fortran-beginning-do ()
"Search backwards for first unmatched DO [WHILE].
-Return point or nil. Ignores labelled DO loops (ie DO 10 ... 10 CONTINUE)."
+Return point or nil. Ignores labeled DO loops (ie DO 10 ... 10 CONTINUE)."
(let ((case-fold-search t)
(dostart-re "\\(\\(\\sw\\|\\s_\\)+:[ \t]*\\)?do[ \t]+[^0-9]"))
(if (save-excursion
(skip-chars-forward " \t0-9")
(cond ((looking-at dostart-re)
(setq count (1- count)))
- ;; Note labelled loop ends not considered.
+ ;; Note labeled loop ends not considered.
((looking-at "end[ \t]*do\\b")
(setq count (1+ count)))))
(and (zerop count)