From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Dziulko Newsgroups: gmane.emacs.help Subject: Re: using c-macro-expand Date: Fri, 4 Oct 2002 14:29:51 -0400 (EDT) Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1033756341 4667 127.0.0.1 (4 Oct 2002 18:32:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 4 Oct 2002 18:32:21 +0000 (UTC) Cc: Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17xXFK-0001Ct-00 for ; Fri, 04 Oct 2002 20:32:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17xXEC-0000Of-00; Fri, 04 Oct 2002 14:31:08 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17xXDC-000880-00 for help-gnu-emacs@gnu.org; Fri, 04 Oct 2002 14:30:06 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17xXD6-00086z-00 for help-gnu-emacs@gnu.org; Fri, 04 Oct 2002 14:30:05 -0400 Original-Received: from klaatu.canisius.edu ([138.92.8.100]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17xXD5-00086s-00 for help-gnu-emacs@gnu.org; Fri, 04 Oct 2002 14:30:00 -0400 Original-Received: from localhost (dziulko@localhost) by klaatu.canisius.edu (8.11.2/8.11.2) with ESMTP id g94ITpU09424; Fri, 4 Oct 2002 14:29:51 -0400 Original-To: Michael Slass In-Reply-To: Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2269 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2269 On Fri, 4 Oct 2002, Michael Slass wrote: > Kevin Dziulko writes: > > >When I run to c-macro-expand command, I get the following: > > > >---------------------------------------- > >/* Preprocessor terminated with status 1 > > > > Messages from `/lib/cpp -C ': > > > >/lib/cpp: Command not found > > > > > >*/ > > > >Preprocessor produced no output > >---------------------------------------- > > > >I'm running GNU Emacs 20.2.3 (sparc-sun-solaris2.6, X toolkit). > >I don't know what cpp -C is. Do I need to set a path to my > >c compiler (/usr/ucb/cc) or something? > > > >Thanks! > >Kevin > > > > > > > > I think you need to customize the variable c-macro-preprocessor > > >From the file cmacexp.el: > > ,---- > | ;; If you use a preprocessor other than /lib/cpp (be careful to set a > | ;; -C option or equivalent in order to make the preprocessor not to > | ;; strip the comments): > | ;;(setq c-macro-preprocessor "gpp -C") > | ;; > | ;; If you often use a particular set of flags: > | ;;(setq c-macro-cppflags "-I /usr/include/local -DDEBUG" > | ;; > | ;; If you want the "Preprocessor arguments: " prompt: > | ;;(setq c-macro-prompt-flag t) > `---- > > ,----[ C-h v c-macro-preprocessor RET ] > | c-macro-preprocessor's value is "/lib/cpp -C" > | > | Documentation: > | The preprocessor used by the cmacexp package. > | > | If you change this, be sure to preserve the `-C' (don't strip comments) > | option, or to set an equivalent one. > | > | You can customize this variable. > | > | Defined in `/usr/share/emacs/21.2/lisp/progmodes/cmacexp.el'. > `---- > > So you do need to set it to the path to your c compiler, and include > whatever switch is uses to indicate "preprocessor only" > > > I added to .emacs: (setq c-macro-preprocessor "/usr/ucb/cc -C -E") cc is the c compiler, -C for preprocessor to leave in comments, and -E to preprocess only. Now when I run c-macro-expand, I get error message: Search failed: "^J??? !!! ??? start of c-macro expansion ??? !!! ???" any ideas?