]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/cmacexp.el
; Remove extraneous "coding: utf-8" specifications in Elisp files
[gnu-emacs] / lisp / progmodes / cmacexp.el
index 0feefd99715b87bba7330760eba599a498d468b5..9953cae2bef5790fe4db833832f52c9b19aad924 100644 (file)
@@ -1,8 +1,9 @@
 ;;; cmacexp.el --- expand C macros in a region
 
-;; Copyright (C) 1992, 1994, 1996, 2000-2012  Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1994, 1996, 2000-2015 Free Software Foundation,
+;; Inc.
 
-;; Author: Francesco Potorti` <pot@gnu.org>
+;; Author: Francesco Potortì <pot@gnu.org>
 ;; Adapted-By: ESR
 ;; Keywords: c
 
@@ -49,7 +50,7 @@
 
 ;; INSTALLATION ======================================================
 
-;; Put the following in your ~/.emacs file.
+;; Put the following in your init file.
 
 ;; If you want the *Macroexpansion* window to be not higher than
 ;; necessary:
@@ -69,7 +70,7 @@
 ;; BUG REPORTS =======================================================
 
 ;; Please report bugs, suggestions, complaints and so on to
-;; pot@gnu.org (Francesco Potorti`).
+;; bug-gnu-emacs@gnu.org and pot@gnu.org (Francesco Potortì).
 
 ;; IMPROVEMENTS OVER emacs 18.xx cmacexp.el ==========================
 
@@ -80,7 +81,7 @@
 ;;   making comments visible in the expansion.
 ;; - All work is done in core memory, no need for temporary files.
 
-;; ACKNOWLEDGEMENTS ==================================================
+;; ACKNOWLEDGMENTS ===================================================
 
 ;; A lot of thanks to Don Maszle who did a great work of testing, bug
 ;; reporting and suggestion of new features.  This work has been
@@ -363,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)
@@ -388,8 +389,9 @@ Optional arg DISPLAY non-nil means show messages in the echo area."
                ;; Put the messages inside a comment, so they won't get in
                ;; the way of font-lock, highlighting etc.
                (insert
-                (format "/* Preprocessor terminated with status %s\n\n   Messages from `%s\':\n\n"
-                        exit-status cppcommand))
+                (format
+                 "/* Preprocessor terminated with status %s\n\n   Messages from '%s':\n\n"
+                 exit-status cppcommand))
                (goto-char (+ (point)
                              (nth 1 (insert-file-contents tempname))))
                (insert "\n\n*/\n")))