changeset 61940:bf3ad3b1e943

(c-mode): If there is no file (Macroexpansion) don't create an alist.
author Nick Roberts <nickrob@snap.net.nz>
date Sat, 30 Apr 2005 05:16:49 +0000
parents 6b3d5f6887e4
children b3a3357502cd
files lisp/progmodes/cc-mode.el
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/cc-mode.el	Sat Apr 30 05:15:52 2005 +0000
+++ b/lisp/progmodes/cc-mode.el	Sat Apr 30 05:16:49 2005 +0000
@@ -686,7 +686,7 @@
   (c-common-init 'c-mode)
   (easy-menu-add c-c-menu)
   (cc-imenu-init cc-imenu-c-generic-expression)
-  (cc-create-define-alist)
+  (if (buffer-file-name) (cc-create-define-alist))
   (add-hook 'after-save-hook 'cc-create-define-alist nil t)
   (run-mode-hooks 'c-mode-common-hook 'c-mode-hook)
   (c-update-modeline))