> From: Nick Roberts <[EMAIL PROTECTED]> > Date: Fri, 6 May 2005 09:02:51 +1200 > Cc: Eli Zaretskii <[EMAIL PROTECTED]>, [EMAIL PROTECTED], > emacs-devel@gnu.org > > Stefan Monnier writes: > > >> ((not (file-executable-p "/lib/cpp")) "gcc -E -C -") > > > > > Right, but please amend this to look for cpp.exe etc. on systems that > > > need that (or perhaps file-executable-p should try that > > > automatically?). > > > > Or maybe (executable-find "/lib/cpp"), > > Since its a trivial change for someone who knows what the right change is, > could you or Eli make it please. I think my changes are more general, but > theres not much point in them being continually reviewed for correctness.
Done. I preferred to use locate-file instead of executable-find, since the latter would load another package. The new version is below, in case someone wants to comment. (defcustom c-macro-preprocessor (cond ;; 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") ((locate-file "/usr/ccs/lib/cpp" '("/") exec-suffixes 'file-executable-p) "/usr/ccs/lib/cpp -C") ((locate-file "/lib/cpp" '("/") exec-suffixes 'file-executable-p) "/lib/cpp -C") ;; On some systems, we cannot rely on standard directories to ;; find CPP. In fact, we cannot rely on having cpp, either, ;; in some GCC versions. ((locate-file "cpp" exec-path exec-suffixes 'file-executable-p) "cpp -C") (t "gcc -E -C -o - -")) "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