From bb9c1f2a82c70e9e020c6d3926dac4263621c4c4 Mon Sep 17 00:00:00 2001 From: Sam Steingold Date: Fri, 29 Apr 2005 18:23:33 +0000 Subject: [PATCH] (cc-mode-cpp-program): New user variable. (cc-create-define-alist): Use it instead of the hard-coded string. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/cc-mode.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 75b4168edde..cab0cc3f468 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-04-29 Sam Steingold + + * progmodes/cc-mode.el (cc-mode-cpp-program): New user variable. + (cc-create-define-alist): Use it instead of the hard-coded string. + 2005-04-29 Stefan Monnier * international/mule-conf.el (file-coding-system-alist): Fix regexp diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index b464c1483b1..920b253d4b7 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -640,13 +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 "/lib/cpp" + "*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 "/lib/cpp" + (call-process cc-mode-cpp-program file t nil "-dM")))) (define-list (split-string output "\n" t)) (name)) -- 2.39.2