diff options
| author | Karoly Lorentey | 2005-10-29 11:50:12 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-10-29 11:50:12 +0000 |
| commit | c40bb1ba81a5df164f0b9b61e3480c55808717b7 (patch) | |
| tree | b7ce7860f839f249aee9f251507aa9e6ab5345be /src/data.c | |
| parent | 1d33157fbfbb14905fcc88f627f15dd2732cc569 (diff) | |
| download | emacs-c40bb1ba81a5df164f0b9b61e3480c55808717b7.tar.gz emacs-c40bb1ba81a5df164f0b9b61e3480c55808717b7.zip | |
Fix semantics of terminal-local variables. Remove `terminal-local-value' hack.
* src/data.c (do_symval_forwarding, store_symval_forwarding)
(find_symbol_value): Use the selected frame's keyboard, not
current_kboard.
* src/data.c (Fterminal_local_value, Fset_terminal_local_value): Disable
these functions.
* src/data.c (syms_of_data): Don't defsubr them.
* lisp/edmacro.el (edmacro-format-keys): Remove terminal-local-value calls.
* lisp/emulation/cua-base.el (cua--pre-command-handler-1): Ditto.
* lisp/international/encoded-kb.el (encoded-kbd-setup-display): Ditto.
* lisp/isearch.el (isearch-other-meta-char): Ditto.
* lisp/obsolete/keyswap.el (the-table): Ditto.
* lisp/simple.el (normal-erase-is-backspace-mode): Ditto.
* lisp/subr.el (keyboard-translate, read-quoted-char): Ditto.
* lisp/term/AT386.el (terminal-init-AT386): Ditto.
* lisp/term/internal.el: Ditto.
* lisp/term/iris-ansi.el (terminal-init-iris-ansi): Ditto.
* lisp/term/lk201.el (terminal-init-lk201): Ditto.
* lisp/term/mac-win.el: Ditto.
* lisp/term/news.el (terminal-init-news): Ditto.
* lisp/term/rxvt.el (terminal-init-rxvt): Ditto.
* lisp/term/sun.el (terminal-init-sun): Ditto.
* lisp/term/tvi970.el (terminal-init-tvi970): Ditto.
* lisp/term/vt200.el (terminal-init-vt200): Ditto.
* lisp/term/vt201.el (terminal-init-vt201): Ditto.
* lisp/term/vt220.el (terminal-init-vt220): Ditto.
* lisp/term/vt240.el (terminal-init-vt240): Ditto.
* lisp/term/vt300.el (terminal-init-vt300): Ditto.
* lisp/term/vt320.el (terminal-init-vt320): Ditto.
* lisp/term/vt400.el (terminal-init-vt400): Ditto.
* lisp/term/vt420.el (terminal-init-vt420): Ditto.
* lisp/term/wyse50.el (terminal-init-wyse50): Ditto.
* lisp/term/x-win.el (x-setup-function-keys): Ditto.
* lisp/term/xterm.el (terminal-init-xterm): Ditto.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-434
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 23 |
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 | ||
| 1881 | extern struct device *get_device P_ ((Lisp_Object display, int)); | 1895 | extern struct device *get_device P_ ((Lisp_Object display, int)); |
| 1882 | 1896 | ||
| 1883 | DEFUN ("terminal-local-value", Fterminal_local_value, Sterminal_local_value, 2, 2, 0, | 1897 | DEFUN ("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); |