Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 99341. ------------------------------------------------------------ revno: 99341 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2010-01-15 23:49:37 -0500 message: (x_term_init): Instead of inhibiting GC while running Lisp code, link the new kboard into all_kboard before running Lisp code, and protect the new terminal with GCPRO (Bug#5365). (x_term_init): Remove unused var `atom'. (x_delete_display, x_delete_terminal): Remove unused var `i'. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-01-15 17:04:14 +0000 +++ src/ChangeLog 2010-01-16 04:49:37 +0000 @@ -1,3 +1,11 @@ +2010-01-16 Stefan Monnier + + * xterm.c (x_term_init): Instead of inhibiting GC while running Lisp + code, link the new kboard into all_kboard before running Lisp code, + and protect the new terminal with GCPRO (Bug#5365). + (x_term_init): Remove unused var `atom'. + (x_delete_display, x_delete_terminal): Remove unused var `i'. + 2010-01-15 Jan Djärv * xfns.c (x_get_current_desktop, x_get_desktop_workarea): New functions. === modified file 'src/xterm.c' --- src/xterm.c 2010-01-13 18:35:36 +0000 +++ src/xterm.c 2010-01-16 04:49:37 +0000 @@ -9821,7 +9821,7 @@ { Pixmap icon_pixmap, icon_mask; -#ifndef USE_X_TOOLKIT +#if !defined USE_X_TOOLKIT && !defined USE_GTK Window window = FRAME_OUTER_WINDOW (f); #endif @@ -10076,7 +10076,6 @@ int argc; char *argv[NUM_ARGV]; char **argv2 = argv; - GdkAtom atom; guint id; #ifndef HAVE_GTK_MULTIDISPLAY if (!EQ (Vinitial_window_system, Qx)) @@ -10215,25 +10214,36 @@ terminal->kboard = (KBOARD *) xmalloc (sizeof (KBOARD)); init_kboard (terminal->kboard); terminal->kboard->Vwindow_system = Qx; + + /* Add the keyboard to the list before running Lisp code (via + Qvendor_specific_keysyms below), since these are not traced + via terminals but only through all_kboards. */ + terminal->kboard->next_kboard = all_kboards; + all_kboards = terminal->kboard; + if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound)) { char *vendor = ServerVendor (dpy); - /* Temporarily hide the partially initialized terminal, - but make sure it doesn't get garbage collected. */ - int count = inhibit_garbage_collection (); + + /* Protect terminal from GC before removing it from the + list of terminals. */ + struct gcpro gcpro1; + Lisp_Object gcpro_term; + XSETTERMINAL (gcpro_term, terminal); + GCPRO1 (gcpro_term); + + /* Temporarily hide the partially initialized terminal. */ terminal_list = terminal->next_terminal; UNBLOCK_INPUT; terminal->kboard->Vsystem_key_alist = call1 (Qvendor_specific_keysyms, vendor ? build_string (vendor) : empty_unibyte_string); BLOCK_INPUT; - unbind_to (count, Qnil); terminal->next_terminal = terminal_list; terminal_list = terminal; + UNGCPRO; } - terminal->kboard->next_kboard = all_kboards; - all_kboards = terminal->kboard; /* Don't let the initial kboard remain current longer than necessary. That would cause problems if a file loaded on startup tries to prompt in the mini-buffer. */ @@ -10582,7 +10592,6 @@ x_delete_display (dpyinfo) struct x_display_info *dpyinfo; { - int i; struct terminal *t; /* Close all frames and delete the generic struct terminal for this @@ -10734,7 +10743,6 @@ x_delete_terminal (struct terminal *terminal) { struct x_display_info *dpyinfo = terminal->display_info.x; - int i; /* Protect against recursive calls. delete_frame in delete_terminal calls us back when it deletes our last frame. */ ------------------------------------------------------------ revno: 99340 author: Mario Lang committer: Glenn Morris branch nick: trunk timestamp: Fri 2010-01-15 18:51:50 -0800 message: Mario Lang : Remove some duplicated words. * cedet/ede/cpp-root.el (ede-cpp-root-project): * cedet/ede/files.el (ede-expand-filename): * cedet/ede/simple.el (ede-simple-project): * cedet/semantic/complete.el (semantic-complete-read-tag-engine) (semantic-complete-inline-tag-engine): * cedet/semantic/db-el.el (semanticdb-equivalent-mode): * cedet/semantic/db-global.el (semanticdb-equivalent-mode): * cedet/semantic/db-javascript.el (semanticdb-equivalent-mode): * cedet/semantic/db.el (semanticdb-equivalent-mode): * cedet/semantic/decorate/include.el (semantic-decoration-unknown-include-describe): * cedet/semantic/idle.el (semantic-idle-work-for-one-buffer): * emacs-lisp/chart.el (chart-translate-namezone): * textmodes/artist.el (artist-compute-popup-menu-table): Remove duplicated words in doc-strings. * srecode/doc-cpp.srt, srecode/doc-default.srt: * srecode/doc-java.srt: Remove duplicated words. * ede.texi (ede-target): * org.texi (Refiling notes): Remove duplicated words. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2010-01-13 15:38:28 +0000 +++ doc/misc/ChangeLog 2010-01-16 02:51:50 +0000 @@ -1,3 +1,8 @@ +2010-01-16 Mario Lang + + * ede.texi (ede-target): + * org.texi (Refiling notes): Remove duplicated words. + 2010-01-04 Stefan Monnier * gnus.texi (Posting Styles): Use with-current-buffer. === modified file 'doc/misc/ede.texi' --- doc/misc/ede.texi 2010-01-13 08:35:10 +0000 +++ doc/misc/ede.texi 2010-01-16 02:51:50 +0000 @@ -1968,7 +1968,7 @@ @deffn Method ede-expand-filename :AFTER this filename &optional force Return a fully qualified file name based on target @var{THIS}. -@var{FILENAME} should a a filename which occurs in a directory in which @var{THIS} works. +@var{FILENAME} should be a filename which occurs in a directory in which @var{THIS} works. Optional argument @var{FORCE} forces the default filename to be provided even if it doesn't exist. @end deffn === modified file 'doc/misc/org.texi' --- doc/misc/org.texi 2010-01-13 08:35:10 +0000 +++ doc/misc/org.texi 2010-01-16 02:51:50 +0000 @@ -6181,7 +6181,7 @@ select a location via a file-path-like completion along the outline path, see the variables @code{org-refile-use-outline-path} and @code{org-outline-path-complete-in-steps}. If you would like to be able to -create new nodes as new parents for for refiling on the fly, check the +create new nodes as new parents for refiling on the fly, check the variable @code{org-refile-allow-creating-parent-nodes}. @kindex C-u C-c C-w @item C-u C-c C-w === modified file 'etc/ChangeLog' --- etc/ChangeLog 2010-01-15 03:49:47 +0000 +++ etc/ChangeLog 2010-01-16 02:51:50 +0000 @@ -1,3 +1,8 @@ +2010-01-16 Mario Lang + + * srecode/doc-cpp.srt, srecode/doc-default.srt: + * srecode/doc-java.srt: Remove duplicated words. + 2010-01-14 Nick Roberts * etc/images/gud/recstart.xpm, etc/images/gud/recstop.xpm: === modified file 'etc/srecode/doc-cpp.srt' --- etc/srecode/doc-cpp.srt 2010-01-14 18:45:02 +0000 +++ etc/srecode/doc-cpp.srt 2010-01-16 02:51:50 +0000 @@ -58,7 +58,7 @@ ---- template group-comment-end :blank :indent -"A comment occurring at the end of a a group of declarations. +"A comment occurring at the end of a group of declarations. Recycle doxygen comment code from the more general template set." ---- {{>:classdecl:doxygen-function-group-end}} @@ -75,7 +75,7 @@ ---- template group-comment-end :blank :indent -"A comment occurring at the end of a a group of declarations. +"A comment occurring at the end of a group of declarations. Recycle doxygen comment code from the more general template set." ---- {{>:classdecl:doxygen-function-group-end}} === modified file 'etc/srecode/doc-default.srt' --- etc/srecode/doc-default.srt 2010-01-14 18:45:02 +0000 +++ etc/srecode/doc-default.srt 2010-01-16 02:51:50 +0000 @@ -57,7 +57,7 @@ ---- template group-comment-end :indent -"A comment occurring at the end of a a group of declarations." +"A comment occurring at the end of a group of declarations." ---- {{comment_start}} End {{?GROUPNAME}} {{comment_end}} ---- @@ -72,7 +72,7 @@ ---- template group-comment-end :indent -"A comment occurring at the end of a a group of declarations." +"A comment occurring at the end of a group of declarations." ---- {{>:declaration:group-comment-end}} ---- === modified file 'etc/srecode/doc-java.srt' --- etc/srecode/doc-java.srt 2010-01-14 18:45:02 +0000 +++ etc/srecode/doc-java.srt 2010-01-16 02:51:50 +0000 @@ -59,7 +59,7 @@ ---- template group-comment-end :blank :indent -"A comment occurring at the end of a a group of declarations. +"A comment occurring at the end of a group of declarations. Recycle javadoc comment code from the more general template set." ---- {{>:classdecl:javadoc-function-group-end}} @@ -76,7 +76,7 @@ ---- template group-comment-end :blank :indent -"A comment occurring at the end of a a group of declarations. +"A comment occurring at the end of a group of declarations. Recycle javadoc comment code from the more general template set." ---- {{>:classdecl:javadoc-function-group-end}} === modified file 'lib-src/etags.c' --- lib-src/etags.c 2010-01-11 07:51:51 +0000 +++ lib-src/etags.c 2010-01-16 02:51:50 +0000 @@ -6297,7 +6297,7 @@ readline (lbp, stream); return; } /* if a real #line directive */ - } /* if #line is followed by a a number */ + } /* if #line is followed by a number */ } /* if line begins with "#line " */ /* If we are here, no #line directive was found. */ === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-01-15 16:55:43 +0000 +++ lisp/ChangeLog 2010-01-16 02:51:50 +0000 @@ -1,3 +1,20 @@ +2010-01-16 Mario Lang + + * cedet/ede/cpp-root.el (ede-cpp-root-project): + * cedet/ede/files.el (ede-expand-filename): + * cedet/ede/simple.el (ede-simple-project): + * cedet/semantic/complete.el (semantic-complete-read-tag-engine) + (semantic-complete-inline-tag-engine): + * cedet/semantic/db-el.el (semanticdb-equivalent-mode): + * cedet/semantic/db-global.el (semanticdb-equivalent-mode): + * cedet/semantic/db-javascript.el (semanticdb-equivalent-mode): + * cedet/semantic/db.el (semanticdb-equivalent-mode): + * cedet/semantic/decorate/include.el (semantic-decoration-unknown-include-describe): + * cedet/semantic/idle.el (semantic-idle-work-for-one-buffer): + * emacs-lisp/chart.el (chart-translate-namezone): + * textmodes/artist.el (artist-compute-popup-menu-table): + Remove duplicated words in doc-strings. + 2010-01-15 David Abrahams (tiny change) * net/mairix.el (mairix-widget-send-query): Send -1 instead of nil @@ -1473,7 +1490,7 @@ 2009-12-01 Dan Nicolaescu Make vc-print-log buttons work. - * log-view.el (log-view-mode-map): Inherit from from widget-keymap. + * log-view.el (log-view-mode-map): Inherit from widget-keymap. 2009-11-30 Ryan C. Thompson (tiny change) === modified file 'lisp/cedet/ede/cpp-root.el' --- lisp/cedet/ede/cpp-root.el 2010-01-13 08:35:10 +0000 +++ lisp/cedet/ede/cpp-root.el 2010-01-16 02:51:50 +0000 @@ -324,7 +324,7 @@ ) ) "EDE cpp-root project class. -Each directory needs a a project file to control it.") +Each directory needs a project file to control it.") ;;; INIT ;; === modified file 'lisp/cedet/ede/files.el' --- lisp/cedet/ede/files.el 2010-01-14 18:37:23 +0000 +++ lisp/cedet/ede/files.el 2010-01-16 02:51:50 +0000 @@ -487,7 +487,7 @@ (defmethod ede-expand-filename ((this ede-target) filename &optional force) "Return a fully qualified file name based on target THIS. -FILENAME should a a filename which occurs in a directory in which THIS works. +FILENAME should be a filename which occurs in a directory in which THIS works. Optional argument FORCE forces the default filename to be provided even if it doesn't exist." (ede-expand-filename (ede-target-parent this) filename force)) === modified file 'lisp/cedet/ede/simple.el' --- lisp/cedet/ede/simple.el 2010-01-13 08:35:10 +0000 +++ lisp/cedet/ede/simple.el 2010-01-16 02:51:50 +0000 @@ -87,7 +87,7 @@ (file-header-line :initform ";; EDE Simple Project") ) "EDE Simple project class. -Each directory needs a a project file to control it.") +Each directory needs a project file to control it.") (defmethod ede-commit-project ((proj ede-simple-project)) "Commit any change to PROJ to its file." === modified file 'lisp/cedet/semantic/complete.el' --- lisp/cedet/semantic/complete.el 2010-01-13 08:35:10 +0000 +++ lisp/cedet/semantic/complete.el 2010-01-16 02:51:50 +0000 @@ -192,7 +192,7 @@ default-tag initial-input history) "Read a semantic tag, and return a tag for the selection. -Argument COLLECTOR is an object which can be used to to calculate +Argument COLLECTOR is an object which can be used to calculate a list of possible hits. See `semantic-completion-collector-engine' for details on COLLECTOR. Argument DISPLAYOR is an object used to display a list of possible @@ -394,7 +394,7 @@ ;;; Keybindings ;; -;; Keys are bound to to perform completion using our mechanisms. +;; Keys are bound to perform completion using our mechanisms. ;; Do that work here. (defun semantic-complete-done () "Accept the current input." @@ -738,7 +738,7 @@ (defun semantic-complete-inline-tag-engine (collector displayor buffer start end) "Perform completion based on semantic tags in a buffer. -Argument COLLECTOR is an object which can be used to to calculate +Argument COLLECTOR is an object which can be used to calculate a list of possible hits. See `semantic-completion-collector-engine' for details on COLLECTOR. Argument DISPLAYOR is an object used to display a list of possible === modified file 'lisp/cedet/semantic/db-el.el' --- lisp/cedet/semantic/db-el.el 2010-01-13 08:35:10 +0000 +++ lisp/cedet/semantic/db-el.el 2010-01-16 02:51:50 +0000 @@ -107,7 +107,7 @@ (defmethod semanticdb-equivalent-mode ((table semanticdb-table-emacs-lisp) &optional buffer) "Return non-nil if TABLE's mode is equivalent to BUFFER. -Equivalent modes are specified by by `semantic-equivalent-major-modes' +Equivalent modes are specified by the `semantic-equivalent-major-modes' local variable." (with-current-buffer buffer (eq (or mode-local-active-mode major-mode) 'emacs-lisp-mode))) === modified file 'lisp/cedet/semantic/db-global.el' --- lisp/cedet/semantic/db-global.el 2010-01-13 08:35:10 +0000 +++ lisp/cedet/semantic/db-global.el 2010-01-16 02:51:50 +0000 @@ -105,7 +105,7 @@ (defmethod semanticdb-equivalent-mode ((table semanticdb-table-global) &optional buffer) "Return t, pretend that this table's mode is equivalent to BUFFER. -Equivalent modes are specified by by `semantic-equivalent-major-modes' +Equivalent modes are specified by the `semantic-equivalent-major-modes' local variable." ;; @todo - hack alert! t) === modified file 'lisp/cedet/semantic/db-javascript.el' --- lisp/cedet/semantic/db-javascript.el 2010-01-13 08:35:10 +0000 +++ lisp/cedet/semantic/db-javascript.el 2010-01-16 02:51:50 +0000 @@ -145,7 +145,7 @@ (defmethod semanticdb-equivalent-mode ((table semanticdb-table-javascript) &optional buffer) "Return non-nil if TABLE's mode is equivalent to BUFFER. -Equivalent modes are specified by by `semantic-equivalent-major-modes' +Equivalent modes are specified by the `semantic-equivalent-major-modes' local variable." (with-current-buffer buffer (eq (or mode-local-active-mode major-mode) 'javascript-mode))) === modified file 'lisp/cedet/semantic/db.el' --- lisp/cedet/semantic/db.el 2010-01-13 08:35:10 +0000 +++ lisp/cedet/semantic/db.el 2010-01-16 02:51:50 +0000 @@ -735,13 +735,13 @@ (defmethod semanticdb-equivalent-mode ((table semanticdb-abstract-table) &optional buffer) "Return non-nil if TABLE's mode is equivalent to BUFFER. -Equivalent modes are specified by by `semantic-equivalent-major-modes' +Equivalent modes are specified by the `semantic-equivalent-major-modes' local variable." nil) (defmethod semanticdb-equivalent-mode ((table semanticdb-table) &optional buffer) "Return non-nil if TABLE's mode is equivalent to BUFFER. -Equivalent modes are specified by by `semantic-equivalent-major-modes' +Equivalent modes are specified by the `semantic-equivalent-major-modes' local variable." (save-excursion (if buffer (set-buffer buffer)) === modified file 'lisp/cedet/semantic/decorate/include.el' --- lisp/cedet/semantic/decorate/include.el 2010-01-13 08:35:10 +0000 +++ lisp/cedet/semantic/decorate/include.el 2010-01-16 02:51:50 +0000 @@ -461,7 +461,7 @@ (when (or (eq mm 'c++-mode) (eq mm 'c-mode)) (princ " -For C/C++ includes located within a a project, you can use a special +For C/C++ includes located within a project, you can use a special EDE project that will wrap an existing build system. You can do that like this in your .emacs file: === modified file 'lisp/cedet/semantic/idle.el' --- lisp/cedet/semantic/idle.el 2010-01-13 08:35:10 +0000 +++ lisp/cedet/semantic/idle.el 2010-01-16 02:51:50 +0000 @@ -336,7 +336,7 @@ (defun semantic-idle-work-for-one-buffer (buffer) - "Do long-processing work for for BUFFER. + "Do long-processing work for BUFFER. Uses `semantic-safe' and returns the output. Returns t of all processing succeeded." (with-current-buffer buffer === modified file 'lisp/emacs-lisp/chart.el' --- lisp/emacs-lisp/chart.el 2010-01-13 08:35:10 +0000 +++ lisp/emacs-lisp/chart.el 2010-01-16 02:51:50 +0000 @@ -323,7 +323,7 @@ (defmethod chart-translate-namezone ((c chart) n) "Return a dot-pair representing a positional range for a name. The name in chart C of the Nth name resides. -Automatically compensates for for direction." +Automatically compensates for direction." (let* ((dir (oref c direction)) (w (if (eq dir 'vertical) (oref c x-width) (oref c y-width))) (m (if (eq dir 'vertical) (oref c y-margin) (oref c x-margin))) === modified file 'lisp/emulation/edt.el' --- lisp/emulation/edt.el 2010-01-13 08:35:10 +0000 +++ lisp/emulation/edt.el 2010-01-16 02:51:50 +0000 @@ -2107,7 +2107,7 @@ (setq edt-term "pc") (if (or (not edt-window-system) (eq edt-window-system 'tty)) (setq edt-term (getenv "TERM")))) - ;; Look for for terminal configuration file for this terminal type. + ;; Look for a terminal configuration file for this terminal type. ;; Otherwise, load the user's custom configuration file. (if (or (not edt-window-system) (memq edt-window-system '(pc tty))) (progn === modified file 'lisp/textmodes/artist.el' --- lisp/textmodes/artist.el 2010-01-13 08:35:10 +0000 +++ lisp/textmodes/artist.el 2010-01-16 02:51:50 +0000 @@ -1477,7 +1477,7 @@ ; (defun artist-compute-popup-menu-table (menu-table) - "Create a menu from from MENU-TABLE data. + "Create a menu from MENU-TABLE data. The returned value is suitable for the `x-popup-menu' function." (cons "Artist menu" (artist-compute-popup-menu-table-sub menu-table))) ------------------------------------------------------------ revno: 99339 [merge] committer: Jan D. branch nick: trunk timestamp: Fri 2010-01-15 18:05:04 +0100 message: Take desktop panels into account when sizing frames so they fit on the screen. xfns.c (x_get_current_desktop, x_get_desktop_workarea): New functions. (Fx_create_frame): Call x_get_current_desktop and x_get_desktop_workarea to find out usable size of the desktop. Don't make frames larger than this. Bug #3643. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-01-15 05:13:05 +0000 +++ src/ChangeLog 2010-01-15 17:04:14 +0000 @@ -1,3 +1,10 @@ +2010-01-15 Jan Djärv + + * xfns.c (x_get_current_desktop, x_get_desktop_workarea): New functions. + (Fx_create_frame): Call x_get_current_desktop and x_get_desktop_workarea + to find out usable size of the desktop. Don't make frames larger than + this. Bug #3643. + 2010-01-15 Kenichi Handa * xdisp.c (CHAR_COMPOSED_P): New arg END_CHARPOS. Callers changed. === modified file 'src/xfns.c' --- src/xfns.c 2010-01-13 08:35:10 +0000 +++ src/xfns.c 2010-01-15 17:04:14 +0000 @@ -3145,6 +3145,91 @@ return Qnil; } +/* Return current desktop index for the display where frame F is. + If we can't find out the current desktop, return 0. */ + +static int +x_get_current_desktop (f) + struct frame *f; +{ + Atom actual_type; + unsigned long actual_size, bytes_remaining; + int rc, actual_format; + struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + long max_len = 10; + Display *dpy = FRAME_X_DISPLAY (f); + long *data = NULL; + int current_desktop; + + BLOCK_INPUT; + x_catch_errors (dpy); + rc = XGetWindowProperty (dpy, dpyinfo->root_window, + XInternAtom (dpy, "_NET_CURRENT_DESKTOP", False), + 0, max_len, False, XA_CARDINAL, + &actual_type, &actual_format, &actual_size, + &bytes_remaining, (unsigned char **)&data); + + if (rc != Success || actual_type != XA_CARDINAL || x_had_errors_p (dpy) + || actual_size == 0 || actual_format != 32) + current_desktop = 0; + else + current_desktop = (int)*data; + + if (data) XFree (data); + x_uncatch_errors (); + UNBLOCK_INPUT; + return current_desktop; +} + +/* Return current size for DESKTOP_INDEX on the display where frame F is. + If we can't find out the size, return 0, otherwise 1. */ + +static int +x_get_desktop_workarea (f, desktop_index, deskw, deskh) + struct frame *f; + int desktop_index; + int *deskw, *deskh; +{ + Atom actual_type; + unsigned long actual_size, bytes_remaining; + int rc, actual_format; + struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + long max_len = 1000; /* This handles 250 desktops, who has that many? */ + Display *dpy = FRAME_X_DISPLAY (f); + long *data = NULL; + int retval; + + BLOCK_INPUT; + x_catch_errors (dpy); + rc = XGetWindowProperty (dpy, dpyinfo->root_window, + XInternAtom (dpy, "_NET_WORKAREA", False), + 0, max_len, False, XA_CARDINAL, + &actual_type, &actual_format, &actual_size, + &bytes_remaining, (unsigned char **)&data); + + if (rc != Success || actual_type != XA_CARDINAL || x_had_errors_p (dpy) + || actual_size < 3 || actual_format != 32) + retval = 0; + else + { + int idx; + + if (actual_size == 4 /* Only one info for all desktops. */ + || desktop_index*4 > actual_size) /* destop_index out of range. */ + desktop_index = 0; + + idx = desktop_index*4; + *deskw = data[idx+2] - data[idx]; + *deskh = data[idx+3] - data[idx+1]; + retval = 1; + } + + if (data) XFree (data); + x_uncatch_errors (); + UNBLOCK_INPUT; + return retval; +} + DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, 1, 1, 0, doc: /* Make a new X window, which is called a "frame" in Emacs terms. @@ -3164,7 +3249,7 @@ Lisp_Object name; int minibuffer_only = 0; long window_prompting = 0; - int width, height; + int width, height, deskw = -1, deskh = -1, current_desktop = -1; int count = SPECPDL_INDEX (); struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; Lisp_Object display; @@ -3440,6 +3525,12 @@ { int ph = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, FRAME_LINES (f)); int dph = DisplayHeight (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f)); + /* Some desktops have fixed menus above and/or panels below. Try to + figure out the usable size we have for emacs. */ + current_desktop = x_get_current_desktop (f); + x_get_desktop_workarea (f, current_desktop, &deskw, &deskh); + if (deskh > 0 && deskh < dph) dph = deskh; + if (ph > dph) { height = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, dph) - @@ -3459,6 +3550,13 @@ { int pw = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, FRAME_COLS (f)); int dpw = DisplayWidth (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f)); + if (deskw == -1) + { + current_desktop = x_get_current_desktop (f); + x_get_desktop_workarea (f, current_desktop, &deskw, &deskh); + } + if (deskw > 0 && deskw < dpw) dpw = deskw; + if (pw > dpw) width = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, dpw); } ------------------------------------------------------------ revno: 99338 committer: Chong Yidong branch nick: trunk timestamp: Fri 2010-01-15 11:55:43 -0500 message: * net/mairix.el (mairix-widget-send-query): Send -1 instead of nil to mairix-search to suppress threading (Bug#5342). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-01-15 12:40:13 +0000 +++ lisp/ChangeLog 2010-01-15 16:55:43 +0000 @@ -1,3 +1,8 @@ +2010-01-15 David Abrahams (tiny change) + + * net/mairix.el (mairix-widget-send-query): Send -1 instead of nil + to mairix-search to suppress threading (Bug#5342). + 2010-01-15 Kenichi Handa * international/mule-cmds.el (canonicalize-coding-system-name): === modified file 'lisp/net/mairix.el' --- lisp/net/mairix.el 2010-01-13 08:35:10 +0000 +++ lisp/net/mairix.el 2010-01-15 16:55:43 +0000 @@ -341,7 +341,7 @@ (defun mairix-search (search threads) "Call Mairix with SEARCH. -If THREADS is t, also display whole threads of found +If THREADS is non-nil, also display whole threads of found messages. Results will be put into the default search file." (interactive (list @@ -595,9 +595,7 @@ "Send query from WIDGETS to mairix binary." (mairix-search (mairix-widget-make-query-from-widgets widgets) - (if (widget-value (cadr (assoc "Threads" widgets))) - t - -1)) + (if (widget-value (cadr (assoc "Threads" widgets))) t)) (kill-buffer mairix-customize-query-buffer)) (defun mairix-widget-save-search (widgets) ------------------------------------------------------------ revno: 99337 [merge] committer: Kenichi Handa branch nick: trunk timestamp: Fri 2010-01-15 21:52:50 +0900 message: international/mule-cmds.el (canonicalize-coding-system-name): Convert "msXXX", "ibmXXX", "windows-XXX" to "cpXXX". diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-01-15 03:59:04 +0000 +++ lisp/ChangeLog 2010-01-15 12:40:13 +0000 @@ -1,3 +1,8 @@ +2010-01-15 Kenichi Handa + + * international/mule-cmds.el (canonicalize-coding-system-name): + Convert "msXXX", "ibmXXX", "windows-XXX" to "cpXXX". + 2010-01-15 Glenn Morris * log-view.el (top-level): Require 'wid-edit. (Bug#5311) === modified file 'lisp/international/mule-cmds.el' --- lisp/international/mule-cmds.el 2010-01-13 08:35:10 +0000 +++ lisp/international/mule-cmds.el 2010-01-15 12:35:31 +0000 @@ -226,19 +226,22 @@ ;; and delimiter characters. Support function of ;; coding-system-from-name. (defun canonicalize-coding-system-name (name) - (if (string-match "^iso[-_ ]?[0-9]" name) - ;; "iso-8859-1" -> "8859-1", "iso-2022-jp" ->"2022-jp" - (setq name (substring name (1- (match-end 0))))) - (let ((idx (string-match "[-_ /]" name))) - ;; Delete "-", "_", " ", "/" but do distinguish "16-be" and "16be". - (while idx - (if (and (>= idx 2) - (eq (string-match "16-[lb]e$" name (- idx 2)) - (- idx 2))) - (setq idx (string-match "[-_ /]" name (match-end 0))) - (setq name (concat (substring name 0 idx) (substring name (1+ idx))) - idx (string-match "[-_ /]" name idx)))) - name)) + (if (string-match "^\\(ms\\|ibm\\|windows-\\)\\([0-9]+\\)$" name) + ;; "ms950", "ibm950", "windows-950" -> "cp950" + (concat "cp" (match-string 2 name)) + (if (string-match "^iso[-_ ]?[0-9]" name) + ;; "iso-8859-1" -> "8859-1", "iso-2022-jp" ->"2022-jp" + (setq name (substring name (1- (match-end 0))))) + (let ((idx (string-match "[-_ /]" name))) + ;; Delete "-", "_", " ", "/" but do distinguish "16-be" and "16be". + (while idx + (if (and (>= idx 2) + (eq (string-match "16-[lb]e$" name (- idx 2)) + (- idx 2))) + (setq idx (string-match "[-_ /]" name (match-end 0))) + (setq name (concat (substring name 0 idx) (substring name (1+ idx))) + idx (string-match "[-_ /]" name idx)))) + name))) (defun coding-system-from-name (name) "Return a coding system whose name matches with NAME (string or symbol)." ------------------------------------------------------------ revno: 99336 [merge] committer: Kenichi Handa branch nick: trunk timestamp: Fri 2010-01-15 14:14:00 +0900 message: xdisp.c (CHAR_COMPOSED_P): New arg END_CHARPOS. Callers changed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-01-15 01:46:53 +0000 +++ src/ChangeLog 2010-01-15 05:13:05 +0000 @@ -1,3 +1,7 @@ +2010-01-15 Kenichi Handa + + * xdisp.c (CHAR_COMPOSED_P): New arg END_CHARPOS. Callers changed. + 2010-01-15 Chong Yidong * nsterm.m (Qnone): Define. === modified file 'src/xdisp.c' --- src/xdisp.c 2010-01-13 08:35:10 +0000 +++ src/xdisp.c 2010-01-15 05:09:50 +0000 @@ -5638,11 +5638,11 @@ /* Return 1 iff a character at CHARPOS (and BYTEPOS) is composed (possibly with the following characters). */ -#define CHAR_COMPOSED_P(IT,CHARPOS,BYTEPOS) \ +#define CHAR_COMPOSED_P(IT,CHARPOS,BYTEPOS,END_CHARPOS) \ ((IT)->cmp_it.id >= 0 \ || ((IT)->cmp_it.stop_pos == (CHARPOS) \ && composition_reseat_it (&(IT)->cmp_it, CHARPOS, BYTEPOS, \ - (IT)->end_charpos, (IT)->w, \ + END_CHARPOS, (IT)->w, \ FACE_FROM_ID ((IT)->f, (IT)->face_id), \ (IT)->string))) @@ -6300,7 +6300,7 @@ return 0; } else if (CHAR_COMPOSED_P (it, IT_STRING_CHARPOS (*it), - IT_STRING_BYTEPOS (*it)) + IT_STRING_BYTEPOS (*it), SCHARS (it->string)) && next_element_from_composition (it)) { return 1; @@ -6336,7 +6336,7 @@ CHARPOS (position) = BYTEPOS (position) = -1; } else if (CHAR_COMPOSED_P (it, IT_STRING_CHARPOS (*it), - IT_STRING_BYTEPOS (*it)) + IT_STRING_BYTEPOS (*it), it->string_nchars) && next_element_from_composition (it)) { return 1; @@ -6523,7 +6523,8 @@ && IT_CHARPOS (*it) >= it->redisplay_end_trigger_charpos) run_redisplay_end_trigger_hook (it); - if (CHAR_COMPOSED_P (it, IT_CHARPOS (*it), IT_BYTEPOS (*it)) + if (CHAR_COMPOSED_P (it, IT_CHARPOS (*it), IT_BYTEPOS (*it), + it->end_charpos) && next_element_from_composition (it)) { return 1; ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.