# HG changeset patch # User Kenichi Handa # Date 1294978110 -32400 # Node ID 01708c6828b7519e16c3ead7cec2b384fbca0403 # Parent 932e0e85675a158158fa5e1971e1a3d45e5b1d3b# Parent e4c00899294b38e17ea1dfa0806e1266f11efc87 merge emacs-23 diff -r 932e0e85675a -r 01708c6828b7 lisp/ChangeLog --- a/lisp/ChangeLog Fri Jan 14 13:04:10 2011 +0900 +++ b/lisp/ChangeLog Fri Jan 14 13:08:30 2011 +0900 @@ -9,6 +9,10 @@ (rmail-show-mime): If only a header part was decoded, find the coding system while ignoring mm-charset-override-alist. +2011-01-13 Chong Yidong + + * subr.el (event-start, event-end): Doc fix (Bug#7826). + 2011-01-12 Kenichi Handa * mail/rmailmm.el (rmail-mime-next-item) diff -r 932e0e85675a -r 01708c6828b7 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Fri Jan 14 13:04:10 2011 +0900 +++ b/lisp/gnus/ChangeLog Fri Jan 14 13:08:30 2011 +0900 @@ -1,3 +1,7 @@ +2011-01-13 Chong Yidong + + * message.el (message-bury): Add special-case handling for Rmail. + 2011-01-12 Glenn Morris * message.el (message-mail): A compose-mail function should diff -r 932e0e85675a -r 01708c6828b7 lisp/gnus/message.el --- a/lisp/gnus/message.el Fri Jan 14 13:04:10 2011 +0900 +++ b/lisp/gnus/message.el Fri Jan 14 13:08:30 2011 +0900 @@ -4023,12 +4023,32 @@ (defun message-bury (buffer) "Bury this mail BUFFER." - (let ((newbuf (other-buffer buffer))) - (bury-buffer buffer) - (if (and (window-dedicated-p (selected-window)) + (let ((newbuf (other-buffer (current-buffer)))) + (bury-buffer (current-buffer)) + (if (and (window-dedicated-p (frame-selected-window)) (not (null (delq (selected-frame) (visible-frame-list))))) (delete-frame (selected-frame)) - (switch-to-buffer newbuf)))) + ;; Temporary hack to make this behave like `mail-bury', when + ;; used with Rmail. Replaced in Emacs 24 with + (let (rmail-flag summary-buffer) + (and (not (one-window-p)) + (with-current-buffer + (window-buffer (next-window (selected-window) 'not)) + (setq rmail-flag (eq major-mode 'rmail-mode)) + (setq summary-buffer + (and (if (boundp 'mail-bury-selects-summary) + mail-bury-selects-summary + t) + (boundp 'rmail-summary-buffer) + rmail-summary-buffer + (buffer-name rmail-summary-buffer) + (not (get-buffer-window rmail-summary-buffer)) + rmail-summary-buffer)))) + (if rmail-flag + ;; If the Rmail buffer has a summary, show that. + (if summary-buffer (switch-to-buffer summary-buffer) + (delete-window)) + (switch-to-buffer newbuf)))))) (defun message-send (&optional arg) "Send the message in the current buffer. diff -r 932e0e85675a -r 01708c6828b7 lisp/subr.el --- a/lisp/subr.el Fri Jan 14 13:04:10 2011 +0900 +++ b/lisp/subr.el Fri Jan 14 13:08:30 2011 +0900 @@ -854,24 +854,37 @@ (defsubst event-start (event) "Return the starting position of EVENT. -If EVENT is a mouse or key press or a mouse click, this returns the location -of the event. -If EVENT is a drag, this returns the drag's starting position. -The return value is of the form +EVENT should be a click, drag, or key press event. +If it is a key press event, the return value has the form + (WINDOW POS (0 . 0) 0) +If it is a click or drag event, it has the form (WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW) IMAGE (DX . DY) (WIDTH . HEIGHT)) -The `posn-' functions access elements of such lists." +The `posn-' functions access elements of such lists. +For more information, see Info node `(elisp)Click Events'. + +If EVENT is a mouse or key press or a mouse click, this is the +position of the event. If EVENT is a drag, this is the starting +position of the drag." (if (consp event) (nth 1 event) (list (selected-window) (point) '(0 . 0) 0))) (defsubst event-end (event) "Return the ending location of EVENT. EVENT should be a click, drag, or key press event. -If EVENT is a click event, this function is the same as `event-start'. -The return value is of the form +If EVENT is a key press event, the return value has the form + (WINDOW POS (0 . 0) 0) +If EVENT is a click event, this function is the same as +`event-start'. For click and drag events, the return value has +the form (WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW) IMAGE (DX . DY) (WIDTH . HEIGHT)) -The `posn-' functions access elements of such lists." +The `posn-' functions access elements of such lists. +For more information, see Info node `(elisp)Click Events'. + +If EVENT is a mouse or key press or a mouse click, this is the +position of the event. If EVENT is a drag, this is the starting +position of the drag." (if (consp event) (nth (if (consp (nth 2 event)) 2 1) event) (list (selected-window) (point) '(0 . 0) 0)))