diff options
| author | Miles Bader <miles@gnu.org> | 2007-08-21 04:55:30 +0000 |
|---|---|---|
| committer | Miles Bader <miles@gnu.org> | 2007-08-21 04:55:30 +0000 |
| commit | 1fb072d1dff954c21d4805196df62c8eeead301c (patch) | |
| tree | da374db1a51e2a355b46f26a1c99e1ac5db5dca4 /src | |
| parent | aaf34461ff5804e5cebe163b31e535da72e81d87 (diff) | |
| parent | bdaf8a62d53cf8d5a0dc4f0dc530ecd6fc1f44fe (diff) | |
| download | emacs-1fb072d1dff954c21d4805196df62c8eeead301c.tar.gz | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 852-856)
- Update from CVS
- Merge from emacs--rel--22
* emacs--rel--22 (patch 93-96)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 245)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-32
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 26 | ||||
| -rw-r--r-- | src/alloc.c | 2 | ||||
| -rw-r--r-- | src/emacs.c | 5 | ||||
| -rw-r--r-- | src/eval.c | 10 | ||||
| -rw-r--r-- | src/insdel.c | 9 | ||||
| -rw-r--r-- | src/minibuf.c | 41 | ||||
| -rw-r--r-- | src/term.c | 13 | ||||
| -rw-r--r-- | src/xterm.c | 34 |
8 files changed, 90 insertions, 50 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e3c212924b3..3962c174970 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,29 @@ +2007-08-19 Richard Stallman <rms@gnu.org> + + * eval.c (Ffunction, Fquote): Signal error if not 1 argument. + +2007-08-19 Andreas Schwab <schwab@suse.de> + + * alloc.c (pure): Round PURESIZE up. + +2007-08-17 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * xterm.c (handle_one_xevent): Remove check that mouse click is in + active frame. + +2007-08-16 Richard Stallman <rms@gnu.org> + + * eval.c (Fcommandp): Add parens to clarify. + + * minibuf.c (Fall_completions): Use enum for type of table. + + * emacs.c (USAGE2): Improve text. + +2007-08-15 Philippe Waroquiers <philippe.waroquiers@eurocontrol.int> + + * term.c (tty_default_color_capabilities): Declare static + variables in file scope, to avoid HPUX compiler problem. + 2007-08-13 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> * gtkutil.c (update_frame_tool_bar): Use -1 as index diff --git a/src/alloc.c b/src/alloc.c index 3f081491e85..8aea81a0f72 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -266,7 +266,7 @@ Lisp_Object Vmemory_full; remapping on more recent systems because this is less important nowadays than in the days of small memories and timesharing. */ -EMACS_INT pure[PURESIZE / sizeof (EMACS_INT)] = {1,}; +EMACS_INT pure[(PURESIZE + sizeof (EMACS_INT) - 1) / sizeof (EMACS_INT)] = {1,}; #define PUREBEG (char *) pure #else /* HAVE_SHM */ diff --git a/src/emacs.c b/src/emacs.c index e23f8083a31..55475e57799 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -281,9 +281,8 @@ Initialization options:\n\ Action options:\n\ \n\ FILE visit FILE using find-file\n\ -+LINE FILE visit FILE using find-file, then go to line LINE\n\ -+LINE:COLUMN FILE visit FILE using find-file, then go to line LINE,\n\ - column COLUMN\n\ ++LINE go to line LINE in next FILE\n\ ++LINE:COLUMN go to line LINE, column COLUMN, in next FILE\n\ --directory, -L DIR add DIR to variable load-path\n\ --eval EXPR evaluate Emacs Lisp expression EXPR\n\ --execute EXPR evaluate Emacs Lisp expression EXPR\n\ diff --git a/src/eval.c b/src/eval.c index 13ea0ba7ebf..830476a61bc 100644 --- a/src/eval.c +++ b/src/eval.c @@ -202,6 +202,8 @@ Lisp_Object Vmacro_declaration_function; extern Lisp_Object Qrisky_local_variable; +extern Lisp_Object Qfunction; + static Lisp_Object funcall_lambda P_ ((Lisp_Object, int, Lisp_Object*)); static void unwind_to_catch P_ ((struct catchtag *, Lisp_Object)) NO_RETURN; @@ -539,7 +541,7 @@ usage: (setq [SYM VAL]...) */) register Lisp_Object val, sym; struct gcpro gcpro1; - if (NILP(args)) + if (NILP (args)) return Qnil; args_left = args; @@ -564,6 +566,8 @@ usage: (quote ARG) */) (args) Lisp_Object args; { + if (!NILP (Fcdr (args))) + xsignal2 (Qwrong_number_of_arguments, Qquote, Flength (args)); return Fcar (args); } @@ -575,6 +579,8 @@ usage: (function ARG) */) (args) Lisp_Object args; { + if (!NILP (Fcdr (args))) + xsignal2 (Qwrong_number_of_arguments, Qfunction, Flength (args)); return Fcar (args); } @@ -2083,7 +2089,7 @@ then strings and vectors are not accepted. */) /* Strings and vectors are keyboard macros. */ if (STRINGP (fun) || VECTORP (fun)) - return NILP (for_call_interactively) ? Qt : Qnil; + return (NILP (for_call_interactively) ? Qt : Qnil); /* Lists may represent commands. */ if (!CONSP (fun)) diff --git a/src/insdel.c b/src/insdel.c index 19823623091..cd8e2738f9a 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -2138,10 +2138,11 @@ prepare_to_modify_buffer (start, end, preserve_ptr) (! NILP (end_marker) ? Fmarker_position (end_marker) : end) /* Set a variable to nil if an error occurred. - VAL is a cons-cell whose car is the variable name, and whose cdr is - either nil (to mean that there was indeed an error), or non-nil to mean - that the was no error (which thus causes this function to do - nothing). */ + Don't change the variable if there was no error. + VAL is a cons-cell (VARIABLE . NO-ERROR-FLAG). + VARIABLE is the variable to maybe set to nil. + NO-ERROR-FLAG is nil if there was an error, + anything else meaning no error (so this function does nothing). */ Lisp_Object reset_var_on_error (val) Lisp_Object val; diff --git a/src/minibuf.c b/src/minibuf.c index c84c83c1c8e..489c714fcb4 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1294,11 +1294,14 @@ is used to further constrain the set of candidates. */) int bestmatchsize = 0; /* These are in bytes, too. */ int compare, matchsize; - int type = (HASH_TABLE_P (collection) ? 3 - : VECTORP (collection) ? 2 - : NILP (collection) || (CONSP (collection) - && (!SYMBOLP (XCAR (collection)) - || NILP (XCAR (collection))))); + enum { function_table, list_table, obarray_table, hash_table} + type = (HASH_TABLE_P (collection) ? hash_table + : VECTORP (collection) ? obarray_table + : ((NILP (collection) + || (CONSP (collection) + && (!SYMBOLP (XCAR (collection)) + || NILP (XCAR (collection))))) + ? list_table : function_table)); int index = 0, obsize = 0; int matchcount = 0; int bindcount = -1; @@ -1306,7 +1309,7 @@ is used to further constrain the set of candidates. */) struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; CHECK_STRING (string); - if (type == 0) + if (type == function_table) return call3 (collection, string, predicate, Qnil); bestmatch = bucket = Qnil; @@ -1314,7 +1317,7 @@ is used to further constrain the set of candidates. */) /* If COLLECTION is not a list, set TAIL just for gc pro. */ tail = collection; - if (type == 2) + if (type == obarray_table) { collection = check_obarray (collection); obsize = XVECTOR (collection)->size; @@ -1328,7 +1331,7 @@ is used to further constrain the set of candidates. */) /* elt gets the alist element or symbol. eltstring gets the name to check as a completion. */ - if (type == 1) + if (type == list_table) { if (!CONSP (tail)) break; @@ -1336,7 +1339,7 @@ is used to further constrain the set of candidates. */) eltstring = CONSP (elt) ? XCAR (elt) : elt; tail = XCDR (tail); } - else if (type == 2) + else if (type == obarray_table) { if (!EQ (bucket, zero)) { @@ -1357,7 +1360,7 @@ is used to further constrain the set of candidates. */) continue; } } - else /* if (type == 3) */ + else /* if (type == hash_table) */ { while (index < HASH_TABLE_SIZE (XHASH_TABLE (collection)) && NILP (HASH_HASH (XHASH_TABLE (collection), index))) @@ -1411,15 +1414,17 @@ is used to further constrain the set of candidates. */) tem = Fcommandp (elt, Qnil); else { - if (bindcount >= 0) { - unbind_to (bindcount, Qnil); - bindcount = -1; - } + if (bindcount >= 0) + { + unbind_to (bindcount, Qnil); + bindcount = -1; + } GCPRO4 (tail, string, eltstring, bestmatch); - tem = type == 3 - ? call2 (predicate, elt, - HASH_VALUE (XHASH_TABLE (collection), index - 1)) - : call1 (predicate, elt); + tem = (type == hash_table + ? call2 (predicate, elt, + HASH_VALUE (XHASH_TABLE (collection), + index - 1)) + : call1 (predicate, elt)); UNGCPRO; } if (NILP (tem)) continue; diff --git a/src/term.c b/src/term.c index 5d8e0f2a61f..c906e1eb15a 100644 --- a/src/term.c +++ b/src/term.c @@ -1967,14 +1967,21 @@ is not on a tty device. */) #ifndef WINDOWSNT +/* Declare here rather than in the function, as in the rest of Emacs, + to work around an HPUX compiler bug (?). See + http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg00410.html */ +static int default_max_colors; +static int default_max_pairs; +static int default_no_color_video; +static char *default_orig_pair; +static char *default_set_foreground; +static char *default_set_background; + /* Save or restore the default color-related capabilities of this terminal. */ static void tty_default_color_capabilities (struct tty_display_info *tty, int save) { - static char - *default_orig_pair, *default_set_foreground, *default_set_background; - static int default_max_colors, default_max_pairs, default_no_color_video; if (save) { diff --git a/src/xterm.c b/src/xterm.c index 1ced63932e5..0e56b04c1b0 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -6866,27 +6866,23 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) } if (!tool_bar_p) - if (!dpyinfo->x_focus_frame - || f == dpyinfo->x_focus_frame) - { #if defined (USE_X_TOOLKIT) || defined (USE_GTK) - if (! popup_activated ()) + if (! popup_activated ()) #endif - { - if (ignore_next_mouse_click_timeout) - { - if (event.type == ButtonPress - && (int)(event.xbutton.time - ignore_next_mouse_click_timeout) > 0) - { - ignore_next_mouse_click_timeout = 0; - construct_mouse_click (&inev.ie, &event.xbutton, f); - } - if (event.type == ButtonRelease) - ignore_next_mouse_click_timeout = 0; - } - else - construct_mouse_click (&inev.ie, &event.xbutton, f); - } + { + if (ignore_next_mouse_click_timeout) + { + if (event.type == ButtonPress + && (int)(event.xbutton.time - ignore_next_mouse_click_timeout) > 0) + { + ignore_next_mouse_click_timeout = 0; + construct_mouse_click (&inev.ie, &event.xbutton, f); + } + if (event.type == ButtonRelease) + ignore_next_mouse_click_timeout = 0; + } + else + construct_mouse_click (&inev.ie, &event.xbutton, f); } } else |
