commit 9b661ff1a8e0fc3fc809a42a187356d6cb5ad2c9 (HEAD, refs/remotes/origin/master) Author: Po Lu Date: Mon Aug 8 11:59:08 2022 +0800 Fix warnings outside XI2 builds * src/xterm.c (x_query_pointer): Juggle some definitions around. diff --git a/src/xterm.c b/src/xterm.c index c1f74f6866..23a35aa161 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -13091,10 +13091,10 @@ x_query_pointer (Display *dpy, Window w, Window *root_return, int *root_y_return, int *win_x_return, int *win_y_return, unsigned int *mask_return) { - struct x_display_info *dpyinfo; Bool rc; - bool had_errors; #ifdef HAVE_XINPUT2 + struct x_display_info *dpyinfo; + bool had_errors; XIModifierState modifiers; XIButtonState buttons; XIGroupState group; /* Unused. */ @@ -13102,8 +13102,8 @@ x_query_pointer (Display *dpy, Window w, Window *root_return, unsigned int state; #endif - dpyinfo = x_display_info_for_display (dpy); #ifdef HAVE_XINPUT2 + dpyinfo = x_display_info_for_display (dpy); if (dpyinfo && dpyinfo->client_pointer_device != -1) { /* Catch errors caused by the device going away. This is not commit 16b8948d79e27a37d223eb171c21e6b78d8b5a7a Author: Po Lu Date: Mon Aug 8 11:44:53 2022 +0800 Improve handling of pointer focus under the input extension * src/xfns.c (x_relative_mouse_position) (Fx_mouse_absolute_pixel_position, compute_tip_xy): Use x_query_pointer instead of XQueryPointer. * src/xterm.c (xi_populate_device_from_info): Set new attachment field. (xi_handle_focus_change): Set client pointer. (xi_focus_handle_for_device, xi_handle_interaction): Use attached keyboard device to handle focus. (x_query_pointer): New function. (XTmouse_position, x_scroll_bar_report_motion) (x_horizontal_scroll_bar_report_motion, handle_one_xevent): Use x_query_pointer instead of XQueryPointer. (x_term_init): Initialize client pointer device. * src/xterm.h (struct xi_device_t): New field `attachment'. (struct x_display_info): New field `client_pointer_device'. diff --git a/src/xfns.c b/src/xfns.c index 672097c0d8..2845ecca6a 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -609,24 +609,24 @@ x_relative_mouse_position (struct frame *f, int *x, int *y) block_input (); - XQueryPointer (FRAME_X_DISPLAY (f), - FRAME_DISPLAY_INFO (f)->root_window, + x_query_pointer (FRAME_X_DISPLAY (f), + FRAME_DISPLAY_INFO (f)->root_window, - /* The root window which contains the pointer. */ - &root, + /* The root window which contains the pointer. */ + &root, - /* Window pointer is on, not used */ - &dummy_window, + /* Window pointer is on, not used */ + &dummy_window, - /* The position on that root window. */ - x, y, + /* The position on that root window. */ + x, y, - /* x/y in dummy_window coordinates, not used. */ - &dummy, &dummy, + /* x/y in dummy_window coordinates, not used. */ + &dummy, &dummy, - /* Modifier keys and pointer buttons, about which - we don't care. */ - (unsigned int *) &dummy); + /* Modifier keys and pointer buttons, about which + we don't care. */ + (unsigned int *) &dummy); XTranslateCoordinates (FRAME_X_DISPLAY (f), @@ -6823,10 +6823,10 @@ selected frame's display. */) return Qnil; block_input (); - XQueryPointer (FRAME_X_DISPLAY (f), - FRAME_DISPLAY_INFO (f)->root_window, - &root, &dummy_window, &x, &y, &dummy, &dummy, - (unsigned int *) &dummy); + x_query_pointer (FRAME_X_DISPLAY (f), + FRAME_DISPLAY_INFO (f)->root_window, + &root, &dummy_window, &x, &y, &dummy, &dummy, + (unsigned int *) &dummy); unblock_input (); return Fcons (make_fixnum (x), make_fixnum (y)); @@ -8382,8 +8382,8 @@ compute_tip_xy (struct frame *f, Lisp_Object parms, Lisp_Object dx, Lisp_Object frame, attributes, monitor, geometry; block_input (); - XQueryPointer (FRAME_X_DISPLAY (f), FRAME_DISPLAY_INFO (f)->root_window, - &root, &child, root_x, root_y, &win_x, &win_y, &pmask); + x_query_pointer (FRAME_X_DISPLAY (f), FRAME_DISPLAY_INFO (f)->root_window, + &root, &child, root_x, root_y, &win_x, &win_y, &pmask); unblock_input (); XSETFRAME (frame, f); diff --git a/src/xterm.c b/src/xterm.c index 54bf656657..c1f74f6866 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -5291,6 +5291,7 @@ xi_populate_device_from_info (struct xi_device_t *xi_device, xi_device->direct_p = false; #endif xi_device->name = build_string (device->name); + xi_device->attachment = device->attachment; for (c = 0; c < device->num_classes; ++c) { @@ -12474,7 +12475,9 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction, focus is switched to a given frame. This situation is handled by keeping track of each master device's focus frame, the time of the last interaction with that frame, and always keeping the focus on - the most recently selected frame. */ + the most recently selected frame. We also use the pointer of the + device that is keeping the current frame focused in functions like + `mouse-position'. */ static void xi_handle_focus_change (struct x_display_info *dpyinfo) @@ -12493,6 +12496,8 @@ xi_handle_focus_change (struct x_display_info *dpyinfo) new = NULL; time = 0; + dpyinfo->client_pointer_device = -1; + for (i = 0; i < dpyinfo->num_devices; ++i) { device = &dpyinfo->devices[i]; @@ -12503,6 +12508,14 @@ xi_handle_focus_change (struct x_display_info *dpyinfo) new = device->focus_frame; time = device->focus_frame_time; source = device; + + /* Use this device for future calls to `mouse-position' etc. + If it is a keyboard, use its attached pointer. */ + + if (device->use == XIMasterKeyboard) + dpyinfo->client_pointer_device = device->attachment; + else + dpyinfo->client_pointer_device = device->device_id; } if (device->focus_implicit_frame @@ -12511,6 +12524,14 @@ xi_handle_focus_change (struct x_display_info *dpyinfo) new = device->focus_implicit_frame; time = device->focus_implicit_time; source = device; + + /* Use this device for future calls to `mouse-position' etc. + If it is a keyboard, use its attached pointer. */ + + if (device->use == XIMasterKeyboard) + dpyinfo->client_pointer_device = device->attachment; + else + dpyinfo->client_pointer_device = device->device_id; } } @@ -12601,6 +12622,12 @@ xi_focus_handle_for_device (struct x_display_info *dpyinfo, if (!event->focus) break; + if (device->use == XIMasterPointer) + device = xi_device_from_id (dpyinfo, device->attachment); + + if (!device) + break; + device->focus_implicit_frame = mentioned_frame; device->focus_implicit_time = event->time; break; @@ -12609,6 +12636,12 @@ xi_focus_handle_for_device (struct x_display_info *dpyinfo, if (!event->focus) break; + if (device->use == XIMasterPointer) + device = xi_device_from_id (dpyinfo, device->attachment); + + if (!device) + break; + device->focus_implicit_frame = NULL; break; } @@ -12646,6 +12679,13 @@ xi_handle_interaction (struct x_display_info *dpyinfo, { bool change; + /* If DEVICE is a pointer, use its attached keyboard device. */ + if (device->use == XIMasterPointer) + device = xi_device_from_id (dpyinfo, device->attachment); + + if (!device) + return; + change = false; if (device->focus_frame == f) @@ -13042,6 +13082,68 @@ get_keysym_name (int keysym) return value; } +/* Like XQueryPointer, but always use the right client pointer + device. */ + +Bool +x_query_pointer (Display *dpy, Window w, Window *root_return, + Window *child_return, int *root_x_return, + int *root_y_return, int *win_x_return, + int *win_y_return, unsigned int *mask_return) +{ + struct x_display_info *dpyinfo; + Bool rc; + bool had_errors; +#ifdef HAVE_XINPUT2 + XIModifierState modifiers; + XIButtonState buttons; + XIGroupState group; /* Unused. */ + double root_x, root_y, win_x, win_y; + unsigned int state; +#endif + + dpyinfo = x_display_info_for_display (dpy); +#ifdef HAVE_XINPUT2 + if (dpyinfo && dpyinfo->client_pointer_device != -1) + { + /* Catch errors caused by the device going away. This is not + very expensive, since XIQueryPointer will sync anyway. */ + x_catch_errors (dpy); + rc = XIQueryPointer (dpyinfo->display, + dpyinfo->client_pointer_device, + w, root_return, child_return, + &root_x, &root_y, &win_x, &win_y, + &buttons, &modifiers, &group); + had_errors = x_had_errors_p (dpy); + x_uncatch_errors_after_check (); + + if (had_errors) + rc = XQueryPointer (dpyinfo->display, w, root_return, + child_return, root_x_return, + root_y_return, win_x_return, + win_y_return, mask_return); + else + { + state = 0; + + xi_convert_button_state (&buttons, &state); + *mask_return = state | modifiers.effective; + + *root_x_return = lrint (root_x); + *root_y_return = lrint (root_y); + *win_x_return = lrint (win_x); + *win_y_return = lrint (win_y); + } + } + else +#endif + rc = XQueryPointer (dpy, w, root_return, child_return, + root_x_return, root_y_return, win_x_return, + win_y_return, mask_return); + + return rc; +} + /* Mouse clicks and mouse movement. Rah. Formerly, we used PointerMotionHintMask (in standard_event_mask) @@ -13308,20 +13410,20 @@ XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, dpyinfo->last_mouse_scroll_bar = NULL; /* Figure out which root window we're on. */ - XQueryPointer (FRAME_X_DISPLAY (*fp), - DefaultRootWindow (FRAME_X_DISPLAY (*fp)), - /* The root window which contains the pointer. */ - &root, - /* Trash which we can't trust if the pointer is on - a different screen. */ - &dummy_window, - /* The position on that root window. */ - &root_x, &root_y, - /* More trash we can't trust. */ - &dummy, &dummy, - /* Modifier keys and pointer buttons, about which - we don't care. */ - (unsigned int *) &dummy); + x_query_pointer (FRAME_X_DISPLAY (*fp), + DefaultRootWindow (FRAME_X_DISPLAY (*fp)), + /* The root window which contains the pointer. */ + &root, + /* Trash which we can't trust if the pointer is on + a different screen. */ + &dummy_window, + /* The position on that root window. */ + &root_x, &root_y, + /* More trash we can't trust. */ + &dummy, &dummy, + /* Modifier keys and pointer buttons, about which + we don't care. */ + (unsigned int *) &dummy); /* Now we have a position on the root; find the innermost window containing the pointer. */ @@ -15894,17 +15996,17 @@ x_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window, /* Get the mouse's position relative to the scroll bar window, and report that. */ - if (XQueryPointer (FRAME_X_DISPLAY (f), w, + if (x_query_pointer (FRAME_X_DISPLAY (f), w, - /* Root, child, root x and root y. */ - &dummy_window, &dummy_window, - &dummy_coord, &dummy_coord, + /* Root, child, root x and root y. */ + &dummy_window, &dummy_window, + &dummy_coord, &dummy_coord, - /* Position relative to scroll bar. */ - &win_x, &win_y, + /* Position relative to scroll bar. */ + &win_x, &win_y, - /* Mouse buttons and modifier keys. */ - &dummy_mask)) + /* Mouse buttons and modifier keys. */ + &dummy_mask)) { int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, bar->height); @@ -15963,17 +16065,17 @@ x_horizontal_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_windo /* Get the mouse's position relative to the scroll bar window, and report that. */ - if (XQueryPointer (FRAME_X_DISPLAY (f), w, + if (x_query_pointer (FRAME_X_DISPLAY (f), w, - /* Root, child, root x and root y. */ - &dummy_window, &dummy_window, - &dummy_coord, &dummy_coord, + /* Root, child, root x and root y. */ + &dummy_window, &dummy_window, + &dummy_coord, &dummy_coord, - /* Position relative to scroll bar. */ - &win_x, &win_y, + /* Position relative to scroll bar. */ + &win_x, &win_y, - /* Mouse buttons and modifier keys. */ - &dummy_mask)) + /* Mouse buttons and modifier keys. */ + &dummy_mask)) { int left_range = HORIZONTAL_SCROLL_BAR_LEFT_RANGE (f, bar->width); @@ -22202,7 +22304,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (info) { if (device && info->enabled) - device->use = info->use; + { + device->use = info->use; + device->attachment = info->attachment; + } else if (device) disabled[n_disabled++] = hev->info[i].deviceid; @@ -27816,6 +27921,8 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) int minor = 0; #endif + dpyinfo->client_pointer_device = -1; + if (XQueryExtension (dpyinfo->display, "XInputExtension", &dpyinfo->xi2_opcode, &xi_first_event, &xi_first_error)) diff --git a/src/xterm.h b/src/xterm.h index 7be0f2ede6..e97f3d4c83 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -249,6 +249,10 @@ struct xi_device_t /* Whether or not the device is grabbed and its use. */ int grab, use; + /* The attached device. Only valid if USE is some kind of master + device. */ + int attachment; + #ifdef HAVE_XINPUT2_2 /* Whether or not this device is a direct touch device. */ bool direct_p; @@ -708,13 +712,27 @@ struct x_display_info #ifdef HAVE_XINPUT2 bool supports_xi2; + + /* The minor version of the input extension. (Major is always + 2.x.) */ int xi2_version; + + /* The generic event opcode of XI2 events. */ int xi2_opcode; + /* The number of devices on this display known to Emacs. */ int num_devices; + + /* Array of all input extension devices on this display known to + Emacs. */ struct xi_device_t *devices; + /* Pending keystroke time. */ Time pending_keystroke_time; + + /* Pending keystroke source. If a core KeyPress event arrives with + the same timestamp as pending_keystroke_time, it will be treated + as originating from this device. */ int pending_keystroke_source; #if defined USE_GTK && !defined HAVE_GTK3 @@ -724,6 +742,10 @@ struct x_display_info input method) core key event. */ bool pending_keystroke_time_special_p; #endif + + /* The client pointer. We keep a record client-side to avoid + calling XISetClientPointer all the time. */ + int client_pointer_device; #endif #ifdef HAVE_XKB @@ -1599,11 +1621,14 @@ extern Lisp_Object x_cr_export_frames (Lisp_Object, cairo_surface_type_t); #ifdef HAVE_XRENDER extern void x_xrender_color_from_gc_background (struct frame *, GC, XRenderColor *, bool); -extern void x_xr_ensure_picture (struct frame *f); -extern void x_xr_apply_ext_clip (struct frame *f, GC gc); -extern void x_xr_reset_ext_clip (struct frame *f); +extern void x_xr_ensure_picture (struct frame *); +extern void x_xr_apply_ext_clip (struct frame *, GC); +extern void x_xr_reset_ext_clip (struct frame *); #endif +extern Bool x_query_pointer (Display *, Window, Window *, Window *, int *, + int *, int *, int *, unsigned int *); + #ifdef HAVE_GTK3 extern void x_scroll_bar_configure (GdkEvent *); #endif commit 7dab52dfbce9c39a77524376a53e8d65b3e470a3 Author: Stefan Kangas Date: Sun Aug 7 19:21:09 2022 +0200 Minor cleanups in ediff-*.el * lisp/vc/ediff-init.el (ediff-window-visible-p): (ediff-nonempty-string-p): Simplify. (stipple-pixmap): Don't try XEmacs specific(?) variable. (ediff-frame-unsplittable-p): Make obsolete. Update callers. (ediff-has-gutter-support-p): Redefine as obsolete function alias for 'ignore'. (ediff-mouse-event-p): Redefine as obsolete function alias for 'mouse-event-p'. Update callers. * lisp/vc/ediff-util.el (ediff-submit-report): Simplify. (ediff-filename-magic-p): Make obsolete. Update callers. (ediff-activate-mark): Make obsolete. Update callers. * lisp/vc/ediff-help.el: * lisp/vc/ediff-hook.el: * lisp/vc/ediff-util.el: * lisp/vc/ediff-wind.el: Remove superfluous defvars. diff --git a/lisp/vc/ediff-help.el b/lisp/vc/ediff-help.el index 42fbde2165..e2d93d2b31 100644 --- a/lisp/vc/ediff-help.el +++ b/lisp/vc/ediff-help.el @@ -24,10 +24,6 @@ ;;; Code: -;; Compiler pacifier start -(defvar ediff-multiframe) -;; end pacifier - (require 'ediff-init) (defvar ediff-multiframe) diff --git a/lisp/vc/ediff-hook.el b/lisp/vc/ediff-hook.el index 0160d9f684..d1eff0151a 100644 --- a/lisp/vc/ediff-hook.el +++ b/lisp/vc/ediff-hook.el @@ -35,16 +35,8 @@ ;; (define-key menu-bar-tools-menu [ediff] ;; '("Compare" . menu-bar-ediff-menu)) -;; Compiler pacifier -(defvar ediff-menu) -(defvar ediff-merge-menu) -(defvar epatch-menu) -(defvar ediff-misc-menu) -;; end pacifier - ;; allow menus to be set up without ediff-wind.el being loaded -;; Emacs ;; initialize menu bar keymaps (defvar menu-bar-ediff-misc-menu (make-sparse-keymap "Ediff Miscellanea")) diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el index 29f24436e1..a3e77200dd 100644 --- a/lisp/vc/ediff-init.el +++ b/lisp/vc/ediff-init.el @@ -27,17 +27,13 @@ (require 'cl-lib) (require 'ediff-util) -;; Start compiler pacifier (defvar ediff-metajob-name) (defvar ediff-meta-buffer) (defvar ediff-grab-mouse) (defvar ediff-mouse-pixel-position) (defvar ediff-mouse-pixel-threshold) -(defvar ediff-whitespace) (defvar ediff-multiframe) (defvar ediff-use-toolbar-p) -(defvar mswindowsx-bitmap-file-path) -;; end pacifier (defvar ediff-force-faces nil "If t, Ediff will think that it is running on a display that supports faces. @@ -59,11 +55,6 @@ that Ediff doesn't know about.") (defun ediff-has-toolbar-support-p () nil) - -(defun ediff-has-gutter-support-p () - (declare (obsolete nil "27.1")) - nil) - (defun ediff-use-toolbar-p () (and (ediff-has-toolbar-support-p) ;Can it do it ? (boundp 'ediff-use-toolbar-p) @@ -717,18 +708,6 @@ Ediff needs to find fine differences." :type 'symbol :group 'ediff) - -(define-obsolete-function-alias 'ediff-read-event #'read-event "27.1") - -(define-obsolete-function-alias 'ediff-overlayp #'overlayp "27.1") - -(define-obsolete-function-alias 'ediff-make-overlay #'make-overlay "27.1") - -(define-obsolete-function-alias 'ediff-delete-overlay #'delete-overlay "27.1") - -(define-obsolete-function-alias 'ediff-color-display-p #'display-color-p "27.1") - - ;; A var local to each control panel buffer. Indicates highlighting style ;; in effect for this buffer: `face', `ascii', ;; `off' -- turned off (on a dumb terminal only). @@ -967,8 +946,6 @@ this variable represents.") (cond ((not (ediff-has-face-support-p)) nil) ((and (boundp 'x-bitmap-file-path) (locate-library "stipple" t x-bitmap-file-path)) "stipple") - ((and (boundp 'mswindowsx-bitmap-file-path) - (locate-library "stipple" t mswindowsx-bitmap-file-path)) "stipple") (t "Stipple"))) (defface ediff-even-diff-A @@ -1275,6 +1252,7 @@ This default should work without changes." (defsubst ediff-frame-unsplittable-p (frame) + (declare (obsolete nil "29.1")) (cdr (assq 'unsplittable (frame-parameters frame)))) (defsubst ediff-get-next-window (wind prev-wind) @@ -1349,29 +1327,23 @@ This default should work without changes." (ediff-clear-fine-differences-in-one-buffer n 'C))) -(defsubst ediff-mouse-event-p (event) - (string-match "mouse" (format "%S" (event-basic-type event)))) - - (defsubst ediff-key-press-event-p (event) (or (char-or-string-p event) (symbolp event))) (defun ediff-event-point (event) - (cond ((ediff-mouse-event-p event) + (cond ((mouse-event-p event) (posn-point (event-start event))) ((ediff-key-press-event-p event) (point)) (t (error "Error")))) (defun ediff-event-buffer (event) - (cond ((ediff-mouse-event-p event) + (cond ((mouse-event-p event) (window-buffer (posn-window (event-start event)))) ((ediff-key-press-event-p event) (current-buffer)) (t (error "Error")))) -(define-obsolete-function-alias 'ediff-event-key #'identity "27.1") - (defun ediff-last-command-char () (declare (obsolete last-command-event "27.1")) last-command-event) @@ -1383,14 +1355,8 @@ This default should work without changes." (eq (frame-visible-p frame) 'icon))) (defsubst ediff-window-visible-p (wind) - ;; under TTY, window-live-p also means window is visible (and (window-live-p wind) - (or (not (display-graphic-p)) - (frame-visible-p (window-frame wind))))) - - -(define-obsolete-function-alias 'ediff-frame-char-width - #'frame-char-width "27.1") + (frame-visible-p (window-frame wind)))) (defun ediff-reset-mouse (&optional frame do-not-grab-mouse) (or frame (setq frame (selected-frame))) @@ -1433,8 +1399,6 @@ This default should work without changes." ediff-mouse-pixel-threshold)))) (t nil))))) -(define-obsolete-function-alias 'ediff-frame-char-height - #'frame-char-height "27.1") ;; Some overlay functions @@ -1449,12 +1413,6 @@ This default should work without changes." (defsubst ediff-empty-overlay-p (overl) (= (ediff-overlay-start overl) (ediff-overlay-end overl))) -(define-obsolete-function-alias 'ediff-overlay-buffer - #'overlay-buffer "27.1") - -(define-obsolete-function-alias 'ediff-overlay-get #'overlay-get "27.1") - - (defun ediff-move-overlay (overlay beg end &optional buffer) "If OVERLAY's buffer exists, call `move-overlay'." (let ((buf (and overlay (overlay-buffer overlay)))) @@ -1493,7 +1451,7 @@ This default should work without changes." (ediff-abbreviate-file-name (file-name-directory dir)))) (defsubst ediff-nonempty-string-p (string) - (and (stringp string) (not (string= string "")))) + (and (stringp string) (string-empty-p string))) (defun ediff-abbrev-jobname (jobname) (cond ((eq jobname 'ediff-directories) @@ -1554,11 +1512,23 @@ This default should work without changes." (ediff-file-attributes filename 5)) +(define-obsolete-function-alias 'ediff-has-gutter-support-p #'ignore "27.1") +(define-obsolete-function-alias 'ediff-event-key #'identity "27.1") +(define-obsolete-function-alias 'ediff-frame-char-width #'frame-char-width "27.1") +(define-obsolete-function-alias 'ediff-frame-char-height #'frame-char-height "27.1") +(define-obsolete-function-alias 'ediff-overlay-buffer #'overlay-buffer "27.1") +(define-obsolete-function-alias 'ediff-overlay-get #'overlay-get "27.1") +(define-obsolete-function-alias 'ediff-read-event #'read-event "27.1") +(define-obsolete-function-alias 'ediff-overlayp #'overlayp "27.1") +(define-obsolete-function-alias 'ediff-make-overlay #'make-overlay "27.1") +(define-obsolete-function-alias 'ediff-delete-overlay #'delete-overlay "27.1") +(define-obsolete-function-alias 'ediff-color-display-p #'display-color-p "27.1") (define-obsolete-function-alias 'ediff-with-syntax-table #'with-syntax-table "27.1") (define-obsolete-function-alias 'ediff-convert-standard-filename #'convert-standard-filename "28.1") (define-obsolete-function-alias 'ediff-hide-face #'ignore "28.1") (define-obsolete-function-alias 'ediff-file-remote-p #'file-remote-p "29.1") (define-obsolete-function-alias 'ediff-window-display-p #'display-graphic-p "29.1") +(define-obsolete-function-alias 'ediff-mouse-event-p #'mouse-event-p "29.1") (provide 'ediff-init) ;;; ediff-init.el ends here diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el index 94a890d95d..4d471e21b4 100644 --- a/lisp/vc/ediff-ptch.el +++ b/lisp/vc/ediff-ptch.el @@ -24,10 +24,8 @@ ;;; Code: - (require 'diff-mode) ; For `diff-file-junk-re'. - (defgroup ediff-ptch nil "Ediff patch support." :tag "Patch" diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index e8510acfb1..0d96a195ad 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -24,24 +24,11 @@ ;;; Code: - (provide 'ediff-util) ;FIXME: Break cyclic dependencies and move to the end! -;; Compiler pacifier (defvar ediff-use-toolbar-p) -(defvar ediff-toolbar-height) -(defvar ediff-toolbar) -(defvar ediff-toolbar-3way) -(defvar bottom-toolbar) -(defvar bottom-toolbar-visible-p) -(defvar bottom-toolbar-height) -(defvar mark-active) - (defvar ediff-after-quit-hook-internal nil) -;; end pacifier - - (require 'ediff-init) (require 'ediff-help) (require 'ediff-mult) @@ -1337,10 +1324,6 @@ To change the default, set the variable `ediff-use-toolbar-p', which see." (if (ediff-in-control-buffer-p) (ediff-recenter 'no-rehighlight))))) - -(define-obsolete-function-alias 'ediff-kill-bottom-toolbar #'ignore "27.1") -(define-obsolete-function-alias 'ediff-make-bottom-toolbar #'ignore "27.1") - ;; Merging (defun ediff-toggle-show-clashes-only () @@ -3082,10 +3065,6 @@ Hit \\[ediff-recenter] to reset the windows afterward." ) -;; for compatibility -(define-obsolete-function-alias 'ediff-minibuffer-with-setup-hook - #'minibuffer-with-setup-hook "28.1") - ;; This is adapted from a similar function in `emerge.el'. ;; PROMPT should not have a trailing ': ', so that it can be modified ;; according to context. @@ -3202,16 +3181,6 @@ Hit \\[ediff-recenter] to reset the windows afterward." file)) -;; Quote metacharacters (using \) when executing diff in Unix. -;;(defun ediff-protect-metachars (str) -;; (let ((limit 0)) -;; (while (string-match ediff-metachars str limit) -;; (setq str (concat (substring str 0 (match-beginning 0)) -;; "\\" -;; (substring str (match-beginning 0)))) -;; (setq limit (1+ (match-end 0))))) -;; str) - ;; Make sure the current buffer (for a file) has the same contents as the ;; file on disk, and attempt to remedy the situation if not. ;; Signal an error if we can't make them the same, or the user doesn't want @@ -3272,6 +3241,7 @@ Hit \\[ediff-recenter] to reset the windows afterward." (defun ediff-filename-magic-p (file) + (declare (obsolete nil "29.1")) (or (ediff-file-compressed-p file) (file-remote-p file))) @@ -3320,7 +3290,8 @@ Without an argument, it saves customized diff argument, if available (select-window wind) (delete-other-windows) (or (mark) (push-mark)) - (ediff-activate-mark) + (setq mark-active 'ediff-util) + (setq-local transient-mark-mode t) (split-window-vertically) (ediff-select-lowest-window) (setq other-wind (selected-window)) @@ -3899,11 +3870,9 @@ Ediff Control Panel to restore highlighting." "Submit bug report on Ediff." (interactive) (ediff-barf-if-not-control-buffer) - (defvar ediff-device-type) (defvar ediff-buffer-name) (let ((reporter-prompt-for-summary-p t) (ctl-buf ediff-control-buffer) - (ediff-device-type window-system) varlist salutation ediff-buffer-name) (setq varlist '(ediff-diff-program ediff-diff-options ediff-diff3-program ediff-diff3-options @@ -3922,8 +3891,7 @@ Ediff Control Panel to restore highlighting." ediff-job-name ediff-word-mode ediff-buffer-name - ediff-device-type - )) + window-system)) (setq salutation " Congratulations! You may have unearthed a bug in Ediff! @@ -4009,15 +3977,11 @@ Mail anyway? (y or n) ") (syntax-table)))) ) - -(define-obsolete-function-alias 'ediff-deactivate-mark #'deactivate-mark "27.1") - (defun ediff-activate-mark () + (declare (obsolete nil "29.1")) (setq mark-active 'ediff-util) (setq-local transient-mark-mode t)) -(define-obsolete-function-alias 'ediff-nuke-selective-display #'ignore "27.1") - ;; The next two are modified versions from emerge.el. ;; VARS must be a list of symbols ;; ediff-save-variables returns an association list: ((var . val) ...) @@ -4169,7 +4133,12 @@ Mail anyway? (y or n) ") (key-description desc) (format "M-x %s" func-def)))) +(define-obsolete-function-alias 'ediff-kill-bottom-toolbar #'ignore "27.1") +(define-obsolete-function-alias 'ediff-make-bottom-toolbar #'ignore "27.1") +(define-obsolete-function-alias 'ediff-deactivate-mark #'deactivate-mark "27.1") +(define-obsolete-function-alias 'ediff-nuke-selective-display #'ignore "27.1") (define-obsolete-function-alias 'ediff-add-to-history #'add-to-history "27.1") +(define-obsolete-function-alias 'ediff-minibuffer-with-setup-hook #'minibuffer-with-setup-hook "28.1") (define-obsolete-function-alias 'ediff-copy-list #'copy-sequence "28.1") (define-obsolete-function-alias 'ediff-union #'seq-union "28.1") (define-obsolete-function-alias 'ediff-intersection #'seq-intersection "28.1") diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el index bd3f6880da..d45e13ea72 100644 --- a/lisp/vc/ediff-wind.el +++ b/lisp/vc/ediff-wind.el @@ -1,6 +1,6 @@ ;;; ediff-wind.el --- window manipulation utilities -*- lexical-binding:t -*- -;; Copyright (C) 1994-1997, 2000-2022 Free Software Foundation, Inc. +;; Copyright (C) 1994-2022 Free Software Foundation, Inc. ;; Author: Michael Kifer ;; Package: ediff @@ -24,23 +24,11 @@ ;;; Code: - -;; Compiler pacifier (defvar icon-title-format) -(defvar top-toolbar-height) -(defvar bottom-toolbar-height) -(defvar left-toolbar-height) -(defvar right-toolbar-height) -(defvar left-toolbar-width) -(defvar right-toolbar-width) -(defvar default-menubar) -(defvar top-gutter) -(defvar frame-icon-title-format) (defvar ediff-diff-status) (require 'ediff-init) (require 'ediff-help) -;; end pacifier (defgroup ediff-window nil "Ediff window manipulation." @@ -261,8 +249,8 @@ keyboard input to go into icons." (let (event) (message "Select windows by clicking. Please click on Window %d " wind-number) - (while (not (ediff-mouse-event-p (setq event - (read--potential-mouse-event)))) + (while (not (mouse-event-p (setq event + (read--potential-mouse-event)))) (if (sit-for 1) ; if sequence of events, wait till the final word (beep 1)) (message "Please click on Window %d " wind-number)) @@ -846,7 +834,7 @@ keyboard input to go into icons." Create a new splittable frame if none is found." (if (display-graphic-p) (let ((wind-frame (window-frame)) - seen-windows) + seen-windows) (while (and (not (memq (selected-window) seen-windows)) (or (ediff-frame-has-dedicated-windows wind-frame) @@ -855,8 +843,8 @@ Create a new splittable frame if none is found." (< (frame-height wind-frame) (* 3 window-min-height)) (if ok-unsplittable - nil - (ediff-frame-unsplittable-p wind-frame)))) + nil + (cdr (assq 'unsplittable (frame-parameters wind-frame)))))) ;; remember history (setq seen-windows (cons (selected-window) seen-windows)) ;; try new window diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index 840ab8cf51..84ad5cef90 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -107,8 +107,6 @@ ;;; Code: (require 'ediff-util) -;; end pacifier - (require 'ediff-init) (require 'ediff-mult) ; required because of the registry stuff @@ -283,7 +281,8 @@ deleted. Returns the buffer into which the file is visited. Also sets `ediff--magic-file-name' to indicate where the file's content has been saved (if not in `buffer-file-name')." - (let* ((file-magic (ediff-filename-magic-p file)) + (let* ((file-magic (or (ediff-file-compressed-p file) + (file-remote-p file))) (temp-file-name-prefix (file-name-nondirectory file))) (cond ((not (file-readable-p file)) (user-error "File `%s' does not exist or is not readable" file)) commit 6b4f6dfb4e195c572c6e8502a349afff5f7987b9 Author: Stefan Kangas Date: Sun Aug 7 17:50:33 2022 +0200 Make ediff-window-display-p obsolete * lisp/vc/ediff-init.el (ediff-window-display-p): Redefine as obsolete function alias for 'display-graphic-p'. diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el index 05a9901e1e..29f24436e1 100644 --- a/lisp/vc/ediff-init.el +++ b/lisp/vc/ediff-init.el @@ -48,13 +48,9 @@ that Ediff doesn't know about.") (declare (obsolete window-system "27.1")) window-system) -(defun ediff-window-display-p () - (and window-system - (not (memq window-system '(tty pc stream))))) - ;; test if supports faces (defun ediff-has-face-support-p () - (cond ((ediff-window-display-p)) + (cond ((display-graphic-p)) (ediff-force-faces) ((display-color-p)) (t (memq window-system '(pc))))) @@ -258,7 +254,7 @@ It needs to be killed when we quit the session.") (defsubst ediff-multiframe-setup-p () - (and (ediff-window-display-p) ediff-multiframe)) + (and (display-graphic-p) ediff-multiframe)) (defmacro ediff-narrow-control-frame-p () '(and (ediff-multiframe-setup-p) @@ -788,7 +784,7 @@ Ediff needs to find fine differences." (defun ediff-set-face-pixmap (face pixmap) "Set stipple pixmap of FACE to PIXMAP on a monochrome display." - (if (and (ediff-window-display-p) (not (display-color-p))) + (if (and (display-graphic-p) (not (display-color-p))) (condition-case nil (set-face-background-pixmap face pixmap) (error @@ -1382,14 +1378,14 @@ This default should work without changes." (defsubst ediff-frame-iconified-p (frame) - (and (ediff-window-display-p) + (and (display-graphic-p) (frame-live-p frame) (eq (frame-visible-p frame) 'icon))) (defsubst ediff-window-visible-p (wind) ;; under TTY, window-live-p also means window is visible (and (window-live-p wind) - (or (not (ediff-window-display-p)) + (or (not (display-graphic-p)) (frame-visible-p (window-frame wind))))) @@ -1398,7 +1394,7 @@ This default should work without changes." (defun ediff-reset-mouse (&optional frame do-not-grab-mouse) (or frame (setq frame (selected-frame))) - (if (ediff-window-display-p) + (if (display-graphic-p) (let ((frame-or-wind frame)) (or do-not-grab-mouse ;; don't set mouse if the user said to never do this @@ -1562,6 +1558,7 @@ This default should work without changes." (define-obsolete-function-alias 'ediff-convert-standard-filename #'convert-standard-filename "28.1") (define-obsolete-function-alias 'ediff-hide-face #'ignore "28.1") (define-obsolete-function-alias 'ediff-file-remote-p #'file-remote-p "29.1") +(define-obsolete-function-alias 'ediff-window-display-p #'display-graphic-p "29.1") (provide 'ediff-init) ;;; ediff-init.el ends here diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el index fc2d899c2e..7e15060f8c 100644 --- a/lisp/vc/ediff-mult.el +++ b/lisp/vc/ediff-mult.el @@ -2054,14 +2054,14 @@ all marked sessions must be active." ((and (setq wind (ediff-get-visible-buffer-window ediff-registry-buffer)) - (ediff-window-display-p)) + (display-graphic-p)) (select-window wind) (other-window 1) (set-window-buffer (selected-window) meta-buf)) (t (ediff-skip-unsuitable-frames 'ok-unsplittable) (set-window-buffer (selected-window) meta-buf))) )) - (if (and (ediff-window-display-p) + (if (and (display-graphic-p) (window-live-p (setq wind (ediff-get-visible-buffer-window meta-buf)))) (progn @@ -2115,14 +2115,14 @@ all marked sessions must be active." (select-window ediff-window-B)) ((and (setq wind (ediff-get-visible-buffer-window ediff-meta-buffer)) - (ediff-window-display-p)) + (display-graphic-p)) (select-window wind) (other-window 1) (set-window-buffer (selected-window) ediff-registry-buffer)) (t (ediff-skip-unsuitable-frames 'ok-unsplittable) (set-window-buffer (selected-window) ediff-registry-buffer))) )) - (if (ediff-window-display-p) + (if (display-graphic-p) (progn (setq frame (window-frame diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index fd36840db2..e8510acfb1 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -735,7 +735,7 @@ buffers." ;; set visibility range appropriate to this invocation of Ediff. (ediff-visible-region) ;; raise - (if (and (ediff-window-display-p) + (if (and (display-graphic-p) (symbolp this-command) (symbolp last-command) ;; Either one of the display-changing commands @@ -760,7 +760,7 @@ buffers." (raise-frame (window-frame ediff-window-B))) (if (window-live-p ediff-window-C) (raise-frame (window-frame ediff-window-C))))) - (if (and (ediff-window-display-p) + (if (and (display-graphic-p) (frame-live-p ediff-control-frame) (not ediff-use-long-help-message) (not (ediff-frame-iconified-p ediff-control-frame))) @@ -1252,7 +1252,7 @@ of the current buffer." This is especially useful when comparing buffers side-by-side." (interactive) (ediff-barf-if-not-control-buffer) - (or (ediff-window-display-p) + (or (display-graphic-p) (user-error "Emacs is not running as a window application")) (ediff-recenter 'no-rehighlight) ; make sure buffs are displayed in windows (let ((ctl-buf ediff-control-buffer)) @@ -1279,7 +1279,7 @@ To change the default, set the variable `ediff-window-setup-function', which see." (interactive) (let (window-setup-func) - (or (ediff-window-display-p) + (or (display-graphic-p) (user-error "Emacs is not running as a window application")) (cond ((eq ediff-window-setup-function #'ediff-setup-windows-multiframe) @@ -1323,7 +1323,7 @@ To change the default, set the variable `ediff-use-toolbar-p', which see." ;; FIXME: Make it work in Emacs! (if (featurep 'ediff-tbar) (progn - (or (ediff-window-display-p) + (or (display-graphic-p) (user-error "Emacs is not running as a window application")) ;; do this only after killing the toolbar (setq ediff-use-toolbar-p (not ediff-use-toolbar-p)) @@ -2438,7 +2438,7 @@ reverse the meaning of this variable." (after-quit-hook-internal (remq t ediff-after-quit-hook-internal)) (session-number ediff-meta-session-number) ;; suitable working frame - (warp-frame (if (and (ediff-window-display-p) (eq ediff-grab-mouse t)) + (warp-frame (if (and (display-graphic-p) (eq ediff-grab-mouse t)) (cond ((window-live-p ediff-window-A) (window-frame ediff-window-A)) ((window-live-p ediff-window-B) @@ -2512,7 +2512,7 @@ reverse the meaning of this variable." (setq warp-frame ; if mouse is over a reasonable frame, use it (cond ((ediff-good-frame-under-mouse)) (t warp-frame))) - (if (and (ediff-window-display-p) (frame-live-p warp-frame) ediff-grab-mouse) + (if (and (display-graphic-p) (frame-live-p warp-frame) ediff-grab-mouse) (set-mouse-position warp-frame 2 1)) (mapc #'funcall after-quit-hook-internal) @@ -2569,7 +2569,7 @@ reverse the meaning of this variable." (ediff-kill-buffer-carefully ediff-patch-diagnostics)) ;; delete control frame or window - (cond ((and (ediff-window-display-p) (frame-live-p ctl-frame)) + (cond ((and (display-graphic-p) (frame-live-p ctl-frame)) (delete-frame ctl-frame)) ((window-live-p ctl-wind) (delete-window ctl-wind))) @@ -2744,7 +2744,7 @@ only if this merge job is part of a group, i.e., was invoked from within (buf-fine-diff ediff-fine-diff-buffer)) ;; hide the control panel - (if (and (ediff-window-display-p) (frame-live-p ediff-control-frame)) + (if (and (display-graphic-p) (frame-live-p ediff-control-frame)) (iconify-frame ediff-control-frame) (bury-buffer)) (if buf-err (bury-buffer buf-err)) diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el index 0579cee6ec..bd3f6880da 100644 --- a/lisp/vc/ediff-wind.el +++ b/lisp/vc/ediff-wind.el @@ -52,7 +52,7 @@ ;; Determine which window setup function to use based on current window system. (defun ediff-choose-window-setup-function-automatically () (declare (obsolete ediff-setup-windows-default "24.3")) - (if (ediff-window-display-p) + (if (display-graphic-p) #'ediff-setup-windows-multiframe #'ediff-setup-windows-plain)) @@ -304,7 +304,7 @@ keyboard input to go into icons." (other-window 1)) ;; in case user did a no-no on a tty - (or (ediff-window-display-p) + (or (display-graphic-p) (setq ediff-window-setup-function #'ediff-setup-windows-plain)) (or (ediff-keep-window-config control-buffer) @@ -844,7 +844,7 @@ keyboard input to go into icons." (defun ediff-skip-unsuitable-frames (&optional ok-unsplittable) "Skip unsplittable frames and frames that have dedicated windows. Create a new splittable frame if none is found." - (if (ediff-window-display-p) + (if (display-graphic-p) (let ((wind-frame (window-frame)) seen-windows) (while (and (not (memq (selected-window) seen-windows)) @@ -993,7 +993,7 @@ Create a new splittable frame if none is found." ;; synchronize so the cursor will move to control frame ;; per RMS suggestion - (if (ediff-window-display-p) + (if (display-graphic-p) (let ((count 7)) (sit-for .1) (while (and (not (frame-visible-p ctl-frame)) (> count 0)) @@ -1012,7 +1012,7 @@ Create a new splittable frame if none is found." (defun ediff-destroy-control-frame (ctl-buffer) (ediff-with-current-buffer ctl-buffer - (if (and (ediff-window-display-p) (frame-live-p ediff-control-frame)) + (if (and (display-graphic-p) (frame-live-p ediff-control-frame)) (let ((ctl-frame ediff-control-frame)) (setq ediff-control-frame nil) (delete-frame ctl-frame)))) @@ -1145,7 +1145,7 @@ It assumes that it is called from within the control buffer." ;; Force mode-line redisplay (force-mode-line-update) - (if (and (ediff-window-display-p) (frame-live-p ediff-control-frame)) + (if (and (display-graphic-p) (frame-live-p ediff-control-frame)) (ediff-refresh-control-frame)) (ediff-with-current-buffer ediff-buffer-A commit c3e99a870aa26d6d7d64b7fa9f5a8e990089638e Author: Mattias Engdegård Date: Sun Aug 7 17:18:21 2022 +0200 ; * lisp/emacs-lisp/bytecomp.el: indentation fix diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index d8a5dd20f6..9d5f6682b5 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2452,8 +2452,8 @@ list that represents a doc string reference. (print-symbols-bare t)) ; Possibly redundant binding. ;; Insert the doc string, and make it a comment with #@LENGTH. (when (and (>= (nth 1 info) 0) dynamic-docstrings) - (setq position (byte-compile-output-as-comment - (nth (nth 1 info) form) nil))) + (setq position (byte-compile-output-as-comment + (nth (nth 1 info) form) nil))) (let ((print-continuous-numbering t) print-number-table commit af90a31629be00d159f06c1dee0a96c69cf775ce Author: Lars Ingebrigtsen Date: Sun Aug 7 17:22:46 2022 +0200 Pacify a gcc warning in xi_handle_focus_change * src/xterm.c (xi_handle_focus_change): Pacify a wrong warning on gcc (Debian 10.2.1-6). xterm.c: In function ‘xi_handle_focus_change’: xterm.c:12564:25: warning: ‘source’ may be used uninitialized in this function [-Wmaybe-uninitialized] 12564 | ie.device = source->name; | ~~~~~~^~~~~~ diff --git a/src/xterm.c b/src/xterm.c index 97985c8d9e..54bf656657 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -12481,7 +12481,7 @@ xi_handle_focus_change (struct x_display_info *dpyinfo) { struct input_event ie; struct frame *focus, *new; - struct xi_device_t *device, *source; + struct xi_device_t *device, *source = NULL; ptrdiff_t i; Time time; #ifdef USE_GTK commit 82d22ef8db1838c84dbc512b3f1628a549559504 Author: Michael Albinus Date: Sun Aug 7 16:35:50 2022 +0200 Improve Tramp error message * lisp/net/tramp-sh.el (tramp-sh-handle-file-local-copy): Simplify for empty files. Better error message. (Bug#56879) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 38fffadd4e..a2b675cf88 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -3270,6 +3270,9 @@ implementation will be used." (condition-case err (cond + ;; Empty file. + ((zerop size)) + ;; `copy-file' handles direct copy and out-of-band methods. ((or (tramp-local-host-p v) (tramp-method-out-of-band-p v size)) @@ -3285,6 +3288,11 @@ implementation will be used." v (format rem-enc (tramp-shell-quote-argument localname)) "Encoding remote file failed")) + ;; Check error. `rem-enc' could be a pipe, which doesn't + ;; flag the error in the first command. + (when (zerop (buffer-size (tramp-get-buffer v))) + (tramp-error v 'file-error' "Encoding remote file failed")) + (with-tramp-progress-reporter v 3 (format-message "Decoding local file `%s' with `%s'" tmpfile loc-dec) commit 11e6c12def5e617fb07d604e82c9bf5289c6e827 Author: kobarity Date: Sun Aug 7 16:10:26 2022 +0200 Fix blank/comment line handling in python-nav-beginning-of-block * lisp/progmodes/python.el (python-nav-beginning-of-block): Fix handling of blank/comment line right after block start (bug#57038). diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 27bdbae311..88b19c88cd 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1761,16 +1761,16 @@ backward to previous statement." "Move to start of current block." (interactive "^") (let ((starting-pos (point))) + ;; Go to first line beginning a statement + (while (and (not (bobp)) + (or (and (python-nav-beginning-of-statement) nil) + (python-info-current-line-comment-p) + (python-info-current-line-empty-p))) + (forward-line -1)) (if (progn (python-nav-beginning-of-statement) (looking-at (python-rx block-start))) (point-marker) - ;; Go to first line beginning a statement - (while (and (not (bobp)) - (or (and (python-nav-beginning-of-statement) nil) - (python-info-current-line-comment-p) - (python-info-current-line-empty-p))) - (forward-line -1)) (let ((block-matching-indent (- (current-indentation) python-indent-offset))) (while diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 07f2c4f09a..eb57122690 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -2734,6 +2734,28 @@ def decoratorFunctionWithArguments(arg1, arg2, arg3): (point)) (python-tests-look-at "def wwrap(f):" -1))))) +(ert-deftest python-nav-beginning-of-block-2 () + (python-tests-with-temp-buffer + " +if True: + + pass +if False: + # comment + pass +" + (python-tests-look-at "if True:") + (forward-line) + (should (= (save-excursion + (python-nav-beginning-of-block) + (point)) + (python-tests-look-at "if True:" -1))) + (python-tests-look-at "# comment") + (should (= (save-excursion + (python-nav-beginning-of-block) + (point)) + (python-tests-look-at "if False:" -1))))) + (ert-deftest python-nav-end-of-block-1 () (python-tests-with-temp-buffer " commit 75929535530d7c5ab48565a33b33b4e84026b368 Author: Eli Zaretskii Date: Sun Aug 7 17:03:52 2022 +0300 Fix 'vertical-motion' in bidi-reordered text * src/xdisp.c (move_it_vertically_backward): Fix the case of long bidi-reordered lines when starting from its last (top-most) screen line. (move_it_by_lines): Fix logic of detection when going by lines overshoots. diff --git a/src/xdisp.c b/src/xdisp.c index c756e7f04f..855f48f2bd 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -10711,6 +10711,11 @@ move_it_vertically_backward (struct it *it, int dy) while (nlines-- && IT_CHARPOS (*it) > pos_limit) back_to_previous_visible_line_start (it); + /* Move one line more back, for the (rare) situation where we have + bidi-reordered continued lines, and we start from the top-most + screen line, which is the last in logical order. */ + if (it->bidi_p && dy == 0) + back_to_previous_visible_line_start (it); /* Reseat the iterator here. When moving backward, we don't want reseat to skip forward over invisible text, set up the iterator to deliver from overlay strings at the new position etc. So, @@ -10956,7 +10961,6 @@ move_it_by_lines (struct it *it, ptrdiff_t dvpos) int nchars_per_row = (it->last_visible_x - it->first_visible_x) / FRAME_COLUMN_WIDTH (it->f); bool hit_pos_limit = false; - bool reverse_rows = false; ptrdiff_t pos_limit; /* Start at the beginning of the screen line containing IT's @@ -10967,10 +10971,6 @@ move_it_by_lines (struct it *it, ptrdiff_t dvpos) move_it_vertically_backward (it, 0); dvpos -= it->vpos; - /* Do we have glyph rows whose positions _increase_ as we go up? */ - if (IT_CHARPOS (*it) > start_charpos) - reverse_rows = true; - /* Go back -DVPOS buffer lines, but no farther than -DVPOS full screen lines, and reseat the iterator there. */ start_charpos = IT_CHARPOS (*it); @@ -11021,8 +11021,7 @@ move_it_by_lines (struct it *it, ptrdiff_t dvpos) SAVE_IT (it2, *it, it2data); move_it_to (it, -1, -1, -1, it->vpos + delta, MOVE_TO_VPOS); /* Move back again if we got too far ahead. */ - if ((IT_CHARPOS (*it) >= start_charpos && !reverse_rows) - || (IT_CHARPOS (*it) <= start_charpos && reverse_rows)) + if (it->vpos - it2.vpos > delta) RESTORE_IT (it, &it2, it2data); else bidi_unshelve_cache (it2data, true); commit b65a2d1d9992bb80c6670c11ba906e30c0f27e21 Author: Stefan Kangas Date: Sun Aug 7 14:28:38 2022 +0200 Make ediff-file-remote-p obsolete in favor of file-remote-p * lisp/vc/ediff-init.el (ediff-file-remote-p): Make into obsolete function alias for file-remote-p. Update callers. diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el index 6e0656ab4e..05a9901e1e 100644 --- a/lisp/vc/ediff-init.el +++ b/lisp/vc/ediff-init.el @@ -1272,9 +1272,6 @@ This default should work without changes." "Temporary file used for refining difference regions in buffer C.") -(defun ediff-file-remote-p (file-name) - (file-remote-p file-name)) - ;; File for which we can get attributes, such as size or date (defun ediff-listable-file (file-name) (let ((handler (find-file-name-handler file-name 'file-local-copy))) @@ -1564,6 +1561,7 @@ This default should work without changes." (define-obsolete-function-alias 'ediff-with-syntax-table #'with-syntax-table "27.1") (define-obsolete-function-alias 'ediff-convert-standard-filename #'convert-standard-filename "28.1") (define-obsolete-function-alias 'ediff-hide-face #'ignore "28.1") +(define-obsolete-function-alias 'ediff-file-remote-p #'file-remote-p "29.1") (provide 'ediff-init) ;;; ediff-init.el ends here diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el index 17654f80ec..94a890d95d 100644 --- a/lisp/vc/ediff-ptch.el +++ b/lisp/vc/ediff-ptch.el @@ -798,7 +798,7 @@ you can still examine the changes via M-x ediff-files" ;; the orig file. (setq target-filename (concat - (if (ediff-file-remote-p (file-truename source-filename)) + (if (file-remote-p (file-truename source-filename)) magic-file-name source-filename) "_patched")) diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index dd01feb1a7..fd36840db2 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -3273,7 +3273,7 @@ Hit \\[ediff-recenter] to reset the windows afterward." (defun ediff-filename-magic-p (file) (or (ediff-file-compressed-p file) - (ediff-file-remote-p file))) + (file-remote-p file))) (defun ediff-save-buffer (arg) @@ -3394,11 +3394,11 @@ Without an argument, it saves customized diff argument, if available file-A file-B) (unless (and buf-A-file-name (file-exists-p buf-A-file-name) - (not (ediff-file-remote-p buf-A-file-name))) + (not (file-remote-p buf-A-file-name))) (setq file-A (ediff-make-temp-file ediff-buffer-A))) (unless (and buf-B-file-name (file-exists-p buf-B-file-name) - (not (ediff-file-remote-p buf-B-file-name))) + (not (file-remote-p buf-B-file-name))) (setq file-B (ediff-make-temp-file ediff-buffer-B))) (or (ediff-buffer-live-p ediff-custom-diff-buffer) (setq ediff-custom-diff-buffer commit e672cad231f4be2e5456e2bf6550a8523a3c24ed Author: Stefan Kangas Date: Sun Aug 7 14:19:19 2022 +0200 ; Improve obsoletions in ediff-init.el * lisp/vc/ediff-init.el (ediff-convert-standard-filename): Convert to obsolete function alias. (ediff-device-type, ediff-last-command-char): Better document obsoletion. diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el index e83a172cb8..6e0656ab4e 100644 --- a/lisp/vc/ediff-init.el +++ b/lisp/vc/ediff-init.el @@ -44,9 +44,8 @@ This is provided as a temporary relief for users of face-capable displays that Ediff doesn't know about.") -;; Are we running as a window application or on a TTY? (defsubst ediff-device-type () - (declare (obsolete nil "27.1")) + (declare (obsolete window-system "27.1")) window-system) (defun ediff-window-display-p () @@ -1381,7 +1380,7 @@ This default should work without changes." (define-obsolete-function-alias 'ediff-event-key #'identity "27.1") (defun ediff-last-command-char () - (declare (obsolete nil "27.1")) + (declare (obsolete last-command-event "27.1")) last-command-event) @@ -1562,15 +1561,8 @@ This default should work without changes." (ediff-file-attributes filename 5)) -;;; Obsolete - -(defun ediff-convert-standard-filename (fname) - (declare (obsolete convert-standard-filename "28.1")) - (convert-standard-filename fname)) - -(define-obsolete-function-alias 'ediff-with-syntax-table - #'with-syntax-table "27.1") - +(define-obsolete-function-alias 'ediff-with-syntax-table #'with-syntax-table "27.1") +(define-obsolete-function-alias 'ediff-convert-standard-filename #'convert-standard-filename "28.1") (define-obsolete-function-alias 'ediff-hide-face #'ignore "28.1") (provide 'ediff-init) commit 1f4f1358e62e2df2b15e557c0008e13d93b9393a Author: Stefan Kangas Date: Sun Aug 7 13:51:39 2022 +0200 Declare unused function ediff-user-grabbed-mouse obsolete * lisp/vc/ediff-init.el (ediff-user-grabbed-mouse): Declare unused function obsolete. As far as I can tell, this has been unused since 1996. * lisp/vc/ediff-wind.el (ediff-mouse-pixel-position): Make variable obsolete. It is only used in the above obsolete funct * lisp/vc/ediff-mult.el (ediff-filegroup-action) (ediff-registry-action): * lisp/vc/ediff-util.el (ediff-setup): Don't set above unused variable. * lisp/vc/ediff-init.el (ediff-spy-after-mouse): Make obsolete. * lisp/vc/ediff-util.el (ediff-setup): Don't add above obsolete function to pre-command-hook. diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el index 273bad5d35..e83a172cb8 100644 --- a/lisp/vc/ediff-init.el +++ b/lisp/vc/ediff-init.el @@ -1419,26 +1419,27 @@ This default should work without changes." ))) (defsubst ediff-spy-after-mouse () - (setq ediff-mouse-pixel-position (mouse-pixel-position))) + (declare (obsolete nil "29.1")) + (with-suppressed-warnings ((obsolete ediff-mouse-pixel-position)) + (setq ediff-mouse-pixel-position (mouse-pixel-position)))) -;; It is not easy to find out when the user grabs the mouse, since emacs and -;; xemacs behave differently when mouse is not in any frame. Also, this is -;; sensitive to when the user grabbed mouse. Not used for now. (defun ediff-user-grabbed-mouse () - (if ediff-mouse-pixel-position - (cond ((not (eq (car ediff-mouse-pixel-position) - (car (mouse-pixel-position))))) - ((and (car (cdr ediff-mouse-pixel-position)) - (car (cdr (mouse-pixel-position))) - (cdr (cdr ediff-mouse-pixel-position)) - (cdr (cdr (mouse-pixel-position)))) - (not (and (< (abs (- (car (cdr ediff-mouse-pixel-position)) - (car (cdr (mouse-pixel-position))))) - ediff-mouse-pixel-threshold) - (< (abs (- (cdr (cdr ediff-mouse-pixel-position)) - (cdr (cdr (mouse-pixel-position))))) - ediff-mouse-pixel-threshold)))) - (t nil)))) + (declare (obsolete nil "29.1")) + (with-suppressed-warnings ((obsolete ediff-mouse-pixel-position)) + (if ediff-mouse-pixel-position + (cond ((not (eq (car ediff-mouse-pixel-position) + (car (mouse-pixel-position))))) + ((and (car (cdr ediff-mouse-pixel-position)) + (car (cdr (mouse-pixel-position))) + (cdr (cdr ediff-mouse-pixel-position)) + (cdr (cdr (mouse-pixel-position)))) + (not (and (< (abs (- (car (cdr ediff-mouse-pixel-position)) + (car (cdr (mouse-pixel-position))))) + ediff-mouse-pixel-threshold) + (< (abs (- (cdr (cdr ediff-mouse-pixel-position)) + (cdr (cdr (mouse-pixel-position))))) + ediff-mouse-pixel-threshold)))) + (t nil))))) (define-obsolete-function-alias 'ediff-frame-char-height #'frame-char-height "27.1") diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el index b7c349fc1c..fc2d899c2e 100644 --- a/lisp/vc/ediff-mult.el +++ b/lisp/vc/ediff-mult.el @@ -1861,7 +1861,6 @@ all marked sessions must be active." ;; handle an individual session with a live control buffer ((ediff-buffer-live-p session-buf) (ediff-with-current-buffer session-buf - (setq ediff-mouse-pixel-position (mouse-pixel-position)) (ediff-recenter 'no-rehighlight))) ((ediff-problematic-session-p info) @@ -2005,7 +2004,6 @@ all marked sessions must be active." (ediff-show-meta-buffer ctl-buf t) ;; it's a session buffer -- invoke go back to session (ediff-with-current-buffer ctl-buf - (setq ediff-mouse-pixel-position (mouse-pixel-position)) (ediff-recenter 'no-rehighlight))) (beep) (message "You've selected a stale session --- try again") diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index 97dfc02201..dd01feb1a7 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -296,10 +296,6 @@ to invocation.") (if (string-match "buffer" (symbol-name ediff-job-name)) (setq ediff-keep-variants t)) - (if (ediff-window-display-p) - (add-hook 'pre-command-hook 'ediff-spy-after-mouse nil 'local)) - (setq ediff-mouse-pixel-position (mouse-pixel-position)) - ;; adjust for merge jobs (if ediff-merge-job (let ((buf diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el index 6db3667545..0579cee6ec 100644 --- a/lisp/vc/ediff-wind.el +++ b/lisp/vc/ediff-wind.el @@ -179,6 +179,7 @@ Used internally---not a user option.") (ediff-defvar-local ediff-mouse-pixel-position nil "Position of the mouse. Used to decide whether to warp the mouse into control frame.") +(make-obsolete-variable 'ediff-mouse-pixel-position "it is unused." "29.1") ;; not used for now (defvar ediff-mouse-pixel-threshold 30 @@ -901,7 +902,6 @@ Create a new splittable frame if none is found." fheight fwidth adjusted-parameters) (with-current-buffer ctl-buffer - ;;(setq user-grabbed-mouse (ediff-user-grabbed-mouse)) (run-hooks 'ediff-before-setup-control-frame-hook)) (setq old-ctl-frame (with-current-buffer ctl-buffer ediff-control-frame)) commit 4439a80407d2912a126e3676c7ba9849c763caae Author: Stefan Kangas Date: Sun Aug 7 13:46:00 2022 +0200 Make compat function custom-reset-variables obsolete * lisp/custom.el (custom-reset-variables): Make unused XEmacs compat function obsolete. diff --git a/lisp/custom.el b/lisp/custom.el index 5ece5047a8..96dfb37d86 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1692,6 +1692,7 @@ Each of the arguments ARGS has this form: (VARIABLE IGNORED) This means reset VARIABLE. (The argument IGNORED is ignored)." + (declare (obsolete nil "29.1")) (apply #'custom-theme-reset-variables 'user args)) (defun custom-add-choice (variable choice) commit c6abfb32d7ca10733c971e0fb338291cd56b558e Author: Stefan Kangas Date: Sun Aug 7 13:43:47 2022 +0200 Remove workaround for XEmacs bug in ediff-util.el * lisp/vc/ediff-util.el (ediff-make-empty-tmp-file): Remove workaround for XEmacs bug. diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index 1bfab508f8..97dfc02201 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -3197,13 +3197,7 @@ Hit \\[ediff-recenter] to reset the windows afterward." (progn (if (or (file-exists-p file) (not keep-proposed-name)) (setq file (make-temp-name proposed-name))) - ;; the with-temp-buffer thing is a workaround for an XEmacs - ;; bug: write-region complains that we are trying to visit a - ;; file in an indirect buffer, failing to notice that the - ;; VISIT flag is unset and that we are actually writing from a - ;; string and not from any buffer. - (with-temp-buffer - (write-region "" nil file nil 'silent nil 'excl)) + (write-region "" nil file nil 'silent nil 'excl) nil) (file-already-exists t)) ;; the file was somehow created by someone else between commit cf98a395d017c16da8126ff689d43de192efc14a Author: Stefan Kangas Date: Sun Aug 7 13:32:45 2022 +0200 * lib-src/etags.c: Remove XEmacs support. diff --git a/lib-src/etags.c b/lib-src/etags.c index ef11257926..ed8a218464 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -87,14 +87,6 @@ University of California, as described above. */ #include -/* WIN32_NATIVE is for XEmacs. - MSDOS, WINDOWSNT, DOS_NT are for Emacs. */ -#ifdef WIN32_NATIVE -# undef MSDOS -# undef WINDOWSNT -# define WINDOWSNT -#endif /* WIN32_NATIVE */ - #ifdef MSDOS # undef MSDOS # define MSDOS true commit 4252cea163c2a7bde2ebedfa46b4f1fdc11d7d60 Author: Lars Ingebrigtsen Date: Sun Aug 7 14:40:54 2022 +0200 Clarify lisp/Makefile.in comment * lisp/Makefile.in: Clarify comment. diff --git a/lisp/Makefile.in b/lisp/Makefile.in index ff70401f5b..c73a623cce 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -172,10 +172,11 @@ org-manuals: main-first ## Comments on loaddefs generation: # loaddefs depends on gen-lisp because in ../src, the emacs target -# depends on loaddefs but not on eg leim-list. So having leim as a -# dependency of loaddefs (via gen-lisp) ensures leim-list gets created -# before the final emacs is dumped. Having leim dependencies in -# ../src as well would create a parallel race condition. +# depends on loaddefs, but not on, for instance, leim-list. So having +# leim as a dependency of loaddefs (via gen-lisp) ensures leim-list +# gets created before the final emacs is dumped. Having leim +# dependencies in ../src as well would create a parallel race +# condition. # # FIXME: Is the following true any more? # commit a332034160bf8e1f38039cd2d37898de6f94508f Author: Alan Mackenzie Date: Sun Aug 7 12:26:16 2022 +0000 CC Mode: Fix looping in patch from yesterday * lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings) (c-after-change-mark-abnormal-strings): Check (eobp) in loops advancing over escaped newlines. diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index ca4df2d1c7..027fd8f42f 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1520,7 +1520,9 @@ Note that the style variables are always made local to the buffer." ;; was before unescaping a NL.) (while (progn (end-of-line) - (eq (char-before) ?\\)) + (and + (eq (char-before) ?\\) + (not (eobp)))) (forward-line)) ;; We're at an EOLL or point-max. (if (equal (c-get-char-property (point) 'syntax-table) '(15)) @@ -1641,7 +1643,9 @@ Note that the style variables are always made local to the buffer." end)) (while (progn (end-of-line) - (eq (char-before) ?\\)) + (and + (eq (char-before) ?\\) + (not (eobp)))) (forward-line)) (point)) c-new-END)) commit c8833ba365b8476271b64fbd985d1cf7b1a9ad02 Author: Lars Ingebrigtsen Date: Sun Aug 7 14:02:42 2022 +0200 Tweak autoloads lisp/Makefile.in dependencies * lisp/Makefile.in (autoloads): Adjust the dependencies to what they were before, and update the comments. diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 14582611fd..ff70401f5b 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -171,10 +171,11 @@ org-manuals: main-first ## Comments on loaddefs generation: -# In ../src, the emacs target depends on loaddefs but not on eg leim-list. -# So having leim as a dependency of loaddefs (via gen-lisp) ensures leim-list -# gets created before the final emacs is dumped. Having leim -# dependencies in ../src as well would create a parallel race condition. +# loaddefs depends on gen-lisp because in ../src, the emacs target +# depends on loaddefs but not on eg leim-list. So having leim as a +# dependency of loaddefs (via gen-lisp) ensures leim-list gets created +# before the final emacs is dumped. Having leim dependencies in +# ../src as well would create a parallel race condition. # # FIXME: Is the following true any more? # @@ -190,7 +191,7 @@ org-manuals: main-first # "all" dependency. "leim" isn't really a dependency here, but we # need leim-list.el at about the same time, so ensure that it's # generated, too. -autoloads: $(lisp)/emacs-lisp/loaddefs-gen.elc leim +autoloads: $(lisp)/emacs-lisp/loaddefs-gen.elc gen-lisp $(AM_V_GEN)$(emacs) \ -l $(lisp)/emacs-lisp/loaddefs-gen.elc \ -f loaddefs-generate--emacs-batch ${SUBDIRS_ALMOST} commit 9c0da894b9e69c8cb216585c5de1361be2e51812 Author: Stefan Kangas Date: Sun Aug 7 13:16:53 2022 +0200 ; Improve time-convert call in recently changed test * test/lisp/eshell/em-pred-tests.el (eshell-parse-file-name-attributes): Use t instead of nil as second argument to 'time-convert'. Suggested by Stefan Monnier . diff --git a/test/lisp/eshell/em-pred-tests.el b/test/lisp/eshell/em-pred-tests.el index ef31a5d147..0d6351ec82 100644 --- a/test/lisp/eshell/em-pred-tests.el +++ b/test/lisp/eshell/em-pred-tests.el @@ -75,7 +75,7 @@ The following attributes are recognized: (`(,(and (or "links" "uid" "gid" "size") key) ,value) (cons (intern key) (string-to-number value))) (`(,(and (or "atime" "mtime" "ctime") key) ,value) - (cons (intern key) (time-convert (string-to-number value) nil))) + (cons (intern key) (time-convert (string-to-number value) t))) (`(,key ,value) (cons (intern key) value)) (_ (error "invalid format %S" i)))) commit 321f33a2b111c3c0ea1246ffa705d2cc9e8e9242 Author: Stefan Kangas Date: Sun Aug 7 13:14:20 2022 +0200 Improve how url-http displays status messages * lisp/url/url-util.el (url-display-message): New function. (url-display-percentage): Make obsolete in favor of url-display-message. * lisp/url/url-http.el (url-http-content-length-after-change-function): Prefer 'url-display-message' to 'url-display-percentage'. (url-http-content-length-after-change-function) (url-http-chunked-encoding-after-change-function): Remove ineffectual calls to 'url-display-percentage'. diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 125f8436f6..94ef156108 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -1046,19 +1046,15 @@ More sophisticated percentage downloaded, etc. Also does minimal parsing of HTTP headers and will actually cause the callback to be triggered." (if url-http-content-type - (url-display-percentage + (url-display-message "Reading [%s]... %s of %s (%d%%)" - (url-percentage (- nd url-http-end-of-headers) - url-http-content-length) url-http-content-type (funcall byte-count-to-string-function (- nd url-http-end-of-headers)) (funcall byte-count-to-string-function url-http-content-length) (url-percentage (- nd url-http-end-of-headers) url-http-content-length)) - (url-display-percentage + (url-display-message "Reading... %s of %s (%d%%)" - (url-percentage (- nd url-http-end-of-headers) - url-http-content-length) (funcall byte-count-to-string-function (- nd url-http-end-of-headers)) (funcall byte-count-to-string-function url-http-content-length) (url-percentage (- nd url-http-end-of-headers) @@ -1067,7 +1063,6 @@ the callback to be triggered." (if (> (- nd url-http-end-of-headers) url-http-content-length) (progn ;; Found the end of the document! Wheee! - (url-display-percentage nil nil) (url-lazy-message "Reading... done.") (if (url-http-parse-headers) (url-http-activate-callback))))) @@ -1097,13 +1092,6 @@ the end of the document." ;; one after-change-function call. (while read-next-chunk (setq no-initial-crlf (= 0 url-http-chunked-counter)) - (if url-http-content-type - (url-display-percentage nil - "Reading [%s]... chunk #%d" - url-http-content-type url-http-chunked-counter) - (url-display-percentage nil - "Reading... chunk #%d" - url-http-chunked-counter)) (url-http-debug "Reading chunk %d (%d %d %d)" url-http-chunked-counter st nd length) (setq regexp (if no-initial-crlf @@ -1161,7 +1149,6 @@ the end of the document." ;; Found the end of the document! Wheee! (url-http-debug "Saw end of stream chunk!") (setq read-next-chunk nil) - (url-display-percentage nil nil) ;; Every chunk, even the last 0-length one, is ;; terminated by CRLF. Skip it. (if (not (looking-at "\r?\n")) diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el index 48ea947fab..147a643c9f 100644 --- a/lisp/url/url-util.el +++ b/lisp/url/url-util.el @@ -189,12 +189,18 @@ Will not do anything if `url-show-status' is nil." 'file-size-human-readable "24.4") ;;;###autoload -(defun url-display-percentage (fmt _perc &rest args) +(defun url-display-message (fmt &rest args) + "Like `message', but do nothing if `url-show-status' is nil." (when (and url-show-status (not (and url-current-object (url-silent url-current-object))) fmt) (apply #'message fmt args))) +;;;###autoload +(defun url-display-percentage (fmt _perc &rest args) + (declare (obsolete url-display-message "29.1")) + (url-display-message fmt args)) + ;;;###autoload (defun url-percentage (x y) (round (* 100 (/ x (float y))))) commit 91f4ea2fa455ad2458e727217d83a177f333c637 Merge: 08a74ab05a 7ffcba4213 Author: Stefan Kangas Date: Sun Aug 7 12:57:53 2022 +0200 Merge from origin/emacs-28 7ffcba4213 * etc/PROBLEMS: Problems with Alacritty and Emoji. (Bug#5... df95118e83 Link from (emacs)Init Syntax to (elisp)Introduction 7793cf0c3d Don't mention removed XEmacs support in reftex manual 3d1cf1b47a Don't mention removed XEmacs support in idlwave manual 7ff60c62a9 ; * admin/make-tarball.txt: Fix last change. 2fd5590d0c ; * lisp/play/fortune.el (fortune-ask-file): Doc fix. commit 08a74ab05a2dcca261fe6adaa839a936b5c123c0 Author: Mattias Engdegård Date: Sun Aug 7 10:52:16 2022 +0200 Cease emitting negative file offsets for user variables 'User variables' were made obsolete in Emacs 24 along with user-variable-p; the sign of the position in (#$ . POS) hasn't mattered since. * lisp/emacs-lisp/bytecomp.el (byte-compile-output-docform): Don't emit negative position when doc string starts with `*`. * src/lread.c (get_lazy_string): Explain. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index b1f4f01b3a..d8a5dd20f6 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2451,18 +2451,9 @@ list that represents a doc string reference. (let (position (print-symbols-bare t)) ; Possibly redundant binding. ;; Insert the doc string, and make it a comment with #@LENGTH. - (and (>= (nth 1 info) 0) - dynamic-docstrings - (progn - (setq position - (byte-compile-output-as-comment - (nth (nth 1 info) form) nil)) - ;; If the doc string starts with * (a user variable), - ;; negate POSITION. - (if (and (stringp (nth (nth 1 info) form)) - (> (length (nth (nth 1 info) form)) 0) - (eq (aref (nth (nth 1 info) form) 0) ?*)) - (setq position (- position))))) + (when (and (>= (nth 1 info) 0) dynamic-docstrings) + (setq position (byte-compile-output-as-comment + (nth (nth 1 info) form) nil))) (let ((print-continuous-numbering t) print-number-table diff --git a/src/lread.c b/src/lread.c index d16df32ca3..ccccd79cd7 100644 --- a/src/lread.c +++ b/src/lread.c @@ -3486,7 +3486,9 @@ get_lazy_string (Lisp_Object val) unibyte string. If it is actually a doc string, caller must make it multibyte. */ - /* Position is negative for user variables. */ + /* We used to emit negative positions for 'user variables' (whose doc + strings started with an asterisk); take the absolute value for + compatibility. */ EMACS_INT pos = eabs (XFIXNUM (XCDR (val))); struct saved_string *ss = &saved_strings[0]; struct saved_string *ssend = ss + ARRAYELTS (saved_strings); commit 7778f83b3e691716522b30393d33ae20cba9a2b0 Author: Mattias Engdegård Date: Sat Aug 6 16:39:42 2022 +0200 Use struct for saved strings in the reader * src/lread.c (saved_doc_string, saved_doc_string_size) (saved_doc_string_length, saved_doc_string_position) (prev_saved_doc_string, prev_saved_doc_string_size) (prev_saved_doc_string_length, prev_saved_doc_string_position): Replace with... (struct saved_string, saved_strings): ...this. * src/lread.c (Fload, skip_lazy_string, get_lazy_string): Adapt code. diff --git a/src/lread.c b/src/lread.c index 58fe3c5a9c..d16df32ca3 100644 --- a/src/lread.c +++ b/src/lread.c @@ -131,25 +131,15 @@ static ptrdiff_t read_from_string_limit; /* Position in object from which characters are being read by `readchar'. */ static EMACS_INT readchar_offset; -/* This contains the last string skipped with #@. */ -static char *saved_doc_string; -/* Length of buffer allocated in saved_doc_string. */ -static ptrdiff_t saved_doc_string_size; -/* Length of actual data in saved_doc_string. */ -static ptrdiff_t saved_doc_string_length; -/* This is the file position that string came from. */ -static file_offset saved_doc_string_position; - -/* This contains the previous string skipped with #@. - We copy it from saved_doc_string when a new string - is put in saved_doc_string. */ -static char *prev_saved_doc_string; -/* Length of buffer allocated in prev_saved_doc_string. */ -static ptrdiff_t prev_saved_doc_string_size; -/* Length of actual data in prev_saved_doc_string. */ -static ptrdiff_t prev_saved_doc_string_length; -/* This is the file position that string came from. */ -static file_offset prev_saved_doc_string_position; +struct saved_string { + char *string; /* string in allocated buffer */ + ptrdiff_t size; /* allocated size of buffer */ + ptrdiff_t length; /* length of string in buffer */ + file_offset position; /* position in file the string came from */ +}; + +/* The last two strings skipped with #@ (most recent first). */ +static struct saved_string saved_strings[2]; /* A list of file names for files being loaded in Fload. Used to check for recursive loads. */ @@ -1605,13 +1595,12 @@ Return t if the file exists and loads successfully. */) if (!NILP (Ffboundp (Qdo_after_load_evaluation))) call1 (Qdo_after_load_evaluation, hist_file_name) ; - xfree (saved_doc_string); - saved_doc_string = 0; - saved_doc_string_size = 0; - - xfree (prev_saved_doc_string); - prev_saved_doc_string = 0; - prev_saved_doc_string_size = 0; + for (int i = 0; i < ARRAYELTS (saved_strings); i++) + { + xfree (saved_strings[i].string); + saved_strings[i].string = NULL; + saved_strings[i].size = 0; + } if (!noninteractive && (NILP (nomessage) || force_load_messages)) { @@ -3445,64 +3434,52 @@ skip_lazy_string (Lisp_Object readcharfun) record the last string that we skipped, and record where in the file it comes from. */ - /* But first exchange saved_doc_string - with prev_saved_doc_string, so we save two strings. */ - { - char *temp = saved_doc_string; - ptrdiff_t temp_size = saved_doc_string_size; - file_offset temp_pos = saved_doc_string_position; - ptrdiff_t temp_len = saved_doc_string_length; - - saved_doc_string = prev_saved_doc_string; - saved_doc_string_size = prev_saved_doc_string_size; - saved_doc_string_position = prev_saved_doc_string_position; - saved_doc_string_length = prev_saved_doc_string_length; - - prev_saved_doc_string = temp; - prev_saved_doc_string_size = temp_size; - prev_saved_doc_string_position = temp_pos; - prev_saved_doc_string_length = temp_len; - } + /* First exchange the two saved_strings. */ + verify (ARRAYELTS (saved_strings) == 2); + struct saved_string t = saved_strings[0]; + saved_strings[0] = saved_strings[1]; + saved_strings[1] = t; enum { extra = 100 }; - if (saved_doc_string_size == 0) + struct saved_string *ss = &saved_strings[0]; + if (ss->size == 0) { - saved_doc_string = xmalloc (nskip + extra); - saved_doc_string_size = nskip + extra; + ss->size = nskip + extra; + ss->string = xmalloc (ss->size); } - if (nskip > saved_doc_string_size) + else if (nskip > ss->size) { - saved_doc_string = xrealloc (saved_doc_string, nskip + extra); - saved_doc_string_size = nskip + extra; + ss->size = nskip + extra; + ss->string = xrealloc (ss->string, ss->size); } FILE *instream = infile->stream; - saved_doc_string_position = (file_tell (instream) - infile->lookahead); + ss->position = (file_tell (instream) - infile->lookahead); - /* Copy that many bytes into saved_doc_string. */ + /* Copy that many bytes into the saved string. */ ptrdiff_t i = 0; int c = 0; for (int n = min (nskip, infile->lookahead); n > 0; n--) - saved_doc_string[i++] = c = infile->buf[--infile->lookahead]; + ss->string[i++] = c = infile->buf[--infile->lookahead]; block_input (); for (; i < nskip && c >= 0; i++) - saved_doc_string[i] = c = getc (instream); + ss->string[i] = c = getc (instream); unblock_input (); - saved_doc_string_length = i; + ss->length = i; } else /* Skip that many bytes. */ skip_dyn_bytes (readcharfun, nskip); } +/* Given a lazy-loaded string designator VAL, return the actual string. + VAL is (FILENAME . POS). */ static Lisp_Object get_lazy_string (Lisp_Object val) { - char *saved = NULL; - file_offset saved_position; /* Get a doc string from the file we are loading. - If it's in saved_doc_string, get it from there. + If it's in a saved string, get it from there. Here, we don't know if the string is a bytecode string or a doc string. As a bytecode string must be unibyte, we always return a @@ -3511,47 +3488,37 @@ get_lazy_string (Lisp_Object val) /* Position is negative for user variables. */ EMACS_INT pos = eabs (XFIXNUM (XCDR (val))); - if (pos >= saved_doc_string_position - && pos < (saved_doc_string_position + saved_doc_string_length)) - { - saved = saved_doc_string; - saved_position = saved_doc_string_position; - } - /* Look in prev_saved_doc_string the same way. */ - else if (pos >= prev_saved_doc_string_position - && pos < (prev_saved_doc_string_position - + prev_saved_doc_string_length)) - { - saved = prev_saved_doc_string; - saved_position = prev_saved_doc_string_position; - } - if (saved) - { - ptrdiff_t start = pos - saved_position; - ptrdiff_t from = start; - ptrdiff_t to = start; + struct saved_string *ss = &saved_strings[0]; + struct saved_string *ssend = ss + ARRAYELTS (saved_strings); + while (ss < ssend + && !(pos >= ss->position && pos < ss->position + ss->length)) + ss++; + if (ss >= ssend) + return get_doc_string (val, 1, 0); + + ptrdiff_t start = pos - ss->position; + char *str = ss->string; + ptrdiff_t from = start; + ptrdiff_t to = start; - /* Process quoting with ^A, and find the end of the string, - which is marked with ^_ (037). */ - while (saved[from] != 037) + /* Process quoting with ^A, and find the end of the string, + which is marked with ^_ (037). */ + while (str[from] != 037) + { + int c = str[from++]; + if (c == 1) { - int c = saved[from++]; - if (c == 1) - { - c = saved[from++]; - saved[to++] = (c == 1 ? c - : c == '0' ? 0 - : c == '_' ? 037 - : c); - } - else - saved[to++] = c; + c = str[from++]; + str[to++] = (c == 1 ? c + : c == '0' ? 0 + : c == '_' ? 037 + : c); } - - return make_unibyte_string (saved + start, to - start); + else + str[to++] = c; } - else - return get_doc_string (val, 1, 0); + + return make_unibyte_string (str + start, to - start); } commit c46863d9bb8493d0d15030df863d78b8f1738b2e Author: Mattias Engdegård Date: Sat Aug 6 13:38:12 2022 +0200 Make force-load-doc-strings work again When load-force-doc-strings is true, read (#$ . POS) as the (unibyte) string referred to. This feature was lost by mistake in the recent nonrecursive reader rewrite. Noticed by Stefan Monnier. * src/lread.c (get_lazy_string): New function (code mostly recycled from an old version). (read0): Detect (#$ . FIXNUM) and retrieve the string if appropriate. * test/src/lread-resources/lazydoc.el: * test/src/lread-tests.el (lread-force-load-doc-strings): New test. diff --git a/src/lread.c b/src/lread.c index b7d8d9eeca..58fe3c5a9c 100644 --- a/src/lread.c +++ b/src/lread.c @@ -3496,6 +3496,64 @@ skip_lazy_string (Lisp_Object readcharfun) skip_dyn_bytes (readcharfun, nskip); } +static Lisp_Object +get_lazy_string (Lisp_Object val) +{ + char *saved = NULL; + file_offset saved_position; + /* Get a doc string from the file we are loading. + If it's in saved_doc_string, get it from there. + + Here, we don't know if the string is a bytecode string or a doc + string. As a bytecode string must be unibyte, we always return a + unibyte string. If it is actually a doc string, caller must make + it multibyte. */ + + /* Position is negative for user variables. */ + EMACS_INT pos = eabs (XFIXNUM (XCDR (val))); + if (pos >= saved_doc_string_position + && pos < (saved_doc_string_position + saved_doc_string_length)) + { + saved = saved_doc_string; + saved_position = saved_doc_string_position; + } + /* Look in prev_saved_doc_string the same way. */ + else if (pos >= prev_saved_doc_string_position + && pos < (prev_saved_doc_string_position + + prev_saved_doc_string_length)) + { + saved = prev_saved_doc_string; + saved_position = prev_saved_doc_string_position; + } + if (saved) + { + ptrdiff_t start = pos - saved_position; + ptrdiff_t from = start; + ptrdiff_t to = start; + + /* Process quoting with ^A, and find the end of the string, + which is marked with ^_ (037). */ + while (saved[from] != 037) + { + int c = saved[from++]; + if (c == 1) + { + c = saved[from++]; + saved[to++] = (c == 1 ? c + : c == '0' ? 0 + : c == '_' ? 037 + : c); + } + else + saved[to++] = c; + } + + return make_unibyte_string (saved + start, to - start); + } + else + return get_doc_string (val, 1, 0); +} + /* Length of prefix only consisting of symbol constituent characters. */ static ptrdiff_t @@ -4237,6 +4295,15 @@ read0 (Lisp_Object readcharfun, bool locate_syms) XSETCDR (e->u.list.tail, obj); read_stack_pop (); obj = e->u.list.head; + + /* Hack: immediately convert (#$ . FIXNUM) to the corresponding + string if load-force-doc-strings is set. */ + if (load_force_doc_strings + && BASE_EQ (XCAR (obj), Vload_file_name) + && !NILP (XCAR (obj)) + && FIXNUMP (XCDR (obj))) + obj = get_lazy_string (obj); + break; } diff --git a/test/src/lread-resources/lazydoc.el b/test/src/lread-resources/lazydoc.el new file mode 100644 index 0000000000..cb434c239b Binary files /dev/null and b/test/src/lread-resources/lazydoc.el differ diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el index f190f14781..2f25de4cc3 100644 --- a/test/src/lread-tests.el +++ b/test/src/lread-tests.el @@ -322,4 +322,21 @@ literals (Bug#20852)." (should-error (read-from-string "?\\\n x")) (should (equal (read-from-string "\"a\\\nb\"") '("ab" . 6)))) +(ert-deftest lread-force-load-doc-strings () + ;; Verify that lazy doc strings are loaded lazily by default, + ;; but eagerly with `force-load-doc-strings' set. + (let ((file (expand-file-name "lazydoc.el" (ert-resource-directory)))) + (fmakunbound 'lazydoc-fun) + (load file) + (let ((f (symbol-function 'lazydoc-fun))) + (should (byte-code-function-p f)) + (should (equal (aref f 4) (cons file 87)))) + + (fmakunbound 'lazydoc-fun) + (let ((load-force-doc-strings t)) + (load file) + (let ((f (symbol-function 'lazydoc-fun))) + (should (byte-code-function-p f)) + (should (equal (aref f 4) "My little\ndoc string\nhere")))))) + ;;; lread-tests.el ends here commit 7ffcba4213786569954bbdd9b7d7aa741b5014c9 (refs/remotes/origin/emacs-28) Author: Eli Zaretskii Date: Sat Aug 6 19:19:01 2022 +0300 * etc/PROBLEMS: Problems with Alacritty and Emoji. (Bug#56952) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index c0b44008e9..2a82995c99 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -2170,8 +2170,23 @@ terminals display them as 1-column glyphs. Again, this causes cursor addressing to get out of sync and eventually messes up the display. One possible workaround for problems caused by character composition -is to turn off 'auto-composition-mode' on Kitty terminals. +is to turn off 'auto-composition-mode' on Kitty terminals, e.g. by +customizing the 'auto-composition-mode' variable to have as value a +string that the 'tty-type' function returns on those terminals. +*** Display artifacts on the Alacritty text terminal + +This terminal is known to cause problems with Emoji sequences: when +displaying them, the Emacs text-mode frame could show gaps and other +visual artifacts. + +The solution is to disable 'auto-composition-mode' on these +terminals, for example, like this: + + (setq auto-composition-mode "alacritty") + +This disables 'auto-composition-mode' on frames that display on +terminals of this type. * Runtime problems specific to individual Unix variants commit df95118e8331950fc62cd243c40947eb8cc8845a Author: YugaEgo Date: Sat Aug 6 15:20:09 2022 +0300 Link from (emacs)Init Syntax to (elisp)Introduction * doc/emacs/custom.texi (Init Syntax): Link to the ELisp manual (Bug#56870) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 094b8b11f6..2d63b2a717 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -2434,6 +2434,9 @@ keys which send non-@acronym{ASCII} characters. Write a single-quote (@code{'}) followed by the Lisp object you want. @end table + For more information on the Emacs Lisp syntax, @pxref{Introduction,,, +elisp, The Emacs Lisp Reference Manual}. + @node Init Examples @subsection Init File Examples commit 7793cf0c3dc5d4d6eaa4dbdd483fc0bd537fb192 Author: Stefan Kangas Date: Sat Aug 6 14:26:07 2022 +0200 Don't mention removed XEmacs support in reftex manual * doc/misc/reftex.texi (Installation, Imprint): Don't mention removed XEmacs support. diff --git a/doc/misc/reftex.texi b/doc/misc/reftex.texi index c3b7b0b0f6..0c95b388cb 100644 --- a/doc/misc/reftex.texi +++ b/doc/misc/reftex.texi @@ -38,7 +38,6 @@ Con@TeX{}t @set SUPPORTADDRESS @AUCTeX{} user mailing list (@email{auctex@@gnu.org}) @set DEVELADDRESS @AUCTeX{} developer mailing list (@email{auctex-devel@@gnu.org}) @set BUGADDRESS @AUCTeX{} bug mailing list (@email{bug-auctex@@gnu.org}) -@set XEMACSFTP @uref{ftp://ftp.xemacs.org/pub/xemacs/packages/,XEmacs FTP site} @c %**end of header @copying @@ -249,10 +248,7 @@ reports or suggestions. @cindex Installation @RefTeX{} has been bundled and pre-installed with Emacs since -version 20.2. It has also been bundled and pre-installed with XEmacs -19.16--20.x. XEmacs 21.x users want to install the corresponding -plug-in package which is available from the @value{XEMACSFTP}. See the -XEmacs 21.x documentation on package installation for details. +version 20.2. @findex turn-on-reftex @findex reftex-mode @@ -3584,7 +3580,7 @@ the @value{BUGADDRESS}. There are also several Usenet groups which have competent readers who might be able to help: @code{comp.emacs}, @code{gnu.emacs.help}, -@code{comp.emacs.xemacs}, and @code{comp.text.tex}. +and @code{comp.text.tex}. Thanks to the people on the Net who have used @RefTeX{} and helped developing it with their reports. In particular thanks to @i{Ralf commit 3d1cf1b47ad7c43ad9cb8edf16710824a08b75c4 Author: Stefan Kangas Date: Sat Aug 6 10:25:39 2022 +0200 Don't mention removed XEmacs support in idlwave manual * doc/misc/idlwave.texi (Lesson I---Development Cycle) (Syntax Highlighting, Windows and macOS, Troubleshooting): Delete most references to XEmacs. Support for it was deleted in 28.1. diff --git a/doc/misc/idlwave.texi b/doc/misc/idlwave.texi index 46fe62693a..5261f993bc 100644 --- a/doc/misc/idlwave.texi +++ b/doc/misc/idlwave.texi @@ -392,7 +392,7 @@ that IDLWAVE has many more capabilities than covered here, which can be discovered by reading the entire manual, or hovering over the shoulder of your nearest IDLWAVE guru for a few days. -It is assumed that you have access to Emacs or XEmacs with the full +It is assumed that you have access to Emacs with the full IDLWAVE package including online help. We also assume that you are familiar with Emacs and can read the nomenclature of key presses in Emacs (in particular, @kbd{C} stands for @key{CONTROL} and @kbd{M} for @@ -1011,9 +1011,9 @@ Non-@code{nil} means use last match on line for @cindex Font lock Highlighting of keywords, comments, strings etc.@: can be accomplished -with @code{font-lock}. If you are using @code{global-font-lock-mode} -(in Emacs), or have @code{font-lock} turned on in any other buffer in -XEmacs, it should also automatically work in IDLWAVE buffers. If you'd +with @code{font-lock}. If you are using @code{global-font-lock-mode}, +or have @code{font-lock-mode} turned on in any other buffer, +it should also automatically work in IDLWAVE buffers. If you'd prefer invoking font-lock individually by mode, you can enforce it in @code{idlwave-mode} with the following line in your @file{.emacs}: @@ -4022,7 +4022,7 @@ user is King! IDLWAVE was developed on a UNIX system. However, thanks to the portability of Emacs, much of IDLWAVE does also work under different -operating systems like Windows (with NTEmacs or NTXEmacs). +operating systems like Windows (with NTEmacs). The only real problem is that there is no command-line version of IDL for Windows with which IDLWAVE can interact. As a @@ -4117,13 +4117,6 @@ configuration files (e.g., @file{.cshrc}), but from the file @file{~/.MacOSX/environment.plist}. Either include your path settings there, or start Emacs and IDLWAVE from the shell. -@item @strong{I get errors like @samp{Symbol's function is void: -overlayp}} - -You don't have the @samp{fsf-compat} package installed, which IDLWAVE -needs to run under XEmacs. Install it, or find an XEmacs distribution -which includes it by default. - @item @strong{I'm getting errors like @samp{Symbol's value as variable is void: cl-builtin-gethash} on completion or routine info.} @@ -4262,20 +4255,6 @@ is updated). Starting with IDL 6.2, the HTML help and its catalog are distributed with IDL, and so should never be inconsistent. -@item @strong{I get errors such as @samp{void-variable -browse-url-browser-function} or similar when attempting to load IDLWAVE -under XEmacs.} - -You don't have the @samp{browse-url} (or other required) XEmacs package. -Unlike Emacs, XEmacs distributes many packages separately from the -main program. IDLWAVE is actually among these, but is not always the -most up to date. When installing IDLWAVE as an XEmacs package, it -should prompt you for required additional packages. When installing it -from source, it won't and you'll get this error. The easiest solution -is to install all the packages when you install XEmacs (the so-called -@samp{sumo} bundle). The minimum set of XEmacs packages required by -IDLWAVE is @samp{fsf-compat, xemacs-base, mail-lib}. - @end enumerate @node GNU Free Documentation License commit 7ff60c62a96fd87bca04cb5cb5ad72384b587848 Author: Eli Zaretskii Date: Sat Aug 6 09:48:15 2022 +0300 ; * admin/make-tarball.txt: Fix last change. diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index f5b9d56c4d..a60fead267 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -185,10 +185,11 @@ General steps (for each step, check for possible errors): ./admin/diff-tar-files emacs-OLD.tar emacs-NEW.tar - Alternatively: + Alternatively, if you want to use the compressed tarballs (which + diff-tar-files doesn't understand): - tar tf emacs-OLD.tar | sed -e 's,^[^/]*,,' | sort > old_tmp - tar tf emacs-NEW.tar | sed -e 's,^[^/]*,,' | sort > new_tmp + tar tJf emacs-OLD.tar.xz | sed -e 's,^[^/]*,,' | sort > old_tmp + tar tJf emacs-NEW.tar.xz | sed -e 's,^[^/]*,,' | sort > new_tmp diff -u old_tmp new_tmp If this is the first pretest of a major release, just comparing commit 2fd5590d0cd167d28b7a18c4ceee43784ec12538 Author: Eli Zaretskii Date: Sat Aug 6 09:44:45 2022 +0300 ; * lisp/play/fortune.el (fortune-ask-file): Doc fix. diff --git a/lisp/play/fortune.el b/lisp/play/fortune.el index d6360e5022..0973f2bc5f 100644 --- a/lisp/play/fortune.el +++ b/lisp/play/fortune.el @@ -176,7 +176,7 @@ If INTERACTIVE is non-nil, don't compile the fortune file afterwards." (fortune-compile file))))) (defun fortune-ask-file () - "Asks the user for a file name." + "Ask the user for the file name of the fortune file." (expand-file-name (read-file-name "Fortune file to use: "