# HG changeset patch # User Richard M. Stallman # Date 776822109 0 # Node ID fcddf32619172ee0b171ce5f08c1ab5205185e21 # Parent b97057eb17d3cfbe59d634c3b992f2e54084fa63 (c-macro-expansion): If the CPP output is empty, just show error messages. diff -r b97057eb17d3 -r fcddf3261917 lisp/progmodes/cmacexp.el --- a/lisp/progmodes/cmacexp.el Sat Aug 13 23:13:10 1994 +0000 +++ b/lisp/progmodes/cmacexp.el Sat Aug 13 23:55:09 1994 +0000 @@ -3,7 +3,7 @@ ;; Copyright (C) 1992, 1994 Free Software Foundation, Inc. ;; Author: Francesco Potorti` -;; 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 @@ (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)