/[emacs]/emacs/lisp/emacs-lisp/easymenu.el
ViewVC logotype

Diff of /emacs/lisp/emacs-lisp/easymenu.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.61.4.2 by miles, Mon Jun 28 07:29:45 2004 UTC revision 1.61.4.3 by miles, Thu Nov 4 08:55:37 2004 UTC
# Line 42  menus, turn this variable off, otherwise Line 42  menus, turn this variable off, otherwise
42    :version "20.3")    :version "20.3")
43    
44  (defsubst easy-menu-intern (s)  (defsubst easy-menu-intern (s)
45    (if (stringp s) (intern (downcase s)) s))    (if (stringp s)
46          (let ((copy (copy-sequence s))
47                (pos 0)
48                found)
49            ;; For each letter that starts a word, flip its case.
50            ;; This way, the usual convention for menu strings (capitalized)
51            ;; corresponds to the usual convention for menu item event types
52            ;; (all lower case).  It's a 1-1 mapping so causes no conflicts.
53            (while (setq found (string-match "\\<\\sw" copy pos))
54              (setq pos (match-end 0))
55              (unless (= (upcase (aref copy found))
56                         (downcase (aref copy found)))
57                (aset copy found
58                      (if (= (upcase (aref copy found))
59                             (aref copy found))
60                          (downcase (aref copy found))
61                        (upcase (aref copy found))))))
62             (intern copy))
63        s))
64    
65  ;;;###autoload  ;;;###autoload
66  (put 'easy-menu-define 'lisp-indent-function 'defun)  (put 'easy-menu-define 'lisp-indent-function 'defun)

Legend:
Removed from v.1.61.4.2  
changed lines
  Added in v.1.61.4.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26