Davin Pearson writes: > In another version of emacs the third argument to add-hook can be a > number between -70 and 70, like so: > > (add-hook 'find-file-hook 'dmp-find-file-hook 70) > > In the version of emacs that I am currently using (26.3) it turns non > nil third arguments to t otherwise leave nil as nil. > > Having numbers for the third argument seems like you have more > flexibility in order of the sequences of hooks to your hook variables. > > Do I need to upgrade the Emacs version? Yes, according to the NEWS file of Emacs 27.1: --8<---------------cut here---------------start------------->8--- ** 'add-hook' does not always add to the front or the end any more. The replacement of 'append' with 'depth' implies that the function is not always added to the very front (when append/depth is nil) or the very end (when append/depth is t) any more because other functions on the hook may have specified higher/lower depths. This makes it possible to control the ordering of functions more precisely, as was already possible in 'add-function' and 'advice-add'. --8<---------------cut here---------------end--------------->8--- > Ubuntu tells me I am using the > most up to date version of Emacs. Ubuntu is lying. The latest version is 28.1. Probably it's not in your version. You can build Emacs yourself or use a PPA, or switch to a rolling release distribution (e.g. GNU Guix, which as stable as Ubuntu (if not more)), or install GNU Guix in your Ubuntu (alongside apt). -- Akib Azmain Turja Find me on Mastodon at @akib@hostux.social. This message is signed by me with my GnuPG key. It's fingerprint is: 7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5