changeset 61934:35953c818b05

(cc-mode-cpp-program): New user variable. (cc-create-define-alist): Use it instead of the hard-coded string.
author Sam Steingold <sds@gnu.org>
date Fri, 29 Apr 2005 18:23:33 +0000
parents e555645f13f4
children 89b44e97dc29
files lisp/ChangeLog lisp/progmodes/cc-mode.el
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Apr 29 16:09:59 2005 +0000
+++ b/lisp/ChangeLog	Fri Apr 29 18:23:33 2005 +0000
@@ -1,3 +1,8 @@
+2005-04-29  Sam Steingold  <sds@gnu.org>
+
+	* 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  <monnier@iro.umontreal.ca>
 
 	* international/mule-conf.el (file-coding-system-alist): Fix regexp
--- a/lisp/progmodes/cc-mode.el	Fri Apr 29 16:09:59 2005 +0000
+++ b/lisp/progmodes/cc-mode.el	Fri Apr 29 18:23:33 2005 +0000
@@ -640,13 +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 "/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))