Subject: bug#60426: 29.0.60; Binding to outline-minor-mode-cycle-map correctly is unintuitive and hard

From: Juri Linkov <[email-masked]>
Date: Wed, 11 Jan 2023 21:38:05 +0200

> 1. I think  in the NEWS entry, "font-lock text property 'keymap'" should
>    probably just be "text property 'keymap'" i.e. why mention font-lock?

Thanks, now pushed to the emacs-29 branch with these corrections.

> 2. Since the implementation of `outline-minor-mode-cycle--bind` can change,
>    it is better to change the order of arguments and make `map` an actual
>    third argument. It is awkward to pass `nil` as the first argument and I
>    think that way the actual map key is bound to can be treated as an
>    implementation detail with `outline-minor-mode-cycle--bind` the official
>    way of binding keys on headings.

Even though it's like an "internal" function, I still hesitate to reorder
its arguments to not break user configs.  I'd rather add a new function
without two hyphens as the official way to use it in personal customization:

(defun outline-minor-mode-cycle-bind (key binding &optional filter map)
  (outline-minor-mode-cycle--bind map key binding &optional filter)

and declare `outline-minor-mode-cycle--bind` obsolete.