1

I have some very long function names I want to use short forms for in particular files, eg

(defalias-local avlfn a-very-long-function-name)

Is that possible, or is that something I may have to write myself?

Can I define something like what within a function or a mode?

UPDATE:

I think I may have a partial answer here, but it applies in a let binding rather than the whole file.

vfclists
  • 1,347
  • 1
  • 11
  • 28

1 Answers1

1

No, there really isn’t a built–in way to scope names to a particular file or package. Loading a file just adds new things to the global environment, or changes things in the global environment. The global environment we use as users is just the sum of all those additions and changes.

However, as pointed out in the linked question and answer, let and flet (aka cl-flet) can certainly be used to shorten function and variable and function names if you want. Not everyone likes putting all of their code into a big let or flet though.

db48x
  • 15,741
  • 1
  • 19
  • 23