;;; fortran.el --- Fortran mode for GNU Emacs
-;; Copyright (C) 1986, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001,
-;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1986, 1993-1995, 1997-2011 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:
:type 'integer
:safe 'integerp
:initialize 'custom-initialize-default
- :set (lambda (symbol value)
+ :set (lambda (_symbol value)
;; Do all fortran buffers, and the default.
(fortran-line-length value t))
:version "23.1"
This is used to fontify fixed-format Fortran comments."
;; This results in a non-byte-compiled function. We could pass it through
;; `byte-compile', but simple benchmarks indicate that it's probably not
- ;; worth the trouble (about ½% of slow down).
+ ;; worth the trouble (about 0.5% of slow down).
(eval ;I hate `eval', but it's hard to avoid it here.
`(syntax-propertize-rules
("^[cd\\*]" (0 "<"))
;; 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\\|"
(modify-syntax-entry ?= "." table)
(modify-syntax-entry ?* "." table)
(modify-syntax-entry ?/ "." table)
+ (modify-syntax-entry ?% "." table) ; bug#8820
(modify-syntax-entry ?\' "\"" table)
(modify-syntax-entry ?\" "\"" table)
;; Consistent with GNU Fortran's default -- see the manual.
["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]
(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)