Suposse that I want to use the function dolist from package cl (I know that is obsolete and als have cl-lib package). but when I'm looking for documentation (C-h f dolist) I get the following:

dolist is a Lisp macro in ‘subr.el’.

(dolist (VAR LIST [RESULT]) BODY...)

Probably introduced at or before Emacs version 21.1.

This macro has :around advice: ‘cl--wrap-in-nil-block’.

Loop over a list. Evaluate BODY with VAR bound to each car from LIST, in turn. Then evaluate RESULT to get return value, default nil.

So the one that I have loaded is from subr.el (maybe the right package), it is possible to change this locally for a single user without need to load the cl package globally?, I know that Emacs does not have namespace or packages and the best way is to append the prefix name, as cl-dolist, but are there alternatives for name collision?

  • Not too clear (to me). What do you mean by "change this locally for a single user" versus "load the cl package globally"? Where are you doing this? Change it where for a single user? If this is in some function, whether the function is used by everyone or only one user, that function can explicitly use (require 'cl) or whatever. – Drew Sep 18 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.