docs/faq: add "Why sharp-quote functions"
This commit is contained in:
parent
316a9b871b
commit
0ebb5cf35d
1 changed files with 15 additions and 0 deletions
15
docs/faq.org
15
docs/faq.org
|
@ -51,6 +51,8 @@
|
||||||
- [[#why-do-non-evil-users-get-expand-region-but-not-evil-users][Why do non-evil users get expand-region, but not evil users?]]
|
- [[#why-do-non-evil-users-get-expand-region-but-not-evil-users][Why do non-evil users get expand-region, but not evil users?]]
|
||||||
- [[#why-not-use-exec-path-from-shell-instead-of-doom-env][Why not use exec-path-from-shell instead of ~doom env~?]]
|
- [[#why-not-use-exec-path-from-shell-instead-of-doom-env][Why not use exec-path-from-shell instead of ~doom env~?]]
|
||||||
- [[#why-wsbutler-over-delete-trailing-whitespace-or-whitespace-cleanup][Why wsbutler over delete-trailing-whitespace or whitespace-cleanup?]]
|
- [[#why-wsbutler-over-delete-trailing-whitespace-or-whitespace-cleanup][Why wsbutler over delete-trailing-whitespace or whitespace-cleanup?]]
|
||||||
|
- [[#emacs-lisp][Emacs Lisp]]
|
||||||
|
- [[#why-do-you-quote-some-symbols-with-symbol][Why do you quote some symbols with ~#'symbol~?]]
|
||||||
- [[#common-issues][Common Issues]]
|
- [[#common-issues][Common Issues]]
|
||||||
- [[#i-get-the-vanilla-emacs-splash-screen-at-startup][I get the vanilla Emacs splash screen at startup]]
|
- [[#i-get-the-vanilla-emacs-splash-screen-at-startup][I get the vanilla Emacs splash screen at startup]]
|
||||||
- [[#i-see-a-blank-scratch-buffer-at-startup][I see a blank scratch buffer at startup]]
|
- [[#i-see-a-blank-scratch-buffer-at-startup][I see a blank scratch buffer at startup]]
|
||||||
|
@ -989,6 +991,19 @@ cleanup work.
|
||||||
|
|
||||||
In any case, if you had used =ws-butler= from the beginning, trailing whitespace
|
In any case, if you had used =ws-butler= from the beginning, trailing whitespace
|
||||||
and newlines would never be a problem!
|
and newlines would never be a problem!
|
||||||
|
* Emacs Lisp
|
||||||
|
** Why do you quote some symbols with ~#'symbol~?
|
||||||
|
~#'symbol~ is short for ~(function symbol)~, the same way ~'symbol~ is short for
|
||||||
|
~(quote symbol)~.
|
||||||
|
|
||||||
|
In elisp there is no /functional/ difference between the two syntaxes, but the
|
||||||
|
sharp-quote does hint to the byte-compiler that "this symbol refers to a
|
||||||
|
function", which it can perform additional checks on when the code is
|
||||||
|
byte-compiled.
|
||||||
|
|
||||||
|
My reason for using it is to make it explicit to readers how I intend (or
|
||||||
|
expect) the symbol to be used. No sharp-quote means I'm using the symbol as a
|
||||||
|
literal data value.
|
||||||
|
|
||||||
* Common Issues
|
* Common Issues
|
||||||
** I get the vanilla Emacs splash screen at startup
|
** I get the vanilla Emacs splash screen at startup
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue