>> Using side-effects on alists is often a bad idea.
> Why? I do this very often in my .emacs. For example:
Because a lot of code assumes alists are used in a "pure" way.
> --8<---------------cut here---------------start------------->8---
> (aput 'find-constituents 'readable (list 0))
> (eval-after-load "linkd"
> '(aput 'minor-mode-alist 'linkd-mode '(" Ld")))
> (aput 'default-frame-alist 'width 104)
> (aput 'warning-suppress-types 'undo '(discard-info))
> (aput 'auto-mode-alist "\\.v?dired\\'" 'dired-virtual-mode)
> (aput 'org-show-siblings 'org-goto t)
> (aput 'w3m-search-engine-alist
> "duckduckgo" '("
http://duckduckgo.com/?q=%s"))
> --8<---------------cut here---------------end--------------->8---
> Is it a bad idea in these cases?
AFAICT, (push (cons key val) foo) would work just as well in those cases.
> Will it be ok to require cl-lib at run-time in third-party packages?
Requiring `cl' has been allowed for ever in third party packages (as if
we could disallow it, anyway).
What is new is that require `cl-lib' is OK in non-third-party packages.
Stefan
opensubscriber is not affiliated with the authors of this message nor responsible for its content.