From 9c09f54acc80ee09d4191326ec7293e31e50d867 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 2 May 2005 00:28:20 +0000 Subject: [PATCH] (cc-create-define-alist): Use a shell. (cc-mode-cpp-program): Rename to cc-define-list-program and move to cc-vars.el. --- lisp/progmodes/cc-mode.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index fdb308b7dc9..df27ee5a1b9 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -640,16 +640,15 @@ Note that the style variables are always made local to the buffer." ;;;###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) -- 2.39.2