commit d8e9122115b5ffcec342c841b81cb2d2b8217e4b (HEAD, refs/remotes/origin/master) Merge: cbd447e e726f20 Author: Paul Eggert Date: Wed Feb 25 22:53:56 2015 -0800 Merge from origin/emacs-24 e726f20 Handle "#" operator properly inside macro. Fix coding bug. 618931b Handle dead frame in menu-bar-non-minibuffer-window-p. (Bug#19728) 017a03a Document MS-Windows file-name idiosyncrasies (Bug#19463) f3faf4f Fix description of Customize buffer in Emacs manual. 1c1d0b7 Fix a typo in the Emacs manual's Hungry Delete description. be7fb82 src/dispextern.h (FACE_FOR_CHAR): Fix the commentary. 33c4409 Spelling fixes 6c8231e python.el: Handle tabs in python-indent-dedent-line. 41c3b92 * lisp/progmodes/python.el: Respect user indentation after comment. 868df45 Avoid compiler warnings in decode_env_path. b28c979 Fix XEmacs version typo in comment and ChangeLog 989fb32 Improve solution of bug #19701 6310530 Fix refilling of list of language environments in User Manual c4c447d Restore XEmacs compatibility Conflicts: doc/emacs/ChangeLog lisp/ChangeLog src/ChangeLog test/ChangeLog commit cbd447e1cdbbebcd2a04144194138bb7936dea9d Merge: 4d36e52 b75358e Author: Paul Eggert Date: Wed Feb 25 22:52:01 2015 -0800 Merge from origin/emacs-24 The following commits were skipped: b75358e Merge remote-tracking branch 'origin/emacs-24' into emacs-24 c96c93f [Backport] lisp/gnus/message.el (message-smtpmail-send-it): Make non-standard mail header separators work with smtpmail 972282f [Backport] lisp/gnus/message.el (message-smtpmail-send-it): Make non-standard mail header separators work with smtpmail commit 4d36e5246e3d182b84f5d776e730a81e03fff06a Merge: b6964cb 7779da6 Author: Paul Eggert Date: Wed Feb 25 22:52:00 2015 -0800 Merge from origin/emacs-24 7779da6 lisp/gnus/nimap.el (nnimap-find-expired-articles): nnimap `never' expiration fix commit b6964cb031b5aa25c34b06ba77540ab06fab2005 Merge: 4859809 9ee2d9f Author: Paul Eggert Date: Wed Feb 25 22:51:59 2015 -0800 Merge from origin/emacs-24 The following commit was skipped: 9ee2d9f [Backport] lisp/gnus/nnimap.el (nnimap-find-expired-articles): nnimap `never' expiration fix commit 48598095b3b777dfaa80fd85ba8246de6e18b3cd Author: Katsumi Yamaoka Date: Thu Feb 26 06:39:11 2015 +0000 Fix point motion when removing displayed MIME part * gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part): Fix point motion when removing displayed MIME part. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 454957e..af49782 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,7 +1,9 @@ 2015-02-26 Katsumi Yamaoka - * gnus-art.el (gnus-article-edit-part): Make jumping to the next part - really work when deleting or stripping. + * gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part): + Fix point motion when removing displayed MIME part. + (gnus-article-edit-part): Make jumping to the next part really work + when deleting or stripping. (gnus-mime-buttonize-attachments-in-header): Make header attachment buttons identical to the ones in the article body so as to work deleting and stripping. diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index f88e7d5..5de4b58 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -5360,7 +5360,10 @@ Compressed files like .gz and .bz2 are decompressed." 'gnus-data)))) (setq b btn)) (if (and (not arg) (mm-handle-undisplayer handle)) - (mm-remove-part handle) + (progn + (setq b (copy-marker b) + btn (copy-marker btn)) + (mm-remove-part handle)) (cond ((not arg) nil) ((numberp arg) @@ -5374,6 +5377,9 @@ Compressed files like .gz and .bz2 are decompressed." (forward-line 1)) (mm-display-inline handle)) ;; Toggle the button appearance between `[button]...' and `[button]'. + (when (markerp btn) + (setq btn (prog1 (marker-position btn) + (set-marker btn nil)))) (goto-char btn) (let ((displayed-p (mm-handle-displayed-p handle))) (gnus-insert-mime-button handle (get-text-property btn 'gnus-part) @@ -5409,6 +5415,9 @@ Compressed files like .gz and .bz2 are decompressed." '((gnus-treat-highlight-headers gnus-article-highlight-headers)))) (gnus-treat-article 'head))))) + (when (markerp b) + (setq b (prog1 (marker-position b) + (set-marker b nil)))) (goto-char b)))) (defun gnus-mime-set-charset-parameters (handle charset) @@ -5731,7 +5740,8 @@ all parts." point (previous-single-property-change start 'gnus-data)) (if (mm-handle-displayed-p handle) ;; This will remove the part. - (setq retval (mm-display-part handle)) + (setq point (copy-marker point) + retval (mm-display-part handle)) (let ((part (or (and (mm-inlinable-p handle) (mm-inlined-p handle) t) @@ -5762,6 +5772,9 @@ all parts." ,(point-max-marker))))))) (part (mm-display-inline handle)))))) + (when (markerp point) + (setq point (prog1 (marker-position point) + (set-marker point nil)))) (goto-char point) ;; Toggle the button appearance between `[button]...' and `[button]'. (let ((displayed-p (mm-handle-displayed-p handle))) commit 8ae2142555b313c6939d7659e9db65431db06837 Author: Paul Eggert Date: Wed Feb 25 20:43:25 2015 -0800 * xfns.c (x_real_pos_and_offsets): Fix pointer signedness. diff --git a/src/ChangeLog b/src/ChangeLog index e450696..37e6d20 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2015-02-26 Paul Eggert + + * xfns.c (x_real_pos_and_offsets): Fix pointer signedness. + 2015-02-25 Jan Djärv * xterm.h (struct x_output): Remove x_pixels_outer_diff, diff --git a/src/xfns.c b/src/xfns.c index afbd460..4fc92c3 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -334,15 +334,16 @@ x_real_pos_and_offsets (struct frame *f, if (yptr) *yptr = real_y; if (right_offset_x || bottom_offset_y) - { - unsigned int ign, fw, fh; - Window rootw; - - XGetGeometry (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), - &rootw, &ign, &ign, &fw, &fh, &ign, &ign); - if (right_offset_x) *right_offset_x = ow - fw + outer_x; - if (bottom_offset_y) *bottom_offset_y = oh - fh + outer_y; - } + { + int xy_ign; + unsigned int ign, fw, fh; + Window rootw; + + XGetGeometry (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), + &rootw, &xy_ign, &xy_ign, &fw, &fh, &ign, &ign); + if (right_offset_x) *right_offset_x = ow - fw + outer_x; + if (bottom_offset_y) *bottom_offset_y = oh - fh + outer_y; + } } /* Store the screen positions of frame F into XPTR and YPTR. commit 4f9befb3b81e967696f40a0ef7a758d6e56e2933 Author: Katsumi Yamaoka Date: Thu Feb 26 03:29:36 2015 +0000 lisp/gnus/ChangeLog: Fix typo diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7f8971d..454957e 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -3,7 +3,7 @@ * gnus-art.el (gnus-article-edit-part): Make jumping to the next part really work when deleting or stripping. (gnus-mime-buttonize-attachments-in-header): Make header attachment - buttons identical to the one in the article body so as to work deleting + buttons identical to the ones in the article body so as to work deleting and stripping. 2015-02-25 Katsumi Yamaoka commit f376a4b747421b4c6456500051489ae162d21957 Author: Katsumi Yamaoka Date: Thu Feb 26 03:24:48 2015 +0000 Gnus: Improve parts deletion and stripping behavior * gnus-art.el (gnus-article-edit-part): Make jumping to the next part really work when deleting or stripping. (gnus-mime-buttonize-attachments-in-header): Make header attachment buttons identical to the one in the article body so as to work deleting and stripping. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 671e171..7f8971d 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,11 @@ +2015-02-26 Katsumi Yamaoka + + * gnus-art.el (gnus-article-edit-part): Make jumping to the next part + really work when deleting or stripping. + (gnus-mime-buttonize-attachments-in-header): Make header attachment + buttons identical to the one in the article body so as to work deleting + and stripping. + 2015-02-25 Katsumi Yamaoka * mm-decode.el (mm-shr) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 83a2f94..f88e7d5 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -5064,6 +5064,7 @@ and `gnus-mime-delete-part', and not provided at run-time normally." (let ((gnus-mime-buttonized-part-id current-id)) (gnus-article-edit-done)) (gnus-configure-windows 'article) + (sit-for 0) (when (and current-id (integerp gnus-auto-select-part)) (gnus-article-jump-to-part (min (max (+ current-id gnus-auto-select-part) 1) @@ -6432,8 +6433,7 @@ in the body. Use `gnus-header-face-alist' to highlight buttons." (dolist (button (nreverse buttons)) (setq st (point)) (insert " ") - (mm-handle-set-undisplayer - (setq handle (copy-sequence (cdr button))) nil) + (mm-handle-set-undisplayer (setq handle (cdr button)) nil) (gnus-insert-mime-button handle (car button)) (skip-chars-backward "\t\n ") (delete-region (point) (point-max)) commit b206b9d73728dec9b71a41ac4e1622ec795d6fd0 Author: Daiki Ueno Date: Thu Feb 26 11:01:10 2015 +0900 dbus.el: fix ":argN" keyword recognition * net/dbus.el (dbus-register-signal): Convert "N" of ":argN" to integer before comparison. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7f7eac6..33e0480 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-02-26 Daiki Ueno + + * net/dbus.el (dbus-register-signal): Convert "N" of ":argN" to + integer before comparison. + 2015-02-25 Nicolas Richard * progmodes/elisp-mode.el (elisp--eval-last-sexp): Document argument. diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index bbce300..b2c1ba8 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -707,7 +707,8 @@ Example: (setq counter (match-string 2 (symbol-name key)) args (cdr args) value (car args)) - (unless (and (<= counter 63) (stringp value)) + (unless (and (<= (string-to-number counter) 63) + (stringp value)) (signal 'wrong-type-argument (list "Wrong argument" key value))) (format commit 719fd9334634dfc91e145d0a7320387a8bb4b75f Author: Jan D Date: Wed Feb 25 20:16:44 2015 +0100 Redo the whole window offsets and coordinate translation for X. * frame.h (struct frame): Remove x_pixels_diff, y_pixels_diff. * w32fns.c (x_real_positions): Remove setting of x_pixels_diff, y_pixels_diff. * xfns.c (x_real_pos_and_offsets): New function, basically the code from x_real_positions. (x_real_positions): Call x_real_pos_and_offsets. (x_relative_mouse_position): Use XTranslateCoordinates instead of OUTER_TO_INNER_DIFF macros. (Fx_frame_geometry): Get offsets with x_real_pos_and_offsets, border from window attributes. Adjust tool bar and menu widths. * xmenu.c (create_and_show_popup_menu): Use XTranslateCoordinates instead of OUTER_TO_INNER_DIFF macros. * xterm.h (struct x_output): Remove x_pixels_outer_diff, y_pixels_outer_diff, FRAME_OUTER_TO_INNER_DIFF_X, FRAME_OUTER_TO_INNER_DIFF_Y. Declare x_real_pos_and_offsets. diff --git a/src/ChangeLog b/src/ChangeLog index 1f0781f..e450696 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,25 @@ +2015-02-25 Jan Djärv + + * xterm.h (struct x_output): Remove x_pixels_outer_diff, + y_pixels_outer_diff, FRAME_OUTER_TO_INNER_DIFF_X, + FRAME_OUTER_TO_INNER_DIFF_Y. Declare x_real_pos_and_offsets. + + * xmenu.c (create_and_show_popup_menu): Use XTranslateCoordinates + instead of OUTER_TO_INNER_DIFF macros. + + * xfns.c (x_real_pos_and_offsets): New function, basically the code + from x_real_positions. + (x_real_positions): Call x_real_pos_and_offsets. + (x_relative_mouse_position): Use XTranslateCoordinates instead of + OUTER_TO_INNER_DIFF macros. + (Fx_frame_geometry): Get offsets with x_real_pos_and_offsets, + border from window attributes. Adjust tool bar and menu widths. + + * w32fns.c (x_real_positions): Remove setting of x_pixels_diff, + y_pixels_diff. + + * frame.h (struct frame): Remove x_pixels_diff, y_pixels_diff. + 2015-02-25 Paul Eggert Backtrace after malloc arena is corrupted diff --git a/src/frame.h b/src/frame.h index 6f5de3f..ddbf93e 100644 --- a/src/frame.h +++ b/src/frame.h @@ -396,10 +396,6 @@ struct frame widths) in pixels. */ int pixel_width, pixel_height; - /* These many pixels are the difference between the outer window (i.e. the - left and top of the window manager decoration) and FRAME_X_WINDOW. */ - int x_pixels_diff, y_pixels_diff; - /* This is the gravity value for the specified window position. */ int win_gravity; diff --git a/src/w32fns.c b/src/w32fns.c index 1e685ad..6f404e9 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -346,10 +346,6 @@ x_real_positions (struct frame *f, int *xptr, int *yptr) /* Convert (0, 0) in the client area to screen co-ordinates. */ ClientToScreen (FRAME_W32_WINDOW (f), &pt); - /* Remember x_pixels_diff and y_pixels_diff. */ - f->x_pixels_diff = pt.x - rect.left; - f->y_pixels_diff = pt.y - rect.top; - *xptr = rect.left; *yptr = rect.top; } diff --git a/src/xfns.c b/src/xfns.c index 80be6ac..afbd460 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -168,12 +168,25 @@ check_x_display_info (Lisp_Object object) return dpyinfo; } -/* Store the screen positions of frame F into XPTR and YPTR. +/* Return the screen positions and offsets of frame F. + Store the offsets between FRAME_OUTER_WINDOW and the containing + window manager window into LEFT_OFFSET_X, RIGHT_OFFSET_X, + TOP_OFFSET_Y and BOTTOM_OFFSET_Y. + Store the offsets between FRAME_X_WINDOW and the containing + window manager window into X_PIXELS_DIFF and Y_PIXELS_DIFF. + Store the screen positions of frame F into XPTR and YPTR. These are the positions of the containing window manager window, not Emacs's own window. */ - void -x_real_positions (struct frame *f, int *xptr, int *yptr) +x_real_pos_and_offsets (struct frame *f, + int *left_offset_x, + int *right_offset_x, + int *top_offset_y, + int *bottom_offset_y, + int *x_pixels_diff, + int *y_pixels_diff, + int *xptr, + int *yptr) { int win_x, win_y, outer_x IF_LINT (= 0), outer_y IF_LINT (= 0); int real_x = 0, real_y = 0; @@ -187,6 +200,7 @@ x_real_positions (struct frame *f, int *xptr, int *yptr) Display *dpy = FRAME_X_DISPLAY (f); unsigned char *tmp_data = NULL; Atom target_type = XA_CARDINAL; + unsigned int ow IF_LINT (= 0), oh IF_LINT (= 0); block_input (); @@ -230,7 +244,7 @@ x_real_positions (struct frame *f, int *xptr, int *yptr) /* Get the real coordinates for the WM window upper left corner */ XGetGeometry (FRAME_X_DISPLAY (f), win, - &rootw, &real_x, &real_y, &ign, &ign, &ign, &ign); + &rootw, &real_x, &real_y, &ow, &oh, &ign, &ign); /* Translate real coordinates to coordinates relative to our window. For our window, the upper left corner is 0, 0. @@ -310,16 +324,38 @@ x_real_positions (struct frame *f, int *xptr, int *yptr) if (had_errors) return; - f->x_pixels_diff = -win_x; - f->y_pixels_diff = -win_y; + if (x_pixels_diff) *x_pixels_diff = -win_x; + if (y_pixels_diff) *y_pixels_diff = -win_y; + + if (left_offset_x) *left_offset_x = -outer_x; + if (top_offset_y) *top_offset_y = -outer_x; - FRAME_X_OUTPUT (f)->x_pixels_outer_diff = -outer_x; - FRAME_X_OUTPUT (f)->y_pixels_outer_diff = -outer_y; + if (xptr) *xptr = real_x; + if (yptr) *yptr = real_y; - *xptr = real_x; - *yptr = real_y; + if (right_offset_x || bottom_offset_y) + { + unsigned int ign, fw, fh; + Window rootw; + + XGetGeometry (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), + &rootw, &ign, &ign, &fw, &fh, &ign, &ign); + if (right_offset_x) *right_offset_x = ow - fw + outer_x; + if (bottom_offset_y) *bottom_offset_y = oh - fh + outer_y; + } } +/* Store the screen positions of frame F into XPTR and YPTR. + These are the positions of the containing window manager window, + not Emacs's own window. */ + +void +x_real_positions (struct frame *f, int *xptr, int *yptr) +{ + x_real_pos_and_offsets (f, NULL, NULL, NULL, NULL, NULL, NULL, xptr, yptr); +} + + /* Get the mouse position in frame relative coordinates. */ void @@ -351,11 +387,19 @@ x_relative_mouse_position (struct frame *f, int *x, int *y) we don't care. */ (unsigned int *) &dummy); - unblock_input (); + XTranslateCoordinates (FRAME_X_DISPLAY (f), + + /* From-window, to-window. */ + FRAME_DISPLAY_INFO (f)->root_window, + FRAME_X_WINDOW (f), - /* Translate root window coordinates to window coordinates. */ - *x -= f->left_pos + FRAME_OUTER_TO_INNER_DIFF_X (f); - *y -= f->top_pos + FRAME_OUTER_TO_INNER_DIFF_Y (f); + /* From-position, to-position. */ + *x, *y, x, y, + + /* Child of win. */ + &dummy_window); + + unblock_input (); } /* Gamma-correct COLOR on frame F. */ @@ -4279,13 +4323,23 @@ elements (all size values are in pixels). Lisp_Object fullscreen = Fframe_parameter (frame, Qfullscreen); int menu_bar_height, menu_bar_width, tool_bar_height, tool_bar_width; - border = FRAME_OUTER_TO_INNER_DIFF_X (f); - title = FRAME_X_OUTPUT (f)->y_pixels_outer_diff - border; + int left_off, right_off, top_off, bottom_off; + XWindowAttributes atts; + + block_input (); + + XGetWindowAttributes (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &atts); + + x_real_pos_and_offsets (f, &left_off, &right_off, &top_off, &bottom_off, + NULL, NULL, NULL, NULL); + + unblock_input (); + + border = atts.border_width; + title = top_off; - outer_width = FRAME_PIXEL_WIDTH (f) + 2 * border; - outer_height = (FRAME_PIXEL_HEIGHT (f) - + FRAME_OUTER_TO_INNER_DIFF_Y (f) - + FRAME_OUTER_TO_INNER_DIFF_X (f)); + outer_width = FRAME_PIXEL_WIDTH (f) + 2 * border + right_off + left_off; + outer_height = FRAME_PIXEL_HEIGHT (f) + 2 * border + top_off + bottom_off; #if defined (USE_GTK) { @@ -4298,16 +4352,10 @@ elements (all size values are in pixels). tool_bar_height = (tool_bar_left_right ? FRAME_PIXEL_HEIGHT (f) : FRAME_TOOLBAR_HEIGHT (f)); - if (tool_bar_left_right) - /* For some reason FRAME_OUTER_TO_INNER_DIFF_X does not count the - width of a tool bar. */ - outer_width += FRAME_TOOLBAR_WIDTH (f); } #else tool_bar_height = FRAME_TOOL_BAR_HEIGHT (f); - tool_bar_width = ((tool_bar_height > 0) - ? outer_width - 2 * FRAME_INTERNAL_BORDER_WIDTH (f) - : 0); + tool_bar_width = tool_bar_height > 0 ? FRAME_PIXEL_WIDTH (f) : 0; #endif #if defined (USE_X_TOOLKIT) || defined (USE_GTK) @@ -4316,9 +4364,7 @@ elements (all size values are in pixels). menu_bar_height = FRAME_MENU_BAR_HEIGHT (f); #endif - menu_bar_width = ((menu_bar_height > 0) - ? outer_width - 2 * border - : 0); + menu_bar_width = menu_bar_height > 0 ? FRAME_PIXEL_WIDTH (f) : 0; if (!FRAME_EXTERNAL_MENU_BAR (f)) inner_height -= menu_bar_height; diff --git a/src/xmenu.c b/src/xmenu.c index fdf1f6f..c9f150f 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1211,13 +1211,25 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv, if (use_pos_func) { + Window dummy_window; + /* Not invoked by a click. pop up at x/y. */ pos_func = menu_position_func; /* Adjust coordinates to be root-window-relative. */ - x += f->left_pos + FRAME_OUTER_TO_INNER_DIFF_X (f); - y += f->top_pos + FRAME_OUTER_TO_INNER_DIFF_Y (f); + block_input (); + XTranslateCoordinates (FRAME_X_DISPLAY (f), + + /* From-window, to-window. */ + FRAME_X_WINDOW (f), + FRAME_DISPLAY_INFO (f)->root_window, + /* From-position, to-position. */ + x, y, &x, &y, + + /* Child of win. */ + &dummy_window); + unblock_input (); popup_x_y.x = x; popup_x_y.y = y; popup_x_y.f = f; diff --git a/src/xterm.h b/src/xterm.h index e597227..16868f1 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -628,15 +628,6 @@ struct x_output They are changed only when a different background is involved. */ unsigned long relief_background; - /* As x_pixels_diff, but to FRAME_OUTER_WINDOW. For some reason the - two might differ by a pixel, depending on WM */ - int x_pixels_outer_diff; - - /* As y_pixels_diff, but to FRAME_OUTER_WINDOW. In the toolkit version, - these may differ because this does not take into account possible - menubar. y_pixels_diff is with menubar height included */ - int y_pixels_outer_diff; - /* Keep track of focus. May be EXPLICIT if we received a FocusIn for this frame, or IMPLICIT if we received an EnterNotify. FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ @@ -759,16 +750,6 @@ enum /* This is the Colormap which frame F uses. */ #define FRAME_X_COLORMAP(f) FRAME_DISPLAY_INFO (f)->cmap -/* The difference in pixels between the top left corner of the - Emacs window (including possible window manager decorations) - and FRAME_X_WINDOW (f). */ -#define FRAME_OUTER_TO_INNER_DIFF_X(f) \ - ((f)->output_data.x->x_pixels_outer_diff) -#define FRAME_OUTER_TO_INNER_DIFF_Y(f) \ - ((f)->output_data.x->y_pixels_outer_diff \ - + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f)) - - #define FRAME_XIC(f) ((f)->output_data.x->xic) #define FRAME_X_XIM(f) (FRAME_DISPLAY_INFO (f)->xim) #define FRAME_X_XIM_STYLES(f) (FRAME_DISPLAY_INFO (f)->xim_styles) @@ -971,6 +952,15 @@ SELECTION_EVENT_DISPLAY (struct input_event *ev) extern void x_free_gcs (struct frame *); extern void x_relative_mouse_position (struct frame *, int *, int *); +extern void x_real_pos_and_offsets (struct frame *f, + int *left_offset_x, + int *right_offset_x, + int *top_offset_y, + int *bottom_offset_y, + int *x_pixels_diff, + int *y_pixels_diff, + int *xptr, + int *yptr); /* From xrdb.c. */ commit 0731a2e857f6d328a06a12d9d7540f41f3a8ae04 Author: Glenn Morris Date: Wed Feb 25 12:28:28 2015 -0500 # Auto-commit of loaddefs files. diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 855a4c2..1b8dd06 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -4810,7 +4810,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse order. ;;;*** -;;;### (autoloads nil "rmailsum" "rmailsum.el" "e3943ef45946f10b9b5cab8097d7f271") +;;;### (autoloads nil "rmailsum" "rmailsum.el" "3203e61425330fc20f3154b559f8b539") ;;; Generated autoloads from rmailsum.el (autoload 'rmail-summary "rmailsum" "\ commit ca5790eb50db4511ecd987559b91f0509ffe61e5 Author: Nicolas Richard Date: Wed Feb 25 13:07:43 2015 +0100 lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): Document argument. Fixes: 19932 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f1dd8db..7f7eac6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2015-02-25 Nicolas Richard + + * progmodes/elisp-mode.el (elisp--eval-last-sexp): Document argument. + 2015-02-25 Oleh Krehel * emacs-lisp/check-declare.el (check-declare-warn): Use diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index b2c5fbf..29f1ee9 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -883,10 +883,11 @@ If CHAR is not a character, return nil." (defun elisp--eval-last-sexp (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in the echo area. -With argument, print output into current buffer. -With a zero prefix arg, print output with no limit on the length -and level of lists, and include additional formats for integers -\(octal, hexadecimal, and character)." +If EVAL-LAST-SEXP-ARG-INTERNAL is non-nil, print output into +current buffer. If EVAL-LAST-SEXP-ARG-INTERNAL is `0', print +output with no limit on the length and level of lists, and +include additional formats for integers \(octal, hexadecimal, and +character)." (let ((standard-output (if eval-last-sexp-arg-internal (current-buffer) t))) ;; Setup the lexical environment if lexical-binding is enabled. (elisp--eval-last-sexp-print-value commit e726f2058c98e68c951bdb290fe68dac2a84ff65 Author: Alan Mackenzie Date: Sat Jan 31 21:44:47 2015 +0000 Handle "#" operator properly inside macro. Fix coding bug. cc-mode.el (c-neutralize-syntax-in-and-mark-CPP): On finding a "#" which looks like the start of a macro, check it isn't already inside a macro. cc-engine.el (c-state-safe-place): Don't record a new "safe" position into the list of them when this is beyond our current position. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6cdaf14..fd54c68 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2015-01-31 Alan Mackenzie + + Handle "#" operator properly inside macro. Fix coding bug. + + * progmodes/cc-mode.el (c-neutralize-syntax-in-and-mark-CPP): On + finding a "#" which looks like the start of a macro, check it + isn't already inside a macro. + + * progmodes/cc-engine.el (c-state-safe-place): Don't record a new + "safe" position into the list of them when this is beyond our + current position. + 2015-01-31 Martin Rudalics * menu-bar.el (menu-bar-non-minibuffer-window-p): Return nil when diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 1f4aa81..b8051b2 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -2275,7 +2275,9 @@ comment at the start of cc-engine.el for more info." (while ;; Add an element to `c-state-nonlit-pos-cache' each iteration. (and - (<= (setq npos (+ pos c-state-nonlit-pos-interval)) here) + (setq npos + (when (<= (+ pos c-state-nonlit-pos-interval) here) + (+ pos c-state-nonlit-pos-interval))) ;; Test for being in a literal. If so, go to after it. (progn @@ -2302,7 +2304,9 @@ comment at the start of cc-engine.el for more info." ;; Add one extra element above HERE so as to to avoid the previous ;; expensive calculation when the next call is close to the current ;; one. This is especially useful when inside a large macro. - (setq c-state-nonlit-pos-cache (cons npos c-state-nonlit-pos-cache))) + (when npos + (setq c-state-nonlit-pos-cache + (cons npos c-state-nonlit-pos-cache)))) (if (> pos c-state-nonlit-pos-cache-limit) (setq c-state-nonlit-pos-cache-limit pos)) @@ -3066,7 +3070,7 @@ comment at the start of cc-engine.el for more info." (setq dropped-cons (consp (car c-state-cache))) (setq c-state-cache (cdr c-state-cache)) (setq pos pa)) - ;; At this stage, (> pos here); + ;; At this stage, (>= pos here); ;; (< (c-state-cache-top-lparen) here) (or is nil). (cond diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index c4f1efb..1cba502 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -957,12 +957,17 @@ Note that the style variables are always made local to the buffer." (let ((pps-position (point)) pps-state mbeg) (while (and (< (point) c-new-END) (search-forward-regexp c-anchored-cpp-prefix c-new-END t)) - ;; If we've found a "#" inside a string/comment, ignore it. - (setq pps-state - (parse-partial-sexp pps-position (point) nil nil pps-state) - pps-position (point)) - (unless (or (nth 3 pps-state) ; in a string? - (nth 4 pps-state)) ; in a comment? + ;; If we've found a "#" inside a macro/string/comment, ignore it. + (unless + (or (save-excursion + (goto-char (match-beginning 0)) + (c-beginning-of-macro)) + (progn + (setq pps-state + (parse-partial-sexp pps-position (point) nil nil pps-state) + pps-position (point)) + (or (nth 3 pps-state) ; in a string? + (nth 4 pps-state)))) ; in a comment? (goto-char (match-beginning 1)) (setq mbeg (point)) (if (> (c-syntactic-end-of-macro) mbeg) commit 618931b5b614df307cfe74c2175287e3f6dfa2a0 Author: Martin Rudalics Date: Sat Jan 31 19:38:58 2015 +0100 Handle dead frame in menu-bar-non-minibuffer-window-p. (Bug#19728) * menu-bar.el (menu-bar-non-minibuffer-window-p): Return nil when the menu frame is dead. (Bug#19728) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 51d47a7..6cdaf14 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-01-31 Martin Rudalics + + * menu-bar.el (menu-bar-non-minibuffer-window-p): Return nil when + the menu frame is dead. (Bug#19728) + 2015-01-30 Fabián Ezequiel Gallina python.el: Handle tabs in python-indent-dedent-line. diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 25d41dc..e82c089 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -1737,12 +1737,14 @@ The menu frame is the frame for which we are updating the menu." (frame-visible-p menu-frame)))) (defun menu-bar-non-minibuffer-window-p () - "Return non-nil if selected window of the menu frame is not a minibuf window. - -See the documentation of `menu-bar-menu-frame-live-and-visible-p' -for the definition of the menu frame." + "Return non-nil if the menu frame's selected window is no minibuffer window. +Return nil if the menu frame is dead or its selected window is a +minibuffer window. The menu frame is the frame for which we are +updating the menu." (let ((menu-frame (or menu-updating-frame (selected-frame)))) - (not (window-minibuffer-p (frame-selected-window menu-frame))))) + (and (frame-live-p menu-frame) + (not (window-minibuffer-p + (frame-selected-window menu-frame)))))) (defun kill-this-buffer () ; for the menu bar "Kill the current buffer. commit 017a03afc92ba084898fc897c7e3dbf90197e0b6 Author: Eli Zaretskii Date: Sat Jan 31 18:32:11 2015 +0200 Document MS-Windows file-name idiosyncrasies (Bug#19463) doc/emacs/msdog.texi (Windows Files): Document characters invalid in Windows file names. diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 4e3c60e..7d8fcf4 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,5 +1,8 @@ 2015-01-31 Eli Zaretskii + * msdog.texi (Windows Files): Document characters invalid in + Windows file names. (Bug#19463) + * custom.texi (Customization Groups): Update the looks of the Customize Group buffer. diff --git a/doc/emacs/msdog.texi b/doc/emacs/msdog.texi index bf130eb..0245fed 100644 --- a/doc/emacs/msdog.texi +++ b/doc/emacs/msdog.texi @@ -249,7 +249,42 @@ removable and remote volumes, where this could potentially slow down Dired and other related features. The value of @code{nil} means never issue those system calls. Non-@code{nil} values are more useful on NTFS volumes, which support hard links and file security, than on FAT, -FAT32, and XFAT volumes. +FAT32, and exFAT volumes. + +@cindex file names, invalid characters on MS-Windows + Unlike Unix, MS-Windows file systems restrict the set of characters +that can be used in a file name. The following characters are not +allowed: + +@itemize @bullet +@item +Shell redirection symbols @samp{<}, @samp{>}, and @samp{|}. + +@item +Colon @samp{:} (except after the drive letter). + +@item +Forward slash @samp{/} and backslash @samp{\} (except as directory +separators). + +@item +Wildcard characters @samp{*} and @samp{?}. + +@item +Control characters whose codepoints are 1 through 31 decimal. In +particular, newlines in file names are not allowed. + +@item +The null character, whose codepoint is zero (this limitation exists on +Unix filesystems as well). +@end itemize + +@noindent +In addition, referencing any file whose name matches a DOS character +device, such as @file{NUL} or @file{LPT1} or @file{PRN} or @file{CON}, +with or without any file-name extension, will always resolve to those +character devices, in any directory. Therefore, only use such file +names when you want to use the corresponding character device. @node ls in Lisp @section Emulation of @code{ls} on MS-Windows commit f3faf4f0275d7f94011464ca35d4e7a7ce49b746 Author: Eli Zaretskii Date: Sat Jan 31 18:05:38 2015 +0200 Fix description of Customize buffer in Emacs manual. doc/emacs/custom.texi (Customization Groups): Update the looks of the Customize Group buffer. diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 02e4845..4e3c60e 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,5 +1,8 @@ 2015-01-31 Eli Zaretskii + * custom.texi (Customization Groups): Update the looks of the + Customize Group buffer. + * programs.texi (Hungry Delete): Fix a typo: "C-d" instead of "C-c C-d" in hungry-delete mode. diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index d36e15e..0e9c4fb 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -82,14 +82,12 @@ top-level @code{Emacs} group. It looks like this, in part: @c @page @smallexample @group -To apply changes, use the Save or Set buttons. -For details, see [Saving Customizations] in the [Emacs manual]. +For help, see [Easy Customization] in the [Emacs manual]. ________________________________________ [ Search ] Operate on all settings in this buffer: - [ Set for current session ] [ Save for future sessions ] - [ Undo edits ] [ Reset to saved ] [ Erase customizations ] [ Exit ] + [ Revert... ] [ Apply ] [ Apply and Save ] Emacs group: Customization of the One True Editor. @@ -97,7 +95,6 @@ Emacs group: Customization of the One True Editor. See also [Manual]. [Editing] : Basic text editing facilities. - [Convenience] : Convenience features for faster editing. @var{more second-level groups} commit 1c1d0b75e8b2650184c96476449a66884e663372 Author: Eli Zaretskii Date: Sat Jan 31 17:50:36 2015 +0200 Fix a typo in the Emacs manual's Hungry Delete description. doc/emacs/programs.texi (Hungry Delete): Fix a typo: "C-d" instead of "C-c C-d" in hungry-delete mode. diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 24d94f9..02e4845 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2015-01-31 Eli Zaretskii + + * programs.texi (Hungry Delete): Fix a typo: "C-d" instead of + "C-c C-d" in hungry-delete mode. + 2015-01-29 Eli Zaretskii * mule.texi (Language Environments): Work around refill bug in diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 547de42..3291754 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -1666,7 +1666,7 @@ Delete the entire block of whitespace after point (@code{c-hungry-delete-forward As an alternative to the above commands, you can enable @dfn{hungry delete mode}. When this feature is enabled (indicated by @samp{/h} in the mode line after the mode name), a single @key{DEL} deletes all -preceding whitespace, not just one space, and a single @kbd{C-c C-d} +preceding whitespace, not just one space, and a single @kbd{C-d} (but @emph{not} plain @key{Delete}) deletes all following whitespace. @table @kbd commit be7fb822b8bfee77c705fb5bccdc35d4212cfde0 Author: Eli Zaretskii Date: Fri Jan 30 13:47:47 2015 +0200 src/dispextern.h (FACE_FOR_CHAR): Fix the commentary. diff --git a/src/ChangeLog b/src/ChangeLog index 949ea74..829eb25 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2015-01-30 Eli Zaretskii + + * dispextern.h (FACE_FOR_CHAR): Fix the commentary. + 2015-01-29 Hans Wennborg (tiny change) * emacs.c (decode_env_path): Add parentheses around ternary diff --git a/src/dispextern.h b/src/dispextern.h index d6bbb0b..239c442 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -1821,8 +1821,10 @@ struct face_cache ((FACE) == (FACE)->ascii_face) /* Return the id of the realized face on frame F that is like the face - with id ID but is suitable for displaying character CHAR. - This macro is only meaningful for multibyte character CHAR. */ + FACE, but is suitable for displaying character CHAR at buffer or + string position POS. OBJECT is the string object, or nil for + buffer. This macro is only meaningful for multibyte character + CHAR. */ #define FACE_FOR_CHAR(F, FACE, CHAR, POS, OBJECT) \ face_for_char ((F), (FACE), (CHAR), (POS), (OBJECT)) commit 33c4409a8edb03d686ab41d493ec3668e5cd597f Author: Paul Eggert Date: Thu Jan 29 19:45:04 2015 -0800 Spelling fixes diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 0d314d6..dea316e 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -943,7 +943,7 @@ keyword May return an integer for the maximum possible indentation at current context or a list of integers. The latter case is only happening for :at-dedenter-block-start context since the -possibilities can be narrowed to especific indentation points." +possibilities can be narrowed to specific indentation points." (save-restriction (widen) (save-excursion @@ -1032,7 +1032,7 @@ minimum." (defun python-indent-line (&optional previous) "Internal implementation of `python-indent-line-function'. Use the PREVIOUS level when argument is non-nil, otherwise indent -to the maxium available level. When indentation is the minimum +to the maximum available level. When indentation is the minimum possible and PREVIOUS is non-nil, cycle back to the maximum level." (let ((follow-indentation-p commit 6c8231ee8ce527b779df81249c0e597b9a04a17f Author: Fabián Ezequiel Gallina Date: Fri Jan 30 00:41:52 2015 -0300 python.el: Handle tabs in python-indent-dedent-line. Fixes: debbugs:19730 * lisp/progmodes/python.el (python-indent-dedent-line): Fixes for indentation with tabs. Thanks to . * test/automated/python-tests.el (python-indent-dedent-line-backspace-2) (python-indent-dedent-line-backspace-3): New tests. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2068601..51d47a7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,12 @@ 2015-01-30 Fabián Ezequiel Gallina + python.el: Handle tabs in python-indent-dedent-line. + + * progmodes/python.el (python-indent-dedent-line): Fixes for + indentation with tabs. Thanks to (Bug#19730). + +2015-01-30 Fabián Ezequiel Gallina + * progmodes/python.el (python-indent-context): Respect user indentation after comment. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 5842be7..0d314d6 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1067,9 +1067,7 @@ indentation levels from right to left." (interactive "*") (when (and (not (bolp)) (not (python-syntax-comment-or-string-p)) - (= (+ (line-beginning-position) - (current-indentation)) - (point))) + (= (current-indentation) (current-column))) (python-indent-line t) t)) diff --git a/test/ChangeLog b/test/ChangeLog index 72e1b85..f33cf84 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,5 +1,11 @@ 2015-01-30 Fabián Ezequiel Gallina + * automated/python-tests.el + (python-indent-dedent-line-backspace-2) + (python-indent-dedent-line-backspace-3): New tests. + +2015-01-30 Fabián Ezequiel Gallina + * automated/python-tests.el (python-indent-pep8-1) (python-indent-pep8-2, python-indent-pep8-3) (python-indent-after-comment-2): Fix tests. diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index 4972731..42c26fc 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el @@ -2127,6 +2127,55 @@ if True: (call-interactively #'python-indent-dedent-line-backspace) (should (zerop (current-indentation))))) +(ert-deftest python-indent-dedent-line-backspace-2 () + "Check de-indentation with tabs. Bug#19730." + (let ((tab-width 8)) + (python-tests-with-temp-buffer + " +if x: +\tabcdefg +" + (python-tests-look-at "abcdefg") + (goto-char (line-end-position)) + (call-interactively #'python-indent-dedent-line-backspace) + (should + (string= (buffer-substring-no-properties + (line-beginning-position) (line-end-position)) + "\tabcdef"))))) + +(ert-deftest python-indent-dedent-line-backspace-3 () + "Paranoid check of de-indentation with tabs. Bug#19730." + (let ((tab-width 8)) + (python-tests-with-temp-buffer + " +if x: +\tif y: +\t abcdefg +" + (python-tests-look-at "abcdefg") + (goto-char (line-end-position)) + (call-interactively #'python-indent-dedent-line-backspace) + (should + (string= (buffer-substring-no-properties + (line-beginning-position) (line-end-position)) + "\t abcdef")) + (back-to-indentation) + (call-interactively #'python-indent-dedent-line-backspace) + (should + (string= (buffer-substring-no-properties + (line-beginning-position) (line-end-position)) + "\tabcdef")) + (call-interactively #'python-indent-dedent-line-backspace) + (should + (string= (buffer-substring-no-properties + (line-beginning-position) (line-end-position)) + " abcdef")) + (call-interactively #'python-indent-dedent-line-backspace) + (should + (string= (buffer-substring-no-properties + (line-beginning-position) (line-end-position)) + "abcdef"))))) + ;;; Shell integration commit 41c3b9241cd78a1eaeb159572b6f4e546b1f8d7b Author: Fabián Ezequiel Gallina Date: Fri Jan 30 00:19:55 2015 -0300 * lisp/progmodes/python.el (python-indent-context): Respect user indentation after comment. * test/automated/python-tests.el (python-indent-pep8-1) (python-indent-pep8-2, python-indent-pep8-3) (python-indent-after-comment-2): Fix tests. (python-indent-after-comment-3): New test. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0d0f7aa..2068601 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-01-30 Fabián Ezequiel Gallina + + * progmodes/python.el (python-indent-context): Respect user + indentation after comment. + 2015-01-29 Tassilo Horn * textmodes/reftex-vars.el (featurep): Conditionalize value of diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index d0a8308..5842be7 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -810,15 +810,6 @@ keyword ;; Beginning of buffer. ((= (line-number-at-pos) 1) (cons :no-indent 0)) - ;; Comment continuation (maybe). - ((save-excursion - (when (and - (or - (python-info-current-line-comment-p) - (python-info-current-line-empty-p)) - (forward-comment -1) - (python-info-current-line-comment-p)) - (cons :after-comment (point))))) ;; Inside a string. ((let ((start (python-syntax-context 'string ppss))) (when start @@ -930,21 +921,22 @@ keyword ((let ((start (python-info-dedenter-statement-p))) (when start (cons :at-dedenter-block-start start)))) - ;; After normal line. - ((let ((start (save-excursion - (back-to-indentation) - (skip-chars-backward " \t\n") - (python-nav-beginning-of-statement) - (point)))) - (when start - (if (save-excursion - (python-util-forward-comment -1) - (python-nav-beginning-of-statement) - (looking-at (python-rx block-ender))) - (cons :after-block-end start) - (cons :after-line start))))) - ;; Default case: do not indent. - (t (cons :no-indent 0)))))) + ;; After normal line, comment or ender (default case). + ((save-excursion + (back-to-indentation) + (skip-chars-backward " \t\n") + (python-nav-beginning-of-statement) + (cons + (cond ((python-info-current-line-comment-p) + :after-comment) + ((save-excursion + (goto-char (line-end-position)) + (python-util-forward-comment -1) + (python-nav-beginning-of-statement) + (looking-at (python-rx block-ender))) + :after-block-end) + (t :after-line)) + (point)))))))) (defun python-indent--calculate-indentation () "Internal implementation of `python-indent-calculate-indentation'. diff --git a/test/ChangeLog b/test/ChangeLog index 62876e9..72e1b85 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,10 @@ +2015-01-30 Fabián Ezequiel Gallina + + * automated/python-tests.el (python-indent-pep8-1) + (python-indent-pep8-2, python-indent-pep8-3) + (python-indent-after-comment-2): Fix tests. + (python-indent-after-comment-3): New test. + 2015-01-26 Fabián Ezequiel Gallina * automated/python-tests.el (python-indent-pep8-1) diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index 5bddfe8..4972731 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el @@ -177,7 +177,7 @@ foo = long_function_name(var_one, var_two, (should (eq (car (python-indent-context)) :no-indent)) (should (= (python-indent-calculate-indentation) 0)) (python-tests-look-at "foo = long_function_name(var_one, var_two,") - (should (eq (car (python-indent-context)) :after-line)) + (should (eq (car (python-indent-context)) :after-comment)) (should (= (python-indent-calculate-indentation) 0)) (python-tests-look-at "var_three, var_four)") (should (eq (car (python-indent-context)) :inside-paren)) @@ -195,7 +195,7 @@ def long_function_name( (should (eq (car (python-indent-context)) :no-indent)) (should (= (python-indent-calculate-indentation) 0)) (python-tests-look-at "def long_function_name(") - (should (eq (car (python-indent-context)) :after-line)) + (should (eq (car (python-indent-context)) :after-comment)) (should (= (python-indent-calculate-indentation) 0)) (python-tests-look-at "var_one, var_two, var_three,") (should (eq (car (python-indent-context)) @@ -221,7 +221,7 @@ foo = long_function_name( (should (eq (car (python-indent-context)) :no-indent)) (should (= (python-indent-calculate-indentation) 0)) (python-tests-look-at "foo = long_function_name(") - (should (eq (car (python-indent-context)) :after-line)) + (should (eq (car (python-indent-context)) :after-comment)) (should (= (python-indent-calculate-indentation) 0)) (python-tests-look-at "var_one, var_two,") (should (eq (car (python-indent-context)) :inside-paren-newline-start)) @@ -286,10 +286,10 @@ class Blag(object): def func(arg): # I don't do much return arg - # This comment is badly indented just because. - # But we won't mess with the user in this line. + # This comment is badly indented because the user forced so. + # At this line python.el wont dedent, user is always right. -now_we_do_mess_cause_this_is_not_a_comment = 1 +comment_wins_over_ender = True # yeah, that. " @@ -301,28 +301,49 @@ now_we_do_mess_cause_this_is_not_a_comment = 1 ;; the rules won't apply here. (should (eq (car (python-indent-context)) :after-block-start)) (should (= (python-indent-calculate-indentation) 4)) - (python-tests-look-at "# This comment is badly") + (python-tests-look-at "# This comment is badly indented") (should (eq (car (python-indent-context)) :after-block-end)) - ;; The return keyword moves indentation backwards 4 spaces, but - ;; let's assume this comment was placed there because the user - ;; wanted to (manually adding spaces or whatever). + ;; The return keyword do make indentation lose a level... (should (= (python-indent-calculate-indentation) 0)) - (python-tests-look-at "# but we won't mess") + ;; ...but the current indentation was forced by the user. + (python-tests-look-at "# At this line python.el wont dedent") (should (eq (car (python-indent-context)) :after-comment)) (should (= (python-indent-calculate-indentation) 4)) - ;; Behave the same for blank lines: potentially a comment. + ;; Should behave the same for blank lines: potentially a comment. (forward-line 1) (should (eq (car (python-indent-context)) :after-comment)) (should (= (python-indent-calculate-indentation) 4)) - (python-tests-look-at "now_we_do_mess") - ;; Here is where comment indentation starts to get ignored and - ;; where the user can't freely indent anymore. - (should (eq (car (python-indent-context)) :after-block-end)) - (should (= (python-indent-calculate-indentation) 0)) + (python-tests-look-at "comment_wins_over_ender") + ;; The comment won over the ender because the user said so. + (should (eq (car (python-indent-context)) :after-comment)) + (should (= (python-indent-calculate-indentation) 4)) + ;; The indentation calculated fine for the assignment, but the user + ;; choose to force it back to the first column. Next line should + ;; be aware of that. (python-tests-look-at "# yeah, that.") (should (eq (car (python-indent-context)) :after-line)) (should (= (python-indent-calculate-indentation) 0)))) +(ert-deftest python-indent-after-comment-3 () + "Test after-comment in buggy case." + (python-tests-with-temp-buffer + " +class A(object): + + def something(self, arg): + if True: + return arg + + # A comment + + @adecorator + def method(self, a, b): + pass +" + (python-tests-look-at "@adecorator") + (should (eq (car (python-indent-context)) :after-comment)) + (should (= (python-indent-calculate-indentation) 4)))) + (ert-deftest python-indent-inside-paren-1 () "The most simple inside-paren case that shouldn't fail." (python-tests-with-temp-buffer commit 868df451530c294cff3d4ccb98873626aa8105df Author: Hans Wennborg Date: Thu Jan 29 21:31:14 2015 +0200 Avoid compiler warnings in decode_env_path. src/emacs.c (decode_env_path): Add parentheses around ternary operator to increase readability and pacify compiler warnings. diff --git a/src/ChangeLog b/src/ChangeLog index 0877940..949ea74 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2015-01-29 Hans Wennborg (tiny change) + + * emacs.c (decode_env_path): Add parentheses around ternary + operator to increase readability and pacify compiler warnings. + 2015-01-29 Eli Zaretskii * w32.c (sys_readdir): Map ERROR_NOT_READY (as in "device not diff --git a/src/emacs.c b/src/emacs.c index 0b7adbd..9b78a70 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2300,7 +2300,7 @@ decode_env_path (const char *evarname, const char *defalt, bool empty) p = strchr (path, SEPCHAR); if (!p) p = path + strlen (path); - element = (p - path ? make_unibyte_string (path, p - path) + element = ((p - path) ? make_unibyte_string (path, p - path) : empty_element); if (! NILP (element)) { commit b28c97942e29eb193951e56b6b8c2b7f21763333 Author: Tassilo Horn Date: Thu Jan 29 20:28:16 2015 +0100 Fix XEmacs version typo in comment and ChangeLog diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2811556..0d0f7aa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,7 @@ 2015-01-29 Tassilo Horn * textmodes/reftex-vars.el (featurep): Conditionalize value of - reftex-label-regexps in order to stay compatible with XEmacs 25 + reftex-label-regexps in order to stay compatible with XEmacs 21.5 which has no explicitly numbered groups in regexps (bug#19714). 2015-01-28 Tassilo Horn diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index 96d76fb..b471707 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -867,8 +867,8 @@ DOWNCASE t: Downcase words before using them." (option (boolean :tag "Downcase words ")))) (if (featurep 'xemacs) - ;; XEmacs 25 doesn't have explicitly numbered matching groups, so - ;; this list mustn't get any more items. + ;; XEmacs 21.5 doesn't have explicitly numbered matching groups, + ;; so this list mustn't get any more items. (defconst reftex-label-regexps '("\\\\label{\\([^}]*\\)}")) (defcustom reftex-label-regexps '(;; Normal \\label{foo} labels commit 989fb32064c890dd6df4aa77da5394e655af6f51 Author: Eli Zaretskii Date: Thu Jan 29 20:43:08 2015 +0200 Improve solution of bug #19701 src/w32.c (sys_readdir): Map ERROR_NOT_READY (as in "device not ready") to ENOENT. diff --git a/src/ChangeLog b/src/ChangeLog index dc49508..0877940 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2015-01-29 Eli Zaretskii + + * w32.c (sys_readdir): Map ERROR_NOT_READY (as in "device not + ready") to ENOENT. + 2015-01-28 Eli Zaretskii * dired.c (directory_files_internal, file_name_completion) diff --git a/src/w32.c b/src/w32.c index 2faa742..f8284f3 100644 --- a/src/w32.c +++ b/src/w32.c @@ -3454,6 +3454,7 @@ sys_readdir (DIR *dirp) break; case ERROR_PATH_NOT_FOUND: case ERROR_INVALID_DRIVE: + case ERROR_NOT_READY: case ERROR_BAD_NETPATH: case ERROR_BAD_NET_NAME: errno = ENOENT; commit 6310530450d14d4afe4eea2ea2779a086f8e52c8 Author: Eli Zaretskii Date: Thu Jan 29 18:51:24 2015 +0200 Fix refilling of list of language environments in User Manual (Bug#19697) doc/emacs/mule.texi (Language Environments): Work around refill bug in makeinfo 4.x. diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 93ae618..24d94f9 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2015-01-29 Eli Zaretskii + + * mule.texi (Language Environments): Work around refill bug in + makeinfo 4.x. (Bug#19697) + 2015-01-26 Eli Zaretskii * cmdargs.texi (Action Arguments): Clarify into which buffer diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index bea06f5..f8b06bd 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi @@ -265,123 +265,101 @@ the list of supported language environments, and use the command for more information about the language environment @var{lang-env}. Supported language environments include: +@c @cindex entries below are split between portions of the list to +@c make them more accurate, i.e. land on the line that mentions the +@c language. However, makeinfo 4.x doesn't fill inside @quotation +@c lines that follow a @cindex entry and whose text has no whitespace. +@c To work around, we group the language environments together, so +@c that the blank that separates them triggers refill. @quotation @cindex ASCII -ASCII, @cindex Arabic -Arabic, +ASCII, Arabic, @cindex Belarusian -Belarusian, @cindex Bengali -Bengali, +Belarusian, Bengali, @cindex Brazilian Portuguese -Brazilian Portuguese, @cindex Bulgarian -Bulgarian, +Brazilian Portuguese, Bulgarian, @cindex Burmese -Burmese, @cindex Cham -Cham, +Burmese, Cham, @cindex Chinese Chinese-BIG5, Chinese-CNS, Chinese-EUC-TW, Chinese-GB, Chinese-GB18030, Chinese-GBK, @cindex Croatian -Croatian, @cindex Cyrillic -Cyrillic-ALT, Cyrillic-ISO, Cyrillic-KOI8, +Croatian, Cyrillic-ALT, Cyrillic-ISO, Cyrillic-KOI8, @cindex Czech -Czech, @cindex Devanagari -Devanagari, +Czech, Devanagari, @cindex Dutch -Dutch, @cindex English -English, +Dutch, English, @cindex Esperanto -Esperanto, @cindex Ethiopic -Ethiopic, +Esperanto, Ethiopic, @cindex French -French, @cindex Georgian -Georgian, +French, Georgian, @cindex German -German, @cindex Greek -Greek, @cindex Gujarati -Gujarati, +German, Greek, Gujarati, @cindex Hebrew -Hebrew, @cindex IPA -IPA, +Hebrew, IPA, @cindex Italian Italian, @cindex Japanese -Japanese, @cindex Kannada -Kannada, +Japanese, Kannada, @cindex Khmer -Khmer, @cindex Korean -Korean, @cindex Lao -Lao, +Khmer, Korean, Lao, @cindex Latin Latin-1, Latin-2, Latin-3, Latin-4, Latin-5, Latin-6, Latin-7, Latin-8, Latin-9, @cindex Latvian -Latvian, @cindex Lithuanian -Lithuanian, +Latvian, Lithuanian, @cindex Malayalam -Malayalam, @cindex Oriya -Oriya, +Malayalam, Oriya, @cindex Persian -Persian, @cindex Polish -Polish, +Persian, Polish, @cindex Punjabi -Punjabi, @cindex Romanian -Romanian, +Punjabi, Romanian, @cindex Russian -Russian, @cindex Sinhala -Sinhala, +Russian, Sinhala, @cindex Slovak -Slovak, @cindex Slovenian -Slovenian, @cindex Spanish -Spanish, +Slovak, Slovenian, Spanish, @cindex Swedish -Swedish, @cindex TaiViet -TaiViet, +Swedish, TaiViet, @cindex Tajik -Tajik, @cindex Tamil -Tamil, +Tajik, Tamil, @cindex Telugu -Telugu, @cindex Thai -Thai, +Telugu, Thai, @cindex Tibetan -Tibetan, @cindex Turkish -Turkish, +Tibetan, Turkish, @cindex UTF-8 -UTF-8, @cindex Ukrainian -Ukrainian, +UTF-8, Ukrainian, @cindex Vietnamese -Vietnamese, @cindex Welsh -Welsh, and +Vietnamese, Welsh, @cindex Windows-1255 -Windows-1255. +and Windows-1255. @end quotation To display the script(s) used by your language environment on a commit c4c447d8cca960513428eb3cfde73adca627d566 Author: Tassilo Horn Date: Thu Jan 29 15:51:40 2015 +0100 Restore XEmacs compatibility * textmodes/reftex-vars.el (featurep): Conditionalize value of reftex-label-regexps in order to stay compatible with XEmacs 25 which has no explicitly numbered groups in regexps (bug#19714). diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2c852f9..2811556 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2015-01-29 Tassilo Horn + + * textmodes/reftex-vars.el (featurep): Conditionalize value of + reftex-label-regexps in order to stay compatible with XEmacs 25 + which has no explicitly numbered groups in regexps (bug#19714). + 2015-01-28 Tassilo Horn * textmodes/reftex.el (reftex-syntax-table-for-bib): Give ( and ) diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index 115c1e0..96d76fb 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -866,13 +866,17 @@ DOWNCASE t: Downcase words before using them." (string :tag "")) (option (boolean :tag "Downcase words ")))) -(defcustom reftex-label-regexps - '(;; Normal \\label{foo} labels - "\\\\label{\\(?1:[^}]*\\)}" - ;; keyvals [..., label = {foo}, ...] forms used by ctable, - ;; listings, minted, ... - "\\[[^]]*\\ Date: Thu Jan 29 02:29:55 2015 +0000 Merge remote-tracking branch 'origin/emacs-24' into emacs-24 commit c96c93fad1bc0c15a6e680ac38c2cbc56e55bed9 Author: Lars Magne Ingebrigtsen Date: Thu Jan 29 02:28:18 2015 +0000 [Backport] lisp/gnus/message.el (message-smtpmail-send-it): Make non-standard mail header separators work with smtpmail diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index d0a68b7..592f34d 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2015-01-29 Lars Ingebrigtsen + + * message.el (message-smtpmail-send-it): Remove the mail header + separator before sending. + 2015-01-28 Elias Oltmanns * nnimap.el (nnimap-find-expired-articles): Fix handling of diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index c37b939..646aa8f 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -4828,6 +4828,11 @@ evaluates `message-send-mail-hook' just before sending a message. It is useful if your ISP requires the POP-before-SMTP authentication. See the Gnus manual for details." (run-hooks 'message-send-mail-hook) + ;; Change header-delimiter to be what smtpmail expects. + (goto-char (point-min)) + (when (re-search-forward + (concat "^" (regexp-quote mail-header-separator) "\n")) + (replace-match "\n")) (smtpmail-send-it)) (defun message-send-mail-with-mailclient () commit 972282f3bdb12188193e453aa470591d7d52cb7e Author: Lars Magne Ingebrigtsen Date: Thu Jan 29 02:22:34 2015 +0000 [Backport] lisp/gnus/message.el (message-smtpmail-send-it): Make non-standard mail header separators work with smtpmail diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index d0a68b7..592f34d 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2015-01-29 Lars Ingebrigtsen + + * message.el (message-smtpmail-send-it): Remove the mail header + separator before sending. + 2015-01-28 Elias Oltmanns * nnimap.el (nnimap-find-expired-articles): Fix handling of diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index c37b939..646aa8f 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -4828,6 +4828,11 @@ evaluates `message-send-mail-hook' just before sending a message. It is useful if your ISP requires the POP-before-SMTP authentication. See the Gnus manual for details." (run-hooks 'message-send-mail-hook) + ;; Change header-delimiter to be what smtpmail expects. + (goto-char (point-min)) + (when (re-search-forward + (concat "^" (regexp-quote mail-header-separator) "\n")) + (replace-match "\n")) (smtpmail-send-it)) (defun message-send-mail-with-mailclient () commit 7779da6fc1ff3628e1b754a5bef898d8fbdb4b7b Author: Elias Oltmanns Date: Thu Jan 29 01:41:44 2015 +0000 lisp/gnus/nimap.el (nnimap-find-expired-articles): nnimap `never' expiration fix diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 199cf4e..a2dd38f 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -994,7 +994,6 @@ textual parts.") (delete 0 (mapcar #'string-to-number (cdr (assoc "SEARCH" (cdr result))))))))))) - (defun nnimap-find-article-by-message-id (group server message-id &optional limit) "Search for message with MESSAGE-ID in GROUP from SERVER. commit 9ee2d9f92a9097c468fb4e938a14b2f569feb453 Author: Elias Oltmanns Date: Thu Jan 29 01:20:00 2015 +0000 [Backport] lisp/gnus/nnimap.el (nnimap-find-expired-articles): nnimap `never' expiration fix diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 2bdbfcc..d0a68b7 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,10 +1,15 @@ +2015-01-28 Elias Oltmanns + + * nnimap.el (nnimap-find-expired-articles): Fix handling of + (expiry-wait . never). + 2014-12-19 Andreas Schwab * gnus-group.el (gnus-read-ephemeral-bug-group): Bind coding-system-for-read and coding-system-for-write only around with-temp-file, and make buffer unibyte. Don't write temp file twice. -2014-11-26 John Mastro (tiny change) +2014-11-26 John Mastro (tiny change) * auth-source.el (auth-source-macos-keychain-search-items): Return result of `auth-source-macos-keychain-result-append' (bug#19074). diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 8ed5143..199cf4e 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -979,19 +979,20 @@ textual parts.") (defun nnimap-find-expired-articles (group) (let ((cutoff (nnmail-expired-article-p group nil nil))) - (with-current-buffer (nnimap-buffer) - (let ((result - (nnimap-command - "UID SEARCH SENTBEFORE %s" - (format-time-string - (format "%%d-%s-%%Y" - (upcase - (car (rassoc (nth 4 (decode-time cutoff)) - parse-time-months)))) - cutoff)))) - (and (car result) - (delete 0 (mapcar #'string-to-number - (cdr (assoc "SEARCH" (cdr result)))))))))) + (when cutoff + (with-current-buffer (nnimap-buffer) + (let ((result + (nnimap-command + "UID SEARCH SENTBEFORE %s" + (format-time-string + (format "%%d-%s-%%Y" + (upcase + (car (rassoc (nth 4 (decode-time cutoff)) + parse-time-months)))) + cutoff)))) + (and (car result) + (delete 0 (mapcar #'string-to-number + (cdr (assoc "SEARCH" (cdr result))))))))))) (defun nnimap-find-article-by-message-id (group server message-id