unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Garreau\, Alexandre" <galex-713@galex-713.eu>
To: emacs-devel@gnu.org
Subject: emacs-lisp-mode highlights incorrectly defmacros/defuns’ arglists
Date: Tue, 16 Oct 2018 19:49:53 +0200	[thread overview]
Message-ID: <87in21u6gu.fsf@portable.galex-713.eu> (raw)

At least *someone* must have *seen* this:
#+BEGIN_SRC elisp
(defmacro unless (cond &rest body)
  "If COND yields nil, do BODY, else return nil.
When COND yields nil, eval BODY forms sequentially and return
value of last one, or nil if there are none.

\(fn COND BODY...)"
  (declare (indent 1) (debug t))
  (cons 'if (cons cond (cons nil body))))
#+END_SRC

“cond” is highlighted in blue, while since defmacro (as well as defun,
which present the same issue) is itself a macro, and the meaning of its
arglist is known and fixed in lisp (a list of symbols, whose the first
isn’t particularly meant to be called), why is cond highlighted just as
if the arglist was a real form to be evaluated, while we know it’s not?

Wouldn’t there be a way to turn off these highlightings in such places
of known old and fixed macro calls?



             reply	other threads:[~2018-10-16 17:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-16 17:49 Garreau, Alexandre [this message]
2018-10-16 18:35 ` emacs-lisp-mode highlights incorrectly defmacros/defuns’ arglists Alan Mackenzie
2018-10-16 19:22   ` Garreau, Alexandre
2018-10-16 20:10     ` Alan Mackenzie
2018-10-16 20:12   ` Garreau, Alexandre
2018-10-16 21:23 ` Stefan Monnier

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=87in21u6gu.fsf@portable.galex-713.eu \
    --to=galex-713@galex-713.eu \
    --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).