After some experimenting (and some TFM reading) prompted by Daimrod's comment, I learned that the problem arose from the way Aquamacs does configuration. It loads the ~/.emacs
file, but that's the first file it loads of four, and my text-mode-hook
was being overwritten by one of the files loaded after it
Specifically, the order (according to the Aquamacs manual section 4.3, customizing Aquamacs) is:
~/.emacs ~/Library/Preferences/Aquamacs Emacs/customizations.el /Library/Preferences/Aquamacs Emacs/Preferences.el (for all users) ~/Library/Preferences/Aquamacs Emacs/Preferences.el
My addition to the text-mode-hook
was being overwritten by a line in the customizations.el
file, which was why visual line mode wasn't loading.
The manual also says that users shouldn't use ~/.emacs for customizations, but the last Preferences.el file instead, so I've moved everything in .emacs to my Preferences.el. Everything now works as I expect.