diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-24 00:10:51 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-24 00:10:51 -0400 |
| commit | efd3cdce5b3aebfdb3e02460d1ec0434cef85949 (patch) | |
| tree | ae8746cc7699b7e989d253f4c816fc7798a8e040 /scripts | |
| parent | 4d46eafaa087f5570ece9d2e5f5d2ba6bc0d824e (diff) | |
| download | emacs-wttrin-efd3cdce5b3aebfdb3e02460d1ec0434cef85949.tar.gz emacs-wttrin-efd3cdce5b3aebfdb3e02460d1ec0434cef85949.zip | |
I bound d in the weather buffer to wttrin-make-default, which sets wttrin-favorite-location to the location on screen so it drives the mode-line and future sessions. The footer advertises "[d] to make default".
Persistence rides savehist, not the Emacs custom-variable mechanism: wttrin--savehist-register registers wttrin-favorite-location alongside the search history, at load and on savehist-save-hook. Enable savehist-mode and the favorite survives restarts.
Promoting a location drops it from the search history, the way wttrin-default-locations entries are kept out of history. The favorite shows in the picker instead: wttrin--completion-candidates prepends it when it's a string and not already a default, so it appears exactly once.
The setter only assigns the variable and trims history. It doesn't register with savehist itself, because savehist-additional-variables is unbound until savehist loads, so a direct add-to-list would error for users without savehist. Registration stays on the load and save-hook path.
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
