emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/tutorial.el,v


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/tutorial.el,v
Date: Thu, 07 Jun 2007 06:56:15 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       07/06/07 06:56:15

Index: tutorial.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/tutorial.el,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- tutorial.el 16 May 2007 13:19:02 -0000      1.16
+++ tutorial.el 7 Jun 2007 06:56:15 -0000       1.17
@@ -155,9 +155,9 @@
                           " RET instead."))
               (insert "\n\nWith your current key bindings"
                       " you can use "
-                      (if (string-equal "the menus" where)
+                      (if (string-match "^the .*menus?$" where)
                           ""
-                        "the key ")
+                        "the key")
                       where
                       " to get the function `"
                       (format "%s" db)
@@ -434,14 +434,26 @@
               (key-fun (if (eq def-fun 'ESC-prefix)
                            (lookup-key global-map [27])
                          (key-binding key)))
-              (where (where-is-internal (if rem-fun rem-fun def-fun))))
+              (where (where-is-internal (if rem-fun rem-fun def-fun)))
+              cwhere)
          (if where
              (progn
-               (setq where (key-description (car where)))
+               (setq cwhere (car where)
+                     where (key-description cwhere))
                (when (and (< 10 (length where))
                           (string= (substring where 0 (length "<menu-bar>"))
                                    "<menu-bar>"))
-                 (setq where "the menus")))
+                 (setq where
+                       (if (and (vectorp cwhere)
+                                (setq cwhere (elt cwhere 1))
+                                (setq cwhere
+                                      (cadr
+                                       (assoc cwhere
+                                              (lookup-key global-map
+                                                          [menu-bar]))))
+                                (stringp cwhere))
+                           (format "the `%s' menu" cwhere)
+                         "the menus"))))
            (setq where ""))
          (setq remark nil)
          (unless




reply via email to

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