diff options
| author | Richard M. Stallman | 1993-05-08 14:55:39 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-05-08 14:55:39 +0000 |
| commit | b04904fb2e0d6ddf614feeed36bdacb6707ff897 (patch) | |
| tree | 01c2762ee18f16df423de3d83a3a3a7763bd4244 | |
| parent | d2b641800ec58d92a20eea511f1b63b65753cf08 (diff) | |
| download | emacs-b04904fb2e0d6ddf614feeed36bdacb6707ff897.tar.gz emacs-b04904fb2e0d6ddf614feeed36bdacb6707ff897.zip | |
(read_avail_input): If meta_key is 2, let 8 bits thru.
(Fset_input_mode): Set meta_key to 2 if META arg isn't t or nil.
| -rw-r--r-- | src/keyboard.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 2b51d6abb90..eb0af725962 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -271,7 +271,9 @@ FILE *dribble; | |||
| 271 | /* Nonzero if input is available. */ | 271 | /* Nonzero if input is available. */ |
| 272 | int input_pending; | 272 | int input_pending; |
| 273 | 273 | ||
| 274 | /* Nonzero if should obey 0200 bit in input chars as "Meta". */ | 274 | /* 1 if should obey 0200 bit in input chars as "Meta", 2 if should |
| 275 | keep 0200 bit in input chars. 0 to ignore the 0200 bit. */ | ||
| 276 | |||
| 275 | int meta_key; | 277 | int meta_key; |
| 276 | 278 | ||
| 277 | extern char *pending_malloc_warning; | 279 | extern char *pending_malloc_warning; |
| @@ -2846,9 +2848,10 @@ read_avail_input (expected) | |||
| 2846 | { | 2848 | { |
| 2847 | buf[i].kind = ascii_keystroke; | 2849 | buf[i].kind = ascii_keystroke; |
| 2848 | buf[i].modifiers = 0; | 2850 | buf[i].modifiers = 0; |
| 2849 | if (meta_key && (cbuf[i] & 0x80)) | 2851 | if (meta_key == 1 && (cbuf[i] & 0x80)) |
| 2850 | buf[i].modifiers = meta_modifier; | 2852 | buf[i].modifiers = meta_modifier; |
| 2851 | cbuf[i] &= ~0x80; | 2853 | if (meta_key != 2) |
| 2854 | cbuf[i] &= ~0x80; | ||
| 2852 | 2855 | ||
| 2853 | XSET (buf[i].code, Lisp_Int, cbuf[i]); | 2856 | XSET (buf[i].code, Lisp_Int, cbuf[i]); |
| 2854 | #ifdef MULTI_FRAME | 2857 | #ifdef MULTI_FRAME |
| @@ -4441,8 +4444,9 @@ First arg INTERRUPT non-nil means use input interrupts;\n\ | |||
| 4441 | nil means use CBREAK mode.\n\ | 4444 | nil means use CBREAK mode.\n\ |
| 4442 | Second arg FLOW non-nil means use ^S/^Q flow control for output to terminal\n\ | 4445 | Second arg FLOW non-nil means use ^S/^Q flow control for output to terminal\n\ |
| 4443 | (no effect except in CBREAK mode).\n\ | 4446 | (no effect except in CBREAK mode).\n\ |
| 4444 | Third arg META non-nil means accept 8-bit input (for a Meta key).\n\ | 4447 | Third arg META t means accept 8-bit input (for a Meta key).\n\ |
| 4445 | Otherwise, the top bit is ignored, on the assumption it is parity.\n\ | 4448 | META nil means ignore the top bit, on the assumption it is parity.\n\ |
| 4449 | Otherwise, accept 8-bit input and don't use the top bit for Meta.\n\ | ||
| 4446 | Optional fourth arg QUIT if non-nil specifies character to use for quitting.") | 4450 | Optional fourth arg QUIT if non-nil specifies character to use for quitting.") |
| 4447 | (interrupt, flow, meta, quit) | 4451 | (interrupt, flow, meta, quit) |
| 4448 | Lisp_Object interrupt, flow, meta, quit; | 4452 | Lisp_Object interrupt, flow, meta, quit; |
| @@ -4469,7 +4473,12 @@ Optional fourth arg QUIT if non-nil specifies character to use for quitting.") | |||
| 4469 | interrupt_input = 1; | 4473 | interrupt_input = 1; |
| 4470 | #endif | 4474 | #endif |
| 4471 | flow_control = !NILP (flow); | 4475 | flow_control = !NILP (flow); |
| 4472 | meta_key = !NILP (meta); | 4476 | if (NILP (meta)) |
| 4477 | meta_key = 0; | ||
| 4478 | else if (EQ (meta, Qt)) | ||
| 4479 | meta_key = 1; | ||
| 4480 | else | ||
| 4481 | meta_key = 2; | ||
| 4473 | if (!NILP (quit)) | 4482 | if (!NILP (quit)) |
| 4474 | /* Don't let this value be out of range. */ | 4483 | /* Don't let this value be out of range. */ |
| 4475 | quit_char = XINT (quit) & (meta_key ? 0377 : 0177); | 4484 | quit_char = XINT (quit) & (meta_key ? 0377 : 0177); |