alphapapa / alphapapa/ement.el

Consider defining the ement-room-mode-hook docstring explicitly

Abierto
#184 1 comentario 0 reacciones 1 asignado Reclamado por @alphapapa Ver en GitHub
enhancement
Lenguaje dominante
Emacs Lisp
Estrellas
604
Forks
54
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I think this is an Emacs bug which could be resolved with a call to `format-mode-line` , but the auto-generated docstring for major mode hooks doesn't cope with the (entirely valid) use of mode line constructs in `mode-name`, so we end up with a \*Help\* buffer like this:

```plain
ement-room-mode-hook is a variable defined in ‘ement-room.el’.

Its value is (visual-line-mode)

Hook run after entering ‘(Ement-Room (:eval (unless (map-elt ement-syncs ement-session) (propertize :Not-syncing ’face ’font-lock-warning-face ’help-echo Automatic syncing was interrupted; press "g" to resume)))) mode.
No problems result if this variable is not bound.
‘add-hook’ automatically binds it. (This is true for all hook variables.)

This variable may be risky if used as a file-local variable.

[back]
```

I see that `emacs-lisp-mode` circumvents this with a `defcustom` for the hook, to declare a plainer-text docstring (although that might well have pre-dated the use of mode line constructs in its `mode-name`; I didn't check.)

It might be a sensible idea to do something similar in this case.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.