unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Eli Zaretskii <eliz@gnu.org>, Lars Ingebrigtsen <larsi@gnus.org>
Cc: emacs-devel@gnu.org
Subject: Re: woman.el broken?
Date: Tue, 2 Mar 2021 20:23:53 -0600	[thread overview]
Message-ID: <CADwFkmn_Hs3+oiweXoNT-u2Kg5n0EMewzf8YD9J9JECLYiZRWA@mail.gmail.com> (raw)
In-Reply-To: <83mtvm7hkt.fsf@gnu.org>

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



  parent reply	other threads:[~2021-03-03  2:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01 19:39 woman.el broken? T.V Raman
2021-03-01 19:48 ` Lars Ingebrigtsen
2021-03-01 20:02   ` Eli Zaretskii
2021-03-01 20:07     ` Lars Ingebrigtsen
2021-03-01 20:19       ` Eli Zaretskii
2021-03-01 20:25         ` Eli Zaretskii
2021-03-01 20:42           ` Stefan Monnier
2021-03-02  5:18             ` Eli Zaretskii
2021-03-01 20:47         ` Lars Ingebrigtsen
2021-03-01 21:06           ` Lars Ingebrigtsen
2021-03-01 21:29             ` Lars Ingebrigtsen
2021-03-03  2:23         ` Stefan Kangas [this message]
2021-03-03  6:25           ` Eli Zaretskii
2021-03-03 14:19             ` Stefan Kangas
2021-03-03 14:40               ` Eli Zaretskii
2021-03-03 18:46                 ` Stefan Kangas
2021-03-06  3:43               ` Stefan Kangas
2021-03-06  8:07                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADwFkmn_Hs3+oiweXoNT-u2Kg5n0EMewzf8YD9J9JECLYiZRWA@mail.gmail.com \
    --to=stefan@marxist.se \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).