[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Case problem with menus
From: |
David Kastrup |
Subject: |
Re: Case problem with menus |
Date: |
Wed, 27 Oct 2004 13:19:48 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
Richard Stallman <address@hidden> writes:
> Cough, cough. What is the deal exactly with the symbol names, anyway?
> Where does their case get externally visible?
>
> If you use lookup-key or define-key.
>
> And why is lowercasing
> them desirable? I am afraid that I still don't understand the problem
> that is presumably addressed by the lowercasing.
>
> For consistency in naming of these symbols. Please don't think of
> these symbols as an internal implementation detail. Users do access
> these symbols, and normally they are lower-case. When people see a
> menu item `Greek' they can assume the symbol is `greek'.
>
> Please try this:
>
> (defsubst easy-menu-intern (s)
> (if (stringp s)
> (let ((copy (copy-sequence s))
> (pos 0)
> found)
> (while (setq found (string-match "\\<\\sw" copy pos))
> (setq pos (match-end 0))
> (unless (= (upcase (aref copy found))
> (downcase (aref copy found)))
> (aset copy found
> (if (= (upcase (aref copy found))
> (aref copy found))
> (downcase (aref copy found))
> (upcase (aref copy found))))))
> (intern copy))
> s))
I don't like the implications for menu names that contain words not
starting with uppercase. Wouldn't it be possible to deal with this in
a manner similarly to generate-new-buffer-name? By appending <2> and
so on until we have a unique symbol in the structure where the menu
gets added? Yes, it would not allow one to guess without looking
whether <greek> means "Greek" or "greek" in an ambiguous menu setup,
but to be honest, if <Greek> means "greek" this is not significatly
more helpful.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
- Case problem with menus, David Kastrup, 2004/10/21
- Re: Case problem with menus, Richard Stallman, 2004/10/23
- Re: Case problem with menus, David Kastrup, 2004/10/23
- Re: Case problem with menus, Richard Stallman, 2004/10/23
- Re: Case problem with menus, David Kastrup, 2004/10/24
- Re: Case problem with menus, Richard Stallman, 2004/10/25
- Re: Case problem with menus, David Kastrup, 2004/10/25
- Re: Case problem with menus, Richard Stallman, 2004/10/27
- Re: Case problem with menus,
David Kastrup <=