From ad7e1143fc6d904bc5a9a0a05536986f53a48cf7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 2 May 2015 12:01:04 +0300 Subject: [PATCH] Fix error diagnostics of c-macro-expand * lisp/progmodes/cmacexp.el (c-macro-expansion): Don't bail out too early if no start-marker string was found -- that generally means cpp exited abnormally, and we still want to show its error messages to the user. --- lisp/progmodes/cmacexp.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el index 357625d10cf..19d0473c42d 100644 --- a/lisp/progmodes/cmacexp.el +++ b/lisp/progmodes/cmacexp.el @@ -364,8 +364,8 @@ Optional arg DISPLAY non-nil means show messages in the echo area." ;; 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 (search-forward startmarker nil t) + (delete-region 1 (point)))) (while (re-search-forward (concat "^# [0-9]+ \"" (regexp-quote filename) "\"") nil t) -- 2.39.2