Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 99399. ------------------------------------------------------------ revno: 99399 [merge] committer: Jan D. branch nick: trunk timestamp: Thu 2010-01-28 08:13:47 +0100 message: Revert code for bug #3643. xfns.c (Fx_create_frame): Remove window size matching code from 2010-01-15. (x_get_current_desktop, x_get_desktop_workarea): Remove diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-01-27 13:59:13 +0000 +++ src/ChangeLog 2010-01-28 07:10:04 +0000 @@ -1,3 +1,9 @@ +2010-01-28 Jan Djärv + + * xfns.c (Fx_create_frame): Remove window size matching code from + 2010-01-15. + (x_get_current_desktop, x_get_desktop_workarea): Remove + 2010-01-27 Jason Rumney * w32inevt.c (w32_kbd_patch_key): Save the unicode character. === modified file 'src/xfns.c' --- src/xfns.c 2010-01-25 07:43:10 +0000 +++ src/xfns.c 2010-01-28 07:10:04 +0000 @@ -3145,91 +3145,6 @@ 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. @@ -3249,7 +3164,7 @@ Lisp_Object name; int minibuffer_only = 0; long window_prompting = 0; - int width, height, deskw = -1, deskh = -1, current_desktop = -1; + int width, height; int count = SPECPDL_INDEX (); struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; Lisp_Object display; @@ -3517,66 +3432,6 @@ /* Compute the size of the X window. */ window_prompting = x_figure_window_size (f, parms, 1); - /* Don't make height higher than display height unless the user asked - for it. Try sizes 24 and 10 if current is too large. */ - height = FRAME_LINES (f); - tem = x_get_arg (dpyinfo, parms, Qheight, 0, 0, RES_TYPE_NUMBER); - if (EQ (tem, Qunbound)) - { - int h = FRAME_LINES (f) + FRAME_TOOL_BAR_LINES (f) - + FRAME_MENU_BAR_LINES (f) + 2; - int ph = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, h); - int dph = DisplayHeight (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f)); - static int tryheight[] = { 24, 10, 0 } ; - int i; - - ph += (FRAME_EXTERNAL_TOOL_BAR (f) ? 32 : 0) /* Gtk toolbar size */ - + (FRAME_EXTERNAL_MENU_BAR (f) ? 24 : 0); /* Arbitrary */ - - /* 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; - - /* Allow 40 pixels for manager decorations. */ - for (i = 0; ph+40 > dph && tryheight[i] != 0; ++i) - { - height = tryheight[i]; - h = height + FRAME_TOOL_BAR_LINES (f) + FRAME_MENU_BAR_LINES (f) + 2; - ph = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, h) - + (FRAME_EXTERNAL_TOOL_BAR (f) ? 32 : 0) - + (FRAME_EXTERNAL_MENU_BAR (f) ? 24 : 0); - } - } - - /* Don't make width wider than display width unless the user asked - for it. */ - width = FRAME_COLS (f); - tem = x_get_arg (dpyinfo, parms, Qwidth, 0, 0, RES_TYPE_NUMBER); - if (EQ (tem, Qunbound)) - { - 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); - } - - if (height != FRAME_LINES (f) || width != FRAME_COLS (f)) - { - check_frame_size (f, &height, &width); - FRAME_LINES (f) = height; - SET_FRAME_COLS (f, width); - } - - tem = x_get_arg (dpyinfo, parms, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN); f->no_split = minibuffer_only || EQ (tem, Qt); ------------------------------------------------------------ revno: 99398 committer: Michael Albinus branch nick: trunk timestamp: Thu 2010-01-28 07:06:41 +0100 message: Fix some busybox annoyances. * net/tramp.el (tramp-wrong-passwd-regexp): Add "Timeout, server not responding." string. (tramp-open-connection-setup-interactive-shell): Dump stty settings. Enable "neveropen" arg for all `tramp-send-command' calls. Handle "=" in variable values properly. (tramp-find-inline-encoding): Raise an error, when no encoding is found. (tramp-wait-for-output): Check, whether PROC buffer is available. Remove spurious " ^H" sequences, sent by busybox. (tramp-get-ls-command): Suppress coloring, if possible. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-01-28 05:54:48 +0000 +++ lisp/ChangeLog 2010-01-28 06:06:41 +0000 @@ -1,3 +1,18 @@ +2010-01-28 Michael Albinus + + Fix some busybox annoyances. + + * net/tramp.el (tramp-wrong-passwd-regexp): Add "Timeout, server + not responding." string. + (tramp-open-connection-setup-interactive-shell): Dump stty + settings. Enable "neveropen" arg for all `tramp-send-command' + calls. Handle "=" in variable values properly. + (tramp-find-inline-encoding): Raise an error, when no encoding is + found. + (tramp-wait-for-output): Check, whether PROC buffer is available. + Remove spurious " ^H" sequences, sent by busybox. + (tramp-get-ls-command): Suppress coloring, if possible. + 2010-01-28 Glenn Morris * vc-svn.el (vc-svn-update): Use "svn --non-interactive". (Bug#4280) === modified file 'lisp/net/tramp.el' (properties changed: -x to +x) --- lisp/net/tramp.el 2010-01-18 04:39:40 +0000 +++ lisp/net/tramp.el 2010-01-28 06:06:41 +0000 @@ -1085,6 +1085,7 @@ "Login Incorrect" "Connection refused" "Connection closed" + "Timeout, server not responding." "Sorry, try again." "Name or service not known" "Host key verification failed." @@ -6732,6 +6733,9 @@ ;; because we're running on a non-MULE Emacs. Let's try ;; stty, instead. (tramp-send-command vec "stty -onlcr" t)))) + ;; Dump stty settings in the traces. + (when (>= tramp-verbose 10) + (tramp-send-command vec "stty -a" t)) (tramp-send-command vec "set +o vi +o emacs" t) ;; Check whether the output of "uname -sr" has been changed. If @@ -6801,15 +6805,16 @@ ;; . We ;; apply the workaround. (if (string-equal (tramp-get-connection-property vec "uname" "") "SunOS 5.11") - (tramp-send-command vec "unset HISTFILE")) + (tramp-send-command vec "unset HISTFILE" t)) (let ((env (copy-sequence tramp-remote-process-environment)) unset item) (while env (setq item (tramp-compat-split-string (car env) "=")) - (if (and (stringp (cadr item)) (not (string-equal (cadr item) ""))) + (setcdr item (mapconcat 'identity (cdr item) "=")) + (if (and (stringp (cdr item)) (not (string-equal (cdr item) ""))) (tramp-send-command - vec (format "%s=%s; export %s" (car item) (cadr item) (car item)) t) + vec (format "%s=%s; export %s" (car item) (cdr item) (car item)) t) (push (car item) unset)) (setq env (cdr env))) (when unset @@ -6981,7 +6986,8 @@ ;; Did we find something? (unless found - (tramp-message vec 2 "Couldn't find an inline transfer encoding")) + (tramp-error + vec 'file-error "Couldn't find an inline transfer encoding")) ;; Set connection properties. (tramp-message vec 5 "Using local encoding `%s'" loc-enc) @@ -7301,7 +7307,10 @@ (unless nooutput (tramp-wait-for-output p)))) (defun tramp-wait-for-output (proc &optional timeout) - "Wait for output from remote rsh command." + "Wait for output from remote command." + (unless (buffer-live-p (process-buffer proc)) + (delete-process proc) + (tramp-error proc 'file-error "Process `%s' not available, try again" proc)) (with-current-buffer (process-buffer proc) (let* (;; Initially, `tramp-end-of-output' is "#$ ". There might ;; be leading escape sequences, which must be ignored. @@ -7313,6 +7322,14 @@ (found (tramp-wait-for-regexp proc timeout regexp1))) (if found (let (buffer-read-only) + ;; A simple-minded busybox has sent " ^H" sequences. + ;; Delete them. + (goto-char (point-min)) + (when (re-search-forward + "^\\(.\b\\)+$" (tramp-compat-line-end-position) t) + (forward-line 1) + (delete-region (point-min) (point))) + ;; Delete the prompt. (goto-char (point-max)) (re-search-backward regexp nil t) (delete-region (point) (point-max))) @@ -8002,9 +8019,14 @@ (let ((dl (tramp-get-remote-path vec)) result) (while (and dl (setq result (tramp-find-executable vec cmd dl t t))) - ;; Check parameter. + ;; Check parameters. On busybox, "ls" output coloring is + ;; enabled by default sometimes. So we try to disable it + ;; when possible. $LS_COLORING is not supported there. (when (zerop (tramp-send-command-and-check vec (format "%s -lnd /" result))) + (when (zerop (tramp-send-command-and-check + vec (format "%s --color=never /" result))) + (setq result (concat result " --color=never"))) (throw 'ls-found result)) (setq dl (cdr dl)))))) (tramp-error vec 'file-error "Couldn't find a proper `ls' command")))) @@ -8481,8 +8503,6 @@ ;; * Don't use globbing for directories with many files, as this is ;; likely to produce long command lines, and some shells choke on ;; long command lines. -;; * `vc-directory' does not work. It never displays any files, even -;; if it does show files when run locally. ;; * How to deal with MULE in `insert-file-contents' and `write-region'? ;; * Test remote ksh or bash for tilde expansion in `tramp-find-shell'? ;; * abbreviate-file-name @@ -8529,8 +8549,6 @@ ;; * Reconnect directly to a compliant shell without first going ;; through the user's default shell. (Pete Forman) ;; * Make `tramp-default-user' obsolete. -;; * Tramp shall reconnect automatically to its ssh connection when it -;; detects that the process "has died". (David Reitter) ;; * How can I interrupt the remote process with a signal ;; (interrupt-process seems not to work)? (Markus Triska) ;; * Avoid the local shell entirely for starting remote processes. If @@ -8552,6 +8570,16 @@ ;; * Keep a second connection open for out-of-band methods like scp or ;; rsync. ;; * Support ptys in `tramp-handle-start-file-process'. +;; * IMHO, it's a drawback that currently Tramp doesn't support +;; Unicode in Dired file names by default. Is it possible to +;; improve Tramp to set LC_ALL to "C" only for commands where Tramp +;; expects English? Or just to set LC_MESSAGES to "C" if Tramp +;; expects only English messages? (Juri Linkov) +;; * Make shadowfile.el grok Tramp filenames. (Bug#4526, Bug#4846) +;; * Do not handle files with drive letter as remote. (Bug#5447) +;; * Load Tramp subpackages only when needed. (Bug#1529, Bug#5448) +;; * Try telnet+curl as new method. It might be useful for busybox, +;; without built-in uuencode/uudecode. ;; Functions for file-name-handler-alist: ;; diff-latest-backup-file -- in diff.el ------------------------------------------------------------ revno: 99397 committer: Glenn Morris branch nick: trunk timestamp: Wed 2010-01-27 21:54:48 -0800 message: * vc-svn.el (vc-svn-update): Use "svn --non-interactive". (Bug#4280) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-01-28 05:19:23 +0000 +++ lisp/ChangeLog 2010-01-28 05:54:48 +0000 @@ -1,5 +1,7 @@ 2010-01-28 Glenn Morris + * vc-svn.el (vc-svn-update): Use "svn --non-interactive". (Bug#4280) + * log-edit.el (log-edit-strip-single-file-name): Add missing :safe, :group, and :version tags. === modified file 'lisp/vc-svn.el' --- lisp/vc-svn.el 2010-01-15 03:54:36 +0000 +++ lisp/vc-svn.el 2010-01-28 05:54:48 +0000 @@ -330,6 +330,7 @@ ;; Check out a particular version (or recreate the file). (vc-file-setprop file 'vc-working-revision nil) (apply 'vc-svn-command nil 0 file + "--non-interactive" ; bug#4280 "update" (cond ((null rev) "-rBASE") ------------------------------------------------------------ revno: 99396 committer: Glenn Morris branch nick: trunk timestamp: Wed 2010-01-27 21:19:23 -0800 message: (log-edit-strip-single-file-name): Add missing :safe, :group, and :version tags. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-01-27 04:00:54 +0000 +++ lisp/ChangeLog 2010-01-28 05:19:23 +0000 @@ -1,3 +1,8 @@ +2010-01-28 Glenn Morris + + * log-edit.el (log-edit-strip-single-file-name): Add missing + :safe, :group, and :version tags. + 2010-01-27 Stephen Berman * calendar/diary-lib.el (diary-unhide-everything): Handle narrowed === modified file 'lisp/log-edit.el' --- lisp/log-edit.el 2010-01-13 08:35:10 +0000 +++ lisp/log-edit.el 2010-01-28 05:19:23 +0000 @@ -1,7 +1,7 @@ ;;; log-edit.el --- Major mode for editing CVS commit messages -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +;; 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: Stefan Monnier ;; Keywords: pcl-cvs cvs commit log @@ -150,7 +150,10 @@ (defcustom log-edit-strip-single-file-name t "If non-nil, remove file name from single-file log entries." - :type 'boolean) + :type 'boolean + :safe 'booleanp + :group 'log-edit + :version "23.2") (defvar cvs-changelog-full-paragraphs t) (make-obsolete-variable 'cvs-changelog-full-paragraphs ------------------------------------------------------------ revno: 99395 committer: Glenn Morris branch nick: trunk timestamp: Wed 2010-01-27 21:15:52 -0800 message: Add some details of bzr's --fixes option. diff: === modified file 'admin/notes/bugtracker' --- admin/notes/bugtracker 2010-01-27 04:12:26 +0000 +++ admin/notes/bugtracker 2010-01-28 05:15:52 +0000 @@ -178,7 +178,7 @@ headers: X-Emacs-PR-Message: cc-closed 123 -Mail-Followup-To: 123@debbugs.gnu.org, ... +Mail-Followup-To: 123@debbugs.gnu.org, person-who-closed (This is Emacs-specific. Normally the bug list gets the same mail as in 3). @@ -419,13 +419,15 @@ ** Bazaar stuff *** You can use `bzr commit --fixes emacs:123' to mark that a commit fixes -Emacs bug 123. You will first need to add a line to your bazaar.conf -(untested): +Emacs bug 123. You will first need to add a line to your bazaar.conf: bugtracker_emacs_url = http://debbugs.gnu.org/{id} Note that all this does is add some metadata to the commit, it doesn't -actually mark the bug as closed in the tracker. +actually mark the bug as closed in the tracker. There seems to be no +way to see this "metadata" with `bzr log', which is rather poor, but +it will show up as a link in a recent loggerhead installation, or with +some of the graphical frontends to bzr log. ** Gnus-specific voodoo ------------------------------------------------------------ revno: 99394 [merge] committer: Jason Rumney branch nick: trunk timestamp: Thu 2010-01-28 07:21:16 +0800 message: Use Unicode for keyboard input on w32 console. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-01-27 05:28:39 +0000 +++ src/ChangeLog 2010-01-27 13:59:13 +0000 @@ -1,3 +1,8 @@ +2010-01-27 Jason Rumney + + * w32inevt.c (w32_kbd_patch_key): Save the unicode character. + (key_event): Use unicode for characters 128 and higher. + 2010-01-27 Kenichi Handa * regex.c (analyse_first): Fix setting of fastmap for unibyte === modified file 'src/w32inevt.c' --- src/w32inevt.c 2010-01-13 08:35:10 +0000 +++ src/w32inevt.c 2010-01-27 16:22:16 +0000 @@ -81,6 +81,9 @@ static INPUT_RECORD event_queue[EVENT_QUEUE_SIZE]; static INPUT_RECORD *queue_ptr = event_queue, *queue_end = event_queue; +/* Temporarily store lead byte of DBCS input sequences. */ +static char dbcs_lead = 0; + static int fill_queue (BOOL block) { @@ -253,13 +256,15 @@ keystate, buf, 128, 0); if (isdead > 0) { - char cp[20]; - int cpId; - - GetLocaleInfo (GetThreadLocale (), + char cp[20]; + int cpId; + + event->uChar.UnicodeChar = buf[isdead - 1]; + + GetLocaleInfo (GetThreadLocale (), LOCALE_IDEFAULTANSICODEPAGE, cp, 20); - cpId = atoi (cp); - isdead = WideCharToMultiByte (cpId, 0, buf, isdead, + cpId = atoi (cp); + isdead = WideCharToMultiByte (cpId, 0, buf, isdead, ansi_code, 4, NULL, NULL); } else @@ -425,8 +430,6 @@ if (lispy_function_keys[event->wVirtualKeyCode] == 0) { - emacs_ev->kind = ASCII_KEYSTROKE_EVENT; - if (!NILP (Vw32_recognize_altgr) && (event->dwControlKeyState & LEFT_CTRL_PRESSED) && (event->dwControlKeyState & RIGHT_ALT_PRESSED)) @@ -461,9 +464,65 @@ else if (event->uChar.AsciiChar == 0) w32_kbd_patch_key (event); } + if (event->uChar.AsciiChar == 0) - return 0; - emacs_ev->code = event->uChar.AsciiChar; + { + emacs_ev->kind = NO_EVENT; + return 0; + } + else if (event->uChar.AsciiChar > 0 && event->uChar.AsciiChar < 128) + { + emacs_ev->kind = ASCII_KEYSTROKE_EVENT; + emacs_ev->code = event->uChar.AsciiChar; + } + else if (event->uChar.UnicodeChar > 0) + { + emacs_ev->kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT; + emacs_ev->code = event->uChar.UnicodeChar; + } + else + { + /* Fallback for non-Unicode versions of Windows. */ + wchar_t code; + char dbcs[2]; + char cp[20]; + int cpId; + + /* Get the codepage to interpret this key with. */ + GetLocaleInfo (GetThreadLocale (), + LOCALE_IDEFAULTANSICODEPAGE, cp, 20); + cpId = atoi (cp); + + dbcs[0] = dbcs_lead; + dbcs[1] = event->uChar.AsciiChar; + if (dbcs_lead) + { + dbcs_lead = 0; + if (!MultiByteToWideChar (cpId, 0, dbcs, 2, &code, 1)) + { + /* Garbage */ + DebPrint (("Invalid DBCS sequence: %d %d\n", + dbcs[0], dbcs[1])); + emacs_ev->kind = NO_EVENT; + } + } + else if (IsDBCSLeadByteEx (cpId, dbcs[1])) + { + dbcs_lead = dbcs[1]; + emacs_ev->kind = NO_EVENT; + } + else + { + if (!MultiByteToWideChar (cpId, 0, &dbcs[1], 1, &code, 1)) + { + /* Garbage */ + DebPrint (("Invalid character: %d\n", dbcs[1])); + emacs_ev->kind = NO_EVENT; + } + } + emacs_ev->kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT; + emacs_ev->code = code; + } } else { ------------------------------------------------------------ revno: 99393 [merge] committer: Kenichi Handa branch nick: trunk timestamp: Wed 2010-01-27 14:29:18 +0900 message: Fix src/ChangeLog. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-01-27 05:23:52 +0000 +++ src/ChangeLog 2010-01-27 05:28:39 +0000 @@ -1,7 +1,7 @@ 2010-01-27 Kenichi Handa * regex.c (analyse_first): Fix setting of fastmap for unibyte - pattern string. + pattern string (Bug#4209). 2010-01-27 David De La Harpe Golden ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.