all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Alan Third <alan@idiocy.org>
Cc: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: cc-mode Objective C method names
Date: Wed, 01 Jan 2020 10:29:42 -0500	[thread overview]
Message-ID: <jwvftgzp5l7.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20200101112757.GA41966@breton.holly.idiocy.org> (Alan Third's message of "Wed, 1 Jan 2020 11:27:57 +0000")

> And I think the methods’ names should be written something like:
>
> -[ClassName doSomething]
> -[ClassName doSomethingTo:with:]

These names look very odd to me (as a non-ObjC coder, I find the
brackets rather ugly and useless for example), but if they're the
"normal" way to refer to them, then I guess it's fine.

> The ‘-’ means it’s an instance method and a ‘+’ would mean it was a
> class method.

Might be best not to include it: how often do you have both a class
method and an instance method with the same name?
[ E.g. in Elisp we use the function names and variable names as is,
  without clarifying if it's a function name or a variable name.  ]

> It appears to work for me, but I’m not great at Emacs lisp so I
> thought it best to run this by the mailing list in case I’ve made any
> boneheaded errors.

This is the code of the other Alan and I'm not very familiar with this
part of CC-mode, so don't take my opinion too seriously, but it looks
acceptable to me.

> +			   (if (looking-at "(")
> +			       (c-forward-token-2 2 t)
> +			     (c-forward-token-2 1 t))

AKA
   			   (c-forward-token-2 (if (looking-at "(") 2 1) t)


-- Stefan




  reply	other threads:[~2020-01-01 15:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-01 11:27 cc-mode Objective C method names Alan Third
2020-01-01 15:29 ` Stefan Monnier [this message]
2020-01-02 11:02   ` Alan Third
2020-01-01 16:41 ` Eli Zaretskii
2020-01-04 10:48 ` Alan Mackenzie
2020-01-04 11:07   ` HaiJun Zhang
2020-01-04 17:09   ` Alan Third

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

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

  git send-email \
    --in-reply-to=jwvftgzp5l7.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=alan@idiocy.org \
    --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 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.