Path: 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: 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 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