diff options
| author | Nick Roberts | 2005-05-02 00:28:20 +0000 |
|---|---|---|
| committer | Nick Roberts | 2005-05-02 00:28:20 +0000 |
| commit | 9c09f54acc80ee09d4191326ec7293e31e50d867 (patch) | |
| tree | 6f142424ae431d2f0f8b66fc7d7ee140f035afa9 | |
| parent | 07beadff0ac14b9d87dae4f93e9931b9a89439b0 (diff) | |
| download | emacs-9c09f54acc80ee09d4191326ec7293e31e50d867.tar.gz emacs-9c09f54acc80ee09d4191326ec7293e31e50d867.zip | |
(cc-create-define-alist): Use a shell.
(cc-mode-cpp-program): Rename to cc-define-list-program and
move to cc-vars.el.
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 7 |
1 files 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." | |||
| 640 | ;;;###autoload (add-to-list 'auto-mode-alist '("\\.lex\\'" . c-mode)) | 640 | ;;;###autoload (add-to-list 'auto-mode-alist '("\\.lex\\'" . c-mode)) |
| 641 | 641 | ||
| 642 | (defvar cc-define-alist nil "Alist of #define directives for GUD tooltips.") | 642 | (defvar cc-define-alist nil "Alist of #define directives for GUD tooltips.") |
| 643 | (defvar cc-mode-cpp-program "gcc -E" | ||
| 644 | "*The program name for the CPP pre-processor.") | ||
| 645 | 643 | ||
| 646 | (defun cc-create-define-alist () | 644 | (defun cc-create-define-alist () |
| 647 | (let* ((file (buffer-file-name)) | 645 | (let* ((file (buffer-file-name)) |
| 648 | (output | 646 | (output |
| 649 | (with-output-to-string | 647 | (with-output-to-string |
| 650 | (with-current-buffer standard-output | 648 | (with-current-buffer standard-output |
| 651 | (call-process cc-mode-cpp-program | 649 | (call-process shell-file-name |
| 652 | (if (file-exists-p file) file nil) t nil "-dM")))) | 650 | (if (file-exists-p file) file nil) |
| 651 | (list t nil) nil "-c" cc-define-list-program)))) | ||
| 653 | (define-list (split-string output "\n" t)) | 652 | (define-list (split-string output "\n" t)) |
| 654 | (name)) | 653 | (name)) |
| 655 | (setq cc-define-alist nil) | 654 | (setq cc-define-alist nil) |