Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 100842. ------------------------------------------------------------ revno: 100842 author: Thierry Volpiatto committer: Chong Yidong branch nick: trunk timestamp: Sat 2010-07-17 17:35:19 -0400 message: Do not set bookmark context for images (Bug#6650). * lisp/image-mode.el (image-bookmark-make-record): Do not set context in an image (Bug#6650). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-17 20:21:51 +0000 +++ lisp/ChangeLog 2010-07-17 21:35:19 +0000 @@ -1,3 +1,8 @@ +2010-07-17 Thierry Volpiatto + + * image-mode.el (image-bookmark-make-record): Do not set context + in an image (Bug#6650). + 2010-07-17 Chong Yidong * simple.el (select-active-region): New function. === modified file 'lisp/image-mode.el' --- lisp/image-mode.el 2010-07-14 15:57:54 +0000 +++ lisp/image-mode.el 2010-07-17 21:35:19 +0000 @@ -522,9 +522,9 @@ (declare-function bookmark-default-handler "bookmark" (bmk)) (defun image-bookmark-make-record () - (nconc (bookmark-make-record-default) - `((image-type . ,image-type) - (handler . image-bookmark-jump)))) + `(,@(bookmark-make-record-default nil 'no-context 0) + (image-type . ,image-type) + (handler . image-bookmark-jump))) ;;;###autoload (defun image-bookmark-jump (bmk) ------------------------------------------------------------ revno: 100841 committer: Chong Yidong branch nick: trunk timestamp: Sat 2010-07-17 16:21:51 -0400 message: Revert 2010-07-14 change to deactivate mark; minor cleanups. * mouse.el (mouse-drag-track): Use select-active-region. * simple.el (select-active-region): New function. (push-mark-command, set-mark, activate-mark) (handle-shift-selection): Use it. (deactivate-mark): Don't check for size of region. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-17 08:44:59 +0000 +++ lisp/ChangeLog 2010-07-17 20:21:51 +0000 @@ -1,3 +1,12 @@ +2010-07-17 Chong Yidong + + * simple.el (select-active-region): New function. + (push-mark-command, set-mark, activate-mark) + (handle-shift-selection): Use it. + (deactivate-mark): Don't check for size of region. + + * mouse.el (mouse-drag-track): Use select-active-region. + 2010-07-17 Michael Albinus * net/tramp.el (tramp-get-ls-command-with-dired): Make test for === modified file 'lisp/mouse.el' --- lisp/mouse.el 2010-07-17 02:49:48 +0000 +++ lisp/mouse.el 2010-07-17 20:21:51 +0000 @@ -1027,9 +1027,7 @@ ;; For `select-active-regions' non-nil, ensure that ;; further alterations of the region (e.g. via ;; shift-selection) continue to update PRIMARY. - (and select-active-regions - (display-selections-p) - (x-set-selection 'PRIMARY (current-buffer)))) + (select-active-region)) ;; If point hasn't moved, run the binding of the ;; terminating up-event. === modified file 'lisp/simple.el' --- lisp/simple.el 2010-07-17 02:49:48 +0000 +++ lisp/simple.el 2010-07-17 20:21:51 +0000 @@ -3687,7 +3687,6 @@ mark-active (display-selections-p) (x-selection-owner-p 'PRIMARY) - (not (eq (region-beginning) (region-end))) (x-set-selection 'PRIMARY (buffer-substring-no-properties (region-beginning) (region-end)))) (if (and (null force) @@ -3708,9 +3707,13 @@ (setq mark-active t) (unless transient-mark-mode (setq transient-mark-mode 'lambda)) - (when (and select-active-regions - (display-selections-p)) - (x-set-selection 'PRIMARY (current-buffer))))) + (select-active-region))) + +(defsubst select-active-region () + "Set the PRIMARY X selection if `select-active-regions' is non-nil." + (and select-active-regions + (display-selections-p) + (x-set-selection 'PRIMARY (current-buffer)))) (defun set-mark (pos) "Set this buffer's mark to POS. Don't use this function! @@ -3733,9 +3736,7 @@ (progn (setq mark-active t) (run-hooks 'activate-mark-hook) - (when (and select-active-regions - (display-selections-p)) - (x-set-selection 'PRIMARY (current-buffer))) + (select-active-region) (set-marker (mark-marker) pos (current-buffer))) ;; Normally we never clear mark-active except in Transient Mark mode. ;; But when we actually clear out the mark value too, we must @@ -3819,8 +3820,7 @@ (push-mark nil nomsg t) (setq mark-active t) (run-hooks 'activate-mark-hook) - (and select-active-regions (display-selections-p) - (x-set-selection 'PRIMARY (current-buffer))) + (select-active-region) (unless nomsg (message "Mark activated"))))) @@ -4008,9 +4008,12 @@ deactivate it, and restore the variable `transient-mark-mode' to its earlier value." (cond ((and shift-select-mode this-command-keys-shift-translated) - (unless (and mark-active - (eq (car-safe transient-mark-mode) 'only)) - (setq transient-mark-mode + (if (and mark-active + (eq (car-safe transient-mark-mode) 'only)) + ;; Another program may have grabbed the selection; make + ;; sure we get it back now. + (select-active-region) + (setq transient-mark-mode (cons 'only (unless (eq transient-mark-mode 'lambda) transient-mark-mode))) ------------------------------------------------------------ revno: 100840 committer: Chong Yidong branch nick: trunk timestamp: Sat 2010-07-17 14:34:44 -0400 message: * frame.c (make_initial_frame): Use set_menu_bar_lines (Bug#6660). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-07-17 16:03:16 +0000 +++ src/ChangeLog 2010-07-17 18:34:44 +0000 @@ -1,3 +1,7 @@ +2010-07-17 Chong Yidong + + * frame.c (make_initial_frame): Use set_menu_bar_lines (Bug#6660). + 2010-07-17 Jan Djärv * gtkutil.c (xg_event_is_for_menubar): Also check that event window === modified file 'src/frame.c' --- src/frame.c 2010-07-10 19:01:01 +0000 +++ src/frame.c 2010-07-17 18:34:44 +0000 @@ -553,7 +553,9 @@ FRAME_CAN_HAVE_SCROLL_BARS (f) = 0; FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_none; - FRAME_MENU_BAR_LINES(f) = NILP (Vmenu_bar_mode) ? 0 : 1; + + /* The default value of menu-bar-mode is t. */ + set_menu_bar_lines (f, make_number (1), Qnil); #ifdef CANNOT_DUMP if (!noninteractive) ------------------------------------------------------------ revno: 100839 committer: Jan D branch nick: trunk timestamp: Sat 2010-07-17 18:03:16 +0200 message: * gtkutil.c (xg_frame_resized): GTK_IS_MAPPED => gtk_widget_get_mapped, for Gtk 3.0 diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-07-17 14:41:10 +0000 +++ src/ChangeLog 2010-07-17 16:03:16 +0000 @@ -2,6 +2,7 @@ * gtkutil.c (xg_event_is_for_menubar): Also check that event window is related to the menu bar (Bug#6499). + (xg_frame_resized): GTK_IS_MAPPED => gtk_widget_get_mapped, for Gtk 3.0 2010-07-16 Jan Djärv === modified file 'src/gtkutil.c' --- src/gtkutil.c 2010-07-17 14:41:10 +0000 +++ src/gtkutil.c 2010-07-17 16:03:16 +0000 @@ -2898,7 +2898,7 @@ for (iter = list ; iter; iter = g_list_next (iter)) { GtkWidget *w = GTK_WIDGET (iter->data); - if (GTK_WIDGET_MAPPED (w) && gtk_widget_intersect (w, &rec, NULL)) + if (gtk_widget_get_mapped (w) && gtk_widget_intersect (w, &rec, NULL)) break; } g_list_free (list); ------------------------------------------------------------ revno: 100838 [merge] committer: Chong Yidong branch nick: trunk timestamp: Sat 2010-07-17 10:43:41 -0400 message: Merge latest fix to xg_event_is_for_menubar. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-07-17 11:38:31 +0000 +++ src/ChangeLog 2010-07-17 14:41:10 +0000 @@ -1,3 +1,8 @@ +2010-07-17 Jan Djärv + + * gtkutil.c (xg_event_is_for_menubar): Also check that event window + is related to the menu bar (Bug#6499). + 2010-07-16 Jan Djärv * xterm.h (x_menubar_window_to_frame): Second parameter is XEvent*. === modified file 'src/gtkutil.c' --- src/gtkutil.c 2010-07-16 15:42:15 +0000 +++ src/gtkutil.c 2010-07-17 14:41:10 +0000 @@ -2860,6 +2860,13 @@ xg_event_is_for_menubar (FRAME_PTR f, XEvent *event) { struct x_output *x = f->output_data.x; + GList *iter; + GdkRectangle rec; + GList *list; + GdkDisplay *gdpy; + GdkWindow *gw; + GdkEvent gevent; + GtkWidget *gwdesc; if (! x->menubar_widget) return 0; @@ -2870,14 +2877,24 @@ && event->xbutton.same_screen)) return 0; - GList *list = gtk_container_get_children (GTK_CONTAINER (x->menubar_widget)); + gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f)); + gw = gdk_xid_table_lookup_for_display (gdpy, event->xbutton.window); + if (! gw) return 0; + gevent.any.window = gw; + gwdesc = gtk_get_event_widget (&gevent); + if (! gwdesc) return 0; + if (! GTK_IS_MENU_BAR (gwdesc) + && ! GTK_IS_MENU_ITEM (gwdesc) + && ! gtk_widget_is_ancestor (x->menubar_widget, gwdesc)) + return 0; + + list = gtk_container_get_children (GTK_CONTAINER (x->menubar_widget)); if (! list) return 0; - GList *iter; - GdkRectangle rec; rec.x = event->xbutton.x; rec.y = event->xbutton.y; rec.width = 1; rec.height = 1; + for (iter = list ; iter; iter = g_list_next (iter)) { GtkWidget *w = GTK_WIDGET (iter->data); ------------------------------------------------------------ revno: 100837 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2010-07-17 13:38:31 +0200 message: src/ChangeLog: Fix typos and dates. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-07-16 15:42:15 +0000 +++ src/ChangeLog 2010-07-17 11:38:31 +0000 @@ -1,4 +1,4 @@ -2010-07-14 Jan Djärv +2010-07-16 Jan Djärv * xterm.h (x_menubar_window_to_frame): Second parameter is XEvent*. @@ -15,7 +15,7 @@ * gtkutil.c (xg_event_is_for_menubar): New function (Bug#6499). -2010-07-14 Eli Zaretskii +2010-07-16 Eli Zaretskii * w32fns.c (x_set_foreground_color): Fix setting the cursor color when it's the same as the old foreground. (Bug#6609) @@ -55,8 +55,8 @@ (prepare_menu_bars): Remove setting of pending_menu_activation. * xmenu.c (pending_menu_activation): Remove. - (x_activate_menubar): Set popup_activated_flag for Xt also. Remove - setting of pending_menu_activation. + (x_activate_menubar): Set popup_activated_flag for Xt also. + Remove setting of pending_menu_activation. (set_frame_menubar): Remove check of pending_menu_activation. Declare menubar_size before code. Correct spelling in comment. @@ -1164,7 +1164,7 @@ * nsterm.m (ns_draw_fringe_bitmap): Likewise. * fringe.c (draw_fringe_bitmap_1): Don't clip bitmap here. - Take account of bitmap offset. + Take account of bitmap offset. (draw_window_fringes): Take account of window vscroll. (update_window_fringes): Likewise. Extend top-aligned top indicator or bottom-aligned bottom indicator to adjacent rows if it doesn't fit ------------------------------------------------------------ revno: 100836 committer: Michael Albinus branch nick: trunk timestamp: Sat 2010-07-17 11:42:59 +0200 message: * tramp.texi (Inline methods): Remove remark about doubled "-t" argument. (Frequently Asked Questions): Recommend "sshx" and "scpx" for echoing shells. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2010-07-10 18:52:53 +0000 +++ doc/misc/ChangeLog 2010-07-17 09:42:59 +0000 @@ -1,3 +1,10 @@ +2010-07-17 Michael Albinus + + * tramp.texi (Inline methods): Remove remark about doubled "-t" + argument. + (Frequently Asked Questions): Recommend "sshx" and "scpx" for + echoing shells. + 2010-07-10 Michael Albinus * tramp.texi (Inline methods): Remove "kludgy" phrase. === modified file 'doc/misc/tramp.texi' --- doc/misc/tramp.texi 2010-07-10 18:52:53 +0000 +++ doc/misc/tramp.texi 2010-07-17 09:42:59 +0000 @@ -693,8 +693,6 @@ invoked from an @value{emacsname} buffer, tells them that it is not allocating a pseudo tty. When this happens, the login shell is wont to not print any shell prompt, which confuses @value{tramp} mightily. -For reasons unknown, some Windows ports for @command{ssh} require the -doubled @samp{-t} option. This supports the @samp{-p} argument. @@ -2803,7 +2801,7 @@ @item @value{tramp} does not connect to the remote host -When @value{tramp} does not connect to the remote host, there are two +When @value{tramp} does not connect to the remote host, there are three reasons heading the bug mailing list: @itemize @minus @@ -2838,6 +2836,17 @@ @end example @item +Echoed characters after login + +When the remote machine opens an echoing shell, there might be control +characters in the welcome message. @value{tramp} tries to suppress +such echoes via the @code{stty -echo} command, but sometimes this +command is not reached, because the echoed output has confused +@value{tramp} already. In such situations it might be helpful to use +the @option{sshx} or @option{scpx} methods, which allocate a pseudo tty. +@xref{Inline methods}. + +@item @value{tramp} doesn't transfer strings with more than 500 characters correctly ------------------------------------------------------------ revno: 100835 committer: Michael Albinus branch nick: trunk timestamp: Sat 2010-07-17 10:44:59 +0200 message: * net/tramp.el (tramp-get-ls-command-with-dired): Make test for "--dired" stronger. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-17 02:49:48 +0000 +++ lisp/ChangeLog 2010-07-17 08:44:59 +0000 @@ -1,3 +1,8 @@ +2010-07-17 Michael Albinus + + * net/tramp.el (tramp-get-ls-command-with-dired): Make test for + "--dired" stronger. + 2010-07-17 Chong Yidong * term/x-win.el (x-select-enable-primary): Change default to nil. === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2010-07-16 12:09:55 +0000 +++ lisp/net/tramp.el 2010-07-17 08:44:59 +0000 @@ -1037,6 +1037,7 @@ ;; Solaris: /usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin ;; GNU/Linux (Debian, Suse): /bin:/usr/bin ;; FreeBSD: /usr/bin:/bin:/usr/sbin:/sbin: - beware trailing ":"! +;; IRIX64: /usr/bin (defcustom tramp-remote-path '(tramp-default-remote-path "/usr/sbin" "/usr/local/bin" "/local/bin" "/local/freeware/bin" "/local/gnu/bin" @@ -8335,8 +8336,11 @@ (save-match-data (with-connection-property vec "ls-dired" (tramp-message vec 5 "Checking, whether `ls --dired' works") + ;; Some "ls" versions are sensible wrt the order of arguments, + ;; they fail when "-al" is after the "--dired" argument (for + ;; example on FreeBSD). (zerop (tramp-send-command-and-check - vec (format "%s --dired /" (tramp-get-ls-command vec))))))) + vec (format "%s --dired -al /" (tramp-get-ls-command vec))))))) (defun tramp-get-test-command (vec) (with-connection-property vec "test" @@ -8936,7 +8940,6 @@ ;; without built-in uuencode/uudecode. ;; * Let `shell-dynamic-complete-*' and `comint-dynamic-complete' work ;; on remote hosts. -;; * Use secrets.el for password handling. ;; * Load ~/.emacs_SHELLNAME on the remote host for `shell'. ;; Functions for file-name-handler-alist: ------------------------------------------------------------ revno: 100834 committer: Chong Yidong branch nick: trunk timestamp: Fri 2010-07-16 22:49:48 -0400 message: Change x-select-enable-primary to nil. * lisp/mouse.el (mouse-drag-copy-region): * lisp/simple.el (select-active-regions): Likewise. * lisp/term/x-win.el (x-select-enable-primary): Change default to nil. (x-select-enable-clipboard): Add :version keyword. diff: === modified file 'etc/NEWS' --- etc/NEWS 2010-07-14 18:03:39 +0000 +++ etc/NEWS 2010-07-17 02:49:48 +0000 @@ -183,6 +183,8 @@ *** `x-select-enable-clipboard' now defaults to t. +*** `x-select-enable-primary' now defaults to nil. + *** `mouse-drag-copy-region' now defaults to nil. *** `mouse-2' is now bound to `mouse-yank-primary'. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-16 15:42:15 +0000 +++ lisp/ChangeLog 2010-07-17 02:49:48 +0000 @@ -1,3 +1,11 @@ +2010-07-17 Chong Yidong + + * term/x-win.el (x-select-enable-primary): Change default to nil. + (x-select-enable-clipboard): Add :version keyword. + + * mouse.el (mouse-drag-copy-region): + * simple.el (select-active-regions): Likewise. + 2010-07-16 Reiner Steib * vc.el (vc-coding-system-inherit-eol): New defvar. === modified file 'lisp/mouse.el' --- lisp/mouse.el 2010-07-14 18:03:39 +0000 +++ lisp/mouse.el 2010-07-17 02:49:48 +0000 @@ -44,7 +44,7 @@ (defcustom mouse-drag-copy-region nil "If non-nil, mouse drag copies region to kill-ring." :type 'boolean - :version "22.1" + :version "24.1" :group 'mouse) (defcustom mouse-1-click-follows-link 450 === modified file 'lisp/simple.el' --- lisp/simple.el 2010-07-16 15:42:15 +0000 +++ lisp/simple.el 2010-07-17 02:49:48 +0000 @@ -3670,7 +3670,7 @@ "If non-nil, an active region automatically becomes the window selection." :type 'boolean :group 'killing - :version "23.1") + :version "24.1") (declare-function x-selection-owner-p "xselect.c" (&optional selection)) === modified file 'lisp/term/x-win.el' --- lisp/term/x-win.el 2010-07-14 18:03:39 +0000 +++ lisp/term/x-win.el 2010-07-17 02:49:48 +0000 @@ -1223,12 +1223,14 @@ "Non-nil means cutting and pasting uses the clipboard. This is in addition to, but in preference to, the primary selection." :type 'boolean - :group 'killing) + :group 'killing + :version "24.1") -(defcustom x-select-enable-primary t +(defcustom x-select-enable-primary nil "Non-nil means cutting and pasting uses the primary selection." :type 'boolean - :group 'killing) + :group 'killing + :version "24.1") (defun x-select-text (text &optional push) "Select TEXT, a string, according to the window system. ------------------------------------------------------------ revno: 100833 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2010-07-17 01:42:11 +0200 message: lisp/mail/rmail.el: Update autoload checksum. diff: === modified file 'lisp/mail/rmail.el' --- lisp/mail/rmail.el 2010-03-28 13:04:11 +0000 +++ lisp/mail/rmail.el 2010-07-16 23:42:11 +0000 @@ -4291,7 +4291,7 @@ ;;;*** -;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "93033f2136fcd111e2b52a116ff4cf29") +;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "4a7502b4aeb3bd5f2111b48cc6512924") ;;; Generated autoloads from rmailmm.el (autoload 'rmail-mime "rmailmm" "\ ------------------------------------------------------------ revno: 100832 [merge] committer: Chong Yidong branch nick: trunk timestamp: Fri 2010-07-16 11:45:58 -0400 message: Merge changes from emacs-23 branch. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-16 12:09:55 +0000 +++ lisp/ChangeLog 2010-07-16 15:42:15 +0000 @@ -1,3 +1,15 @@ +2010-07-16 Reiner Steib + + * vc.el (vc-coding-system-inherit-eol): New defvar. + (vc-coding-system-for-diff): Use it to decide whether to inherit + from the file the EOL format for reading the diffs of that file. + (Bug#4451) + +2010-07-16 Eli Zaretskii + + * mail/rmailmm.el (rmail-mime-save): Make the temp buffer + unibyte, so compressed attachments are not compressed again. + 2010-07-16 Michael Albinus * net/tramp.el (tramp-handle-shell-command): Don't use hard-wired @@ -22,6 +34,11 @@ * bookmark.el (bookmark-load-hook): Fix doc string as suggested by Drew Adams (Bug#5504). +2010-07-14 Jan Djärv + + * xt-mouse.el (xterm-mouse-event-read): Fix for characters > 127 + now that unicode is used (Bug#6594). + 2010-07-14 Chong Yidong * term/x-win.el (x-select-enable-clipboard): Default to t. @@ -120,6 +137,20 @@ * net/tramp-gvfs.el (tramp-gvfs-handle-copy-file): Do not pass empty argument to gvfs-copy. +2010-07-10 Glenn Morris + + * calendar/calendar.el (calendar-week-end-day): New function. + * calendar/cal-tex.el (cal-tex-cursor-month): Remove unused vars. + Respect calendar-week-start-day. (Bug#6606) + (cal-tex-insert-day-names, cal-tex-insert-blank-days) + (cal-tex-insert-blank-days-at-end): Respect calendar-week-start-day. + (cal-tex-first-blank-p, cal-tex-last-blank-p): Simplify, and + respect calendar-week-start-day. + +2010-07-10 Chong Yidong + + * simple.el (use-region-p): Doc fix (Bug#6607). + 2010-07-10 Aleksei Gusev (tiny change) * progmodes/compile.el (compilation-error-regexp-alist-alist): Add === modified file 'lisp/calendar/cal-tex.el' --- lisp/calendar/cal-tex.el 2010-03-22 16:50:29 +0000 +++ lisp/calendar/cal-tex.el 2010-07-10 23:34:57 +0000 @@ -1,7 +1,7 @@ ;;; cal-tex.el --- calendar functions for printing calendars with LaTeX -;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, +;; 2009, 2010 Free Software Foundation, Inc. ;; Author: Steve Fisk ;; Edward M. Reingold @@ -507,6 +507,7 @@ (year (calendar-extract-year date)) (end-month month) (end-year year) + ;; FIXME -landscape sets cal-tex-which-days? (d1 (calendar-absolute-from-gregorian (list month 1 year))) (d2 (progn (calendar-increment-month end-month end-year (1- n)) @@ -515,8 +516,7 @@ (calendar-last-day-of-month end-month end-year) end-year)))) (diary-list (if cal-tex-diary (cal-tex-list-diary-entries d1 d2))) - (holidays (if cal-tex-holidays (cal-tex-list-holidays d1 d2))) - other-month other-year) + (holidays (if cal-tex-holidays (cal-tex-list-holidays d1 d2)))) (cal-tex-insert-preamble (cal-tex-number-weeks month year n) nil "12pt") (if (> n 1) (cal-tex-cmd cal-tex-cal-multi-month) @@ -526,14 +526,12 @@ (cal-tex-nl ".2cm") (cal-tex-insert-blank-days month year cal-tex-day-prefix) (dotimes (idummy n) - (setq other-month month - other-year year) (cal-tex-insert-days month year diary-list holidays cal-tex-day-prefix) - (when (= 6 (mod (calendar-absolute-from-gregorian - (list month - (calendar-last-day-of-month month year) - year)) - 7)) ; last day of month was Saturday + (when (= (calendar-week-end-day) + (calendar-day-of-week + (list month + (calendar-last-day-of-month month year) + year))) ; last day of month was last day of week (cal-tex-hfill) (cal-tex-nl)) (calendar-increment-month month year 1)) @@ -570,13 +568,14 @@ (defun cal-tex-insert-day-names () "Insert the names of the days at top of a monthly calendar." - (dotimes (i 7) - (if (memq i cal-tex-which-days) - (insert (format cal-tex-day-name-format - (cal-tex-LaTeXify-string - (aref calendar-day-name-array - (mod (+ calendar-week-start-day i) 7)))))) - (cal-tex-comment))) + (let (j) + (dotimes (i 7) + (if (memq (setq j (mod (+ calendar-week-start-day i) 7)) + cal-tex-which-days) + (insert (format cal-tex-day-name-format + (cal-tex-LaTeXify-string + (aref calendar-day-name-array j))))) + (cal-tex-comment)))) (defun cal-tex-insert-month-header (n month year end-month end-year) "Create a title for a calendar. @@ -603,7 +602,7 @@ calendar-week-start-day) 7))) (dotimes (i blank-days) - (if (memq i cal-tex-which-days) + (if (memq (mod (+ calendar-week-start-day i) 7) cal-tex-which-days) (insert (format day-format " " " ") "{}{}{}{}%\n")))))) (defun cal-tex-insert-blank-days-at-end (month year day-format) @@ -619,38 +618,37 @@ 7)) (i blank-days)) (while (<= (setq i (1+ i)) 6) - (if (memq i cal-tex-which-days) + (if (memq (mod (+ calendar-week-start-day i) 7) cal-tex-which-days) (insert (format day-format "" "") "{}{}{}{}%\n")))))) (defun cal-tex-first-blank-p (month year) "Determine if any days of the first week will be printed. Return t if there will there be any days of the first week printed in the calendar starting in MONTH YEAR." - (let (any-days the-saturday) ; the day of week of 1st Saturday - (dotimes (i 7) - (if (= 6 (calendar-day-of-week (list month (1+ i) year))) - (setq the-saturday (1+ i)))) - (dotimes (i the-saturday) - (if (memq (calendar-day-of-week (list month (1+ i) year)) - cal-tex-which-days) - (setq any-days t))) - any-days)) + ;; Check days 1-7 of the month, until we find the last day of the week. + (catch 'found + (let (dow) + (dotimes (i 7) + (if (memq (setq dow (calendar-day-of-week (list month (1+ i) year))) + cal-tex-which-days) + (throw 'found t) + (if (= dow (calendar-week-end-day)) (throw 'found nil))))))) (defun cal-tex-last-blank-p (month year) "Determine if any days of the last week will be printed. Return t if there will there be any days of the last week printed in the calendar starting in MONTH YEAR." - (let* ((last-day (calendar-last-day-of-month month year)) - (i (- last-day 7)) - any-days the-sunday) ; the day of week of last Sunday - (while (<= (setq i (1+ i)) last-day) - (if (zerop (calendar-day-of-week (list month i year))) - (setq the-sunday i))) - (setq i (1- the-sunday)) - (while (<= (setq i (1+ i)) last-day) - (if (memq (calendar-day-of-week (list month i year)) cal-tex-which-days) - (setq any-days t))) - any-days)) + ;; Check backwards from the last day of the month, until we find the + ;; start of the last week in the month. + (catch 'found + (let ((last-day (calendar-last-day-of-month month year)) + day dow) + (dotimes (i 7) + (if (memq (setq dow (calendar-day-of-week + (list month (- last-day i) year))) + cal-tex-which-days) + (throw 'found t) + (if (= dow calendar-week-start-day) (throw 'found nil))))))) (defun cal-tex-number-weeks (month year n) "Determine the number of weeks in a range of dates. @@ -1499,7 +1497,7 @@ (- (calendar-day-of-week (list month 1 year)) calendar-week-start-day) 7)) - (last (calendar-last-day-of-month month year)) + (last( calendar-last-day-of-month month year)) (str (concat "\\def\\" name "{\\hbox to" width "{%\n" "\\vbox to" height "{%\n" "\\vfil \\hbox to" width "{%\n" === modified file 'lisp/calendar/calendar.el' --- lisp/calendar/calendar.el 2010-01-13 08:35:10 +0000 +++ lisp/calendar/calendar.el 2010-07-10 23:34:57 +0000 @@ -2226,6 +2226,10 @@ interpreted as BC; -1 being 1 BC, and so on." (mod (calendar-absolute-from-gregorian date) 7)) +(defun calendar-week-end-day () + "Return the index (0 for Sunday, etc.) of the last day of the week." + (mod (+ calendar-week-start-day 6) 7)) + (defun calendar-unmark () "Delete all diary/holiday marks/highlighting from the calendar." (interactive) === modified file 'lisp/mail/rmailmm.el' --- lisp/mail/rmailmm.el 2010-01-22 16:43:54 +0000 +++ lisp/mail/rmailmm.el 2010-07-16 09:59:37 +0000 @@ -112,6 +112,10 @@ (file-name-as-directory filename)))) (with-temp-buffer (set-buffer-file-coding-system 'no-conversion) + ;; Needed e.g. by jka-compr, so if the attachment is a compressed + ;; file, the magic signature compares equal with the unibyte + ;; signature string recorded in jka-compr-compression-info-list. + (set-buffer-multibyte nil) (insert data) (write-region nil nil filename nil nil nil t)))) === modified file 'lisp/simple.el' --- lisp/simple.el 2010-07-14 18:03:39 +0000 +++ lisp/simple.el 2010-07-16 15:42:15 +0000 @@ -3761,10 +3761,9 @@ This is used by commands that act specially on the region under Transient Mark mode. -The return value is t provided Transient Mark mode is enabled and -the mark is active; and, when `use-empty-active-region' is -non-nil, provided the region is empty. Otherwise, the return -value is nil. +The return value is t if Transient Mark mode is enabled and the +mark is active; furthermore, if `use-empty-active-region' is nil, +the region must not be empty. Otherwise, the return value is nil. For some commands, it may be appropriate to ignore the value of `use-empty-active-region'; in that case, use `region-active-p'." === modified file 'lisp/vc/vc.el' --- lisp/vc/vc.el 2010-07-10 18:52:53 +0000 +++ lisp/vc/vc.el 2010-07-16 15:42:15 +0000 @@ -1437,6 +1437,16 @@ ;; (vc-call-backend ',(vc-backend f) ;; 'diff (list ',f) ',rev1 ',rev2)))))) +(defvar vc-coding-system-inherit-eol t + "When non-nil, inherit the EOL format for reading Diff output from the file. + +Used in `vc-coding-system-for-diff' to determine the EOL format to use +for reading Diff output for a file. If non-nil, the EOL format is +inherited from the file itself. +Set this variable to nil if your Diff tool might use a different +EOL. Then Emacs will auto-detect the EOL format in Diff output, which +gives better results.") ;; Cf. bug#4451. + (defun vc-coding-system-for-diff (file) "Return the coding system for reading diff output for FILE." (or coding-system-for-read @@ -1444,7 +1454,12 @@ ;; use the buffer's coding system (let ((buf (find-buffer-visiting file))) (when buf (with-current-buffer buf - buffer-file-coding-system))) + (if vc-coding-system-inherit-eol + buffer-file-coding-system + ;; Don't inherit the EOL part of the coding-system, + ;; because some Diff tools may choose to use + ;; a different one. bug#4451. + (coding-system-base buffer-file-coding-system))))) ;; otherwise, try to find one based on the file name (car (find-operation-coding-system 'insert-file-contents file)) ;; and a final fallback === modified file 'lisp/xt-mouse.el' --- lisp/xt-mouse.el 2010-01-13 08:35:10 +0000 +++ lisp/xt-mouse.el 2010-07-14 17:53:42 +0000 @@ -122,8 +122,8 @@ ;; read xterm sequences above ascii 127 (#x7f) (defun xterm-mouse-event-read () (let ((c (read-char))) - (if (< c 0) - (+ c #x8000000 128) + (if (> c #x3FFF80) + (+ 128 (- c #x3FFF80)) c))) (defun xterm-mouse-truncate-wrap (f) === modified file 'src/ChangeLog' --- src/ChangeLog 2010-07-16 07:50:37 +0000 +++ src/ChangeLog 2010-07-16 15:42:15 +0000 @@ -1,3 +1,25 @@ +2010-07-14 Jan Djärv + + * xterm.h (x_menubar_window_to_frame): Second parameter is XEvent*. + + * xterm.c (handle_one_xevent): Pass event to x_menubar_window_to_frame. + + * xmenu.c (x_activate_menubar): Revert previous fix for Bug#6499, + i.e. don't put back ButtonRelease (Bug#6608). + + * xfns.c (x_menubar_window_to_frame): Take XEvent as second parameter + instead of Window. Call xg_event_is_for_menubar when + USE_GTK (Bug#6499). + + * gtkutil.h (xg_event_is_for_menubar): Declare. + + * gtkutil.c (xg_event_is_for_menubar): New function (Bug#6499). + +2010-07-14 Eli Zaretskii + + * w32fns.c (x_set_foreground_color): Fix setting the cursor color + when it's the same as the old foreground. (Bug#6609) + 2010-07-16 Jan Djärv * xmenu.c (free_frame_menubar): Only call x_set_window_size if === modified file 'src/gtkutil.c' --- src/gtkutil.c 2010-07-12 17:47:17 +0000 +++ src/gtkutil.c 2010-07-16 15:42:15 +0000 @@ -2856,6 +2856,38 @@ } } +int +xg_event_is_for_menubar (FRAME_PTR f, XEvent *event) +{ + struct x_output *x = f->output_data.x; + + if (! x->menubar_widget) return 0; + + if (! (event->xbutton.x >= 0 + && event->xbutton.x < FRAME_PIXEL_WIDTH (f) + && event->xbutton.y >= 0 + && event->xbutton.y < f->output_data.x->menubar_height + && event->xbutton.same_screen)) + return 0; + + GList *list = gtk_container_get_children (GTK_CONTAINER (x->menubar_widget)); + if (! list) return 0; + GList *iter; + GdkRectangle rec; + rec.x = event->xbutton.x; + rec.y = event->xbutton.y; + rec.width = 1; + rec.height = 1; + for (iter = list ; iter; iter = g_list_next (iter)) + { + GtkWidget *w = GTK_WIDGET (iter->data); + if (GTK_WIDGET_MAPPED (w) && gtk_widget_intersect (w, &rec, NULL)) + break; + } + g_list_free (list); + return iter == 0 ? 0 : 1; +} + /*********************************************************************** === modified file 'src/gtkutil.h' --- src/gtkutil.h 2010-07-02 09:26:33 +0000 +++ src/gtkutil.h 2010-07-16 15:42:15 +0000 @@ -153,6 +153,8 @@ extern int xg_update_frame_menubar (FRAME_PTR f); +extern int xg_event_is_for_menubar (FRAME_PTR f, XEvent *event); + extern int xg_have_tear_offs (void); extern int xg_get_scroll_id_for_window (Display *dpy, Window wid); === modified file 'src/w32fns.c' --- src/w32fns.c 2010-07-10 18:52:53 +0000 +++ src/w32fns.c 2010-07-16 15:42:15 +0000 @@ -1333,7 +1333,10 @@ if (FRAME_W32_WINDOW (f) != 0) { if (x->cursor_pixel == old_fg) - x->cursor_pixel = fg; + { + x->cursor_pixel = fg; + x->cursor_gc->background = fg; + } update_face_from_frame_parameter (f, Qforeground_color, arg); if (FRAME_VISIBLE_P (f)) === modified file 'src/xfns.c' --- src/xfns.c 2010-07-12 19:56:46 +0000 +++ src/xfns.c 2010-07-16 15:42:15 +0000 @@ -398,8 +398,9 @@ /* Likewise, but consider only the menu bar widget. */ struct frame * -x_menubar_window_to_frame (struct x_display_info *dpyinfo, int wdesc) +x_menubar_window_to_frame (struct x_display_info *dpyinfo, XEvent *event) { + Window wdesc = event->xany.window; Lisp_Object tail, frame; struct frame *f; struct x_output *x; @@ -415,21 +416,11 @@ if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo) continue; x = f->output_data.x; +#ifdef USE_GTK + if (x->menubar_widget && xg_event_is_for_menubar (f, event)) + return f; +#else /* Match if the window is this frame's menubar. */ -#ifdef USE_GTK - if (x->menubar_widget) - { - GtkWidget *gwdesc = xg_win_to_widget (dpyinfo->display, wdesc); - - /* This gives false positives, but the rectangle check in xterm.c - where this is called takes care of that. */ - if (gwdesc != 0 - && (gwdesc == x->menubar_widget - || gtk_widget_is_ancestor (x->menubar_widget, gwdesc) - || gtk_widget_is_ancestor (gwdesc, x->menubar_widget))) - return f; - } -#else if (x->menubar_widget && lw_window_is_in_menubar (wdesc, x->menubar_widget)) return f; === modified file 'src/xmenu.c' --- src/xmenu.c 2010-07-16 07:50:37 +0000 +++ src/xmenu.c 2010-07-16 15:42:15 +0000 @@ -664,14 +664,6 @@ BLOCK_INPUT; popup_activated_flag = 1; #ifdef USE_GTK - /* If we click outside any menu item, the menu bar still grabs. - So we send Press and the Release. If outside, grab is released. - If on a menu item, it is popped up normally. - PutBack is like a stack, so we put back in reverse order. */ - f->output_data.x->saved_menu_event->type = ButtonRelease; - XPutBackEvent (f->output_data.x->display_info->display, - f->output_data.x->saved_menu_event); - f->output_data.x->saved_menu_event->type = ButtonPress; XPutBackEvent (f->output_data.x->display_info->display, f->output_data.x->saved_menu_event); #else === modified file 'src/xterm.c' --- src/xterm.c 2010-07-15 21:54:10 +0000 +++ src/xterm.c 2010-07-16 15:42:15 +0000 @@ -6743,7 +6743,7 @@ f->mouse_moved = 0; #if defined (USE_X_TOOLKIT) || defined (USE_GTK) - f = x_menubar_window_to_frame (dpyinfo, event.xbutton.window); + f = x_menubar_window_to_frame (dpyinfo, &event); /* For a down-event in the menu bar, don't pass it to Xt right now. Instead, save it away === modified file 'src/xterm.h' --- src/xterm.h 2010-07-05 10:28:27 +0000 +++ src/xterm.h 2010-07-16 15:42:15 +0000 @@ -381,12 +381,15 @@ #endif /* This checks to make sure we have a display. */ + extern void check_x (void); extern struct frame *x_window_to_frame (struct x_display_info *, int); extern struct frame *x_any_window_to_frame (struct x_display_info *, int); -extern struct frame *x_menubar_window_to_frame (struct x_display_info *, int); +extern struct frame *x_menubar_window_to_frame (struct x_display_info *, + XEvent *); + extern struct frame *x_top_window_to_frame (struct x_display_info *, int); #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) ------------------------------------------------------------ revno: 100831 committer: Michael Albinus branch nick: trunk timestamp: Fri 2010-07-16 14:09:55 +0200 message: * net/tramp.el (tramp-handle-shell-command): Don't use hard-wired "/bin/sh" but `tramp-remote-sh' from `tramp-methods'. (tramp-find-shell): Simplify setting connection property. (tramp-get-ls-command): Make test for "--color=never" stronger. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-15 14:36:27 +0000 +++ lisp/ChangeLog 2010-07-16 12:09:55 +0000 @@ -1,3 +1,10 @@ +2010-07-16 Michael Albinus + + * net/tramp.el (tramp-handle-shell-command): Don't use hard-wired + "/bin/sh" but `tramp-remote-sh' from `tramp-methods'. + (tramp-find-shell): Simplify setting connection property. + (tramp-get-ls-command): Make test for "--color=never" stronger. + 2010-07-15 Simon South * progmodes/delphi.el (delphi-previous-indent-of): Indent case === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2010-06-12 08:59:37 +0000 +++ lisp/net/tramp.el 2010-07-16 12:09:55 +0000 @@ -4683,7 +4683,12 @@ (let* ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command)) ;; We cannot use `shell-file-name' and `shell-command-switch', ;; they are variables of the local host. - (args (list "/bin/sh" "-c" (substring command 0 asynchronous))) + (args (list + (tramp-get-method-parameter + (tramp-file-name-method + (tramp-dissect-file-name default-directory)) + 'tramp-remote-sh) + "-c" (substring command 0 asynchronous))) current-buffer-p (output-buffer (cond @@ -6619,12 +6624,10 @@ (t (tramp-message vec 5 "Remote `%s' groks tilde expansion, good" - (tramp-get-method-parameter - (tramp-file-name-method vec) 'tramp-remote-sh)) - (tramp-set-connection-property - vec "remote-shell" - (tramp-get-method-parameter - (tramp-file-name-method vec) 'tramp-remote-sh)))))))) + (tramp-set-connection-property + vec "remote-shell" + (tramp-get-method-parameter + (tramp-file-name-method vec) 'tramp-remote-sh))))))))) ;; ------------------------------------------------------------ ;; -- Functions for establishing connection -- @@ -8316,10 +8319,13 @@ ;; 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. + ;; Some "ls" versions are sensible wrt the order of + ;; arguments, they fail when "-al" is after the + ;; "--color=never" argument (for example on FreeBSD). (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))) + vec (format "%s --color=never -al /" result))) (setq result (concat result " --color=never"))) (throw 'ls-found result)) (setq dl (cdr dl)))))) ------------------------------------------------------------ revno: 100830 committer: Jan D branch nick: trunk timestamp: Fri 2010-07-16 09:50:37 +0200 message: * xmenu.c (free_frame_menubar): Only call x_set_window_size if widget is non-null (Bug#6645). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-07-15 21:54:10 +0000 +++ src/ChangeLog 2010-07-16 07:50:37 +0000 @@ -1,3 +1,8 @@ +2010-07-16 Jan Djärv + + * xmenu.c (free_frame_menubar): Only call x_set_window_size if + widget is non-null (Bug#6645). + 2010-07-15 Andreas Schwab * xterm.c (x_fully_uncatch_errors, x_trace_wire, x_check_font): === modified file 'src/xmenu.c' --- src/xmenu.c 2010-07-15 21:53:32 +0000 +++ src/xmenu.c 2010-07-16 07:50:37 +0000 @@ -1355,15 +1355,15 @@ lw_destroy_all_widgets ((LWLIB_ID) f->output_data.x->id); f->output_data.x->menubar_widget = NULL; -#ifdef USE_MOTIF if (f->output_data.x->widget) { +#ifdef USE_MOTIF XtVaGetValues (f->output_data.x->widget, XtNx, &x1, XtNy, &y1, NULL); if (x1 == 0 && y1 == 0) XtVaSetValues (f->output_data.x->widget, XtNx, x0, XtNy, y0, NULL); +#endif + x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f)); } -#endif - x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f)); UNBLOCK_INPUT; } } ------------------------------------------------------------ revno: 100829 committer: Andreas Schwab branch nick: emacs timestamp: Thu 2010-07-15 23:54:10 +0200 message: * xterm.c (x_fully_uncatch_errors, x_trace_wire, x_check_font): Convert old-style definition. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-07-15 21:53:32 +0000 +++ src/ChangeLog 2010-07-15 21:54:10 +0000 @@ -1,5 +1,8 @@ 2010-07-15 Andreas Schwab + * xterm.c (x_fully_uncatch_errors, x_trace_wire, x_check_font): + Convert old-style definition. + * xmenu.c (create_and_show_popup_menu, xmenu_show): Fix type of timestamp argument. === modified file 'src/xterm.c' --- src/xterm.c 2010-07-14 15:10:59 +0000 +++ src/xterm.c 2010-07-15 21:54:10 +0000 @@ -7503,7 +7503,7 @@ /* Close off all unclosed x_catch_errors calls. */ void -x_fully_uncatch_errors () +x_fully_uncatch_errors (void) { while (x_error_message) x_uncatch_errors (); @@ -7520,7 +7520,7 @@ #if 0 static unsigned int x_wire_count; -x_trace_wire () +x_trace_wire (void) { fprintf (stderr, "Lib call: %d\n", ++x_wire_count); } @@ -9560,9 +9560,7 @@ font table. */ static void -x_check_font (f, font) - struct frame *f; - struct font *font; +x_check_font (struct frame *f, struct font *font) { Lisp_Object frame; ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.