emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Case problem with menus


From: Richard Stallman
Subject: Re: Case problem with menus
Date: Wed, 27 Oct 2004 06:48:01 -0400

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





reply via email to

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