emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r99405: Flymake fix to handle more C+


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r99405: Flymake fix to handle more C++ filenames (Bug#5488).
Date: Thu, 28 Jan 2010 14:53:11 -0500
User-agent: Bazaar (2.0.2)

------------------------------------------------------------
revno: 99405
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Thu 2010-01-28 14:53:11 -0500
message:
  Flymake fix to handle more C++ filenames (Bug#5488).
  
  * progmodes/flymake.el (flymake-allowed-file-name-masks)
  (flymake-master-make-header-init): Add other C++ filename masks.
  (flymake-find-possible-master-files)
  (flymake-check-patch-master-file-buffer): Doc fixes (Bug#5488).
modified:
  lisp/ChangeLog
  lisp/progmodes/flymake.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-01-28 06:06:41 +0000
+++ b/lisp/ChangeLog    2010-01-28 19:53:11 +0000
@@ -1,3 +1,10 @@
+2010-01-28  Nil Geisweiller  <address@hidden>  (tiny change)
+
+       * progmodes/flymake.el (flymake-allowed-file-name-masks)
+       (flymake-master-make-header-init): Add other C++ filename masks.
+       (flymake-find-possible-master-files)
+       (flymake-check-patch-master-file-buffer): Doc fixes (Bug#5488).
+
 2010-01-28  Michael Albinus  <address@hidden>
 
        Fix some busybox annoyances.

=== modified file 'lisp/progmodes/flymake.el'
--- a/lisp/progmodes/flymake.el 2010-01-14 18:49:53 +0000
+++ b/lisp/progmodes/flymake.el 2010-01-28 19:53:11 +0000
@@ -269,8 +269,7 @@
   :group 'tools)
 
 (defcustom flymake-allowed-file-name-masks
-  '(("\\.c\\'" flymake-simple-make-init)
-    ("\\.cpp\\'" flymake-simple-make-init)
+  '(("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'" flymake-simple-make-init)
     ("\\.xml\\'" flymake-xml-init)
     ("\\.html?\\'" flymake-xml-init)
     ("\\.cs\\'" flymake-simple-make-init)
@@ -291,7 +290,7 @@
     ;; ("[ \t]*\\input[ \t]*{\\(.*\\)\\(%s\\)}" 1 2 ))
     ;; ("\\.tex\\'" 1)
     )
-  "*Files syntax checking is allowed for."
+  "Files syntax checking is allowed for."
   :group 'flymake
   :type '(repeat (string symbol symbol symbol)))
 
@@ -384,7 +383,7 @@
 
 (defun flymake-find-possible-master-files (file-name master-file-dirs masks)
   "Find (by name and location) all possible master files.
-Master files are .cpp and .c for and .h.  Files are searched for
+Master files include .cpp and .c for .h.  Files are searched for
 starting from the .h directory and max max-level parent dirs.
 File contents are not checked."
   (let* ((dirs master-file-dirs)
@@ -434,9 +433,11 @@
         source-file-name patched-source-file-name
         include-dirs regexp)
   "Check if MASTER-FILE-NAME is a master file for SOURCE-FILE-NAME.
-For .cpp master file this means it includes SOURCE-FILE-NAME (.h).
 If yes, patch a copy of MASTER-FILE-NAME to include PATCHED-SOURCE-FILE-NAME
 instead of SOURCE-FILE-NAME.
+
+For example, foo.cpp is a master file if it includes foo.h.
+
 Whether a buffer for MATER-FILE-NAME exists, use it as a source
 instead of reading master file from disk."
   (let* ((source-file-nondir (file-name-nondirectory source-file-name))
@@ -1700,9 +1701,10 @@
 
 ;;;; .h/make specific
 (defun flymake-master-make-header-init ()
-  (flymake-master-make-init 'flymake-get-include-dirs
-                           '("\\.cpp\\'" "\\.c\\'")
-                           "[ \t]*#[ \t]*include[ 
\t]*\"\\([[:word:]0-9/\\_.]*%s\\)\""))
+  (flymake-master-make-init
+   'flymake-get-include-dirs
+   '("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'")
+   "[ \t]*#[ \t]*include[ \t]*\"\\([[:word:]0-9/\\_.]*%s\\)\""))
 
 ;;;; .java/make specific
 (defun flymake-simple-make-java-init ()


reply via email to

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