[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- c-end-of-defun - !
From: |
A Soare |
Subject: |
- c-end-of-defun - ! |
Date: |
Wed, 18 Apr 2007 15:17:00 +0200 (CEST) |
int
function (void)
{
int b;
}
struct ONE function (void)
{
int a;
}
struct
TWO function (void)
{
int a;
}
Here are 3 valid functions written in C.
Copy them into a buffer in C-MODE, and eval (end-of defun) in the first one and
in the second.
In the second case => FAIL.
That is because of this code in c-end-of-defun:
;; Do we need to move forward from the brace to the semicolon?
(when (eq arg 0)
(if (c-in-function-trailer-p) ; after "}" of struct/enum, etc.
(c-syntactic-re-search-forward ";"))
(c-in-function-trailer-p) in our case MUST return NULL. Not the (point).
Is really need to call (c-syntactic-re-search-forward ";") here?
Alin Soare.
- - c-end-of-defun - !,
A Soare <=