unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: A Soare <alinsoar@voila.fr>
To: "Emacs   Dev  [emacs-devel]" <emacs-devel@gnu.org>
Subject: - c-end-of-defun - !
Date: Wed, 18 Apr 2007 15:17:00 +0200 (CEST)	[thread overview]
Message-ID: <20935145.311971176902220543.JavaMail.www@wwinf4104> (raw)


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.

             reply	other threads:[~2007-04-18 13:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-18 13:17 A Soare [this message]
2007-04-18 18:38 ` - c-end-of-defun - ! Alan Mackenzie
  -- strict thread matches above, loose matches on Subject: below --
2007-04-18 19:36 A Soare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20935145.311971176902220543.JavaMail.www@wwinf4104 \
    --to=alinsoar@voila.fr \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).