[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
c-lineup-template-args does not indent C++ template args as expected
From: |
Matthew Carter |
Subject: |
c-lineup-template-args does not indent C++ template args as expected |
Date: |
Wed, 19 May 2004 07:50:46 -0700 (PDT) |
Greetings,
I'm trying to use the c-lineup-template-args function
to automatically indent C++ template parameters.
My ~/.emacs file is as follows:
=====START .emacs=====
(defun start-c-mode ()
(c-set-offset 'template-args-cont
'c-lineup-template-args)
)
(add-hook 'c++-mode-hook 'start-c-mode)
=====END .emacs=====
In a c++-mode buffer containing the following text:
=====START BUFFER TEXT=====
int main(int argc,
char **argv)
{
myfunc<int,
char **>(argc,
argv);
}
=====END BUFFER TEXT=====
I position the point at the first 'c' on the line
containing "char **>(argc," and press TAB. It does
not indent the line to line the "char **" up with the
"int" on the previous line as expected.
In trying to diagnose the problem, I typed C-c C-s
with point at that same location, and emacs responded
with: "syntactic analysis: ((statement-cont . 46))".
This tells me that emacs does not know that point is
in template arguments.
Am I incorrect in thinking that it should think the
syntactic context is
template arguments?
"M-x emacs-version" produces: "GNU Emacs 21.3.1
(i386-mingw-nt5.0.2195) of 2004-03-10 on NYAUMO"
Thank you very much for your time.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- c-lineup-template-args does not indent C++ template args as expected,
Matthew Carter <=