Path: utzoo!utgpu!water!watmath!clyde!rutgers!rochester!ur-tut!sunybcs!boulder!hao!ames!amdahl!dlb!dana!rap From: rap@dana.UUCP (Rob Peck) Newsgroups: comp.emacs Subject: Re: Hiding comments in C mode Summary: macros would maybe be good enough for a start... Message-ID: <296@dana.UUCP> Date: 21 Jan 88 22:39:42 GMT References: <8801202039.AA09434@ucbvax.Berkeley.EDU> Organization: Dana Computer, Inc., Sunnyvale, CA Lines: 29 In article <8801202039.AA09434@ucbvax.Berkeley.EDU>, dsill@NSWC-OAS.ARPA (Dave Sill) writes: > being able to hide comments on command. How hard would it be to add > this feature to GNU's C mode? It sure would be handy, and a boon to > readability, to be able to compress comments into /**/. Kinda like > outline mode... It seems that to get a similar effect, (have not tried yet, but see no reason why not), you could: Mark beginning of C source Move to end of C source Copy region to buffer: no-comments Switch to buffer: no-comments Loop the following: Find "/*" Set Mark Find "*/" cursor-left onto the "*" Delete-region Repeat loop until end of buffer And view that new buffer. Problem would come in if you wanted to make changes (or add new comments) and then want to push that back into the source - hmmm maybe a combination of diff and patch (but I don't have time to do it, though I do agree, neat idea - usually I have so many comments in my code folks find it difficult to see the code itself.) Rob Peck ...ihnp4!hplabs!dana!rap