aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/data.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/data.c b/src/data.c
index e5e77885da4..cb6c7d2c85c 100644
--- a/src/data.c
+++ b/src/data.c
@@ -891,7 +891,18 @@ do_symval_forwarding (valcontents)
891 891
892 case Lisp_Misc_Kboard_Objfwd: 892 case Lisp_Misc_Kboard_Objfwd:
893 offset = XKBOARD_OBJFWD (valcontents)->offset; 893 offset = XKBOARD_OBJFWD (valcontents)->offset;
894 return *(Lisp_Object *)(offset + (char *)current_kboard); 894 /* We used to simply use current_kboard here, but from Lisp
895 code, it's value is often unexpected. It seems nicer to
896 allow constructions like this to work as intuitively expected:
897
898 (with-selected-frame frame
899 (define-key local-function-map "\eOP" [f1]))
900
901 On the other hand, this affects the semantics of
902 last-command and real-last-command, and people may rely on
903 that. I took a quick look at the Lisp codebase, and I
904 don't think anything will break. --lorentey */
905 return *(Lisp_Object *)(offset + (char *)FRAME_KBOARD (SELECTED_FRAME ()));
895 } 906 }
896 return valcontents; 907 return valcontents;
897} 908}
@@ -979,7 +990,7 @@ store_symval_forwarding (symbol, valcontents, newval, buf)
979 990
980 case Lisp_Misc_Kboard_Objfwd: 991 case Lisp_Misc_Kboard_Objfwd:
981 { 992 {
982 char *base = (char *) current_kboard; 993 char *base = (char *) FRAME_KBOARD (SELECTED_FRAME ());
983 char *p = base + XKBOARD_OBJFWD (valcontents)->offset; 994 char *p = base + XKBOARD_OBJFWD (valcontents)->offset;
984 *(Lisp_Object *) p = newval; 995 *(Lisp_Object *) p = newval;
985 } 996 }
@@ -1125,7 +1136,7 @@ find_symbol_value (symbol)
1125 1136
1126 case Lisp_Misc_Kboard_Objfwd: 1137 case Lisp_Misc_Kboard_Objfwd:
1127 return *(Lisp_Object *)(XKBOARD_OBJFWD (valcontents)->offset 1138 return *(Lisp_Object *)(XKBOARD_OBJFWD (valcontents)->offset
1128 + (char *)current_kboard); 1139 + (char *)FRAME_KBOARD (SELECTED_FRAME ()));
1129 } 1140 }
1130 } 1141 }
1131 1142
@@ -1878,6 +1889,9 @@ If the current binding is global (the default), the value is nil. */)
1878 return Qnil; 1889 return Qnil;
1879} 1890}
1880 1891
1892/* This code is disabled now that we use the selected frame to return
1893 keyboard-local-values. */
1894#if 0
1881extern struct device *get_device P_ ((Lisp_Object display, int)); 1895extern struct device *get_device P_ ((Lisp_Object display, int));
1882 1896
1883DEFUN ("terminal-local-value", Fterminal_local_value, Sterminal_local_value, 2, 2, 0, 1897DEFUN ("terminal-local-value", Fterminal_local_value, Sterminal_local_value, 2, 2, 0,
@@ -1918,6 +1932,7 @@ selected frame's display device). */)
1918 pop_kboard (); 1932 pop_kboard ();
1919 return result; 1933 return result;
1920} 1934}
1935#endif
1921 1936
1922/* Find the function at the end of a chain of symbol function indirections. */ 1937/* Find the function at the end of a chain of symbol function indirections. */
1923 1938
@@ -3369,8 +3384,10 @@ syms_of_data ()
3369 defsubr (&Slocal_variable_p); 3384 defsubr (&Slocal_variable_p);
3370 defsubr (&Slocal_variable_if_set_p); 3385 defsubr (&Slocal_variable_if_set_p);
3371 defsubr (&Svariable_binding_locus); 3386 defsubr (&Svariable_binding_locus);
3387#if 0 /* XXX Remove this. --lorentey */
3372 defsubr (&Sterminal_local_value); 3388 defsubr (&Sterminal_local_value);
3373 defsubr (&Sset_terminal_local_value); 3389 defsubr (&Sset_terminal_local_value);
3390#endif
3374 defsubr (&Saref); 3391 defsubr (&Saref);
3375 defsubr (&Saset); 3392 defsubr (&Saset);
3376 defsubr (&Snumber_to_string); 3393 defsubr (&Snumber_to_string);