aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1991-07-28 14:50:08 +0000
committerJim Blandy1991-07-28 14:50:08 +0000
commit1d8d96fa607e344acd8731a3ba1d4894a808482b (patch)
tree5266bc4df085842acae5efc49d28ac6719914be0 /src
parent83b2229fc625ce74469dd02a9821b85edb7038a4 (diff)
downloademacs-1d8d96fa607e344acd8731a3ba1d4894a808482b.tar.gz
emacs-1d8d96fa607e344acd8731a3ba1d4894a808482b.zip
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/keymap.c31
-rw-r--r--src/window.c7
2 files changed, 25 insertions, 13 deletions
diff --git a/src/keymap.c b/src/keymap.c
index 70d7109541e..7aeed24ce4b 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -142,10 +142,11 @@ synkey (frommap, fromchar, tomap, tochar)
142 142
143DEFUN ("keymapp", Fkeymapp, Skeymapp, 1, 1, 0, 143DEFUN ("keymapp", Fkeymapp, Skeymapp, 1, 1, 0,
144 "Return t if ARG is a keymap.\n\ 144 "Return t if ARG is a keymap.\n\
145A keymap is list (keymap . ALIST), where alist elements look like 145\n\
146(CHAR . DEFN) or (SYMBOL . DEFN), or a list (keymap VECTOR . ALIST) 146A keymap is list (keymap . ALIST), a list (keymap VECTOR . ALIST),\n\
147where VECTOR is a 128-element vector of bindings for ASCII characters, 147or a symbol whose function definition is a keymap is itself a keymap.\n\
148and ALIST is as above.") 148ALIST elements look like (CHAR . DEFN) or (SYMBOL . DEFN);\n\
149VECTOR is a 128-element vector of bindings for ASCII characters.")
149 (object) 150 (object)
150 Lisp_Object object; 151 Lisp_Object object;
151{ 152{
@@ -335,7 +336,9 @@ DEFUN ("copy-keymap", Fcopy_keymap, Scopy_keymap, 1, 1, 0,
335 "Return a copy of the keymap KEYMAP.\n\ 336 "Return a copy of the keymap KEYMAP.\n\
336The copy starts out with the same definitions of KEYMAP,\n\ 337The copy starts out with the same definitions of KEYMAP,\n\
337but changing either the copy or KEYMAP does not affect the other.\n\ 338but changing either the copy or KEYMAP does not affect the other.\n\
338Any key definitions that are subkeymaps are recursively copied.") 339Any key definitions that are subkeymaps are recursively copied.\n\
340However, a key definition which is a symbol whose definition is a keymap\n\
341is not copied.")
339 (keymap) 342 (keymap)
340 Lisp_Object keymap; 343 Lisp_Object keymap;
341{ 344{
@@ -357,9 +360,10 @@ Any key definitions that are subkeymaps are recursively copied.")
357 table = Fcopy_sequence (table); 360 table = Fcopy_sequence (table);
358 361
359 for (i = 0; i < DENSE_TABLE_SIZE; i++) 362 for (i = 0; i < DENSE_TABLE_SIZE; i++)
360 if (! NULL (Fkeymapp (XVECTOR (table)->contents[i]))) 363 if (XTYPE (XVECTOR (copy)->contents[i]) != Lisp_Symbol)
361 XVECTOR (table)->contents[i] 364 if (! NULL (Fkeymapp (XVECTOR (table)->contents[i])))
362 = Fcopy_keymap (XVECTOR (table)->contents[i]); 365 XVECTOR (table)->contents[i]
366 = Fcopy_keymap (XVECTOR (table)->contents[i]);
363 XCONS (tail)->car = table; 367 XCONS (tail)->car = table;
364 368
365 tail = XCONS (tail)->cdr; 369 tail = XCONS (tail)->cdr;
@@ -372,7 +376,9 @@ Any key definitions that are subkeymaps are recursively copied.")
372 register Lisp_Object elt; 376 register Lisp_Object elt;
373 377
374 elt = XCONS (tail)->car; 378 elt = XCONS (tail)->car;
375 if (CONSP (elt) && ! NULL (Fkeymapp (XCONS (elt)->cdr))) 379 if (CONSP (elt)
380 && XTYPE (XCONS (elt)->cdr) != Lisp_Symbol
381 && ! NULL (Fkeymapp (XCONS (elt)->cdr)))
376 XCONS (elt)->cdr = Fcopy_keymap (XCONS (elt)->cdr); 382 XCONS (elt)->cdr = Fcopy_keymap (XCONS (elt)->cdr);
377 383
378 tail = XCONS (tail)->cdr; 384 tail = XCONS (tail)->cdr;
@@ -667,8 +673,9 @@ KEY is a string representing a sequence of keystrokes.")
667DEFUN ("define-prefix-command", Fdefine_prefix_command, Sdefine_prefix_command, 1, 2, 0, 673DEFUN ("define-prefix-command", Fdefine_prefix_command, Sdefine_prefix_command, 1, 2, 0,
668 "Define COMMAND as a prefix command.\n\ 674 "Define COMMAND as a prefix command.\n\
669A new sparse keymap is stored as COMMAND's function definition and its value.\n\ 675A new sparse keymap is stored as COMMAND's function definition and its value.\n\
670If a second optional argument MAPVAR is given, the map is stored as its\n\ 676If a second optional argument MAPVAR is given, the map is stored as\n\
671value instead of as COMMAND's value; but COMMAND is still defined as a function.") 677its value instead of as COMMAND's value; but COMMAND is still defined\n\
678as a function.")
672 (name, mapvar) 679 (name, mapvar)
673 Lisp_Object name, mapvar; 680 Lisp_Object name, mapvar;
674{ 681{
@@ -959,7 +966,7 @@ Control characters turn into C-whatever, etc.")
959 return Fsymbol_name (key); 966 return Fsymbol_name (key);
960 967
961 case Lisp_Cons: /* Mouse event */ 968 case Lisp_Cons: /* Mouse event */
962 key = XCONS (key)->cdr; 969 key = XCONS (key)->car;
963 if (XTYPE (key) == Lisp_Symbol) 970 if (XTYPE (key) == Lisp_Symbol)
964 return Fsymbol_name (key); 971 return Fsymbol_name (key);
965 /* Mouse events should have an identifying symbol as their car; 972 /* Mouse events should have an identifying symbol as their car;
diff --git a/src/window.c b/src/window.c
index 7685c0de3a5..a91b5e68aea 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1321,7 +1321,7 @@ set_window_width (window, width, nodelete)
1321 } 1321 }
1322} 1322}
1323 1323
1324static int window_select_count; 1324int window_select_count;
1325 1325
1326DEFUN ("set-window-buffer", Fset_window_buffer, Sset_window_buffer, 2, 2, 0, 1326DEFUN ("set-window-buffer", Fset_window_buffer, Sset_window_buffer, 2, 2, 0,
1327 "Make WINDOW display BUFFER as its contents.\n\ 1327 "Make WINDOW display BUFFER as its contents.\n\
@@ -2575,6 +2575,11 @@ init_window_once ()
2575 Fset_window_buffer (minibuf_window, get_minibuffer (0)); 2575 Fset_window_buffer (minibuf_window, get_minibuffer (0));
2576 2576
2577 selected_window = root_window; 2577 selected_window = root_window;
2578 /* Make sure this window seems more recently used than
2579 a newly-created, never-selected window. Increment
2580 window_select_count so the first selection ever will get
2581 something newer than this. */
2582 XFASTINT (XWINDOW (selected_window)->use_time) = ++window_select_count;
2578#endif /* not MULTI_SCREEN */ 2583#endif /* not MULTI_SCREEN */
2579} 2584}
2580 2585