🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #99266

(none)

#99266
From: NEWSMGR
Date: Wed, 17 Oct 1990 06:44
68 lines
2794 bytes
Relay-Version: VMS News - V6.0 1/9/90 VAX/VMS V5.3; site kontu.utu.fi
Path: kontu.utu.fi!polaris.utu.fi!news.funet.fi!sunic!mcsun!uunet!tut.cis.ohio-state.edu!relay.eu.net!nixpbe!uucp
Newsgroups: gnu.emacs.bug
Subject: (none)
Message-ID: <9010142056.AV10646@unido.informatik.uni-dortmund.de>
From: nixpbe!uucp@relay.eu.net
Date: 14 Oct 90 20:56:10 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Approved: bug-gnu-emacs@prep.ai.mit.edu
Lines: 55

>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: <1AFC163C636720618C@kontu.utu.fi>
Path: arc1-ca.pugleaf.net!gmdzi!unido!isaak!escher!nadia!smurf!ira.uka.de!sol.ctr.columbia.edu!cica!tut.cis.ohio-state.edu!KONTU.UTU.FI!NEWSMGR

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,f1dbc4b61e8e8143
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-10-16 23:44:00 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!isaak!escher!nadia!smurf!ira.uka.de!sol.ctr.columbia.edu!cica!tut.cis.ohio-state.edu!KONTU.UTU.FI!NEWSMGR
From: NEWSMGR@KONTU.UTU.FI
Newsgroups: gnu.emacs.bug
Subject: (none)
Message-ID: <1AFC163C636720618C@kontu.utu.fi>
Date: 17 Oct 90 06:44:00 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 68
Approved: bug-gnu-emacs@prep.ai.mit.edu
Posted: Wed Oct 17 07:44:00 1990