Article View: gnu.emacs.bug
Article #88036cc-mode should be able to "learn" the style of a file
From: Jonathan I. Kamens
Date: Tue, 16 Aug 1994 15:44
Date: Tue, 16 Aug 1994 15:44
29 lines
2037 bytes
2037 bytes
In GNU Emacs 19.25.3 of Sun Aug 14 1994 on gza-client1 (sparc-sun-sunos4.1.3) This is more of a change request than a bug report. It's a request for a feature that I've wanted to see added to a C mode for a long time now. Since active development is being done on cc-mode, and it seems to be a pretty complete mode, I'm suggesting that someone add it to cc-mode. I can't do it myself; the cc-mode code is simply too obtuse for me :-). What I'd like is for there to be some function that I can run, either in a hook or by hand, when I load a C file into Emacs, to get Emacs to automatically realize what formatting parameters it should use when editing the file. In other words, I don't want to have to automatically tweak c-offsets-alist when I load a file that someone else created that uses a style different from my own. I'd like to tell cc-mode, "Look at the code in this file and figure out from it how to format any new code that I write." It may be impossible for such a function to get things exactly right, but it could probably come pretty close pretty easily. If you implement something like this, I owe you a beer. It doesn't count if it already exists and I don't know about it :-). Thanks, Jonathan Kamens | OpenVision Technologies, Inc. | jik@cam.ov.com
Technical Details
Message-ID:
<199408161543.LAA12827@gza-client1.aktis.com>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!newsfeed.ACO.net!news.sztaki.hu!EU.net!howland.reston.ans.net!math.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!cam.ov.COM!jikShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,215d624fa498417d,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-08-16 08:57:53 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!newsfeed.ACO.net!news.sztaki.hu!EU.net!howland.reston.ans.net!math.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!cam.ov.COM!jik From: jik@cam.ov.COM (Jonathan I. Kamens) Newsgroups: gnu.emacs.bug Subject: cc-mode should be able to "learn" the style of a file Date: 16 Aug 1994 11:44:58 -0400 Organization: GNUs Not Usenet Lines: 29 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <199408161543.LAA12827@gza-client1.aktis.com>