Mercurial > emacs
changeset 22228:a12c92c5f4e9
(f90-comment-indent): Don't attempt to indent trailing comment as
code.
(f90-looking-at-if-then): Don't lose with scan-lists on bad syntax.
author | Dave Love <fx@gnu.org> |
---|---|
date | Mon, 25 May 1998 11:25:48 +0000 |
parents | e7ac7f644152 |
children | 4fb09bb7d2f9 |
files | lisp/progmodes/f90.el |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/f90.el Mon May 25 08:08:51 1998 +0000 +++ b/lisp/progmodes/f90.el Mon May 25 11:25:48 1998 +0000 @@ -989,7 +989,8 @@ (setq struct (f90-match-piece 3)) (if (looking-at "\\(\\sw+\\)[ \t]*\:") (setq label (f90-match-piece 1))) - (goto-char (scan-lists (point) 1 0)) + (let ((pos (scan-lists (point) 1 0))) + (and pos (goto-char pos))) (skip-chars-forward " \t") (if (or (looking-at "then\\>") (if (f90-line-continued) @@ -1041,7 +1042,11 @@ ((and f90-directive-comment-re (looking-at f90-directive-comment-re)) 0) ((looking-at (regexp-quote f90-comment-region)) 0) - ((looking-at f90-indented-comment-re) + ((and (looking-at f90-indented-comment-re) + ;; Don't attempt to indent trailing comment as code. + (save-excursion + (skip-chars-backward " \t") + (bolp))) (f90-calculate-indent)) (t (skip-chars-backward " \t") (max (if (bolp) 0 (1+ (current-column))) comment-column))))