aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog26
-rw-r--r--src/alloc.c2
-rw-r--r--src/emacs.c5
-rw-r--r--src/eval.c10
-rw-r--r--src/insdel.c9
-rw-r--r--src/minibuf.c41
-rw-r--r--src/term.c13
-rw-r--r--src/xterm.c34
8 files changed, 90 insertions, 50 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 1a4e8c113e8..06fcf372e81 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,29 @@
12007-08-19 Richard Stallman <rms@gnu.org>
2
3 * eval.c (Ffunction, Fquote): Signal error if not 1 argument.
4
52007-08-19 Andreas Schwab <schwab@suse.de>
6
7 * alloc.c (pure): Round PURESIZE up.
8
92007-08-17 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
10
11 * xterm.c (handle_one_xevent): Remove check that mouse click is in
12 active frame.
13
142007-08-16 Richard Stallman <rms@gnu.org>
15
16 * eval.c (Fcommandp): Add parens to clarify.
17
18 * minibuf.c (Fall_completions): Use enum for type of table.
19
20 * emacs.c (USAGE2): Improve text.
21
222007-08-15 Philippe Waroquiers <philippe.waroquiers@eurocontrol.int>
23
24 * term.c (tty_default_color_capabilities): Declare static
25 variables in file scope, to avoid HPUX compiler problem.
26
12007-08-13 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 272007-08-13 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 28
3 * gtkutil.c (update_frame_tool_bar): Use -1 as index 29 * gtkutil.c (update_frame_tool_bar): Use -1 as index
diff --git a/src/alloc.c b/src/alloc.c
index 320ab5bda56..2e88afc00ac 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -266,7 +266,7 @@ Lisp_Object Vmemory_full;
266 remapping on more recent systems because this is less important 266 remapping on more recent systems because this is less important
267 nowadays than in the days of small memories and timesharing. */ 267 nowadays than in the days of small memories and timesharing. */
268 268
269EMACS_INT pure[PURESIZE / sizeof (EMACS_INT)] = {1,}; 269EMACS_INT pure[(PURESIZE + sizeof (EMACS_INT) - 1) / sizeof (EMACS_INT)] = {1,};
270#define PUREBEG (char *) pure 270#define PUREBEG (char *) pure
271 271
272#else /* HAVE_SHM */ 272#else /* HAVE_SHM */
diff --git a/src/emacs.c b/src/emacs.c
index 9f4fe9dc0de..dc3055f8b1d 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -280,9 +280,8 @@ Initialization options:\n\
280Action options:\n\ 280Action options:\n\
281\n\ 281\n\
282FILE visit FILE using find-file\n\ 282FILE visit FILE using find-file\n\
283+LINE FILE visit FILE using find-file, then go to line LINE\n\ 283+LINE go to line LINE in next FILE\n\
284+LINE:COLUMN FILE visit FILE using find-file, then go to line LINE,\n\ 284+LINE:COLUMN go to line LINE, column COLUMN, in next FILE\n\
285 column COLUMN\n\
286--directory, -L DIR add DIR to variable load-path\n\ 285--directory, -L DIR add DIR to variable load-path\n\
287--eval EXPR evaluate Emacs Lisp expression EXPR\n\ 286--eval EXPR evaluate Emacs Lisp expression EXPR\n\
288--execute EXPR evaluate Emacs Lisp expression EXPR\n\ 287--execute EXPR evaluate Emacs Lisp expression EXPR\n\
diff --git a/src/eval.c b/src/eval.c
index 6ce64bc4d8c..20be847f273 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -202,6 +202,8 @@ Lisp_Object Vmacro_declaration_function;
202 202
203extern Lisp_Object Qrisky_local_variable; 203extern Lisp_Object Qrisky_local_variable;
204 204
205extern Lisp_Object Qfunction;
206
205static Lisp_Object funcall_lambda P_ ((Lisp_Object, int, Lisp_Object*)); 207static Lisp_Object funcall_lambda P_ ((Lisp_Object, int, Lisp_Object*));
206static void unwind_to_catch P_ ((struct catchtag *, Lisp_Object)) NO_RETURN; 208static void unwind_to_catch P_ ((struct catchtag *, Lisp_Object)) NO_RETURN;
207 209
@@ -539,7 +541,7 @@ usage: (setq [SYM VAL]...) */)
539 register Lisp_Object val, sym; 541 register Lisp_Object val, sym;
540 struct gcpro gcpro1; 542 struct gcpro gcpro1;
541 543
542 if (NILP(args)) 544 if (NILP (args))
543 return Qnil; 545 return Qnil;
544 546
545 args_left = args; 547 args_left = args;
@@ -564,6 +566,8 @@ usage: (quote ARG) */)
564 (args) 566 (args)
565 Lisp_Object args; 567 Lisp_Object args;
566{ 568{
569 if (!NILP (Fcdr (args)))
570 xsignal2 (Qwrong_number_of_arguments, Qquote, Flength (args));
567 return Fcar (args); 571 return Fcar (args);
568} 572}
569 573
@@ -575,6 +579,8 @@ usage: (function ARG) */)
575 (args) 579 (args)
576 Lisp_Object args; 580 Lisp_Object args;
577{ 581{
582 if (!NILP (Fcdr (args)))
583 xsignal2 (Qwrong_number_of_arguments, Qfunction, Flength (args));
578 return Fcar (args); 584 return Fcar (args);
579} 585}
580 586
@@ -2073,7 +2079,7 @@ then strings and vectors are not accepted. */)
2073 2079
2074 /* Strings and vectors are keyboard macros. */ 2080 /* Strings and vectors are keyboard macros. */
2075 if (STRINGP (fun) || VECTORP (fun)) 2081 if (STRINGP (fun) || VECTORP (fun))
2076 return NILP (for_call_interactively) ? Qt : Qnil; 2082 return (NILP (for_call_interactively) ? Qt : Qnil);
2077 2083
2078 /* Lists may represent commands. */ 2084 /* Lists may represent commands. */
2079 if (!CONSP (fun)) 2085 if (!CONSP (fun))
diff --git a/src/insdel.c b/src/insdel.c
index 6736b22e2be..059a3c47d1b 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -2171,10 +2171,11 @@ prepare_to_modify_buffer (start, end, preserve_ptr)
2171 (! NILP (end_marker) ? Fmarker_position (end_marker) : end) 2171 (! NILP (end_marker) ? Fmarker_position (end_marker) : end)
2172 2172
2173/* Set a variable to nil if an error occurred. 2173/* Set a variable to nil if an error occurred.
2174 VAL is a cons-cell whose car is the variable name, and whose cdr is 2174 Don't change the variable if there was no error.
2175 either nil (to mean that there was indeed an error), or non-nil to mean 2175 VAL is a cons-cell (VARIABLE . NO-ERROR-FLAG).
2176 that the was no error (which thus causes this function to do 2176 VARIABLE is the variable to maybe set to nil.
2177 nothing). */ 2177 NO-ERROR-FLAG is nil if there was an error,
2178 anything else meaning no error (so this function does nothing). */
2178Lisp_Object 2179Lisp_Object
2179reset_var_on_error (val) 2180reset_var_on_error (val)
2180 Lisp_Object val; 2181 Lisp_Object val;
diff --git a/src/minibuf.c b/src/minibuf.c
index 95cb847dd46..74220d0c7cb 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1288,11 +1288,14 @@ is used to further constrain the set of candidates. */)
1288 int bestmatchsize = 0; 1288 int bestmatchsize = 0;
1289 /* These are in bytes, too. */ 1289 /* These are in bytes, too. */
1290 int compare, matchsize; 1290 int compare, matchsize;
1291 int type = (HASH_TABLE_P (collection) ? 3 1291 enum { function_table, list_table, obarray_table, hash_table}
1292 : VECTORP (collection) ? 2 1292 type = (HASH_TABLE_P (collection) ? hash_table
1293 : NILP (collection) || (CONSP (collection) 1293 : VECTORP (collection) ? obarray_table
1294 && (!SYMBOLP (XCAR (collection)) 1294 : ((NILP (collection)
1295 || NILP (XCAR (collection))))); 1295 || (CONSP (collection)
1296 && (!SYMBOLP (XCAR (collection))
1297 || NILP (XCAR (collection)))))
1298 ? list_table : function_table));
1296 int index = 0, obsize = 0; 1299 int index = 0, obsize = 0;
1297 int matchcount = 0; 1300 int matchcount = 0;
1298 int bindcount = -1; 1301 int bindcount = -1;
@@ -1300,7 +1303,7 @@ is used to further constrain the set of candidates. */)
1300 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; 1303 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
1301 1304
1302 CHECK_STRING (string); 1305 CHECK_STRING (string);
1303 if (type == 0) 1306 if (type == function_table)
1304 return call3 (collection, string, predicate, Qnil); 1307 return call3 (collection, string, predicate, Qnil);
1305 1308
1306 bestmatch = bucket = Qnil; 1309 bestmatch = bucket = Qnil;
@@ -1308,7 +1311,7 @@ is used to further constrain the set of candidates. */)
1308 1311
1309 /* If COLLECTION is not a list, set TAIL just for gc pro. */ 1312 /* If COLLECTION is not a list, set TAIL just for gc pro. */
1310 tail = collection; 1313 tail = collection;
1311 if (type == 2) 1314 if (type == obarray_table)
1312 { 1315 {
1313 collection = check_obarray (collection); 1316 collection = check_obarray (collection);
1314 obsize = XVECTOR (collection)->size; 1317 obsize = XVECTOR (collection)->size;
@@ -1322,7 +1325,7 @@ is used to further constrain the set of candidates. */)
1322 /* elt gets the alist element or symbol. 1325 /* elt gets the alist element or symbol.
1323 eltstring gets the name to check as a completion. */ 1326 eltstring gets the name to check as a completion. */
1324 1327
1325 if (type == 1) 1328 if (type == list_table)
1326 { 1329 {
1327 if (!CONSP (tail)) 1330 if (!CONSP (tail))
1328 break; 1331 break;
@@ -1330,7 +1333,7 @@ is used to further constrain the set of candidates. */)
1330 eltstring = CONSP (elt) ? XCAR (elt) : elt; 1333 eltstring = CONSP (elt) ? XCAR (elt) : elt;
1331 tail = XCDR (tail); 1334 tail = XCDR (tail);
1332 } 1335 }
1333 else if (type == 2) 1336 else if (type == obarray_table)
1334 { 1337 {
1335 if (!EQ (bucket, zero)) 1338 if (!EQ (bucket, zero))
1336 { 1339 {
@@ -1351,7 +1354,7 @@ is used to further constrain the set of candidates. */)
1351 continue; 1354 continue;
1352 } 1355 }
1353 } 1356 }
1354 else /* if (type == 3) */ 1357 else /* if (type == hash_table) */
1355 { 1358 {
1356 while (index < HASH_TABLE_SIZE (XHASH_TABLE (collection)) 1359 while (index < HASH_TABLE_SIZE (XHASH_TABLE (collection))
1357 && NILP (HASH_HASH (XHASH_TABLE (collection), index))) 1360 && NILP (HASH_HASH (XHASH_TABLE (collection), index)))
@@ -1405,15 +1408,17 @@ is used to further constrain the set of candidates. */)
1405 tem = Fcommandp (elt, Qnil); 1408 tem = Fcommandp (elt, Qnil);
1406 else 1409 else
1407 { 1410 {
1408 if (bindcount >= 0) { 1411 if (bindcount >= 0)
1409 unbind_to (bindcount, Qnil); 1412 {
1410 bindcount = -1; 1413 unbind_to (bindcount, Qnil);
1411 } 1414 bindcount = -1;
1415 }
1412 GCPRO4 (tail, string, eltstring, bestmatch); 1416 GCPRO4 (tail, string, eltstring, bestmatch);
1413 tem = type == 3 1417 tem = (type == hash_table
1414 ? call2 (predicate, elt, 1418 ? call2 (predicate, elt,
1415 HASH_VALUE (XHASH_TABLE (collection), index - 1)) 1419 HASH_VALUE (XHASH_TABLE (collection),
1416 : call1 (predicate, elt); 1420 index - 1))
1421 : call1 (predicate, elt));
1417 UNGCPRO; 1422 UNGCPRO;
1418 } 1423 }
1419 if (NILP (tem)) continue; 1424 if (NILP (tem)) continue;
diff --git a/src/term.c b/src/term.c
index 8e8eee72bae..88e120d6d66 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2350,15 +2350,22 @@ DEFUN ("tty-display-color-cells", Ftty_display_color_cells,
2350 2350
2351#ifndef WINDOWSNT 2351#ifndef WINDOWSNT
2352 2352
2353/* Declare here rather than in the function, as in the rest of Emacs,
2354 to work around an HPUX compiler bug (?). See
2355 http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg00410.html */
2356static int default_max_colors;
2357static int default_max_pairs;
2358static int default_no_color_video;
2359static char *default_orig_pair;
2360static char *default_set_foreground;
2361static char *default_set_background;
2362
2353/* Save or restore the default color-related capabilities of this 2363/* Save or restore the default color-related capabilities of this
2354 terminal. */ 2364 terminal. */
2355static void 2365static void
2356tty_default_color_capabilities (save) 2366tty_default_color_capabilities (save)
2357 int save; 2367 int save;
2358{ 2368{
2359 static char
2360 *default_orig_pair, *default_set_foreground, *default_set_background;
2361 static int default_max_colors, default_max_pairs, default_no_color_video;
2362 2369
2363 if (save) 2370 if (save)
2364 { 2371 {
diff --git a/src/xterm.c b/src/xterm.c
index 351f90dac79..65a62324258 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -7065,27 +7065,23 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
7065 } 7065 }
7066 7066
7067 if (!tool_bar_p) 7067 if (!tool_bar_p)
7068 if (!dpyinfo->x_focus_frame
7069 || f == dpyinfo->x_focus_frame)
7070 {
7071#if defined (USE_X_TOOLKIT) || defined (USE_GTK) 7068#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
7072 if (! popup_activated ()) 7069 if (! popup_activated ())
7073#endif 7070#endif
7074 { 7071 {
7075 if (ignore_next_mouse_click_timeout) 7072 if (ignore_next_mouse_click_timeout)
7076 { 7073 {
7077 if (event.type == ButtonPress 7074 if (event.type == ButtonPress
7078 && (int)(event.xbutton.time - ignore_next_mouse_click_timeout) > 0) 7075 && (int)(event.xbutton.time - ignore_next_mouse_click_timeout) > 0)
7079 { 7076 {
7080 ignore_next_mouse_click_timeout = 0; 7077 ignore_next_mouse_click_timeout = 0;
7081 construct_mouse_click (&inev.ie, &event.xbutton, f); 7078 construct_mouse_click (&inev.ie, &event.xbutton, f);
7082 } 7079 }
7083 if (event.type == ButtonRelease) 7080 if (event.type == ButtonRelease)
7084 ignore_next_mouse_click_timeout = 0; 7081 ignore_next_mouse_click_timeout = 0;
7085 } 7082 }
7086 else 7083 else
7087 construct_mouse_click (&inev.ie, &event.xbutton, f); 7084 construct_mouse_click (&inev.ie, &event.xbutton, f);
7088 }
7089 } 7085 }
7090 } 7086 }
7091 else 7087 else