diff options
| author | Eli Zaretskii | 2015-05-02 12:01:04 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2015-05-02 12:01:04 +0300 |
| commit | ad7e1143fc6d904bc5a9a0a05536986f53a48cf7 (patch) | |
| tree | 08b8a20a5b186ad771bb836e49d641179ec8da33 | |
| parent | 8fef8521b20315f211cf5bc11dc15460bed5b579 (diff) | |
| download | emacs-ad7e1143fc6d904bc5a9a0a05536986f53a48cf7.tar.gz emacs-ad7e1143fc6d904bc5a9a0a05536986f53a48cf7.zip | |
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.
| -rw-r--r-- | lisp/progmodes/cmacexp.el | 4 |
1 files 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." | |||
| 364 | ;; Find and delete the mark of the start of the expansion. | 364 | ;; Find and delete the mark of the start of the expansion. |
| 365 | ;; Look for `# nn "file.c"' lines and delete them. | 365 | ;; Look for `# nn "file.c"' lines and delete them. |
| 366 | (goto-char (point-min)) | 366 | (goto-char (point-min)) |
| 367 | (search-forward startmarker) | 367 | (if (search-forward startmarker nil t) |
| 368 | (delete-region 1 (point))) | 368 | (delete-region 1 (point)))) |
| 369 | (while (re-search-forward (concat "^# [0-9]+ \"" | 369 | (while (re-search-forward (concat "^# [0-9]+ \"" |
| 370 | (regexp-quote filename) | 370 | (regexp-quote filename) |
| 371 | "\"") nil t) | 371 | "\"") nil t) |