emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/easymenu.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/easymenu.el
Date: Tue, 09 Nov 2004 09:43:00 -0500

Index: emacs/lisp/emacs-lisp/easymenu.el
diff -c emacs/lisp/emacs-lisp/easymenu.el:1.68 
emacs/lisp/emacs-lisp/easymenu.el:1.69
*** emacs/lisp/emacs-lisp/easymenu.el:1.68      Sat Nov  6 14:42:36 2004
--- emacs/lisp/emacs-lisp/easymenu.el   Tue Nov  9 14:37:09 2004
***************
*** 42,66 ****
    :version "20.3")
  
  (defsubst easy-menu-intern (s)
!   (if (stringp s)
!       (let ((copy (copy-sequence s))
!           (pos 0)
!           found)
!       ;; For each letter that starts a word, flip its case.
!       ;; This way, the usual convention for menu strings (capitalized)
!       ;; corresponds to the usual convention for menu item event types
!       ;; (all lower case).  It's a 1-1 mapping so causes no conflicts.
!       (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))
  
  ;;;###autoload
  (put 'easy-menu-define 'lisp-indent-function 'defun)
--- 42,48 ----
    :version "20.3")
  
  (defsubst easy-menu-intern (s)
!   (if (stringp s) (intern s) s))
  
  ;;;###autoload
  (put 'easy-menu-define 'lisp-indent-function 'defun)
***************
*** 437,444 ****
                  (error nil))          ;`item' might not be a proper list.
                ;; Also check the string version of the symbol name,
                ;; for backwards compatibility.
!               (eq (car-safe item) (intern name))
!               (eq (car-safe item) (easy-menu-intern name)))))))
  
  (defun easy-menu-always-true-p (x)
    "Return true if form X never evaluates to nil."
--- 419,425 ----
                  (error nil))          ;`item' might not be a proper list.
                ;; Also check the string version of the symbol name,
                ;; for backwards compatibility.
!               (eq (car-safe item) (intern name)))))))
  
  (defun easy-menu-always-true-p (x)
    "Return true if form X never evaluates to nil."




reply via email to

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