[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(lambda nil ...) quoted with ' rather than with #' in cc-mode

From: Stefan Monnier
Subject: (lambda nil ...) quoted with ' rather than with #' in cc-mode
Date: Fri, 09 Sep 2011 22:49:48 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

As I'm sure you know, Emacs recently started to warn that cc-mode.el
uses ' to quote some lambdas.

I couldn't figure out where that was coming from, so I changed
macroexp.el's message to include the complete lambda (since "(lambda nil
...)" was too vague), which lead me to:

  (c-lang-defconst c-mode-syntax-table
    ;; The syntax tables in evaluated form.  Only used temporarily when
    ;; the constants in this file are evaluated.
    t (funcall (c-lang-const c-make-mode-syntax-table)))

The offending quoted lambda is the one returned by c-lang-const.
So I think the quote is the one from:

        `',(c-get-lang-constant name nil mode)

The problem being (if my analysis is right) that
c-make-mode-syntax-table doesn't quite hold function values (which could
be quoted with ') but function expressions (which should be quoted with

Not sure how/if best to fix this for now.   As long as you stick to
dynamic scoping, it won't make much of a difference, tho.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]