In xmtn-dvc.el, xmtn-dvc-ignore-file-extensions uses this syntax:

(mapcar #'file-name-extension file-names)

Other places doing the same thing use this syntax:

(mapcar 'file-name-extension file-names)

I'm working on moving the common UI part of this code up into
dvc-unified, so I'm trying to understand the difference.

The elisp manual, in node 'function cells', says:

       We sometimes write `function' instead of `quote' when quoting the
    name of a function, but this usage is just a sort of comment:

     (function SYMBOL) == (quote SYMBOL) == 'SYMBOL

   The read syntax `#'' is a short-hand for using `function'.  For
    example,

     #'(lambda (x) (* x x))

    is equivalent to

     (function (lambda (x) (* x x)))


Earlier, it says:

       Using `function' instead of `quote' makes a difference if you
    compile the function `double-property'. For example, if you
    compile the second definition of `double-property', the anonymous
    function is compiled as well. By contrast, if you compile the
    first definition which uses ordinary `quote', the argument passed
    to `change-property' is the precise list shown.

So I think Christian added `#' in order to improve byte-compiling, but
I don't think it means anything in this case, since the function is a
symbol, not a list.

Is this just a style issue, or have I missed something?

--
-- Stephe


_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev

Reply via email to