> >> On my OSX (10.3.8) it is in /usr/bin/cpp. > > > > In that case, c-macro-preprocessor is set to "/lib/cpp -C" and > > c-macro-expand > > doesn't work on OSX? > > If c-macro-preprocessor is a recent variable I can't check because > Emacs does not currently compile on Mac OSX 10.3. My (a bit old) CVS > compile does not seem to have it.
c-macro-expand and c-macro-preprocessor have been around for quite a while. c-macro-expand is an interactive autoloaded Lisp function in cmacexp.el that can be invoked in C mode with C-c C-e or from the menu-bar. Apparently this file is not part of cc-mode so perhaps its not being maintained. c-macro-expand seems quite useful so I'm kind of surprised that, as a C specialist, you're don't use it/not familiar with it. > But c-macro-expand does not work: If we added the line below to c-macro-preprocessor would it work then for Mac OSX? Nick (defcustom c-macro-preprocessor ;; Cannot rely on standard directory on MS-DOS to find CPP. In ;; fact, cannot rely on having cpp.exe, either, in latest GCC ;; versions. (cond ((eq system-type 'ms-dos) "gcc -E -C -o - -") ;; Solaris has it in an unusual place. ((and (string-match "^[^-]*-[^-]*-\\(solaris\\|sunos5\\)" system-configuration) (file-exists-p "/opt/SUNWspro/SC3.0.1/bin/acomp")) "/opt/SUNWspro/SC3.0.1/bin/acomp -C -E") ((file-exists-p "/usr/ccs/lib/cpp") "/usr/ccs/lib/cpp -C") + ((eq system-type 'darwin) "cpp -C") (t "/lib/cpp -C")) "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." :type 'string :group 'c-macro) _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel