GNU bug report logs -
#9690
24.0.90; f90 mode incorrectly indents top-level preprocessor directives
Previous Next
Reported by: Lawrence Mitchell <wence <at> gmx.li>
Date: Fri, 7 Oct 2011 11:39:02 UTC
Severity: normal
Found in version 24.0.90
Fixed in version 24.0.91
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 9690 in the body.
You can then email your comments to 9690 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#9690
; Package
emacs
.
(Fri, 07 Oct 2011 11:39:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Lawrence Mitchell <wence <at> gmx.li>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 07 Oct 2011 11:39:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
emacs -Q
C-x b *tmp* RET
M-x f90-mode RET
M-: (insert "#include "foo.h") RET
TAB
Note how the preprocessor directive is indented by
f90-program-indent, rather than 0 spaces.
Patch and commit message
Cheers,
Lawrence
f90: Don't indent top-level preprocessor directives
* lisp/progmodes/f90.el (f90-calculate-indent): Special case
preprocessor directives and give them 0 indent.
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index eb33822..95caf3a 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -1820,11 +1820,14 @@ after indenting."
(f90-indent-line-no)
(setq no-line-number t)
(skip-chars-forward " \t"))
- (if (looking-at "!")
- (setq indent (f90-comment-indent))
- (and f90-smart-end (looking-at "end")
- (f90-match-end))
- (setq indent (f90-calculate-indent)))
+ (cond ((looking-at "!")
+ (setq indent (f90-comment-indent)))
+ ((looking-at "#")
+ (setq indent 0))
+ (t
+ (and f90-smart-end (looking-at "end")
+ (f90-match-end))
+ (setq indent (f90-calculate-indent))))
(or (= indent (current-column))
(f90-indent-to indent no-line-number))
;; If initial point was within line's indentation,
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Sat, 08 Oct 2011 21:53:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Lawrence Mitchell <wence <at> gmx.li>
:
bug acknowledged by developer.
(Sat, 08 Oct 2011 21:53:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 9690-done <at> debbugs.gnu.org (full text, mbox):
Version: 24.0.91
Thank you for the report. I fixed this in a different way.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 06 Nov 2011 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 181 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.