all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#5488: flymake does not support .cc + patch to fix it
@ 2010-01-28 18:44 Nil Geisweiller
  2010-01-28 19:48 ` Glenn Morris
  2010-01-28 19:53 ` Chong Yidong
  0 siblings, 2 replies; 4+ messages in thread
From: Nil Geisweiller @ 2010-01-28 18:44 UTC (permalink / raw
  To: 5488

Hi,

flymake.el does not support .cc (only .c and .cpp). I've written a patch
for it (made a few tests and so far it works,
it is a rather trivial patch so I expect it to work properly).

I've produced the patch based on http://repo.or.cz/r/emacs.git because

bzr branch http://bzr.savannah.gnu.org/r/emacs

returns

bzr: ERROR: Not a branch: "http://bzr.savannah.gnu.org/r/emacs/.bzr/branch/"

and git clone git://git.savannah.gnu.org/emacs.git seems not up to date.

===================== flymake_support_cc.patch =========================
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 4af331c..7fdf8ca 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -270,6 +270,7 @@ are the string substitutions (see `format')."

 (defcustom flymake-allowed-file-name-masks
   '(("\\.c\\'" flymake-simple-make-init)
+    ("\\.cc\\'" flymake-simple-make-init)
     ("\\.cpp\\'" flymake-simple-make-init)
     ("\\.xml\\'" flymake-xml-init)
     ("\\.html?\\'" flymake-xml-init)
@@ -384,7 +385,7 @@ Return t if so, nil if not."

 (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 are .cpp, .cc 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,7 +435,7 @@ to the beginning of the list (File.h -> File.cpp
moved to top)."
         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).
+For .cpp and .cc 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.
 Whether a buffer for MATER-FILE-NAME exists, use it as a source
@@ -1701,7 +1702,7 @@ Use CREATE-TEMP-F for creating temp copy."
 ;;;; .h/make specific
 (defun flymake-master-make-header-init ()
   (flymake-master-make-init 'flymake-get-include-dirs
-			    '("\\.cpp\\'" "\\.c\\'")
+			    '("\\.cpp\\'" "\\.cc\\'" "\\.c\\'")
 			    "[ \t]*#[ \t]*include[ \t]*\"\\([[:word:]0-9/\\_.]*%s\\)\""))

 ;;;; .java/make specific
======================================================================

Regards
Nil







^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#5488: flymake does not support .cc + patch to fix it
  2010-01-28 18:44 bug#5488: flymake does not support .cc + patch to fix it Nil Geisweiller
@ 2010-01-28 19:48 ` Glenn Morris
  2010-01-28 20:33   ` Chong Yidong
  2010-01-28 19:53 ` Chong Yidong
  1 sibling, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2010-01-28 19:48 UTC (permalink / raw
  To: Nil Geisweiller; +Cc: 5488

Nil Geisweiller wrote:

> bzr branch http://bzr.savannah.gnu.org/r/emacs
>
> returns
>
> bzr: ERROR: Not a branch: "http://bzr.savannah.gnu.org/r/emacs/.bzr/branch/"

The correct URL is:

http://bzr.savannah.gnu.org/r/emacs/trunk/

If you read the instructions on Savannah, they are unfortunately
wrong, as reported 2 months ago:

http://savannah.gnu.org/support/?107118






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#5488: flymake does not support .cc + patch to fix it
  2010-01-28 18:44 bug#5488: flymake does not support .cc + patch to fix it Nil Geisweiller
  2010-01-28 19:48 ` Glenn Morris
@ 2010-01-28 19:53 ` Chong Yidong
  1 sibling, 0 replies; 4+ messages in thread
From: Chong Yidong @ 2010-01-28 19:53 UTC (permalink / raw
  To: Nil Geisweiller; +Cc: 5488

> flymake.el does not support .cc (only .c and .cpp). I've written a patch
> for it (made a few tests and so far it works,
> it is a rather trivial patch so I expect it to work properly).

Thanks.  I've commited your patch, with some modifications.






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#5488: flymake does not support .cc + patch to fix it
  2010-01-28 19:48 ` Glenn Morris
@ 2010-01-28 20:33   ` Chong Yidong
  0 siblings, 0 replies; 4+ messages in thread
From: Chong Yidong @ 2010-01-28 20:33 UTC (permalink / raw
  To: Glenn Morris; +Cc: 5488, Nil Geisweiller

Glenn Morris <rgm@gnu.org> writes:

> Nil Geisweiller wrote:
>
>> bzr branch http://bzr.savannah.gnu.org/r/emacs
>>
>> returns
>>
>> bzr: ERROR: Not a branch: "http://bzr.savannah.gnu.org/r/emacs/.bzr/branch/"
>
> The correct URL is:
>
> http://bzr.savannah.gnu.org/r/emacs/trunk/
>
> If you read the instructions on Savannah, they are unfortunately
> wrong, as reported 2 months ago:
>
> http://savannah.gnu.org/support/?107118

They seem to be corrected now, actually.  I've also updated the main
Savannah page to display a short version of the instructions.






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-01-28 20:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-28 18:44 bug#5488: flymake does not support .cc + patch to fix it Nil Geisweiller
2010-01-28 19:48 ` Glenn Morris
2010-01-28 20:33   ` Chong Yidong
2010-01-28 19:53 ` Chong Yidong

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.