Article View: gnu.emacs.bug
Article #1863c-mode bug?
From: Simon J. Gerraty
Date: Tue, 06 Feb 1990 04:44
Date: Tue, 06 Feb 1990 04:44
30 lines
1318 bytes
1318 bytes
In c-mode; if point is below a line such as (at top level);
char foo="()";
calculate-c-indent is fooled into thinking that it should apply
c-argdecl-indent.
This used to drive me nuts since all my .c files have;
static char *sccs_id = "%Z%%M% ... (%Y%)";
The following patch "seems" to fix the problem:
*** /usr/local/lib/emacs-18.53/lisp/c-mode.el Thu Feb 1 22:46:28 1990
--- c-mode.el Mon Feb 5 23:25:36 1990
***************
*** 386,391 ****
--- 386,397 ----
(save-excursion
(re-search-backward "^[^ \^L\t\n#]" nil 'move)
(if (and (looking-at "\\sw\\|\\s_")
+ ;; 90-02-05 <sjg@zen.oz>
+ ;; used to muck up if something like
+ ;; char foo="()";
+ ;; was in the buffer, next line seems to
+ ;; fix it.
+ (not (looking-at ".*\"[^\"]*("))
(looking-at ".*(")
(progn
(goto-char (1- (match-end 0)))
Technical Details
Message-ID:
<9002051244.AA07090@zen>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!tut.cis.ohio-state.edu!zen.oz.au!sjgShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!tut.cis.ohio-state.edu!zen.oz.au!sjg From: sjg@zen.oz.au (Simon J. Gerraty) Newsgroups: gnu.emacs.bug Subject: c-mode bug? Message-ID: <9002051244.AA07090@zen> Date: 6 Feb 90 04:44:10 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 30