Doc fix in let-alist for keys with nil value
* lisp/emacs-lisp/let-alist.el (let-alist): Clarify that keys with a nil value will give the same result as if they were missing.
This commit is contained in:
parent
72cc9cf2cd
commit
71feee7930
1 changed files with 9 additions and 2 deletions
|
@ -60,7 +60,7 @@
|
|||
;; the variables of the outer one. You can, however, access alists
|
||||
;; inside the original alist by using dots inside the symbol, as
|
||||
;; displayed in the example above by the `.site.contents'.
|
||||
;;
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
||||
|
@ -139,7 +139,14 @@ essentially expands to
|
|||
If you nest `let-alist' invocations, the inner one can't access
|
||||
the variables of the outer one. You can, however, access alists
|
||||
inside the original alist by using dots inside the symbol, as
|
||||
displayed in the example above."
|
||||
displayed in the example above.
|
||||
|
||||
Note that there is no way to differentiate the case where a key
|
||||
is missing from when it is present, but its value is nil. Thus,
|
||||
the following form evaluates to nil:
|
||||
|
||||
(let-alist '((some-key . nil))
|
||||
.some-key)"
|
||||
(declare (indent 1) (debug t))
|
||||
(let ((var (make-symbol "alist")))
|
||||
`(let ((,var ,alist))
|
||||
|
|
Loading…
Add table
Reference in a new issue