diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/keymap.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/keymap.c b/src/keymap.c index 44179806ada..6d0f9e5c058 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -275,7 +275,7 @@ access_keymap (map, idx, t_ok) | |||
| 275 | else if (INTEGERP (idx)) | 275 | else if (INTEGERP (idx)) |
| 276 | /* Clobber the high bits that can be present on a machine | 276 | /* Clobber the high bits that can be present on a machine |
| 277 | with more than 24 bits of integer. */ | 277 | with more than 24 bits of integer. */ |
| 278 | XFASTINT (idx) = XINT (idx) & ((1 << 24) - 1); | 278 | XFASTINT (idx) = XINT (idx) & (CHAR_META | (CHAR_META - 1)); |
| 279 | 279 | ||
| 280 | { | 280 | { |
| 281 | Lisp_Object tail; | 281 | Lisp_Object tail; |
| @@ -375,7 +375,7 @@ store_in_keymap (keymap, idx, def) | |||
| 375 | else if (INTEGERP (idx)) | 375 | else if (INTEGERP (idx)) |
| 376 | /* Clobber the high bits that can be present on a machine | 376 | /* Clobber the high bits that can be present on a machine |
| 377 | with more than 24 bits of integer. */ | 377 | with more than 24 bits of integer. */ |
| 378 | XFASTINT (idx) = XINT (idx) & ((1 << 24) - 1); | 378 | XFASTINT (idx) = XINT (idx) & (CHAR_META | (CHAR_META - 1)); |
| 379 | 379 | ||
| 380 | /* Scan the keymap for a binding of idx. */ | 380 | /* Scan the keymap for a binding of idx. */ |
| 381 | { | 381 | { |
| @@ -1861,16 +1861,22 @@ describe_vector_princ (elt) | |||
| 1861 | Lisp_Object elt; | 1861 | Lisp_Object elt; |
| 1862 | { | 1862 | { |
| 1863 | Fprinc (elt, Qnil); | 1863 | Fprinc (elt, Qnil); |
| 1864 | Fterpri (Qnil); | ||
| 1864 | } | 1865 | } |
| 1865 | 1866 | ||
| 1866 | DEFUN ("describe-vector", Fdescribe_vector, Sdescribe_vector, 1, 1, 0, | 1867 | DEFUN ("describe-vector", Fdescribe_vector, Sdescribe_vector, 1, 1, 0, |
| 1867 | "Print on `standard-output' a description of contents of VECTOR.\n\ | 1868 | "Insert a description of contents of VECTOR.\n\ |
| 1868 | This is text showing the elements of vector matched against indices.") | 1869 | This is text showing the elements of vector matched against indices.") |
| 1869 | (vector) | 1870 | (vector) |
| 1870 | Lisp_Object vector; | 1871 | Lisp_Object vector; |
| 1871 | { | 1872 | { |
| 1873 | int count = specpdl_ptr - specpdl; | ||
| 1874 | |||
| 1875 | specbind (Qstandard_output, Fcurrent_buffer ()); | ||
| 1872 | CHECK_VECTOR (vector, 0); | 1876 | CHECK_VECTOR (vector, 0); |
| 1873 | describe_vector (vector, Qnil, describe_vector_princ, 0, Qnil); | 1877 | describe_vector (vector, Qnil, describe_vector_princ, 0, Qnil); |
| 1878 | |||
| 1879 | return unbind_to (count, Qnil); | ||
| 1874 | } | 1880 | } |
| 1875 | 1881 | ||
| 1876 | describe_vector (vector, elt_prefix, elt_describer, partial, shadow) | 1882 | describe_vector (vector, elt_prefix, elt_describer, partial, shadow) |