MacターミナルのEmacsが古かった根本的な原因

根本的な原因は.zshrcのPATH設定が悪かったからだった。

自分は

export PATH=/usr/bin:/usr/local/bin

という風に/usr/binの後に/usr/local/binを配置してたのが問題だった。brew doctorをしてみて原因がわかった。

brew doctorをすると

Error: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:

...
...
...

Consider amending your PATH so that /usr/local/bin
is ahead of /usr/bin in your PATH.

こんな感じのが出たはず。
参考: YOMiTOKU: brew doctorの /usr/bin occurs before /usr/local/binにはまったときの解決法

なのでbashの人は .bash_profile or .bashrc のPATHを、zshの人は.zshrc or .zshenvのPATHにある /usr/local/bin が /usr/bin や /usr/local/sbin より先になるように順番を入れ代える。

export="/usr/local/bin:/usr/bin:/usr/local/sbin:$PATH"

これでターミナルで $ emacs とやって新しいバージョンが使えるようになる。

遭遇したエラー

このとき遭遇したエラーは

Debugger entered--Lisp error: (file-error "Cannot open load file" "cl-lib")

とか

Symbol's function definition is void: declare-function

Emacs 22.1とかだとこういうエラーに見舞われる。 $ emacs --version をしたときに22.1と出たのは本当に意味がわからなかった...。