I have a theme which includes some setup, using
after_setup_theme but I'd like to write my own functions which also need to run
after_setup_theme. I'd prefer to keep my stuff in a separate file. Can I call
after_setup_theme multiple times?
WordPress hooks work like Hollywood: you don't call them, they call you. But unlike Hollywood, they keep calling everyone on the list.
It's normal for an action or a filter to have multiple functions hooked to it, from different plugins, or even just different functions in the WordPress core that all do something specific. It is not only possible, but even good practice, as it means your code gets clearer (each function does only one thing) and it's easier to disable one specific piece of functionality by unhooking it.
Remember that you can also play with the priorities of hooks: if you want to run both
My suggestion would be to have a "master" function, if you will, that calls all your other functions. That way you only have to hook into that action one time.
This has the added benefit of being able to return values that you can use in subsequent function calls.