all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Elson <delson@greatalpha.com>
To: help-gnu-emacs@gnu.org
Subject: syntax question for defun
Date: Wed, 28 Aug 2024 13:01:33 -0700	[thread overview]
Message-ID: <6a7b894c-8c00-482e-b75c-ce87c0eb2b9c@greatalpha.com> (raw)

Hello. I have been using emacs for ... a while.

For questions, I have often browsed and browsed (i.e. googled) and ... 
and usually find a good explanation. But sometimes I don't find an 
answer, even when it is staring right at me.

My question:

To emulate something akin to the PL1/C/C++ arrow notation, I have used:

*(defun -> (object method &rest args) ...)*

and it works.

*Is this valid elisp/lisp?*

If it works only coincidentally, then it might break in the future, when 
a pressing emacs issue is resolved in a manner that requires plugging 
this "loophole".

If it is formally valid, where does it document the level of flexibility 
that allows this syntax?

If it is not formally valid, then why does it work coincidentally?

I'd like to enhance/use this code, but I hesitate due to this question.

Thanks in advance?

-David



             reply	other threads:[~2024-08-28 20:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-28 20:01 David Elson [this message]
2024-08-29  4:57 ` syntax question for defun tomas
2024-08-29 16:45   ` David Elson
2024-08-29 18:29     ` tomas
2024-08-29 19:28     ` Stefan Monnier via Users list for the GNU Emacs text editor

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=6a7b894c-8c00-482e-b75c-ce87c0eb2b9c@greatalpha.com \
    --to=delson@greatalpha.com \
    --cc=help-gnu-emacs@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.