aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1994-08-13 23:55:09 +0000
committerRichard M. Stallman <[email protected]>1994-08-13 23:55:09 +0000
commiteb426f3a0823744fd04a94a5945d8bdb5b6751c2 (patch)
tree196a49761c1e046edf841d7aa257a7bb9671669a /lisp
parent45945a7bc28eacb6d38ae5fd75203069d6bfd14f (diff)
(c-macro-expansion): If the CPP output is empty, just show error messages.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/cmacexp.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el
index daaa0109bb..a84aa5eb09 100644
--- a/lisp/progmodes/cmacexp.el
+++ b/lisp/progmodes/cmacexp.el
@@ -3,7 +3,7 @@
;; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
;; Author: Francesco Potorti` <[email protected]>
-;; Version: $Id: cmacexp.el,v 1.14 1994/05/03 22:17:03 kwzh Exp rms $
+;; Version: $Id: cmacexp.el,v 1.15 1994/08/07 17:23:44 rms Exp rms $
;; Adapted-By: ESR
;; Keywords: c
@@ -305,11 +305,14 @@ Optional arg DISPLAY non-nil means show messages in the echo area."
(call-process-region 1 (point-max) "sh" t t nil "-c"
(concat cppcommand " 2>" tempname)))
(if display (message (concat mymsg "done")))
- ;; Find and delete the mark of the start of the expansion.
- ;; Look for `# nn "file.c"' lines and delete them.
- (goto-char (point-min))
- (search-forward startmarker)
- (delete-region 1 (point))
+ (if (= (buffer-size) 0)
+ ;; Empty output is normal after a fatal error.
+ (insert "\nPreprocessor produced no output\n")
+ ;; Find and delete the mark of the start of the expansion.
+ ;; Look for `# nn "file.c"' lines and delete them.
+ (goto-char (point-min))
+ (search-forward startmarker)
+ (delete-region 1 (point)))
(while (re-search-forward (concat "^# [0-9]+ \""
(regexp-quote filename)
"\"") nil t)