[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13841: 24.3.50; Regression - unreadable `C-h k' help

From: Lars Ingebrigtsen
Subject: bug#13841: 24.3.50; Regression - unreadable `C-h k' help
Date: Sun, 09 Feb 2014 23:31:46 -0800
User-agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3.50 (gnu/linux)

"Drew Adams" <address@hidden> writes:

> C-h k
> Then choose menu item Options > Line Wrapping in This Buffer > Truncate
> Long Lines.
> You see binary output instead of useful help:
> <menu-bar> <options> <line-wrapping> <truncate> runs the command #[nil
> word-wrap 0 nil toggle-truncate-lines 1] 2 nil nil], which is an
> interactive compiled Lisp function.
> It is bound to <menu-bar> <options> <line-wrapping> <truncate>.
> (anonymous)
> Not documented.
> For reference wrt this regression, this is what Emacs 23.4 shows
> instead - much more readable and helpful:
> <menu-bar> <options> <line-wrapping> <truncate> runs the command
> (lambda nil (interactive) (if visual-line-mode (visual-line-mode 0))
> (setq word-wrap nil) (toggle-truncate-lines 1)), which is an
> interactive Lisp function.
> It is bound to <menu-bar> <options> <line-wrapping> <truncate>.

Perhaps that's just because it didn't byte-compile the function?  So
we're making progress.

Anyway, if we put lambdas into menus, `C-h k' isn't very helpful:

    (bindings--define-key menu [truncate]
      `(menu-item "Truncate Long Lines"
                  ,(lambda ()
                     (if visual-line-mode (visual-line-mode 0))
                     (setq word-wrap nil)
                     (toggle-truncate-lines 1))
                  :help "Truncate long lines at window edge"
                  :button (:radio . (or truncate-lines
                  :visible (menu-bar-menu-frame-live-and-visible-p)
                  :enable (not (truncated-partial-width-window-p))))

I think the right solution here would be for `C-h k' just to say that
it's an anonymous function and leave it at that.

(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]