changeset 62007:230e62dae4d1

(cc-create-define-alist): Use a shell. (cc-mode-cpp-program): Rename to cc-define-list-program and move to cc-vars.el.
author Nick Roberts <nickrob@snap.net.nz>
date Mon, 02 May 2005 00:28:20 +0000
parents e3167e9f22d0
children ee10b311b39f
files lisp/progmodes/cc-mode.el
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/cc-mode.el	Mon May 02 00:23:27 2005 +0000
+++ b/lisp/progmodes/cc-mode.el	Mon May 02 00:28:20 2005 +0000
@@ -640,16 +640,15 @@
 ;;;###autoload (add-to-list 'auto-mode-alist '("\\.lex\\'" . c-mode))
 
 (defvar cc-define-alist nil "Alist of #define directives for GUD tooltips.")
-(defvar cc-mode-cpp-program "gcc -E"
-  "*The program name for the CPP pre-processor.")
 
 (defun cc-create-define-alist ()
   (let* ((file (buffer-file-name))
 	 (output
 	  (with-output-to-string
 	    (with-current-buffer standard-output
-	      (call-process cc-mode-cpp-program
-			    (if (file-exists-p file) file nil) t nil "-dM"))))
+	      (call-process shell-file-name
+			    (if (file-exists-p file) file nil)
+			    (list t nil) nil "-c" cc-define-list-program))))
 	(define-list (split-string output "\n" t))
 	(name))
     (setq cc-define-alist nil)