help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: setting line-length for mediawiki-mode?


From: Nathanael Schweers
Subject: Re: setting line-length for mediawiki-mode?
Date: Fri, 17 Mar 2017 20:45:33 +0100

Alex Kost <alezost@gmail.com> writes:

Just a small remark: If I recall correctly, it’s better to
function-quote function arguments, so this code:
> (add-hook 'mediawiki-mode-hook 'some-stuff-for-mediawiki)
should rather look like this:

(add-hook 'mediawiki-mode-hook #'some-stuff-for-mediawiki)

This has the benefit of adding some compiler warning in case it cannot
be known that the function will be defined.

If I’m not entirely mistaken, it might even be good for performance, as
the function value of the passed symbol (in the first form) has to be
looked up every time it’s called, while the second form gives the
function object directly.  Take this last piece of “advice“ with a grain
of salt though.

In any case, #' is read syntax for function-quote, just as ' is read
syntax for quote.

-- Nathanael Schweers



reply via email to

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