<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Dec 18, 2013 at 2:16 PM, Alp Toker <span dir="ltr"><<a href="mailto:alp@nuanti.com" target="_blank" class="cremed">alp@nuanti.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><div class="im">
<br>
<div>On 18/12/2013 06:55, Daniel Jasper
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">I think we should revert this. cl is also the
default extension for common lisp programs and we most
definitely don't format those correctly (or within reasonable
amount of time).</div>
</blockquote>
<br></div>
I found 60 OpenCL files and 2 lisp files in the nearest source tree
I had to hand.<br>
<br>
And of those two, both list files have the .el extension, not .cl.<br>
<br>
A lisp developer* says on the topic:<br>
<br>
<blockquote type="cite">
<p style="text-indent:0px;letter-spacing:normal;text-align:left;font-variant:normal;font-style:normal;font-weight:normal;padding:0px;vertical-align:baseline;clear:both;line-height:18px;text-transform:none;font-size:14px;white-space:normal;margin:0px 0px 1em;font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;border:0px;background-repeat:initial initial;word-spacing:0px">
Common Lisp pathname endings for source code:</p>
<ul style="text-indent:0px;letter-spacing:normal;text-align:left;font-variant:normal;font-style:normal;font-weight:normal;padding:0px;vertical-align:baseline;line-height:18px;text-transform:none;font-size:14px;white-space:normal;margin:0px 0px 1em 30px;list-style:disc;font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;border:0px;background-repeat:initial initial;word-spacing:0px">
<li style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent;background-repeat:initial initial"><code>lisp</code><span> </span>is the default. Use
this if possible.</li>
<li style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent;background-repeat:initial initial"><code>lsp</code><span> </span>if the pathname type
allows only three characters</li>
<li style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent;background-repeat:initial initial"><code>l</code><span> </span>if the pathname type
should be one character (rare).</li>
</ul>
<p style="text-indent:0px;letter-spacing:normal;text-align:left;font-variant:normal;font-style:normal;font-weight:normal;padding:0px;vertical-align:baseline;clear:both;line-height:18px;text-transform:none;font-size:14px;white-space:normal;margin:0px 0px 1em;font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;border:0px;background-repeat:initial initial;word-spacing:0px">
The pathname type<span> </span><code>cl</code><span> </span>is
mostly not used. You can see it sometimes in older code or
projects which use several different Lisp dialects.</p>
</blockquote>
<br>
The odds of someone running the clang-format-diff.py tool on such a
file seems remote.<br>
<br>
Meanwhile there's an immediate benefit to formatting source files we
know about and have to maintain here on the project.<br></div></blockquote><div><br></div><div>Ok. I don't have immediate concerns and I guess we can roll back if somebody really runs into trouble.</div><div><br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
If someone insists on running a C-family formatting tool on their
lisp files, they could simply exclude them with the -regex option we
added recently..<br></div></blockquote><div><br></div><div>Well, sure, the question is what the default should be. But thinking about it, I agree that we should err towards including too many files. After all it is more likely that somebody running a tool on a specific directory actually wants that directory processed.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
On the other hand, I found more than 100 .m files on my drive that
were MATLAB files. If this is a genuine concern I suggest we start
there ;-)<br></div></blockquote><div><br></div><div>Are you saying we can't format MATLAB code?? ;-)</div><div>(I know that we'll have problems with 'missing' semicolons as well as %-comments).</div><div>
<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
Alp.<br>
<br>
*
<a href="http://stackoverflow.com/questions/15187240/what-is-the-convention-for-lisp-filename-extension" target="_blank" class="cremed">http://stackoverflow.com/questions/15187240/what-is-the-convention-for-lisp-filename-extension</a><div>
<div class="h5"><br>
<br>
<br>
<br>
<blockquote type="cite">
<div class="gmail_extra">
<br>
<br>
<div class="gmail_quote">On Wed, Dec 18, 2013 at 1:58 AM, Alp
Toker <span dir="ltr"><<a href="mailto:alp@nuanti.com" target="_blank" class="cremed">alp@nuanti.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: alp<br>
Date: Tue Dec 17 18:58:58 2013<br>
New Revision: 197542<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=197542&view=rev" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-project?rev=197542&view=rev</a><br>
Log:<br>
clang-format-diff.py: add the OpenCL file extension<br>
<br>
It's handled correctly as a C-family language.<br>
<br>
Modified:<br>
cfe/trunk/tools/clang-format/clang-format-diff.py<br>
<br>
Modified: cfe/trunk/tools/clang-format/clang-format-diff.py<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format/clang-format-diff.py?rev=197542&r1=197541&r2=197542&view=diff" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format/clang-format-diff.py?rev=197542&r1=197541&r2=197542&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/tools/clang-format/clang-format-diff.py
(original)<br>
+++ cfe/trunk/tools/clang-format/clang-format-diff.py Tue
Dec 17 18:58:58 2013<br>
@@ -47,7 +47,7 @@ def main():<br>
help='custom pattern selecting file
paths to reformat '<br>
'(case sensitive, override -iregex)')<br>
parser.add_argument('-iregex', metavar='PATTERN',
default=<br>
-
r'.*\.(cpp|cc|c\+\+|cxx|c|h|hpp|m|mm|inc|js)',<br>
+
r'.*\.(cpp|cc|c\+\+|cxx|c|cl|h|hpp|m|mm|inc|js)',<br>
help='custom pattern selecting file
paths to reformat '<br>
'(case insensitive, override
-regex)')<br>
parser.add_argument(<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank" class="cremed">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank" class="cremed">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div></div><span class="HOEnZb"><font color="#888888"><pre cols="72">--
<a href="http://www.nuanti.com" target="_blank" class="cremed">http://www.nuanti.com</a>
the browser experts
</pre>
</font></span></div>
</blockquote></div><br></div></div>