diff options
| author | Richard M. Stallman | 1993-06-11 04:16:13 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-06-11 04:16:13 +0000 |
| commit | ad4ec84a08c386da8ff1a05cc6ece5ab34278e69 (patch) | |
| tree | 629b6b40f13602da58291812fa31973df14a3826 /src | |
| parent | 5009d9f0d456066d70e98779d9d50cc1ae0268ef (diff) | |
| download | emacs-ad4ec84a08c386da8ff1a05cc6ece5ab34278e69.tar.gz emacs-ad4ec84a08c386da8ff1a05cc6ece5ab34278e69.zip | |
(Fdescribe_vector): Use current buf, not standard-output.
(describe_vector_princ): Add newline at end.
(store_in_keymap, access_keymap): Use CHAR_META
when clearing excess high bits.
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) |