emacs-devel
[Top][All Lists]
Advanced

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

Re: woman.el broken?


From: Stefan Kangas
Subject: Re: woman.el broken?
Date: Tue, 2 Mar 2021 20:23:53 -0600

Eli Zaretskii <eliz@gnu.org> writes:

>> > So this means that converting any Lisp file to use easymenu will
>> > potentially break all the Lisp programs out there that reference its
>> > menus, due to letter-case issues?  That problem alone is IMO enough to
>> > stop this conversion, until we fix look up-key to not break other
>> > packages, or find some other way of preventing such problems.
>>
>> 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?

    (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))))))

(`lookup-key-internal' would be in C with the same definition as
`lookup-key' has today.)



reply via email to

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