Article View: gnu.emacs.bug
Article #99312(none)
From: nixpbe!uucp
Date: Sun, 14 Oct 1990 20:56
Date: Sun, 14 Oct 1990 20:56
55 lines
2270 bytes
2270 bytes
>From uucp Mon Oct 15 03:50 WST 1990 remote from nixsin
To: nixpbe!unido!gnu-emacs-bug
Path: nixsin!nixpbe!nixbur!linus!agate!apple!bionet!snorkelwacker!tut.cis.ohio-state.edu!BUCSF.BU.EDU!jbw
From: jbw@BUCSF.BU.EDU (Joe Wells)
Newsgroups: gnu.emacs.bug
Subject: Re: Indentation bug in C mode
Message-ID: <9009290912.AA25872@bucsf.bu.edu>
Date: 29 Sep 90 09:12:13 GMT
References: <9009111409.AA04113@ccrwest.UUCP>
Sender: root@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 40
Weening> Emacs 18.55, Sun OS 4.0.3. In C mode, code such as the following
Weening> doesn't indent correctly:
Weening> main() {
Weening> while (1) {
Weening> x = 1;
Weening> #define foo (a+\
Weening> b)
Weening> y = 2;
Weening> After the continuation line of the #define, Emacs indents two
Weening> columns instead of four as needed in this context.
c-backward-to-noncomment doesn't handle continuation lines properly.
Here's the fix:
*** /usr14/gnu/dist-18.55/lisp/c-mode.el Fri May 27 21:28:12 1988
--- c-mode.el Sat Sep 29 05:10:31 1990
***************
*** 500,504 ****
(looking-at "\\*/")))
(search-backward "/*" lim 'move)
! (beginning-of-line)
(skip-chars-forward " \t")
(setq stop (or (not (looking-at "#")) (<= (point) lim)))
--- 500,508 ----
(looking-at "\\*/")))
(search-backward "/*" lim 'move)
! (while (progn
! (beginning-of-line)
! (eq ?\\ (char-after (- (point) 2))))
! (forward-char -1)
! (beginning-of-line))
(skip-chars-forward " \t")
(setq stop (or (not (looking-at "#")) (<= (point) lim)))
Enjoy,
--
Joe Wells <jbw@bu.edu>
Technical Details
Message-ID:
<9010142056.AV10646@unido.informatik.uni-dortmund.de>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!relay.eu.net!nixpbe!uucpShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,b5ec764478ce47e0 X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1990-10-14 13:56:10 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!relay.eu.net!nixpbe!uucp From: nixpbe!uucp@relay.eu.net Newsgroups: gnu.emacs.bug Subject: (none) Message-ID: <9010142056.AV10646@unido.informatik.uni-dortmund.de> Date: 14 Oct 90 20:56:10 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 55 Approved: bug-gnu-emacs@prep.ai.mit.edu Posted: Sun Oct 14 21:56:10 1990