emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master ad7e114: Fix error diagnostics of c-macro-expand


From: Eli Zaretskii
Subject: [Emacs-diffs] master ad7e114: Fix error diagnostics of c-macro-expand
Date: Sat, 02 May 2015 09:02:23 +0000

branch: master
commit ad7e1143fc6d904bc5a9a0a05536986f53a48cf7
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el
index 357625d..19d0473 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]