arialdomartini / stairway-to-emacs

1 page per day, to get started on Emacs
3 stars 2 forks source link

What's the «'» in «(require 'package)»? #8

Open das-g opened 2 months ago

das-g commented 2 months ago

https://github.com/arialdomartini/stairway-to-emacs/blob/55c1fe3cb8ab6a899183e066c14f702e60494925/002-use-package.org?plain=1#L55

Maybe it's also worth explaining here what ' is or does in this context?

arialdomartini commented 2 months ago

@das-g Fair point.

I would like to be as concise as possible here, without delving too much into Lisp.

What about writing something like:

The ' before package tells Emacs to consider package as a literal value, rather than evaluating it as a variable.

What do you think?

das-g commented 2 months ago

What about writing something like:

The ' before package tells Emacs to consider package as a literal value, rather than evaluating it as a variable.

What do you think?

Sounds good. Maybe even shorter:

This is equivalent to JS' require or Python's / Java's import. package is the Emacs' built-in package manager and ' indicates that name is a literal, not a variable to be evaluated.