summaryrefslogtreecommitdiff
path: root/lisp/progmodes/fortran.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/fortran.el')
-rw-r--r--lisp/progmodes/fortran.el23
1 files changed, 11 insertions, 12 deletions
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index d04b00878e1..f01e866f557 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -495,7 +495,7 @@ This is used to fontify fixed-format Fortran comments."
;; `byte-compile', but simple benchmarks indicate that it's probably not
;; worth the trouble (about 0.5% of slow down).
(eval ;I hate `eval', but it's hard to avoid it here.
- `(syntax-propertize-rules
+ '(syntax-propertize-rules
("^[CcDd\\*]" (0 "<"))
;; We mark all chars after line-length as "comment-start", rather than
;; just the first one. This is so that a closing ' that's past the
@@ -1040,13 +1040,9 @@ With non-nil ARG, uncomments the region."
Any other key combination is executed normally."
(interactive "*")
(insert last-command-event)
- (let* ((event (if (fboundp 'next-command-event) ; XEmacs
- (next-command-event)
- (read-event)))
- (char (if (fboundp 'event-to-character)
- (event-to-character event) event)))
+ (let ((event (read-event)))
;; Insert char if not equal to `?', or if abbrev-mode is off.
- (if (and abbrev-mode (or (eq char ??) (eq char help-char)
+ (if (and abbrev-mode (or (eq event ??) (eq event help-char)
(memq event help-event-list)))
(fortran-abbrev-help)
(push event unread-command-events))))
@@ -1279,7 +1275,8 @@ Directive lines are treated as comments."
(concat "[ \t]*"
(regexp-quote fortran-continuation-string)))
(looking-at "[ \t]*$\\| \\{5\\}[^ 0\n]\\|\t[1-9]")
- (looking-at (concat "[ \t]*" comment-start-skip)))))
+ (looking-at (concat "[ \t]*\\(?:"
+ comment-start-skip "\\)")))))
(cond ((and continue-test
(not not-first-statement))
(message "Incomplete continuation statement."))
@@ -1302,7 +1299,8 @@ Directive lines are treated as comments."
(or (looking-at fortran-comment-line-start-skip)
(looking-at fortran-directive-re)
(looking-at "[ \t]*$\\| [^ 0\n]\\|\t[1-9]")
- (looking-at (concat "[ \t]*" comment-start-skip)))))
+ (looking-at (concat "[ \t]*\\(?:"
+ comment-start-skip "\\)")))))
(if (not not-last-statement)
'last-statement)))
@@ -1799,7 +1797,7 @@ non-indentation text within the comment."
(goto-char (match-end 0)))
(t
;; Move past line number.
- (skip-chars-forward "[ \t0-9]")))
+ (skip-chars-forward " \t0-9")))
;; Move past whitespace.
(skip-chars-forward " \t")
(current-column)))
@@ -2056,7 +2054,7 @@ If ALL is nil, only match comments that start in column > 0."
(when (<= (point) bos)
(move-to-column (1+ fill-column))
;; What is this doing???
- (or (re-search-forward "[\t\n,'+-/*)=]" eol t)
+ (or (re-search-forward "[-\t\n,'+/*)=]" eol t)
(goto-char bol)))
(if (bolp)
(re-search-forward "[ \t]" opoint t))
@@ -2150,7 +2148,8 @@ Always returns non-nil (to prevent `fill-paragraph' being called)."
(or (looking-at "[ \t]*$")
(looking-at fortran-comment-line-start-skip)
(and comment-start-skip
- (looking-at (concat "[ \t]*" comment-start-skip)))))
+ (looking-at (concat "[ \t]*\\(?:"
+ comment-start-skip "\\)")))))
(save-excursion
;; Find beginning of statement.
(fortran-next-statement)