Mercurial > emacs
comparison src/keymap.c @ 3632:72cfde0cd8cd
(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.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Fri, 11 Jun 1993 04:16:13 +0000 |
| parents | f183be0dc237 |
| children | cfa45731460e |
comparison
equal
deleted
inserted
replaced
| 3631:0c063224b5d2 | 3632:72cfde0cd8cd |
|---|---|
| 273 if (XTYPE (idx) == Lisp_Symbol) | 273 if (XTYPE (idx) == Lisp_Symbol) |
| 274 idx = reorder_modifiers (idx); | 274 idx = reorder_modifiers (idx); |
| 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; |
| 282 Lisp_Object t_binding = Qnil; | 282 Lisp_Object t_binding = Qnil; |
| 283 | 283 |
| 373 if (XTYPE (idx) == Lisp_Symbol) | 373 if (XTYPE (idx) == Lisp_Symbol) |
| 374 idx = reorder_modifiers (idx); | 374 idx = reorder_modifiers (idx); |
| 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 { |
| 382 Lisp_Object tail; | 382 Lisp_Object tail; |
| 383 | 383 |
| 1859 static int | 1859 static int |
| 1860 describe_vector_princ (elt) | 1860 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) |
| 1877 register Lisp_Object vector; | 1883 register Lisp_Object vector; |
| 1878 Lisp_Object elt_prefix; | 1884 Lisp_Object elt_prefix; |
