649 |
(with-output-to-string |
(with-output-to-string |
650 |
(with-current-buffer standard-output |
(with-current-buffer standard-output |
651 |
(call-process cc-mode-cpp-program |
(call-process cc-mode-cpp-program |
652 |
file t nil "-dM")))) |
(if (file-exists-p file) file nil) t nil "-dM")))) |
653 |
(define-list (split-string output "\n" t)) |
(define-list (split-string output "\n" t)) |
654 |
(name)) |
(name)) |
655 |
|
(setq cc-define-alist nil) |
656 |
(dolist (define define-list) |
(dolist (define define-list) |
657 |
(setq name (nth 1 (split-string define "[( ]"))) |
(setq name (nth 1 (split-string define "[( ]"))) |
658 |
(push (cons name define) cc-define-alist)))) |
(push (cons name define) cc-define-alist)))) |
687 |
(easy-menu-add c-c-menu) |
(easy-menu-add c-c-menu) |
688 |
(cc-imenu-init cc-imenu-c-generic-expression) |
(cc-imenu-init cc-imenu-c-generic-expression) |
689 |
(cc-create-define-alist) |
(cc-create-define-alist) |
690 |
|
(add-hook 'after-save-hook 'cc-create-define-alist nil t) |
691 |
(run-mode-hooks 'c-mode-common-hook 'c-mode-hook) |
(run-mode-hooks 'c-mode-common-hook 'c-mode-hook) |
692 |
(c-update-modeline)) |
(c-update-modeline)) |
693 |
|
|