diff options
| author | Kenichi Handa | 2014-07-05 23:07:57 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2014-07-05 23:07:57 +0900 |
| commit | aeb894a9a06d84d29b93ca04432d7cbed366e665 (patch) | |
| tree | e2b73f9a76bc826c7a443e9a8d4fb3b49bdf7332 /src/keymap.c | |
| parent | 763a11d0d0dcf543e89a22c98f55ea07c40ceefa (diff) | |
| parent | a984543a4488ed08778eb775d62f7091db117945 (diff) | |
| download | emacs-aeb894a9a06d84d29b93ca04432d7cbed366e665.tar.gz emacs-aeb894a9a06d84d29b93ca04432d7cbed366e665.zip | |
merge trunk
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 42 |
1 files changed, 3 insertions, 39 deletions
diff --git a/src/keymap.c b/src/keymap.c index 0b2b61dcc05..76119606643 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -727,11 +727,6 @@ get_keyelt (Lisp_Object object, bool autoload) | |||
| 727 | /* This is really the value. */ | 727 | /* This is really the value. */ |
| 728 | return object; | 728 | return object; |
| 729 | 729 | ||
| 730 | /* If the keymap contents looks like (keymap ...) or (lambda ...) | ||
| 731 | then use itself. */ | ||
| 732 | else if (EQ (XCAR (object), Qkeymap) || EQ (XCAR (object), Qlambda)) | ||
| 733 | return object; | ||
| 734 | |||
| 735 | /* If the keymap contents looks like (menu-item name . DEFN) | 730 | /* If the keymap contents looks like (menu-item name . DEFN) |
| 736 | or (menu-item name DEFN ...) then use DEFN. | 731 | or (menu-item name DEFN ...) then use DEFN. |
| 737 | This is a new format menu item. */ | 732 | This is a new format menu item. */ |
| @@ -768,25 +763,8 @@ get_keyelt (Lisp_Object object, bool autoload) | |||
| 768 | Keymap alist elements like (CHAR MENUSTRING . DEFN) | 763 | Keymap alist elements like (CHAR MENUSTRING . DEFN) |
| 769 | will be used by HierarKey menus. */ | 764 | will be used by HierarKey menus. */ |
| 770 | else if (STRINGP (XCAR (object))) | 765 | else if (STRINGP (XCAR (object))) |
| 771 | { | 766 | object = XCDR (object); |
| 772 | object = XCDR (object); | ||
| 773 | /* Also remove a menu help string, if any, | ||
| 774 | following the menu item name. */ | ||
| 775 | if (CONSP (object) && STRINGP (XCAR (object))) | ||
| 776 | object = XCDR (object); | ||
| 777 | /* Also remove the sublist that caches key equivalences, if any. */ | ||
| 778 | if (CONSP (object) && CONSP (XCAR (object))) | ||
| 779 | { | ||
| 780 | Lisp_Object carcar; | ||
| 781 | carcar = XCAR (XCAR (object)); | ||
| 782 | if (NILP (carcar) || VECTORP (carcar)) | ||
| 783 | object = XCDR (object); | ||
| 784 | } | ||
| 785 | } | ||
| 786 | 767 | ||
| 787 | /* If the contents are (KEYMAP . ELEMENT), go indirect. */ | ||
| 788 | else if (KEYMAPP (XCAR (object))) | ||
| 789 | error ("Wow, indirect keymap entry!!"); | ||
| 790 | else | 768 | else |
| 791 | return object; | 769 | return object; |
| 792 | } | 770 | } |
| @@ -990,9 +968,6 @@ copy_keymap_item (Lisp_Object elt) | |||
| 990 | if (CONSP (tem) && EQ (XCAR (tem), Qkeymap)) | 968 | if (CONSP (tem) && EQ (XCAR (tem), Qkeymap)) |
| 991 | XSETCAR (elt, Fcopy_keymap (tem)); | 969 | XSETCAR (elt, Fcopy_keymap (tem)); |
| 992 | tem = XCDR (elt); | 970 | tem = XCDR (elt); |
| 993 | if (CONSP (tem) && CONSP (XCAR (tem))) | ||
| 994 | /* Delete cache for key equivalences. */ | ||
| 995 | XSETCDR (elt, XCDR (tem)); | ||
| 996 | } | 971 | } |
| 997 | } | 972 | } |
| 998 | else | 973 | else |
| @@ -1011,16 +986,6 @@ copy_keymap_item (Lisp_Object elt) | |||
| 1011 | elt = XCDR (elt); | 986 | elt = XCDR (elt); |
| 1012 | tem = XCDR (elt); | 987 | tem = XCDR (elt); |
| 1013 | } | 988 | } |
| 1014 | /* There may also be a list that caches key equivalences. | ||
| 1015 | Just delete it for the new keymap. */ | ||
| 1016 | if (CONSP (tem) | ||
| 1017 | && CONSP (XCAR (tem)) | ||
| 1018 | && (NILP (XCAR (XCAR (tem))) | ||
| 1019 | || VECTORP (XCAR (XCAR (tem))))) | ||
| 1020 | { | ||
| 1021 | XSETCDR (elt, XCDR (tem)); | ||
| 1022 | tem = XCDR (tem); | ||
| 1023 | } | ||
| 1024 | if (CONSP (tem) && EQ (XCAR (tem), Qkeymap)) | 989 | if (CONSP (tem) && EQ (XCAR (tem), Qkeymap)) |
| 1025 | XSETCDR (elt, Fcopy_keymap (tem)); | 990 | XSETCDR (elt, Fcopy_keymap (tem)); |
| 1026 | } | 991 | } |
| @@ -2572,9 +2537,8 @@ If FIRSTONLY has another non-nil value, prefer bindings | |||
| 2572 | that use the modifier key specified in `where-is-preferred-modifier' | 2537 | that use the modifier key specified in `where-is-preferred-modifier' |
| 2573 | \(or their meta variants) and entirely reject menu bindings. | 2538 | \(or their meta variants) and entirely reject menu bindings. |
| 2574 | 2539 | ||
| 2575 | If optional 4th arg NOINDIRECT is non-nil, don't follow indirections | 2540 | If optional 4th arg NOINDIRECT is non-nil, don't extract the commands inside |
| 2576 | to other keymaps or slots. This makes it possible to search for an | 2541 | menu-items. This makes it possible to search for a menu-item itself. |
| 2577 | indirect definition itself. | ||
| 2578 | 2542 | ||
| 2579 | The optional 5th arg NO-REMAP alters how command remapping is handled: | 2543 | The optional 5th arg NO-REMAP alters how command remapping is handled: |
| 2580 | 2544 | ||