🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.emacs
Article #8211

C comment edit fix

#8211
From: Bill Carpenter
Date: Thu, 29 Dec 1988 20:51
22 lines
1334 bytes
Last year, a package for editing C source code comments was posted to
comp.emacs.  Here is a small (one line) change I made to it:

;(defconst c-comment-leader-regexp "^[ 	]*\\(/\\*\\|\\*/\\|\\*\\|\\*\\*\\)[ ]?"
(defconst c-comment-leader-regexp "^[ 	]*\\(/\\*\\|\\*/\\|\\*\\*\\|\\*\\)[ ]?" ;wjc
  "Regexp used to match C comment leaders.")

In other words, I changed to RE so that it looks for "**" before "*".
If you look for "*" first, you will find it and not find "**".  So, if
you use a c-comment-leader of "**", the c-comment-edit command leaves
one asterisk prepended when it throws text into the temp buffer for
editing.

[The last paragraph will sound like gibberish unless you are actually
looking at the elisp source.  Here's the ID provided by the author:

	;;; C Comment Edit
	;;; Copyright (C) 1987 Kyle E. Jones
]
--
--
   Bill Carpenter         att!ho5cad!wjc  or  attmail!bill
Technical Details
Message-ID: <WJC.88Dec29155128@hoswjc.ho5cad.ATT.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tank!shamash!nic.MR.NET!hal!cwjcc!gatech!rutgers!att!whuts!homxb!ho7cad!hoswjc!wjc

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tank!shamash!nic.MR.NET!hal!cwjcc!gatech!rutgers!att!whuts!homxb!ho7cad!hoswjc!wjc
From: wjc@ho5cad.ATT.COM (Bill Carpenter)
Newsgroups: comp.emacs
Subject: C comment edit fix
Message-ID: <WJC.88Dec29155128@hoswjc.ho5cad.ATT.COM>
Date: 29 Dec 88 20:51:28 GMT
Sender: nuucp@ho7cad.ATT.COM
Reply-To: att!ho5cad!wjc
Distribution: comp
Organization: AT&T Bell Laboratories
Lines: 22