aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/data.c40
-rw-r--r--src/keyboard.c34
2 files changed, 69 insertions, 5 deletions
diff --git a/src/data.c b/src/data.c
index 7bbb45ae043..c74d3c076c3 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1875,6 +1875,44 @@ If the current binding is global (the default), the value is nil. */)
1875 1875
1876 return Qnil; 1876 return Qnil;
1877} 1877}
1878
1879extern struct display *get_display P_ ((Lisp_Object display, int));
1880
1881DEFUN ("terminal-local-value", Fterminal_local_value, Sterminal_local_value, 2, 2, 0,
1882 doc: /* Return the terminal-local value of SYMBOL on DISPLAY.
1883If SYMBOL is not a terminal-local variable, then return its normal
1884value, like `symbol-value'.
1885
1886DISPLAY may be a display, a frame, or nil (meaning the selected
1887frame's display). */)
1888 (symbol, display)
1889 Lisp_Object symbol;
1890 Lisp_Object display;
1891{
1892 Lisp_Object result;
1893 struct display *d = get_display (display, 1);
1894 push_display_kboard (d);
1895 result = Fsymbol_value (symbol);
1896 pop_frame_kboard ();
1897 return result;
1898}
1899
1900DEFUN ("set-terminal-local-value", Fset_terminal_local_value, Sset_terminal_local_value, 3, 3, 0,
1901 doc: /* Set the terminal-local binding of SYMBOL on DISPLAY to VALUE.
1902If VARIABLE is not a terminal-local variable, then set its normal
1903binding, like `set'. */)
1904 (symbol, display, value)
1905 Lisp_Object symbol;
1906 Lisp_Object display;
1907 Lisp_Object value;
1908{
1909 Lisp_Object result;
1910 struct display *d = get_display (display, 1);
1911 push_display_kboard (d);
1912 result = Fset (symbol, value);
1913 pop_frame_kboard ();
1914 return result;
1915}
1878 1916
1879/* Find the function at the end of a chain of symbol function indirections. */ 1917/* Find the function at the end of a chain of symbol function indirections. */
1880 1918
@@ -3326,6 +3364,8 @@ syms_of_data ()
3326 defsubr (&Slocal_variable_p); 3364 defsubr (&Slocal_variable_p);
3327 defsubr (&Slocal_variable_if_set_p); 3365 defsubr (&Slocal_variable_if_set_p);
3328 defsubr (&Svariable_binding_locus); 3366 defsubr (&Svariable_binding_locus);
3367 defsubr (&Sterminal_local_value);
3368 defsubr (&Sset_terminal_local_value);
3329 defsubr (&Saref); 3369 defsubr (&Saref);
3330 defsubr (&Saset); 3370 defsubr (&Saset);
3331 defsubr (&Snumber_to_string); 3371 defsubr (&Snumber_to_string);
diff --git a/src/keyboard.c b/src/keyboard.c
index a906146df4a..4a4afa326f8 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -11247,7 +11247,10 @@ In other words, the present command is the event that made the previous
11247command exit. 11247command exit.
11248 11248
11249The value `kill-region' is special; it means that the previous command 11249The value `kill-region' is special; it means that the previous command
11250was a kill command. */); 11250was a kill command.
11251
11252`last-command' has a separate binding for each display device.
11253See Info node `(elisp)Multiple displays'. */);
11251 11254
11252 DEFVAR_KBOARD ("real-last-command", Vreal_last_command, 11255 DEFVAR_KBOARD ("real-last-command", Vreal_last_command,
11253 doc: /* Same as `last-command', but never altered by Lisp code. */); 11256 doc: /* Same as `last-command', but never altered by Lisp code. */);
@@ -11455,7 +11458,10 @@ buffer's local map, and the minor mode keymaps and text property keymaps.
11455It also replaces `overriding-local-map'. 11458It also replaces `overriding-local-map'.
11456 11459
11457This variable is intended to let commands such as `universal-argument' 11460This variable is intended to let commands such as `universal-argument'
11458set up a different keymap for reading the next command. */); 11461set up a different keymap for reading the next command.
11462
11463`overriding-terminal-local-map' has a separate binding for each display device.
11464See Info node `(elisp)Multiple displays'. */);
11459 11465
11460 DEFVAR_LISP ("overriding-local-map", &Voverriding_local_map, 11466 DEFVAR_LISP ("overriding-local-map", &Voverriding_local_map,
11461 doc: /* Keymap that overrides all other local keymaps. 11467 doc: /* Keymap that overrides all other local keymaps.
@@ -11480,7 +11486,15 @@ and the minor mode maps regardless of `overriding-local-map'. */);
11480 doc: /* Alist of system-specific X windows key symbols. 11486 doc: /* Alist of system-specific X windows key symbols.
11481Each element should have the form (N . SYMBOL) where N is the 11487Each element should have the form (N . SYMBOL) where N is the
11482numeric keysym code (sans the \"system-specific\" bit 1<<28) 11488numeric keysym code (sans the \"system-specific\" bit 1<<28)
11483and SYMBOL is its name. */); 11489and SYMBOL is its name.
11490
11491`system-key-alist' has a separate binding for each display device.
11492See Info node `(elisp)Multiple displays'.
11493
11494Note that the currently selected frame has very little to do with
11495which binding of this variable is active at any given moment. If you
11496need set or get the binding on a specific display, use
11497`terminal-local-value' and `set-terminal-local-value'. */);
11484 11498
11485 DEFVAR_KBOARD ("function-key-map", Vfunction_key_map, 11499 DEFVAR_KBOARD ("function-key-map", Vfunction_key_map,
11486 doc: /* Keymap mapping ASCII function key sequences onto their preferred forms. 11500 doc: /* Keymap mapping ASCII function key sequences onto their preferred forms.
@@ -11503,7 +11517,12 @@ Typing `ESC O P' to `read-key-sequence' would return [f1]. Typing
11503key, typing `ESC O P x' would return [f1 x]. 11517key, typing `ESC O P x' would return [f1 x].
11504 11518
11505`function-key-map' has a separate binding for each display device. 11519`function-key-map' has a separate binding for each display device.
11506See Info node `(elisp)Multiple displays'. */); 11520See Info node `(elisp)Multiple displays'.
11521
11522Note that the currently selected frame has very little to do with
11523which binding of this variable is active at any given moment. If you
11524need set or get the binding on a specific display, use
11525`terminal-local-value' and `set-terminal-local-value'. */);
11507 11526
11508 DEFVAR_KBOARD ("key-translation-map", Vkey_translation_map, 11527 DEFVAR_KBOARD ("key-translation-map", Vkey_translation_map,
11509 doc: /* Keymap of key translations that can override keymaps. 11528 doc: /* Keymap of key translations that can override keymaps.
@@ -11512,7 +11531,12 @@ and its non-prefix bindings override ordinary bindings.
11512 11531
11513`key-translation-map' has a separate binding for each display device. 11532`key-translation-map' has a separate binding for each display device.
11514(See Info node `(elisp)Multiple displays'.) If you need to set a key 11533(See Info node `(elisp)Multiple displays'.) If you need to set a key
11515translation on all devices, change `global-key-translation-map' instead. */); 11534translation on all devices, change `global-key-translation-map' instead.
11535
11536Note that the currently selected frame has very little to do with
11537which binding of this variable is active at any given moment. If you
11538need set or get the binding on a specific display, use
11539`terminal-local-value' and `set-terminal-local-value'. */);
11516 11540
11517 DEFVAR_LISP ("global-key-translation-map", &Vglobal_key_translation_map, 11541 DEFVAR_LISP ("global-key-translation-map", &Vglobal_key_translation_map,
11518 doc: /* The parent keymap of all terminal-local `key-translation-map' instances. 11542 doc: /* The parent keymap of all terminal-local `key-translation-map' instances.