Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site cadre.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!rochester!cmu-cs-pt!cadre!km From: km@cadre.ARPA (Ken Mitchum) Newsgroups: net.sources,net.micro.pc,net.micro Subject: jove/MSDOS bug fix Message-ID: <511@cadre.ARPA> Date: Wed, 4-Sep-85 11:33:47 EDT Article-I.D.: cadre.511 Posted: Wed Sep 4 11:33:47 1985 Date-Received: Fri, 6-Sep-85 03:47:48 EDT Distribution: net Organization: Decision Systems Lab., University of Pittsburgh Lines: 20 Xref: watmath net.sources:3406 net.micro.pc:5212 net.micro:11829 Jove bug: c-mode does not get set on ".h" files and reading in a new file sets the mode correctly but does not update the mode line. Solution: replace setcmode() in io.c with the following: setcmode() { char *p; int len = curbuf->b_fname ? strlen(curbuf->b_fname) : 0; if (len < 2) return; p = &curbuf->b_fname[len -2]; if(strcmp(p,".h") && strcmp(p,".H") && strcmp(p,".c") && strcmp(p,".C")) return; OnFlag(globflags, CMODE); OnFlag(globflags, MATCHING); setfuncs(globflags); }