From: Eli Zaretskii Date: Sat, 2 May 2015 09:01:04 +0000 (+0300) Subject: Fix error diagnostics of c-macro-expand X-Git-Tag: emacs-25.0.90~2229^2~3 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ad7e1143fc6d904bc5a9a0a05536986f53a48cf7;p=emacs.git 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. --- 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)