diff options
| author | Kenichi Handa | 2010-03-08 10:53:37 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2010-03-08 10:53:37 +0900 |
| commit | 59513a2f81060efb01a8a6d684901718c3b4d236 (patch) | |
| tree | 5433967c8574959bf737f94ea33ed5edf5c8a177 /src/keymap.c | |
| parent | b799f2211562060966feabf1975a11b3985264a9 (diff) | |
| parent | b327c9751037d3d8abc7485c6a78ec96f4da1c1e (diff) | |
| download | emacs-59513a2f81060efb01a8a6d684901718c3b4d236.tar.gz emacs-59513a2f81060efb01a8a6d684901718c3b4d236.zip | |
from trunk
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/keymap.c b/src/keymap.c index 98774d5d685..88e0687272f 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -1633,13 +1633,13 @@ like in the respective argument of `key-binding'. */) | |||
| 1633 | /* If a mouse click position is given, our variables are based on | 1633 | /* If a mouse click position is given, our variables are based on |
| 1634 | the buffer clicked on, not the current buffer. So we may have to | 1634 | the buffer clicked on, not the current buffer. So we may have to |
| 1635 | switch the buffer here. */ | 1635 | switch the buffer here. */ |
| 1636 | 1636 | ||
| 1637 | if (CONSP (position)) | 1637 | if (CONSP (position)) |
| 1638 | { | 1638 | { |
| 1639 | Lisp_Object window; | 1639 | Lisp_Object window; |
| 1640 | 1640 | ||
| 1641 | window = POSN_WINDOW (position); | 1641 | window = POSN_WINDOW (position); |
| 1642 | 1642 | ||
| 1643 | if (WINDOWP (window) | 1643 | if (WINDOWP (window) |
| 1644 | && BUFFERP (XWINDOW (window)->buffer) | 1644 | && BUFFERP (XWINDOW (window)->buffer) |
| 1645 | && XBUFFER (XWINDOW (window)->buffer) != current_buffer) | 1645 | && XBUFFER (XWINDOW (window)->buffer) != current_buffer) |
| @@ -1651,14 +1651,14 @@ like in the respective argument of `key-binding'. */) | |||
| 1651 | would not be a problem here, but it is easier to keep | 1651 | would not be a problem here, but it is easier to keep |
| 1652 | things the same. | 1652 | things the same. |
| 1653 | */ | 1653 | */ |
| 1654 | 1654 | ||
| 1655 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 1655 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); |
| 1656 | 1656 | ||
| 1657 | set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); | 1657 | set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); |
| 1658 | } | 1658 | } |
| 1659 | } | 1659 | } |
| 1660 | 1660 | ||
| 1661 | keymaps = Fcons (current_global_map, Qnil); | 1661 | keymaps = Fcons (current_global_map, Qnil); |
| 1662 | 1662 | ||
| 1663 | if (!NILP (olp)) | 1663 | if (!NILP (olp)) |
| 1664 | { | 1664 | { |
| @@ -1685,8 +1685,8 @@ like in the respective argument of `key-binding'. */) | |||
| 1685 | /* Get the buffer local maps, possibly overriden by text or | 1685 | /* Get the buffer local maps, possibly overriden by text or |
| 1686 | overlay properties */ | 1686 | overlay properties */ |
| 1687 | 1687 | ||
| 1688 | local_map = get_local_map (pt, current_buffer, Qlocal_map); | 1688 | local_map = get_local_map (pt, current_buffer, Qlocal_map); |
| 1689 | keymap = get_local_map (pt, current_buffer, Qkeymap); | 1689 | keymap = get_local_map (pt, current_buffer, Qkeymap); |
| 1690 | 1690 | ||
| 1691 | if (CONSP (position)) | 1691 | if (CONSP (position)) |
| 1692 | { | 1692 | { |
| @@ -1694,7 +1694,7 @@ like in the respective argument of `key-binding'. */) | |||
| 1694 | 1694 | ||
| 1695 | /* For a mouse click, get the local text-property keymap | 1695 | /* For a mouse click, get the local text-property keymap |
| 1696 | of the place clicked on, rather than point. */ | 1696 | of the place clicked on, rather than point. */ |
| 1697 | 1697 | ||
| 1698 | if (POSN_INBUFFER_P (position)) | 1698 | if (POSN_INBUFFER_P (position)) |
| 1699 | { | 1699 | { |
| 1700 | Lisp_Object pos; | 1700 | Lisp_Object pos; |
| @@ -1705,7 +1705,7 @@ like in the respective argument of `key-binding'. */) | |||
| 1705 | { | 1705 | { |
| 1706 | local_map = get_local_map (XINT (pos), | 1706 | local_map = get_local_map (XINT (pos), |
| 1707 | current_buffer, Qlocal_map); | 1707 | current_buffer, Qlocal_map); |
| 1708 | 1708 | ||
| 1709 | keymap = get_local_map (XINT (pos), | 1709 | keymap = get_local_map (XINT (pos), |
| 1710 | current_buffer, Qkeymap); | 1710 | current_buffer, Qkeymap); |
| 1711 | } | 1711 | } |
| @@ -1716,12 +1716,12 @@ like in the respective argument of `key-binding'. */) | |||
| 1716 | string displayed via the `display' property, | 1716 | string displayed via the `display' property, |
| 1717 | consider `local-map' and `keymap' properties of | 1717 | consider `local-map' and `keymap' properties of |
| 1718 | that string. */ | 1718 | that string. */ |
| 1719 | 1719 | ||
| 1720 | if (string = POSN_STRING (position), | 1720 | if (string = POSN_STRING (position), |
| 1721 | (CONSP (string) && STRINGP (XCAR (string)))) | 1721 | (CONSP (string) && STRINGP (XCAR (string)))) |
| 1722 | { | 1722 | { |
| 1723 | Lisp_Object pos, map; | 1723 | Lisp_Object pos, map; |
| 1724 | 1724 | ||
| 1725 | pos = XCDR (string); | 1725 | pos = XCDR (string); |
| 1726 | string = XCAR (string); | 1726 | string = XCAR (string); |
| 1727 | if (INTEGERP (pos) | 1727 | if (INTEGERP (pos) |
| @@ -1737,7 +1737,7 @@ like in the respective argument of `key-binding'. */) | |||
| 1737 | keymap = map; | 1737 | keymap = map; |
| 1738 | } | 1738 | } |
| 1739 | } | 1739 | } |
| 1740 | 1740 | ||
| 1741 | } | 1741 | } |
| 1742 | 1742 | ||
| 1743 | if (!NILP (local_map)) | 1743 | if (!NILP (local_map)) |
| @@ -2890,7 +2890,7 @@ remapped command in the returned list. */) | |||
| 2890 | CONSP (sequences))) | 2890 | CONSP (sequences))) |
| 2891 | { | 2891 | { |
| 2892 | Lisp_Object sequence, function; | 2892 | Lisp_Object sequence, function; |
| 2893 | 2893 | ||
| 2894 | sequence = XCAR (sequences); | 2894 | sequence = XCAR (sequences); |
| 2895 | sequences = XCDR (sequences); | 2895 | sequences = XCDR (sequences); |
| 2896 | 2896 | ||
| @@ -2903,8 +2903,8 @@ remapped command in the returned list. */) | |||
| 2903 | 2903 | ||
| 2904 | Either nil or number as value from Flookup_key | 2904 | Either nil or number as value from Flookup_key |
| 2905 | means undefined. */ | 2905 | means undefined. */ |
| 2906 | if (!EQ (shadow_lookup (keymaps, sequence, Qnil, remapped), | 2906 | if (NILP (Fequal (shadow_lookup (keymaps, sequence, Qnil, remapped), |
| 2907 | definition)) | 2907 | definition))) |
| 2908 | continue; | 2908 | continue; |
| 2909 | 2909 | ||
| 2910 | /* If the current sequence is a command remapping with | 2910 | /* If the current sequence is a command remapping with |
| @@ -2933,12 +2933,12 @@ remapped command in the returned list. */) | |||
| 2933 | Faset (sequence, make_number (ASIZE (sequence) - 1), | 2933 | Faset (sequence, make_number (ASIZE (sequence) - 1), |
| 2934 | build_string ("(any string)")); | 2934 | build_string ("(any string)")); |
| 2935 | } | 2935 | } |
| 2936 | 2936 | ||
| 2937 | /* It is a true unshadowed match. Record it, unless it's already | 2937 | /* It is a true unshadowed match. Record it, unless it's already |
| 2938 | been seen (as could happen when inheriting keymaps). */ | 2938 | been seen (as could happen when inheriting keymaps). */ |
| 2939 | if (NILP (Fmember (sequence, found))) | 2939 | if (NILP (Fmember (sequence, found))) |
| 2940 | found = Fcons (sequence, found); | 2940 | found = Fcons (sequence, found); |
| 2941 | 2941 | ||
| 2942 | /* If firstonly is Qnon_ascii, then we can return the first | 2942 | /* If firstonly is Qnon_ascii, then we can return the first |
| 2943 | binding we find. If firstonly is not Qnon_ascii but not | 2943 | binding we find. If firstonly is not Qnon_ascii but not |
| 2944 | nil, then we should return the first ascii-only binding | 2944 | nil, then we should return the first ascii-only binding |