ement.el icon indicating copy to clipboard operation
ement.el copied to clipboard

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

Open phil-s opened this issue 2 years ago • 1 comments

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:

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.

phil-s avatar Jul 12 '23 07:07 phil-s

Thanks, I hadn't noticed that. Should we report an Emacs bug about this?

alphapapa avatar Jul 13 '23 21:07 alphapapa