Reputation: 1943
In my Emacs config I have such a string:
(setq ibuffer-saved-filter-groups
(quote (("default"
("dired"
(mode . dired-mode))
("System"
(or (name . "\*scratch\*")
(name . "\*Messages\*")))
("SVN"
(name . "^\\*vc-.*\\*$"))))))
The variables name
and mode
are undefined but the code is evaluated correctly. When I try to make a such on my own:
(some-var . "some-value")
I receive an error about the undefined variable some-var
.
Upvotes: 2
Views: 294
Reputation: 3236
Look at C-h v ibuffer-saved-filter-groups. It explains about this variables further. It is an alist variable. According to documents, it should look like (("STRING" QUALIFIERS) ("STRING" QUALIFIERS) ...) Now QUALIFIERS is a LIST of the same form as `ibuffer-filtering-qualifiers'. It is a LIST like (SYMBOL . QUALIFIER).
Upvotes: 0
Reputation: 223023
When a datum is quoted, nothing within is evaluated. For example:
foo
evaluates to the value bound to the identifier foo
, whereas
'foo
or
(quote foo)
evaluates to the symbol foo
.
Likewise,
(+ 1 2 3)
evaluates to 6, whereas
'(+ 1 2 3)
or
(quote (+ 1 2 3))
evaluate to a list with four elements: the symbol +
, and the numbers 1, 2, and 3. In particular, the +
is not evaluated.
Similarly, your name
and mode
, both being within the quoted datum, are not treated as identifiers, but as symbols. They are not evaluated.
Upvotes: 7