emacs-devel
[Top][All Lists]
Advanced

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

Re: woman.el broken?


From: Eli Zaretskii
Subject: Re: woman.el broken?
Date: Wed, 03 Mar 2021 08:25:52 +0200

> From: Stefan Kangas <stefan@marxist.se>
> Date: Tue, 2 Mar 2021 20:23:53 -0600
> Cc: emacs-devel@gnu.org
> 
> >> Yes, fixing the lookup to be more forgiving here would be nice.
> >
> > Stefan, would you please make that happen?  Without that, the switch
> > to easymenu is an incompatible change, ironic as it may be.
> 
> Would something along these lines be okay or do we strictly need all of
> this to be in C for some reason?

If this is performant enough, I don't at the moment see any reason to
have it in C.  Of course, the few places that call Flookup_key from C
will need to be analyzed whether they need to call the internal
function or the Lisp wrapper, and modified accordingly.

>     (defun lookup-key (keymap key accept-default)
>       (or (lookup-key-internal keymap key accept-default)
>           (and (vectorp key)
>                (let ((lc-key `[,@(mapcar
>                                   (lambda (s)
>                                     (intern (downcase (symbol-name s))))
>                                   key)]))
>                  (when (not (equal lc-key key))
>                    (lookup-key-internal keymap lc-key accept-default))))))

This is not the only transformation we should apply, IMO: we should
also convert "Foo Bar Baz" into "foo-bar-baz".  See the Dired menus
for examples.



reply via email to

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