Hi, thanks a lot. If I want a shortcut key for markdown-mode do I have to: M-x local-set-key RET F5 markdown-mode ............................................ If I want a shortcut key for adoc-mode do I have to: M-x local-set-key RET F5 adoc-mode ............................................ If I want a key for both, what do I have to do? The one F5 and the other e.g. F6 ?? ................................................. I am careful, so I am asking before doing something. Kind regards Gottfried Am 13.03.23 um 05:17 schrieb Jean Louis: > * Gottfried [2023-03-02 21:53]: >> So the timer makes a mass in my whole emacs programme > > Don't use timer, set up local mode key and use function key for > preview. > > M-x local-set-key RET F5 name-of-my-function > --