all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs-lisp-mode highlights incorrectly defmacros/defuns’ arglists
@ 2018-10-16 17:49 Garreau, Alexandre
  2018-10-16 18:35 ` Alan Mackenzie
  2018-10-16 21:23 ` Stefan Monnier
  0 siblings, 2 replies; 6+ messages in thread
From: Garreau, Alexandre @ 2018-10-16 17:49 UTC (permalink / raw)
  To: emacs-devel

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?



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-16 21:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-16 17:49 emacs-lisp-mode highlights incorrectly defmacros/defuns’ arglists Garreau, Alexandre
2018-10-16 18:35 ` 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

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.