Now on revision 110872. ------------------------------------------------------------ revno: 110872 committer: Vincent Belaïche branch nick: trunk timestamp: Mon 2012-11-12 06:53:53 +0100 message: * ses.texi: Doc for ses-rename-cell, ses-repair-cell-reference-all & ses-range. In all file place SES into @acronym{...}. (Advanced Features): Add key index and function index for ses-set-header-row. Add description for function ses-rename-cell. Add description for function ses-repair-cell-reference-all. (Ranges in formulas): Add description for ses-range flags. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2012-11-12 03:10:51 +0000 +++ doc/misc/ChangeLog 2012-11-12 05:53:53 +0000 @@ -1,3 +1,13 @@ +2012-11-12 Vincent Belaïche + + * ses.texi: Doc for ses-rename-cell, ses-repair-cell-reference-all & ses-range. + In all file place SES into @acronym{...}. + (Advanced Features): Add key index and function index for + ses-set-header-row. Add description for function + ses-rename-cell. Add description for function + ses-repair-cell-reference-all. + (Ranges in formulas): Add description for ses-range flags. + 2012-11-12 Paul Eggert * texinfo.tex: Merge from gnulib. === modified file 'doc/misc/ses.texi' --- doc/misc/ses.texi 2012-07-25 05:48:19 +0000 +++ doc/misc/ses.texi 2012-11-12 05:53:53 +0000 @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @c %**start of header @setfilename ../../info/ses -@settitle SES: Simple Emacs Spreadsheet +@settitle @acronym{SES}: Simple Emacs Spreadsheet @setchapternewpage off @syncodeindex fn cp @syncodeindex vr cp @@ -9,7 +9,7 @@ @c %**end of header @copying -This file documents SES: the Simple Emacs Spreadsheet. +This file documents @acronym{SES}: the Simple Emacs Spreadsheet. Copyright @copyright{} 2002-2012 Free Software Foundation, Inc. @@ -29,13 +29,13 @@ @dircategory Emacs misc features @direntry -* SES: (ses). Simple Emacs Spreadsheet. +* @acronym{SES}: (ses). Simple Emacs Spreadsheet. @end direntry @finalout @titlepage -@title SES +@title @acronym{SES} @subtitle Simple Emacs Spreadsheet @author Jonathan A. Yavner @author @email{jyavner@@member.fsf.org} @@ -52,10 +52,10 @@ @ifnottex @node Top, Sales Pitch, (dir), (dir) @comment node-name, next, previous, up -@top SES: Simple Emacs Spreadsheet +@top @acronym{SES}: Simple Emacs Spreadsheet @display -SES is a major mode for GNU Emacs to edit spreadsheet files, which +@acronym{SES} is a major mode for GNU Emacs to edit spreadsheet files, which contain a rectangular grid of cells. The cells' values are specified by formulas that can refer to the values of other cells. @end display @@ -66,7 +66,7 @@ @insertcopying @menu -* Sales Pitch:: Why use SES? +* Sales Pitch:: Why use @acronym{SES}? * The Basics:: Basic spreadsheet commands * Advanced Features:: Want to know more? * For Gurus:: Want to know @emph{even more}? @@ -126,9 +126,9 @@ Point is always at the left edge of a cell, or at the empty endline. When mark is inactive, the current cell is underlined. When mark is -active, the range is the highlighted rectangle of cells (SES always +active, the range is the highlighted rectangle of cells (@acronym{SES} always uses transient mark mode). Drag the mouse from A1 to A3 to create the -range A1-A2. Many SES commands operate only on single cells, not +range A1-A2. Many @acronym{SES} commands operate only on single cells, not ranges. @table @kbd @@ -155,7 +155,7 @@ * Printer functions:: * Clearing cells:: * Copy/cut/paste:: -* Customizing SES:: +* Customizing @acronym{SES}:: @end menu @node Formulas, Resizing, The Basics, The Basics @@ -192,7 +192,7 @@ expression, you can use @kbd{M-@key{TAB}} to complete symbol names. @item ' @r{(apostrophe)} -Enter a symbol (ses-read-symbol). SES remembers all symbols that have +Enter a symbol (ses-read-symbol). @acronym{SES} remembers all symbols that have been used as formulas, so you can type just the beginning of a symbol and use @kbd{@key{SPC}}, @kbd{@key{TAB}}, and @kbd{?} to complete it. @end table @@ -349,7 +349,7 @@ @end table -@node Copy/cut/paste, Customizing SES, Clearing cells, The Basics +@node Copy/cut/paste, Customizing @acronym{SES}, Clearing cells, The Basics @section Copy, cut, and paste @cindex copy @cindex cut @@ -365,7 +365,7 @@ @findex ses-yank-pop The copy functions work on rectangular regions of cells. You can paste the -copies into non-SES buffers to export the print text. +copies into non-@acronym{SES} buffers to export the print text. @table @kbd @item M-w @@ -394,7 +394,7 @@ differently depending on the format of the text being inserted: @itemize @bullet @item -When pasting cells that were cut from a SES buffer, the print text is +When pasting cells that were cut from a @acronym{SES} buffer, the print text is ignored and only the attached formula and printer are inserted; cell references in the formula are relocated unless you use @kbd{C-u}. @item @@ -402,7 +402,7 @@ is the current cell. If part of the rectangle is beyond the edges of the spreadsheet, you must confirm the increase in spreadsheet size. @item -Non-SES text is usually inserted as a replacement formula for the +Non-@acronym{SES} text is usually inserted as a replacement formula for the current cell. If the formula would be a symbol, it's treated as a string unless you use @kbd{C-u}. Pasted formulas with syntax errors are always treated as strings. @@ -420,12 +420,12 @@ @item M-y Immediately after a paste, you can replace the text with a preceding element from the kill ring (@code{ses-yank-pop}). Unlike the standard -Emacs yank-pop, the SES version uses @code{undo} to delete the old +Emacs yank-pop, the @acronym{SES} version uses @code{undo} to delete the old yank. This doesn't make any difference? @end table -@node Customizing SES, , Copy/cut/paste, The Basics -@section Customizing SES +@node Customizing @acronym{SES}, , Copy/cut/paste, The Basics +@section Customizing @acronym{SES} @cindex customizing @vindex enable-local-eval @vindex ses-mode-hook @@ -443,7 +443,7 @@ list. @code{ses-mode-hook} is a normal mode hook (list of functions to -execute when starting SES mode for a buffer). +execute when starting @acronym{SES} mode for a buffer). The variable @code{safe-functions} is a list of possibly-unsafe functions to be treated as safe when analyzing formulas and printers. @@ -469,7 +469,10 @@ @table @kbd @item C-c M-C-h -(@code{ses-set-header-row}). The header line at the top of the SES +(@code{ses-set-header-row}). +@findex ses-set-header-row +@kindex C-c M-C-h +The header line at the top of the @acronym{SES} window normally shows the column letter for each column. You can set it to show a copy of some row, such as a row of column titles, so that row will always be visible. Default is to set the current row as the @@ -478,6 +481,16 @@ @item [header-line mouse-3] Pops up a menu to set the current row as the header, or revert to column letters. +@item M-x ses-rename-cell +@findex ses-rename-cell +Rename a cell from a standard A1-like name to any +string. +@item M-x ses-repair-cell-reference-all +@findex ses-repair-cell-reference-all +When you interrupt a cell formula update by clicking @kbd{C-g}, then +the cell reference link may be broken, which will jeopardize automatic +cell update when any other cell on which it depends is changed. To +repair that use function @code{ses-repair-cell-reference-all} @end table @menu @@ -498,9 +511,9 @@ @findex ses-renarrow-buffer @findex ses-reprint-all -A SES file consists of a print area and a data area. Normally the +A @acronym{SES} file consists of a print area and a data area. Normally the buffer is narrowed to show only the print area. The print area is -read-only except for special SES commands; it contains cell values +read-only except for special @acronym{SES} commands; it contains cell values formatted by printer functions. The data area records the formula and printer functions, etc. @@ -576,6 +589,52 @@ a new column just beyond a one-row range, the new cell is included in the range. New cells inserted just before a range are not included. +Flags can be added to @code{ses-range} immediately after the @var{to} +cell. +@table @code +@item ! +Empty cells in range can be removed by adding the @code{!} flag. An +empty cell is a cell the value of which is one of symbols @code{nil} +or @code{*skip*}. For instance @code{(ses-range A1 A4 !)} will do the +same as @code{(list A1 A3)} when cells @code{A2} and @code{A4} are +empty. +@item _ +Empty cell values are replaced by the argument following flag +@code{_}, or @code{0} when flag @code{_} is last in argument list. For +instance @code{(ses-range A1 A4 _ "empty")} will do the same as +@code{(list A1 "empty" A3 "empty")} when cells @code{A2} and @code{A4} +are empty. Similarly, @code{(ses-range A1 A4 _ )} will do the same as +@code{(list A1 0 A3 0)}. +@item >v +When order matters, list cells by reading cells rowwise from top left +to bottom right. This flag is provided for completeness only as it is +the default reading order. +@item +List cells by reading cells columnwise from top left to bottom right. +@item v< +List cells by reading cells columnwise from top right to bottom left. +@item v +A short hand for @code{v>}. +@item ^ +A short hand for @code{^>}. +@item > +A short hand for @code{>v}. +@item < +A short hand for @code{>^}. +@item * +Instead of listing cells, it makes a Calc vector or matrix of it +(@pxref{Top,,,calc,GNU Emacs Calc Manual}). If the range contains only +one row or one column a vector is made, otherwise a matrix is made. +@item *2 +Same as @code{*} except that a matrix is always made even when there +is only one row or column in the range. +@item *1 +Same as @code{*} except that a vector is always made even when there +is only one row or column in the range, that is to say the +corresponding matrix is flattened. +@end table @node Sorting by column, Standard formula functions, Ranges in formulas, Advanced Features @section Sorting by column @@ -653,7 +712,7 @@ row or the next non-@code{nil} cell), the result is truncated if the cell's value is a string, or replaced with hash marks otherwise. -SES could get confused by printer results that contain newlines or +@acronym{SES} could get confused by printer results that contain newlines or tabs, so these are replaced with question marks. @table @kbd @@ -734,7 +793,7 @@ A common organization for spreadsheets is to have a bunch of ``detail'' rows, each perhaps describing a transaction, and then a set of ``summary'' rows that each show reduced data for some subset of the -details. SES supports this organization via the @code{ses-select} +details. @acronym{SES} supports this organization via the @code{ses-select} function. @table @code @@ -771,7 +830,7 @@ * Nonrelocatable references:: * The data area:: * Buffer-local variables in spreadsheets:: -* Uses of defadvice in SES:: +* Uses of defadvice in @acronym{SES}:: @end menu @node Deferred updates, Nonrelocatable references, For Gurus, For Gurus @@ -799,7 +858,7 @@ These deferred cell-writes cannot be interrupted by @kbd{C-g}, so you'll just have to wait. -SES uses @code{run-with-idle-timer} to move the cell underline when +@acronym{SES} uses @code{run-with-idle-timer} to move the cell underline when Emacs will be scrolling the buffer after the end of a command, and also to narrow and underline after @kbd{C-x C-v}. This is visible as a momentary glitch after C-x C-v and certain scrolling commands. You @@ -843,14 +902,14 @@ macros for each row, followed by column-widths, column-printers, default-printer, and header-row. Then there's the global parameters (file-format ID, numrows, numcols) and the local variables (specifying -SES mode for the buffer, etc.) +@acronym{SES} mode for the buffer, etc.) -When a SES file is loaded, first the numrows and numcols values are +When a @acronym{SES} file is loaded, first the numrows and numcols values are loaded, then the entire data area is @code{eval}ed, and finally the local variables are processed. You can edit the data area, but don't insert or delete any newlines -except in the local-variables part, since SES locates things by +except in the local-variables part, since @acronym{SES} locates things by counting newlines. Use @kbd{C-x C-e} at the end of a line to install your edits into the spreadsheet data structures (this does not update the print area, use e.g. @kbd{C-c C-l} for that). @@ -866,7 +925,7 @@ @end table -@node Buffer-local variables in spreadsheets, Uses of defadvice in SES, The data area, For Gurus +@node Buffer-local variables in spreadsheets, Uses of defadvice in @acronym{SES}, The data area, For Gurus @section Buffer-local variables in spreadsheets @cindex buffer-local variables @cindex variables, buffer-local @@ -900,8 +959,8 @@ (put 'your-function-name 'safe-function t) @end lisp -@node Uses of defadvice in SES, , Buffer-local variables in spreadsheets, For Gurus -@section Uses of defadvice in SES +@node Uses of defadvice in @acronym{SES}, , Buffer-local variables in spreadsheets, For Gurus +@section Uses of defadvice in @acronym{SES} @cindex defadvice @cindex undo-more @cindex copy-region-as-kill ------------------------------------------------------------ revno: 110871 committer: Dmitry Antipov branch nick: trunk timestamp: Mon 2012-11-12 08:00:55 +0400 message: Simplify by using FOR_EACH_FRAME here and there. * frame.c (next_frame, prev_frame, other_visible_frames) (delete_frame, visible-frame-list): Use FOR_EACH_FRAME. * w32term.c (x_window_to_scroll_bar): Likewise. * window.c (window_list): Likewise. * xdisp.c (x_consider_frame_title): Likewise. * xfaces.c ( Fdisplay_supports_face_attributes_p): Likewise. * xfns.c (x_window_to_frame, x_any_window_to_frame) (x_menubar_window_to_frame, x_top_window_to_frame): Likewise. * xmenu.c (menubar_id_to_frame): Likewise. * xselect.c (frame_for_x_selection): Likewise. * xterm.c (x_frame_of_widget, x_window_to_scroll_bar) (x_window_to_menu_bar): Likewise. * w32fns.c (x_window_to_frame): Likewise. Adjust comment. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-11-12 02:08:06 +0000 +++ src/ChangeLog 2012-11-12 04:00:55 +0000 @@ -1,3 +1,20 @@ +2012-11-12 Dmitry Antipov + + Simplify by using FOR_EACH_FRAME here and there. + * frame.c (next_frame, prev_frame, other_visible_frames) + (delete_frame, visible-frame-list): Use FOR_EACH_FRAME. + * w32term.c (x_window_to_scroll_bar): Likewise. + * window.c (window_list): Likewise. + * xdisp.c (x_consider_frame_title): Likewise. + * xfaces.c ( Fdisplay_supports_face_attributes_p): Likewise. + * xfns.c (x_window_to_frame, x_any_window_to_frame) + (x_menubar_window_to_frame, x_top_window_to_frame): Likewise. + * xmenu.c (menubar_id_to_frame): Likewise. + * xselect.c (frame_for_x_selection): Likewise. + * xterm.c (x_frame_of_widget, x_window_to_scroll_bar) + (x_window_to_menu_bar): Likewise. + * w32fns.c (x_window_to_frame): Likewise. Adjust comment. + 2012-11-12 Paul Eggert * data.c (Qdefalias_fset_function): Now static. === modified file 'src/frame.c' --- src/frame.c 2012-11-06 13:26:20 +0000 +++ src/frame.c 2012-11-12 04:00:55 +0000 @@ -906,7 +906,7 @@ static Lisp_Object next_frame (Lisp_Object frame, Lisp_Object minibuf) { - Lisp_Object tail; + Lisp_Object f, tail; int passed = 0; /* There must always be at least one frame in Vframe_list. */ @@ -918,12 +918,8 @@ CHECK_LIVE_FRAME (frame); while (1) - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) + FOR_EACH_FRAME (tail, f) { - Lisp_Object f; - - f = XCAR (tail); - if (passed && ((!FRAME_TERMCAP_P (XFRAME (f)) && !FRAME_TERMCAP_P (XFRAME (frame)) && FRAME_KBOARD (XFRAME (f)) == FRAME_KBOARD (XFRAME (frame))) @@ -984,22 +980,13 @@ static Lisp_Object prev_frame (Lisp_Object frame, Lisp_Object minibuf) { - Lisp_Object tail; - Lisp_Object prev; + Lisp_Object f, tail, prev = Qnil; /* There must always be at least one frame in Vframe_list. */ - if (! CONSP (Vframe_list)) - emacs_abort (); + eassert (CONSP (Vframe_list)); - prev = Qnil; - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) + FOR_EACH_FRAME (tail, f) { - Lisp_Object f; - - f = XCAR (tail); - if (!FRAMEP (f)) - emacs_abort (); - if (EQ (frame, f) && !NILP (prev)) return prev; @@ -1100,11 +1087,10 @@ static int other_visible_frames (FRAME_PTR f) { - Lisp_Object frames; + Lisp_Object frames, this; - for (frames = Vframe_list; CONSP (frames); frames = XCDR (frames)) + FOR_EACH_FRAME (frames, this) { - Lisp_Object this = XCAR (frames); if (f == XFRAME (this)) continue; @@ -1158,15 +1144,10 @@ minibuffer for any other frame? */ if (FRAME_HAS_MINIBUF_P (f)) { - Lisp_Object frames; + Lisp_Object frames, this; - for (frames = Vframe_list; - CONSP (frames); - frames = XCDR (frames)) + FOR_EACH_FRAME (frames, this) { - Lisp_Object this; - this = XCAR (frames); - if (! EQ (this, frame) && EQ (frame, WINDOW_FRAME (XWINDOW @@ -1359,15 +1340,13 @@ another one. */ if (f == last_nonminibuf_frame) { - Lisp_Object frames; + Lisp_Object frames, this; last_nonminibuf_frame = 0; - for (frames = Vframe_list; - CONSP (frames); - frames = XCDR (frames)) + FOR_EACH_FRAME (frames, this) { - f = XFRAME (XCAR (frames)); + f = XFRAME (this); if (!FRAME_MINIBUF_ONLY_P (f)) { last_nonminibuf_frame = f; @@ -1380,27 +1359,13 @@ single-kboard state if we're in it for this kboard. */ if (kb != NULL) { - Lisp_Object frames; + Lisp_Object frames, this; /* Some frame we found on the same kboard, or nil if there are none. */ - Lisp_Object frame_on_same_kboard; - - frame_on_same_kboard = Qnil; - - for (frames = Vframe_list; - CONSP (frames); - frames = XCDR (frames)) - { - Lisp_Object this; - struct frame *f1; - - this = XCAR (frames); - if (!FRAMEP (this)) - emacs_abort (); - f1 = XFRAME (this); - - if (kb == FRAME_KBOARD (f1)) - frame_on_same_kboard = this; - } + Lisp_Object frame_on_same_kboard = Qnil; + + FOR_EACH_FRAME (frames, this) + if (kb == FRAME_KBOARD (XFRAME (this))) + frame_on_same_kboard = this; if (NILP (frame_on_same_kboard)) not_single_kboard_state (kb); @@ -1412,27 +1377,16 @@ frames with other windows. */ if (kb != NULL && EQ (frame, KVAR (kb, Vdefault_minibuffer_frame))) { - Lisp_Object frames; + Lisp_Object frames, this; /* The last frame we saw with a minibuffer, minibuffer-only or not. */ - Lisp_Object frame_with_minibuf; + Lisp_Object frame_with_minibuf = Qnil; /* Some frame we found on the same kboard, or nil if there are none. */ - Lisp_Object frame_on_same_kboard; - - frame_on_same_kboard = Qnil; - frame_with_minibuf = Qnil; - - for (frames = Vframe_list; - CONSP (frames); - frames = XCDR (frames)) + Lisp_Object frame_on_same_kboard = Qnil; + + FOR_EACH_FRAME (frames, this) { - Lisp_Object this; - struct frame *f1; - - this = XCAR (frames); - if (!FRAMEP (this)) - emacs_abort (); - f1 = XFRAME (this); + struct frame *f1 = XFRAME (this); /* Consider only frames on the same kboard and only those with minibuffers. */ @@ -1816,20 +1770,12 @@ doc: /* Return a list of all frames now \"visible\" (being updated). */) (void) { - Lisp_Object tail, frame; - struct frame *f; - Lisp_Object value; - - value = Qnil; - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) - { - frame = XCAR (tail); - if (!FRAMEP (frame)) - continue; - f = XFRAME (frame); - if (FRAME_VISIBLE_P (f)) - value = Fcons (frame, value); - } + Lisp_Object tail, frame, value = Qnil; + + FOR_EACH_FRAME (tail, frame) + if (FRAME_VISIBLE_P (XFRAME (frame))) + value = Fcons (frame, value); + return value; } === modified file 'src/w32fns.c' --- src/w32fns.c 2012-11-08 17:02:56 +0000 +++ src/w32fns.c 2012-11-12 04:00:55 +0000 @@ -304,19 +304,14 @@ /* Return the Emacs frame-object corresponding to an w32 window. It could be the frame's main window or an icon window. */ -/* This function can be called during GC, so use GC_xxx type test macros. */ - struct frame * x_window_to_frame (struct w32_display_info *dpyinfo, HWND wdesc) { Lisp_Object tail, frame; struct frame *f; - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) + FOR_EACH_FRAME (tail, frame) { - frame = XCAR (tail); - if (!FRAMEP (frame)) - continue; f = XFRAME (frame); if (!FRAME_W32_P (f) || FRAME_W32_DISPLAY_INFO (f) != dpyinfo) continue; === modified file 'src/w32term.c' --- src/w32term.c 2012-11-09 14:45:15 +0000 +++ src/w32term.c 2012-11-12 04:00:55 +0000 @@ -3437,16 +3437,11 @@ static struct scroll_bar * x_window_to_scroll_bar (Window window_id) { - Lisp_Object tail; + Lisp_Object tail, frame; - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) + FOR_EACH_FRAME (tail, frame) { - Lisp_Object frame, bar, condemned; - - frame = XCAR (tail); - /* All elements of Vframe_list should be frames. */ - if (! FRAMEP (frame)) - emacs_abort (); + Lisp_Object bar, condemned; /* Scan this frame's scroll bar list for a scroll bar with the right window ID. */ === modified file 'src/window.c' --- src/window.c 2012-11-11 18:39:29 +0000 +++ src/window.c 2012-11-12 04:00:55 +0000 @@ -2133,10 +2133,10 @@ { if (!CONSP (Vwindow_list)) { - Lisp_Object tail; + Lisp_Object tail, frame; Vwindow_list = Qnil; - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) + FOR_EACH_FRAME (tail, frame) { Lisp_Object args[2]; @@ -2144,7 +2144,7 @@ new windows at the front of args[1], which means we have to reverse this list at the end. */ args[1] = Qnil; - foreach_window (XFRAME (XCAR (tail)), add_window_to_list, &args[1]); + foreach_window (XFRAME (frame), add_window_to_list, &args[1]); args[0] = Vwindow_list; args[1] = Fnreverse (args[1]); Vwindow_list = Fnconc (2, args); === modified file 'src/xdisp.c' --- src/xdisp.c 2012-11-11 14:19:13 +0000 +++ src/xdisp.c 2012-11-12 04:00:55 +0000 @@ -11096,17 +11096,15 @@ || f->explicit_name) { /* Do we have more than one visible frame on this X display? */ - Lisp_Object tail; - Lisp_Object fmt; + Lisp_Object tail, other_frame, fmt; ptrdiff_t title_start; char *title; ptrdiff_t len; struct it it; ptrdiff_t count = SPECPDL_INDEX (); - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) + FOR_EACH_FRAME (tail, other_frame) { - Lisp_Object other_frame = XCAR (tail); struct frame *tf = XFRAME (other_frame); if (tf != f === modified file 'src/xfaces.c' --- src/xfaces.c 2012-11-08 21:02:10 +0000 +++ src/xfaces.c 2012-11-12 04:00:55 +0000 @@ -5012,17 +5012,14 @@ else { /* Find any frame on DISPLAY. */ - Lisp_Object fl_tail; + Lisp_Object tail; frame = Qnil; - for (fl_tail = Vframe_list; CONSP (fl_tail); fl_tail = XCDR (fl_tail)) - { - frame = XCAR (fl_tail); - if (!NILP (Fequal (Fcdr (Fassq (Qdisplay, - XFRAME (frame)->param_alist)), - display))) - break; - } + FOR_EACH_FRAME (tail, frame) + if (!NILP (Fequal (Fcdr (Fassq (Qdisplay, + XFRAME (frame)->param_alist)), + display))) + break; } CHECK_LIVE_FRAME (frame); === modified file 'src/xfns.c' --- src/xfns.c 2012-11-07 05:23:20 +0000 +++ src/xfns.c 2012-11-12 04:00:55 +0000 @@ -224,13 +224,11 @@ Lisp_Object tail, frame; struct frame *f; - if (wdesc == None) return 0; + if (wdesc == None) + return NULL; - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) + FOR_EACH_FRAME (tail, frame) { - frame = XCAR (tail); - if (!FRAMEP (frame)) - continue; f = XFRAME (frame); if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo) continue; @@ -270,18 +268,16 @@ x_any_window_to_frame (struct x_display_info *dpyinfo, int wdesc) { Lisp_Object tail, frame; - struct frame *f, *found; + struct frame *f, *found = NULL; struct x_output *x; - if (wdesc == None) return NULL; + if (wdesc == None) + return NULL; - found = NULL; - for (tail = Vframe_list; CONSP (tail) && !found; tail = XCDR (tail)) + FOR_EACH_FRAME (tail, frame) { - frame = XCAR (tail); - if (!FRAMEP (frame)) - continue; - + if (found) + break; f = XFRAME (frame); if (FRAME_X_P (f) && FRAME_X_DISPLAY_INFO (f) == dpyinfo) { @@ -325,13 +321,11 @@ struct frame *f; struct x_output *x; - if (wdesc == None) return 0; + if (wdesc == None) + return NULL; - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) + FOR_EACH_FRAME (tail, frame) { - frame = XCAR (tail); - if (!FRAMEP (frame)) - continue; f = XFRAME (frame); if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo) continue; @@ -359,13 +353,11 @@ struct frame *f; struct x_output *x; - if (wdesc == None) return 0; + if (wdesc == None) + return NULL; - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) + FOR_EACH_FRAME (tail, frame) { - frame = XCAR (tail); - if (!FRAMEP (frame)) - continue; f = XFRAME (frame); if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo) continue; === modified file 'src/xmenu.c' --- src/xmenu.c 2012-10-11 16:23:37 +0000 +++ src/xmenu.c 2012-11-12 04:00:55 +0000 @@ -132,11 +132,8 @@ Lisp_Object tail, frame; FRAME_PTR f; - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) + FOR_EACH_FRAME (tail, frame) { - frame = XCAR (tail); - if (!FRAMEP (frame)) - continue; f = XFRAME (frame); if (!FRAME_WINDOW_P (f)) continue; === modified file 'src/xselect.c' --- src/xselect.c 2012-09-23 08:44:20 +0000 +++ src/xselect.c 2012-11-12 04:00:55 +0000 @@ -1940,7 +1940,7 @@ static struct frame * frame_for_x_selection (Lisp_Object object) { - Lisp_Object tail; + Lisp_Object tail, frame; struct frame *f; if (NILP (object)) @@ -1949,9 +1949,9 @@ if (FRAME_X_P (f) && FRAME_LIVE_P (f)) return f; - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) + FOR_EACH_FRAME (tail, frame) { - f = XFRAME (XCAR (tail)); + f = XFRAME (frame); if (FRAME_X_P (f) && FRAME_LIVE_P (f)) return f; } @@ -1959,15 +1959,14 @@ else if (TERMINALP (object)) { struct terminal *t = get_terminal (object, 1); + if (t->type == output_x_window) - { - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) - { - f = XFRAME (XCAR (tail)); - if (FRAME_LIVE_P (f) && f->terminal == t) - return f; - } - } + FOR_EACH_FRAME (tail, frame) + { + f = XFRAME (frame); + if (FRAME_LIVE_P (f) && f->terminal == t) + return f; + } } else if (FRAMEP (object)) { === modified file 'src/xterm.c' --- src/xterm.c 2012-11-08 19:12:23 +0000 +++ src/xterm.c 2012-11-12 04:00:55 +0000 @@ -1438,7 +1438,7 @@ x_frame_of_widget (Widget widget) { struct x_display_info *dpyinfo; - Lisp_Object tail; + Lisp_Object tail, frame; struct frame *f; dpyinfo = x_display_info_for_display (XtDisplay (widget)); @@ -1452,15 +1452,15 @@ /* Look for a frame with that top-level widget. Allocate the color on that frame to get the right gamma correction value. */ - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) - if (FRAMEP (XCAR (tail)) - && (f = XFRAME (XCAR (tail)), - (FRAME_X_P (f) - && f->output_data.nothing != 1 - && FRAME_X_DISPLAY_INFO (f) == dpyinfo)) - && f->output_data.x->widget == widget) - return f; - + FOR_EACH_FRAME (tail, frame) + { + f = XFRAME (frame); + if (FRAME_X_P (f) + && f->output_data.nothing != 1 + && FRAME_X_DISPLAY_INFO (f) == dpyinfo + && f->output_data.x->widget == widget) + return f; + } emacs_abort (); } @@ -4098,20 +4098,15 @@ static struct scroll_bar * x_window_to_scroll_bar (Display *display, Window window_id) { - Lisp_Object tail; + Lisp_Object tail, frame; #if defined (USE_GTK) && defined (USE_TOOLKIT_SCROLL_BARS) window_id = (Window) xg_get_scroll_id_for_window (display, window_id); #endif /* USE_GTK && USE_TOOLKIT_SCROLL_BARS */ - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) + FOR_EACH_FRAME (tail, frame) { - Lisp_Object frame, bar, condemned; - - frame = XCAR (tail); - /* All elements of Vframe_list should be frames. */ - if (! FRAMEP (frame)) - emacs_abort (); + Lisp_Object bar, condemned; if (! FRAME_X_P (XFRAME (frame))) continue; @@ -4143,20 +4138,16 @@ static Widget x_window_to_menu_bar (Window window) { - Lisp_Object tail; - - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) - { - if (FRAME_X_P (XFRAME (XCAR (tail)))) - { - Lisp_Object frame = XCAR (tail); - Widget menu_bar = XFRAME (frame)->output_data.x->menubar_widget; - - if (menu_bar && xlwmenu_window_p (menu_bar, window)) - return menu_bar; - } - } - + Lisp_Object tail, frame; + + FOR_EACH_FRAME (tail, frame) + if (FRAME_X_P (XFRAME (frame))) + { + Widget menu_bar = XFRAME (frame)->output_data.x->menubar_widget; + + if (menu_bar && xlwmenu_window_p (menu_bar, window)) + return menu_bar; + } return NULL; } ------------------------------------------------------------ revno: 110870 committer: Paul Eggert branch nick: trunk timestamp: Sun 2012-11-11 19:10:51 -0800 message: * texinfo.tex: Merge from gnulib. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2012-11-10 23:13:33 +0000 +++ doc/misc/ChangeLog 2012-11-12 03:10:51 +0000 @@ -1,3 +1,7 @@ +2012-11-12 Paul Eggert + + * texinfo.tex: Merge from gnulib. + 2012-11-10 Chong Yidong * url.texi (Introduction): Move url-configuration-directory to === modified file 'doc/misc/texinfo.tex' --- doc/misc/texinfo.tex 2012-09-13 07:28:15 +0000 +++ doc/misc/texinfo.tex 2012-11-12 03:10:51 +0000 @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2012-09-12.16} +\def\texinfoversion{2012-11-08.11} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -6559,16 +6559,9 @@ \makedispenvdef{quotation}{\quotationstart} % \def\quotationstart{% - {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip - \parindent=0pt - % - % @cartouche defines \nonarrowing to inhibit narrowing at next level down. + \indentedblockstart % same as \indentedblock, but increase right margin too. \ifx\nonarrowing\relax - \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing - \exdentamount = \lispnarrowing - \else - \let\nonarrowing = \relax \fi \parsearg\quotationlabel } @@ -6594,6 +6587,32 @@ \fi } +% @indentedblock is like @quotation, but indents only on the left and +% has no optional argument. +% +\makedispenvdef{indentedblock}{\indentedblockstart} +% +\def\indentedblockstart{% + {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip + \parindent=0pt + % + % @cartouche defines \nonarrowing to inhibit narrowing at next level down. + \ifx\nonarrowing\relax + \advance\leftskip by \lispnarrowing + \exdentamount = \lispnarrowing + \else + \let\nonarrowing = \relax + \fi +} + +% Keep a nonzero parskip for the environment, since we're doing normal filling. +% +\def\Eindentedblock{% + \par + {\parskip=0pt \afterenvbreak}% +} +\def\Esmallindentedblock{\Eindentedblock} + % LaTeX-like @verbatim...@end verbatim and @verb{...} % If we want to allow any as delimiter, ------------------------------------------------------------ revno: 110869 committer: Paul Eggert branch nick: trunk timestamp: Sun 2012-11-11 18:08:06 -0800 message: * data.c (Qdefalias_fset_function): Now static. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-11-12 01:09:34 +0000 +++ src/ChangeLog 2012-11-12 02:08:06 +0000 @@ -1,5 +1,7 @@ 2012-11-12 Paul Eggert + * data.c (Qdefalias_fset_function): Now static. + Another tweak to vectorlike_header change. * alloc.c (struct Lisp_Vectorlike_Free, NEXT_IN_FREE_LIST): Remove, and replace all uses with ... === modified file 'src/data.c' --- src/data.c 2012-11-09 22:20:47 +0000 +++ src/data.c 2012-11-12 02:08:06 +0000 @@ -80,7 +80,8 @@ Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; static Lisp_Object Qdefun; -Lisp_Object Qinteractive_form, Qdefalias_fset_function; +Lisp_Object Qinteractive_form; +static Lisp_Object Qdefalias_fset_function; static void swap_in_symval_forwarding (struct Lisp_Symbol *, struct Lisp_Buffer_Local_Value *); ------------------------------------------------------------ revno: 110868 committer: Paul Eggert branch nick: trunk timestamp: Sun 2012-11-11 17:09:34 -0800 message: Another tweak to vectorlike_header change. * alloc.c (struct Lisp_Vectorlike_Free, NEXT_IN_FREE_LIST): Remove, and replace all uses with ... (next_in_free_list, set_next_in_free_list): New functions, which respect C's aliasing rules better. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-11-11 18:39:29 +0000 +++ src/ChangeLog 2012-11-12 01:09:34 +0000 @@ -1,3 +1,11 @@ +2012-11-12 Paul Eggert + + Another tweak to vectorlike_header change. + * alloc.c (struct Lisp_Vectorlike_Free, NEXT_IN_FREE_LIST): + Remove, and replace all uses with ... + (next_in_free_list, set_next_in_free_list): + New functions, which respect C's aliasing rules better. + 2012-11-11 Paul Eggert * window.c (list4i): Rename from 'quad'. All uses changed. === modified file 'src/alloc.c' --- src/alloc.c 2012-11-09 11:38:31 +0000 +++ src/alloc.c 2012-11-12 01:09:34 +0000 @@ -2611,18 +2611,21 @@ #define VINDEX(nbytes) (((nbytes) - VBLOCK_BYTES_MIN) / roundup_size) -/* This special type is used to represent any block-allocated vectorlike - object on the free list. */ - -struct Lisp_Vectorlike_Free -{ - struct vectorlike_header header; - struct Lisp_Vector *next; -}; - -/* When V is on the free list, it's always treated as Lisp_Vectorlike_Free. */ - -#define NEXT_IN_FREE_LIST(v) ((struct Lisp_Vectorlike_Free *) v)->next +/* Get and set the next field in block-allocated vectorlike objects on + the free list. Doing it this way respects C's aliasing rules. + We could instead make 'contents' a union, but that would mean + changes everywhere that the code uses 'contents'. */ +static struct Lisp_Vector * +next_in_free_list (struct Lisp_Vector *v) +{ + intptr_t i = XLI (v->contents[0]); + return (struct Lisp_Vector *) i; +} +static void +set_next_in_free_list (struct Lisp_Vector *v, struct Lisp_Vector *next) +{ + v->contents[0] = XIL ((intptr_t) next); +} /* Common shortcut to setup vector on a free list. */ @@ -2633,7 +2636,7 @@ eassert ((nbytes) % roundup_size == 0); \ (tmp) = VINDEX (nbytes); \ eassert ((tmp) < VECTOR_MAX_FREE_LIST_INDEX); \ - NEXT_IN_FREE_LIST (v) = vector_free_lists[tmp]; \ + set_next_in_free_list (v, vector_free_lists[tmp]); \ vector_free_lists[tmp] = (v); \ total_free_vector_slots += (nbytes) / word_size; \ } while (0) @@ -2730,7 +2733,7 @@ if (vector_free_lists[index]) { vector = vector_free_lists[index]; - vector_free_lists[index] = NEXT_IN_FREE_LIST (vector); + vector_free_lists[index] = next_in_free_list (vector); total_free_vector_slots -= nbytes / word_size; return vector; } @@ -2744,7 +2747,7 @@ { /* This vector is larger than requested. */ vector = vector_free_lists[index]; - vector_free_lists[index] = NEXT_IN_FREE_LIST (vector); + vector_free_lists[index] = next_in_free_list (vector); total_free_vector_slots -= nbytes / word_size; /* Excess bytes are used for the smaller vector, ------------------------------------------------------------ revno: 110867 committer: Paul Eggert branch nick: trunk timestamp: Sun 2012-11-11 10:39:29 -0800 message: * window.c (list4i): Rename from 'quad'. All uses changed. Needed because defines 'quad' on Solaris 10. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-11-11 14:19:13 +0000 +++ src/ChangeLog 2012-11-11 18:39:29 +0000 @@ -1,3 +1,8 @@ +2012-11-11 Paul Eggert + + * window.c (list4i): Rename from 'quad'. All uses changed. + Needed because defines 'quad' on Solaris 10. + 2012-11-11 Juanma Barranquero * xdisp.c (start_hourglass) [HAVE_NTGUI]: Add block to silence === modified file 'src/window.c' --- src/window.c 2012-11-10 23:13:33 +0000 +++ src/window.c 2012-11-11 18:39:29 +0000 @@ -273,7 +273,7 @@ /* Build a frequently used 4-integer (X Y W H) list. */ static Lisp_Object -quad (EMACS_INT x, EMACS_INT y, EMACS_INT w, EMACS_INT h) +list4i (EMACS_INT x, EMACS_INT y, EMACS_INT w, EMACS_INT h) { return list4 (make_number (x), make_number (y), make_number (w), make_number (h)); @@ -884,8 +884,8 @@ { register struct window *w = decode_valid_window (window); - return quad (WINDOW_LEFT_EDGE_COL (w), WINDOW_TOP_EDGE_LINE (w), - WINDOW_RIGHT_EDGE_COL (w), WINDOW_BOTTOM_EDGE_LINE (w)); + return list4i (WINDOW_LEFT_EDGE_COL (w), WINDOW_TOP_EDGE_LINE (w), + WINDOW_RIGHT_EDGE_COL (w), WINDOW_BOTTOM_EDGE_LINE (w)); } DEFUN ("window-pixel-edges", Fwindow_pixel_edges, Swindow_pixel_edges, 0, 1, 0, @@ -904,8 +904,8 @@ { register struct window *w = decode_valid_window (window); - return quad (WINDOW_LEFT_EDGE_X (w), WINDOW_TOP_EDGE_Y (w), - WINDOW_RIGHT_EDGE_X (w), WINDOW_BOTTOM_EDGE_Y (w)); + return list4i (WINDOW_LEFT_EDGE_X (w), WINDOW_TOP_EDGE_Y (w), + WINDOW_RIGHT_EDGE_X (w), WINDOW_BOTTOM_EDGE_Y (w)); } static void @@ -950,10 +950,10 @@ calc_absolute_offset (w, &add_x, &add_y); - return quad (WINDOW_LEFT_EDGE_X (w) + add_x, - WINDOW_TOP_EDGE_Y (w) + add_y, - WINDOW_RIGHT_EDGE_X (w) + add_x, - WINDOW_BOTTOM_EDGE_Y (w) + add_y); + return list4i (WINDOW_LEFT_EDGE_X (w) + add_x, + WINDOW_TOP_EDGE_Y (w) + add_y, + WINDOW_RIGHT_EDGE_X (w) + add_x, + WINDOW_BOTTOM_EDGE_Y (w) + add_y); } DEFUN ("window-inside-edges", Fwindow_inside_edges, Swindow_inside_edges, 0, 1, 0, @@ -972,16 +972,16 @@ { register struct window *w = decode_live_window (window); - return quad (WINDOW_BOX_LEFT_EDGE_COL (w) - + WINDOW_LEFT_MARGIN_COLS (w) - + WINDOW_LEFT_FRINGE_COLS (w), - WINDOW_TOP_EDGE_LINE (w) - + WINDOW_HEADER_LINE_LINES (w), - WINDOW_BOX_RIGHT_EDGE_COL (w) - - WINDOW_RIGHT_MARGIN_COLS (w) - - WINDOW_RIGHT_FRINGE_COLS (w), - WINDOW_BOTTOM_EDGE_LINE (w) - - WINDOW_MODE_LINE_LINES (w)); + return list4i ((WINDOW_BOX_LEFT_EDGE_COL (w) + + WINDOW_LEFT_MARGIN_COLS (w) + + WINDOW_LEFT_FRINGE_COLS (w)), + (WINDOW_TOP_EDGE_LINE (w) + + WINDOW_HEADER_LINE_LINES (w)), + (WINDOW_BOX_RIGHT_EDGE_COL (w) + - WINDOW_RIGHT_MARGIN_COLS (w) + - WINDOW_RIGHT_FRINGE_COLS (w)), + (WINDOW_BOTTOM_EDGE_LINE (w) + - WINDOW_MODE_LINE_LINES (w))); } DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, @@ -999,16 +999,16 @@ { register struct window *w = decode_live_window (window); - return quad (WINDOW_BOX_LEFT_EDGE_X (w) - + WINDOW_LEFT_MARGIN_WIDTH (w) - + WINDOW_LEFT_FRINGE_WIDTH (w), - WINDOW_TOP_EDGE_Y (w) - + WINDOW_HEADER_LINE_HEIGHT (w), - WINDOW_BOX_RIGHT_EDGE_X (w) - - WINDOW_RIGHT_MARGIN_WIDTH (w) - - WINDOW_RIGHT_FRINGE_WIDTH (w), - WINDOW_BOTTOM_EDGE_Y (w) - - WINDOW_MODE_LINE_HEIGHT (w)); + return list4i ((WINDOW_BOX_LEFT_EDGE_X (w) + + WINDOW_LEFT_MARGIN_WIDTH (w) + + WINDOW_LEFT_FRINGE_WIDTH (w)), + (WINDOW_TOP_EDGE_Y (w) + + WINDOW_HEADER_LINE_HEIGHT (w)), + (WINDOW_BOX_RIGHT_EDGE_X (w) + - WINDOW_RIGHT_MARGIN_WIDTH (w) + - WINDOW_RIGHT_FRINGE_WIDTH (w)), + (WINDOW_BOTTOM_EDGE_Y (w) + - WINDOW_MODE_LINE_HEIGHT (w))); } DEFUN ("window-inside-absolute-pixel-edges", @@ -1031,16 +1031,16 @@ calc_absolute_offset (w, &add_x, &add_y); - return quad (WINDOW_BOX_LEFT_EDGE_X (w) - + WINDOW_LEFT_MARGIN_WIDTH (w) - + WINDOW_LEFT_FRINGE_WIDTH (w) + add_x, - WINDOW_TOP_EDGE_Y (w) - + WINDOW_HEADER_LINE_HEIGHT (w) + add_y, - WINDOW_BOX_RIGHT_EDGE_X (w) - - WINDOW_RIGHT_MARGIN_WIDTH (w) - - WINDOW_RIGHT_FRINGE_WIDTH (w) + add_x, - WINDOW_BOTTOM_EDGE_Y (w) - - WINDOW_MODE_LINE_HEIGHT (w) + add_y); + return list4i ((WINDOW_BOX_LEFT_EDGE_X (w) + + WINDOW_LEFT_MARGIN_WIDTH (w) + + WINDOW_LEFT_FRINGE_WIDTH (w) + add_x), + (WINDOW_TOP_EDGE_Y (w) + + WINDOW_HEADER_LINE_HEIGHT (w) + add_y), + (WINDOW_BOX_RIGHT_EDGE_X (w) + - WINDOW_RIGHT_MARGIN_WIDTH (w) + - WINDOW_RIGHT_FRINGE_WIDTH (w) + add_x), + (WINDOW_BOTTOM_EDGE_Y (w) + - WINDOW_MODE_LINE_HEIGHT (w) + add_y)); } /* Test if the character at column X, row Y is within window W. @@ -1621,7 +1621,7 @@ { Lisp_Object part = Qnil; if (!fully_p) - part = quad (rtop, rbot, rowh, vpos); + part = list4i (rtop, rbot, rowh, vpos); in_window = Fcons (make_number (x), Fcons (make_number (y), part)); } @@ -1687,17 +1687,18 @@ if (!WINDOW_WANTS_HEADER_LINE_P (w)) return Qnil; row = MATRIX_HEADER_LINE_ROW (w->current_matrix); - return row->enabled_p ? quad (row->height, 0, 0, 0) : Qnil; + return row->enabled_p ? list4i (row->height, 0, 0, 0) : Qnil; } if (EQ (line, Qmode_line)) { row = MATRIX_MODE_LINE_ROW (w->current_matrix); return (row->enabled_p ? - quad (row->height, - 0, /* not accurate */ - WINDOW_HEADER_LINE_HEIGHT (w) - + window_text_bottom_y (w), 0) + list4i (row->height, + 0, /* not accurate */ + (WINDOW_HEADER_LINE_HEIGHT (w) + + window_text_bottom_y (w)), + 0) : Qnil); } @@ -1727,7 +1728,7 @@ found_row: crop = max (0, (row->y + row->height) - max_y); - return quad (row->height + min (0, row->y) - crop, i, row->y, crop); + return list4i (row->height + min (0, row->y) - crop, i, row->y, crop); } DEFUN ("window-dedicated-p", Fwindow_dedicated_p, Swindow_dedicated_p, ------------------------------------------------------------ revno: 110866 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2012-11-11 15:19:13 +0100 message: src/xdisp.c (start_hourglass) [HAVE_NTGUI]: Silence warning. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-11-10 23:13:33 +0000 +++ src/ChangeLog 2012-11-11 14:19:13 +0000 @@ -1,3 +1,8 @@ +2012-11-11 Juanma Barranquero + + * xdisp.c (start_hourglass) [HAVE_NTGUI]: Add block to silence + warning about mixing declarations and code in ISO C90. + 2012-11-10 Martin Rudalics * window.c (Fsplit_window_internal): Set combination limit of === modified file 'src/xdisp.c' --- src/xdisp.c 2012-11-10 23:13:33 +0000 +++ src/xdisp.c 2012-11-11 14:19:13 +0000 @@ -29420,8 +29420,10 @@ delay = make_emacs_time (DEFAULT_HOURGLASS_DELAY, 0); #ifdef HAVE_NTGUI - extern void w32_note_current_window (void); - w32_note_current_window (); + { + extern void w32_note_current_window (void); + w32_note_current_window (); + } #endif /* HAVE_NTGUI */ hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay, ------------------------------------------------------------ revno: 110865 committer: Glenn Morris branch nick: trunk timestamp: Sun 2012-11-11 06:22:06 -0500 message: Auto-commit of loaddefs files. diff: === modified file 'lisp/emacs-lisp/cl-loaddefs.el' --- lisp/emacs-lisp/cl-loaddefs.el 2012-11-10 23:13:33 +0000 +++ lisp/emacs-lisp/cl-loaddefs.el 2012-11-11 11:22:06 +0000 @@ -11,7 +11,7 @@ ;;;;;; cl--map-overlays cl--map-intervals cl--map-keymap-recursively ;;;;;; cl-notevery cl-notany cl-every cl-some cl-mapcon cl-mapcan ;;;;;; cl-mapl cl-mapc cl-maplist cl-map cl--mapcar-many cl-equalp -;;;;;; cl-coerce) "cl-extra" "cl-extra.el" "0e9284b6492cc98eee7c85ae4e5322ee") +;;;;;; cl-coerce) "cl-extra" "cl-extra.el" "8e9fee941c465ac0fee9b92a92d64154") ;;; Generated autoloads from cl-extra.el (autoload 'cl-coerce "cl-extra" "\ @@ -41,7 +41,7 @@ (autoload 'cl-maplist "cl-extra" "\ Map FUNCTION to each sublist of LIST or LISTs. -Like `mapcar', except applies to lists and their cdr's rather than to +Like `cl-mapcar', except applies to lists and their cdr's rather than to the elements themselves. \(fn FUNCTION LIST...)" nil nil) @@ -57,7 +57,7 @@ \(fn FUNCTION LIST...)" nil nil) (autoload 'cl-mapcan "cl-extra" "\ -Like `mapcar', but nconc's together the values returned by the function. +Like `cl-mapcar', but nconc's together the values returned by the function. \(fn FUNCTION SEQUENCE...)" nil nil) @@ -248,7 +248,9 @@ \(fn SYMBOL PROPNAME)" nil nil) (autoload 'cl-prettyexpand "cl-extra" "\ - +Expand macros in FORM and insert the pretty-printed result. +Optional argument FULL non-nil means to expand all macros, +including `cl-block' and `cl-eval-when'. \(fn FORM &optional FULL)" nil nil) @@ -265,7 +267,7 @@ ;;;;;; cl-typecase cl-ecase cl-case cl-load-time-value cl-eval-when ;;;;;; cl-destructuring-bind cl-function cl-defmacro cl-defun cl-gentemp ;;;;;; cl-gensym cl--compiler-macro-cXXr cl--compiler-macro-list*) -;;;;;; "cl-macs" "cl-macs.el" "57cf89149db1e8ea6bc1582713980cf8") +;;;;;; "cl-macs" "cl-macs.el" "a7228877484d2b39e1c2bee40b011734") ;;; Generated autoloads from cl-macs.el (autoload 'cl--compiler-macro-list* "cl-macs" "\ @@ -320,7 +322,7 @@ \(fn FUNC)" nil t) (autoload 'cl-destructuring-bind "cl-macs" "\ - +Bind the variables in ARGS to the result of EXPR and execute BODY. \(fn ARGS EXPR &rest BODY)" nil t) @@ -564,12 +566,12 @@ (put 'cl-multiple-value-setq 'lisp-indent-function '1) (autoload 'cl-locally "cl-macs" "\ - +Equivalent to `progn'. \(fn &rest BODY)" nil t) (autoload 'cl-the "cl-macs" "\ - +At present this ignores _TYPE and is simply equivalent to FORM. \(fn TYPE FORM)" nil t) @@ -721,7 +723,10 @@ \(fn FUNC ARGS &rest BODY)" nil t) (autoload 'cl-compiler-macroexpand "cl-macs" "\ - +Like `macroexpand', but for compiler macros. +Expands FORM repeatedly until no further expansion is possible. +Returns FORM unchanged if it has no compiler macro, or if it has a +macro that returns its `&whole' argument. \(fn FORM)" nil nil) ------------------------------------------------------------ revno: 110864 fixes bug: http://debbugs.gnu.org/7449 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-11-10 15:19:43 -0800 message: Remove report-emacs-bug-query-existing-bugs (use debbugs from GNU ELPA instead) * lisp/mail/emacsbug.el (report-emacs-bug-tracker-url) (report-emacs-bug-bug-alist, report-emacs-bug-choice-widget) (report-emacs-bug-create-existing-bugs-buffer) (report-emacs-bug-parse-query-results) (report-emacs-bug-query-existing-bugs): Remove. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-11-10 23:13:33 +0000 +++ lisp/ChangeLog 2012-11-10 23:19:43 +0000 @@ -1,5 +1,11 @@ 2012-11-10 Glenn Morris + * mail/emacsbug.el (report-emacs-bug-tracker-url) + (report-emacs-bug-bug-alist, report-emacs-bug-choice-widget) + (report-emacs-bug-create-existing-bugs-buffer) + (report-emacs-bug-parse-query-results) + (report-emacs-bug-query-existing-bugs): Remove. (Bug#7449) + * term.el (term-default-fg-color, term-default-bg-color): Make obsolete, rather than just saying "deprecated" in the doc. === modified file 'lisp/mail/emacsbug.el' --- lisp/mail/emacsbug.el 2012-11-08 18:35:08 +0000 +++ lisp/mail/emacsbug.el 2012-11-10 23:19:43 +0000 @@ -60,10 +60,6 @@ ;; User options end here. -(defvar report-emacs-bug-tracker-url "http://debbugs.gnu.org/cgi/" - "Base URL of the GNU bugtracker. -Used for querying duplicates and linking to existing bugs.") - (defvar report-emacs-bug-orig-text nil "The automatically-created initial text of the bug report.") @@ -444,91 +440,6 @@ (delete-region pos (field-end (1+ pos))))))) -;; Querying the bug database - -(defvar report-emacs-bug-bug-alist nil) -(make-variable-buffer-local 'report-emacs-bug-bug-alist) -(defvar report-emacs-bug-choice-widget nil) -(make-variable-buffer-local 'report-emacs-bug-choice-widget) - -(defun report-emacs-bug-create-existing-bugs-buffer (bugs keywords) - (switch-to-buffer (get-buffer-create "*Existing Emacs Bugs*")) - (setq buffer-read-only t) - (let ((inhibit-read-only t)) - (erase-buffer) - (setq report-emacs-bug-bug-alist bugs) - (widget-insert (propertize (concat "Already known bugs (" - keywords "):\n\n") - 'face 'bold)) - (if bugs - (setq report-emacs-bug-choice-widget - (apply 'widget-create 'radio-button-choice - :value (caar bugs) - (let (items) - (dolist (bug bugs) - (push (list - 'url-link - :format (concat "Bug#" (number-to-string (nth 2 bug)) - ": " (cadr bug) "\n %[%v%]\n") - ;; FIXME: Why is only the link of the - ;; active item clickable? - (car bug)) - items)) - (nreverse items)))) - (widget-insert "No bugs matching your keywords found.\n")) - (widget-insert "\n") - (widget-create 'push-button - :notify (lambda (&rest ignore) - ;; TODO: Do something! - (message "Reporting new bug!")) - "Report new bug") - (when bugs - (widget-insert " ") - (widget-create 'push-button - :notify (lambda (&rest ignore) - (let ((val (widget-value report-emacs-bug-choice-widget))) - ;; TODO: Do something! - (message "Appending to bug %s!" - (nth 2 (assoc val report-emacs-bug-bug-alist))))) - "Append to chosen bug")) - (widget-insert " ") - (widget-create 'push-button - :notify (lambda (&rest ignore) - (kill-buffer)) - "Quit reporting bug") - (widget-insert "\n")) - (use-local-map widget-keymap) - (widget-setup) - (goto-char (point-min))) - -(defun report-emacs-bug-parse-query-results (status keywords) - (goto-char (point-min)) - (let (buglist) - (while (re-search-forward "\\([^<]+\\)" nil t) - (let ((number (match-string 1)) - (subject (match-string 2))) - (when (not (string-match "^#" subject)) - (push (list - ;; first the bug URL - (concat report-emacs-bug-tracker-url - "bugreport.cgi?bug=" number) - ;; then the subject and number - subject (string-to-number number)) - buglist)))) - (report-emacs-bug-create-existing-bugs-buffer (nreverse buglist) keywords))) - -(defun report-emacs-bug-query-existing-bugs (keywords) - "Query for KEYWORDS at `report-emacs-bug-tracker-url', and return the result. -The result is an alist with items of the form (URL SUBJECT NO)." - (interactive "sBug keywords (comma separated): ") - (url-retrieve (concat report-emacs-bug-tracker-url - "pkgreport.cgi?include=subject%3A" - (replace-regexp-in-string "[[:space:]]+" "+" keywords) - ";package=emacs") - 'report-emacs-bug-parse-query-results (list keywords))) -(make-obsolete 'report-emacs-bug-query-existing-bugs - "use the `debbugs' package from GNU ELPA instead." "24.3") - (provide 'emacsbug) ;;; emacsbug.el ends here