commit 49248878d4da7dbf901a7cd555e129803ac5e095 (HEAD, refs/remotes/origin/master) Author: Po Lu Date: Thu Aug 10 14:15:03 2023 +0800 ; Improve sectioning and documentation in xterm.c * src/xterm.c (x_dnd_compute_toplevels, x_dnd_get_target_window_1) (x_dnd_get_wm_state_and_proto, xi_frame_selected_for) (xi_convert_event_state, x_free_xi_devices) (xi_populate_device_from_info): Improve sectioning, fill some lines to 80 columns. Not all lines could be filled as a result of XCB's heretically long identifier names. diff --git a/src/xterm.c b/src/xterm.c index f454733c659..6a1642ff56e 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1215,6 +1215,8 @@ #define ATOM_REFS_INIT(string, member) \ static void x_scroll_bar_redraw (struct scroll_bar *); #endif + + /* Global state maintained during a drag-and-drop operation. */ /* Flag that indicates if a drag-and-drop operation is in progress. */ @@ -1543,6 +1545,8 @@ #define ATOM_REFS_INIT(string, member) \ for `x_dnd_toplevels' to work. */ static bool x_dnd_use_toplevels; + + /* Motif drag-and-drop protocol support. */ /* Pointer to a variable which stores whether or not an X error @@ -2914,6 +2918,11 @@ x_dnd_send_xm_leave_for_drop (struct x_display_info *dpyinfo, wdesc, &lmsg); } + + +/* Drag-and-drop and XDND protocol primitives employed by the event + loop. */ + static void x_dnd_free_toplevels (bool display_alive) { @@ -3259,9 +3268,10 @@ x_dnd_compute_toplevels (struct x_display_info *dpyinfo) if (!xm_property_reply) free (error); - extent_property_reply = xcb_get_property_reply (dpyinfo->xcb_connection, - extent_property_cookies[i], - &error); + extent_property_reply + = xcb_get_property_reply (dpyinfo->xcb_connection, + extent_property_cookies[i], + &error); if (!extent_property_reply) free (error); @@ -3342,7 +3352,8 @@ x_dnd_compute_toplevels (struct x_display_info *dpyinfo) #else if (xm_property_reply && xm_property_reply->format == 8 - && xm_property_reply->type == dpyinfo->Xatom_MOTIF_DRAG_RECEIVER_INFO + && (xm_property_reply->type + == dpyinfo->Xatom_MOTIF_DRAG_RECEIVER_INFO) && xcb_get_property_value_length (xm_property_reply) >= 4) { xmdata = xcb_get_property_value (xm_property_reply); @@ -3391,9 +3402,10 @@ x_dnd_compute_toplevels (struct x_display_info *dpyinfo) XFree (rects); } #else - bounding_rect_reply = xcb_shape_get_rectangles_reply (dpyinfo->xcb_connection, - bounding_rect_cookies[i], - &error); + bounding_rect_reply + = xcb_shape_get_rectangles_reply (dpyinfo->xcb_connection, + bounding_rect_cookies[i], + &error); if (bounding_rect_reply) { @@ -3404,7 +3416,8 @@ x_dnd_compute_toplevels (struct x_display_info *dpyinfo) * sizeof *tem->bounding_rects); tem->n_bounding_rects = 0; - for (; bounding_rect_iterator.rem; xcb_rectangle_next (&bounding_rect_iterator)) + for (; bounding_rect_iterator.rem; + xcb_rectangle_next (&bounding_rect_iterator)) { tem->bounding_rects[tem->n_bounding_rects].x = bounding_rect_iterator.data->x; @@ -3429,9 +3442,10 @@ x_dnd_compute_toplevels (struct x_display_info *dpyinfo) || (dpyinfo->xshape_major == 1 && dpyinfo->xshape_minor >= 1)) { - input_rect_reply = xcb_shape_get_rectangles_reply (dpyinfo->xcb_connection, - input_rect_cookies[i], - &error); + input_rect_reply + = xcb_shape_get_rectangles_reply (dpyinfo->xcb_connection, + input_rect_cookies[i], + &error); if (input_rect_reply) { @@ -3442,7 +3456,8 @@ x_dnd_compute_toplevels (struct x_display_info *dpyinfo) * sizeof *tem->input_rects); tem->n_input_rects = 0; - for (; input_rect_iterator.rem; xcb_rectangle_next (&input_rect_iterator)) + for (; input_rect_iterator.rem; + xcb_rectangle_next (&input_rect_iterator)) { tem->input_rects[tem->n_input_rects].x = input_rect_iterator.data->x; @@ -3509,17 +3524,25 @@ x_dnd_compute_toplevels (struct x_display_info *dpyinfo) if (tem->n_input_rects == -1 && tem->n_bounding_rects == 1 #ifdef USE_XCB - && tem->bounding_rects[0].width == (geometry_reply->width - + geometry_reply->border_width) - && tem->bounding_rects[0].height == (geometry_reply->height - + geometry_reply->border_width) - && tem->bounding_rects[0].x == -geometry_reply->border_width - && tem->bounding_rects[0].y == -geometry_reply->border_width + && (tem->bounding_rects[0].width + == (geometry_reply->width + + geometry_reply->border_width)) + && (tem->bounding_rects[0].height + == (geometry_reply->height + + geometry_reply->border_width)) + && (tem->bounding_rects[0].x + == -geometry_reply->border_width) + && (tem->bounding_rects[0].y + == -geometry_reply->border_width) #else - && tem->bounding_rects[0].width == attrs.width + attrs.border_width - && tem->bounding_rects[0].height == attrs.height + attrs.border_width - && tem->bounding_rects[0].x == -attrs.border_width - && tem->bounding_rects[0].y == -attrs.border_width + && (tem->bounding_rects[0].width + == attrs.width + attrs.border_width) + && (tem->bounding_rects[0].height + == attrs.height + attrs.border_width) + && (tem->bounding_rects[0].x + == -attrs.border_width) + && (tem->bounding_rects[0].y + == -attrs.border_width) #endif ) { @@ -3542,9 +3565,10 @@ x_dnd_compute_toplevels (struct x_display_info *dpyinfo) #ifdef HAVE_XCB_SHAPE if (dpyinfo->xshape_supported_p) { - bounding_rect_reply = xcb_shape_get_rectangles_reply (dpyinfo->xcb_connection, - bounding_rect_cookies[i], - &error); + bounding_rect_reply + = xcb_shape_get_rectangles_reply (dpyinfo->xcb_connection, + bounding_rect_cookies[i], + &error); if (bounding_rect_reply) free (bounding_rect_reply); @@ -3559,9 +3583,10 @@ x_dnd_compute_toplevels (struct x_display_info *dpyinfo) || (dpyinfo->xshape_major == 1 && dpyinfo->xshape_minor >= 1))) { - input_rect_reply = xcb_shape_get_rectangles_reply (dpyinfo->xcb_connection, - input_rect_cookies[i], - &error); + input_rect_reply + = xcb_shape_get_rectangles_reply (dpyinfo->xcb_connection, + input_rect_cookies[i], + &error); if (input_rect_reply) free (input_rect_reply); @@ -3784,8 +3809,10 @@ x_dnd_get_target_window_1 (struct x_display_info *dpyinfo, if (tem->n_input_rects == -1 || x_dnd_get_target_window_2 (tem->input_rects, tem->n_input_rects, - tem->border_width + root_x - tem->x, - tem->border_width + root_y - tem->y)) + (tem->border_width + + root_x - tem->x), + (tem->border_width + + root_y - tem->y))) { chosen = tem; break; @@ -3872,11 +3899,12 @@ x_dnd_get_wm_state_and_proto (struct x_display_info *dpyinfo, (xcb_window_t) window, (xcb_atom_t) dpyinfo->Xatom_XdndProxy, XA_WINDOW, 0, 1); - xm_style_cookie = xcb_get_property (dpyinfo->xcb_connection, 0, - (xcb_window_t) window, - (xcb_atom_t) dpyinfo->Xatom_MOTIF_DRAG_RECEIVER_INFO, - (xcb_atom_t) dpyinfo->Xatom_MOTIF_DRAG_RECEIVER_INFO, - 0, 4); + xm_style_cookie + = xcb_get_property (dpyinfo->xcb_connection, 0, + (xcb_window_t) window, + (xcb_atom_t) dpyinfo->Xatom_MOTIF_DRAG_RECEIVER_INFO, + (xcb_atom_t) dpyinfo->Xatom_MOTIF_DRAG_RECEIVER_INFO, + 0, 4); reply = xcb_get_property_reply (dpyinfo->xcb_connection, wmstate_cookie, &error); @@ -4920,6 +4948,11 @@ x_dnd_cleanup_drag_and_drop (void *frame) x_restore_events_after_dnd (f, &x_dnd_old_window_attrs); } + + +/* Primitives for simplified drag-and-drop tracking when items are + being dragged between frames comprising the same Emacs session. */ + static void x_dnd_note_self_position (struct x_display_info *dpyinfo, Window target, unsigned short root_x, unsigned short root_y) @@ -5050,6 +5083,10 @@ x_dnd_note_self_drop (struct x_display_info *dpyinfo, Window target, kbd_buffer_store_event (&ie); } + + +/* Miscellaneous X event and graphics extension functions. */ + /* Flush display of frame F. */ static void @@ -5134,28 +5171,9 @@ record_event (char *locus, int type) #endif -#ifdef HAVE_XINPUT2 -bool -xi_frame_selected_for (struct frame *f, unsigned long event) -{ - XIEventMask *masks; - int i; - - masks = FRAME_X_OUTPUT (f)->xi_masks; - - if (!masks) - return false; - - for (i = 0; i < FRAME_X_OUTPUT (f)->num_xi_masks; ++i) - { - if (masks[i].mask_len >= XIMaskLen (event) - && XIMaskIsSet (masks[i].mask, event)) - return true; - } + - return false; -} -#endif +/* Miscelaneous event handling functions. */ static void x_toolkit_position (struct frame *f, int x, int y, @@ -5300,10 +5318,36 @@ #define FRAME_CR_SURFACE_DESIRED_HEIGHT(f) \ #endif /* HAVE_CAIRO */ + + +/* X input extension device and event mask management functions. */ + #ifdef HAVE_XINPUT2 +bool +xi_frame_selected_for (struct frame *f, unsigned long event) +{ + XIEventMask *masks; + int i; + + masks = FRAME_X_OUTPUT (f)->xi_masks; + + if (!masks) + return false; + + for (i = 0; i < FRAME_X_OUTPUT (f)->num_xi_masks; ++i) + { + if (masks[i].mask_len >= XIMaskLen (event) + && XIMaskIsSet (masks[i].mask, event)) + return true; + } + + return false; +} + /* Convert XI2 button state IN to a standard X button modifier mask, and place it in OUT. */ + static void xi_convert_button_state (XIButtonState *in, unsigned int *out) { @@ -5325,7 +5369,7 @@ xi_convert_button_state (XIButtonState *in, unsigned int *out) #ifdef USE_GTK static -#endif +#endif /* USE_GTK */ unsigned int xi_convert_event_state (XIDeviceEvent *xev) { @@ -5351,12 +5395,13 @@ xi_convert_event_keyboard_state (XIDeviceEvent *xev) } /* Free all XI2 devices on DPYINFO. */ + static void x_free_xi_devices (struct x_display_info *dpyinfo) { #ifdef HAVE_XINPUT2_2 struct xi_touch_point_t *tem, *last; -#endif +#endif /* HAVE_XINPUT2_2 */ block_input (); @@ -5366,7 +5411,7 @@ x_free_xi_devices (struct x_display_info *dpyinfo) { #ifdef HAVE_XINPUT2_1 xfree (dpyinfo->devices[i].valuators); -#endif +#endif /* HAVE_XINPUT2_1 */ #ifdef HAVE_XINPUT2_2 tem = dpyinfo->devices[i].touchpoints; @@ -5376,7 +5421,7 @@ x_free_xi_devices (struct x_display_info *dpyinfo) tem = tem->next; xfree (last); } -#endif +#endif /* HAVE_XINPUT2_2 */ } xfree (dpyinfo->devices); @@ -5441,7 +5486,7 @@ xi_populate_scroll_valuator (struct xi_device_t *device, valuator->number = info->number; } -#endif +#endif /* HAVE_XINPUT2_1 */ static void xi_populate_device_from_info (struct x_display_info *dpyinfo, @@ -5453,14 +5498,14 @@ xi_populate_device_from_info (struct x_display_info *dpyinfo, int actual_valuator_count, c; XIScrollClassInfo *info; XIValuatorClassInfo *valuator_info; -#endif +#endif /* HAVE_XINPUT2_1 */ #ifdef HAVE_XINPUT2_2 XITouchClassInfo *touch_info; -#endif +#endif /* HAVE_XINPUT2_2 */ #ifdef HAVE_XINPUT2_1 USE_SAFE_ALLOCA; -#endif +#endif /* HAVE_XINPUT2_1 */ /* Initialize generic information about the device: its ID, which buttons are currently pressed and thus presumably actively @@ -5917,8 +5962,12 @@ xi_reset_scroll_valuators_for_device_id (struct x_display_info *dpyinfo, } #endif /* HAVE_XINPUT2_1 */ +#endif /* HAVE_XINPUT2 */ -#endif + + +/* Cairo context, X rendering extension, and GC auxiliary data + management functions. */ #ifdef USE_CAIRO @@ -6404,6 +6453,7 @@ x_cr_export_frames (Lisp_Object frames, cairo_surface_type_t surface_type) #endif /* USE_CAIRO */ #if defined HAVE_XRENDER + void x_xr_apply_ext_clip (struct frame *f, GC gc) { @@ -6427,7 +6477,8 @@ x_xr_reset_ext_clip (struct frame *f) FRAME_X_PICTURE (f), CPClipMask, &attrs); } -#endif + +#endif /* HAVE_XRENDER */ static void x_set_clip_rectangles (struct frame *f, GC gc, XRectangle *rectangles, int n) @@ -6631,6 +6682,9 @@ x_fill_rectangle (struct frame *f, GC gc, int x, int y, int width, int height, #endif } + + +/* Graphics primitives. */ static void x_clear_rectangle (struct frame *f, GC gc, int x, int y, int width, int height, @@ -6923,6 +6977,8 @@ x_set_frame_alpha (struct frame *f) x_stop_ignoring_errors (dpyinfo); } + + /*********************************************************************** Starting and ending an update ***********************************************************************/ @@ -7618,6 +7674,8 @@ XTbuffer_flipping_unblocked_hook (struct frame *f) } #endif + + /** * x_clear_under_internal_border: * commit ea1295ff2ca55adfc79f029d87a0b7a1a949238d Author: Po Lu Date: Thu Aug 10 13:32:30 2023 +0800 ; * lisp/calendar/cal-move.el (calendar-scroll-left): Fix last change. diff --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el index 35adb2d80df..b494659a8ee 100644 --- a/lisp/calendar/cal-move.el +++ b/lisp/calendar/cal-move.el @@ -158,9 +158,8 @@ calendar-scroll-left last-nonmenu-event)) (unless arg (setq arg 1)) (save-current-buffer - ;; Nil if called from menu-bar. - (when (setq event (event-start event)) - (select-buffer (calendar-event-buffer event))) + (when (event-start event) + (set-buffer (calendar-event-buffer event))) (calendar-cursor-to-nearest-date) (unless (zerop arg) (let ((old-date (calendar-cursor-to-date)) commit b556c180f6503536b355758c33104fb25b5f53fd Author: Po Lu Date: Thu Aug 10 13:30:33 2023 +0800 Also fix calendar-scroll-left * lisp/calendar/cal-move.el (calendar-scroll-left): Use `calendar-event-buffer' instead of assuming that EVENT's posn-window is always a window. diff --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el index 07a813bb705..35adb2d80df 100644 --- a/lisp/calendar/cal-move.el +++ b/lisp/calendar/cal-move.el @@ -157,9 +157,10 @@ calendar-scroll-left (interactive (list (prefix-numeric-value current-prefix-arg) last-nonmenu-event)) (unless arg (setq arg 1)) - (save-selected-window + (save-current-buffer ;; Nil if called from menu-bar. - (if (setq event (event-start event)) (select-window (posn-window event))) + (when (setq event (event-start event)) + (select-buffer (calendar-event-buffer event))) (calendar-cursor-to-nearest-date) (unless (zerop arg) (let ((old-date (calendar-cursor-to-date)) commit 11116043ae4be761ed4f8ccf559a224b272cc534 Author: Po Lu Date: Thu Aug 10 13:25:29 2023 +0800 Repair several minor breakages * lisp/calendar/calendar.el (calendar-event-buffer): New function. (calendar-cursor-to-date, calendar-other-month): * lisp/calendar/holidays.el (calendar-list-holidays) (calendar-mark-holidays): * lisp/calendar/lunar.el (calendar-lunar-phases): Use that function to derive event windows, in case these commands are being called from the menu bar. * lisp/doc-view.el (doc-view-tool-bar-map): Fix typo in help text. diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index faa88e7f52f..02167d84b3e 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1554,6 +1554,15 @@ calendar-redraw (when (window-live-p (get-buffer-window)) (set-window-point (get-buffer-window) (point)))))) +(defun calendar-event-buffer (event) + "Return the Calendar buffer where EVENT happened. +If EVENT's start falls within a window, use that window's buffer. +Otherwise, use the selected window of EVENT's frame." + (let ((window-or-frame (posn-window (event-start event)))) + (if (windowp window-or-frame) + (window-buffer window-or-frame) + (window-buffer (frame-selected-window window-or-frame))))) + (defvar calendar-mode-map (let ((map (make-keymap))) (suppress-keymap map) @@ -1916,10 +1925,13 @@ calendar-cursor-to-date If EVENT is non-nil, it's an event indicating the buffer position to use instead of point." (with-current-buffer - (if event (window-buffer (posn-window (event-start event))) + (if event (calendar-event-buffer event) (current-buffer)) (save-excursion (and event (setq event (event-start event)) + ;; (posn-point event) can be `menu-bar' if this command is + ;; invoked from the menu bar. + (integerp (posn-point event)) (goto-char (posn-point event))) (let* ((segment (calendar-column-to-segment)) (month (% (+ displayed-month (1- segment)) 12))) @@ -2002,10 +2014,8 @@ calendar-other-month EVENT is an event like `last-nonmenu-event'." (interactive (let ((event (list last-nonmenu-event))) (append (calendar-read-date 'noday) event))) - (save-selected-window - (and event - (setq event (event-start event)) - (select-window (posn-window event))) + (with-current-buffer (or (and (not event) (current-buffer)) + (calendar-event-buffer event)) (unless (and (= month displayed-month) (= year displayed-year)) (let ((old-date (calendar-cursor-to-date)) diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index f30c5653c11..a65beca0e5b 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el @@ -359,7 +359,7 @@ calendar-list-holidays (interactive (list last-nonmenu-event)) ;; If called from a menu, with the calendar window not selected. (with-current-buffer - (if event (window-buffer (posn-window (event-start event))) + (if event (calendar-event-buffer event) (current-buffer)) (message "Looking up holidays...") (let ((holiday-list (calendar-holiday-list)) @@ -590,7 +590,7 @@ calendar-mark-holidays (interactive (list last-nonmenu-event)) ;; If called from a menu, with the calendar window not selected. (with-current-buffer - (if event (window-buffer (posn-window (event-start event))) + (if event (calendar-event-buffer event) (current-buffer)) (setq calendar-mark-holidays-flag t) (message "Marking holidays...") diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el index 5b22043102d..a9c3597a3f9 100644 --- a/lisp/calendar/lunar.el +++ b/lisp/calendar/lunar.el @@ -226,7 +226,7 @@ calendar-lunar-phases (interactive (list last-nonmenu-event)) ;; If called from a menu, with the calendar window not selected. (with-current-buffer - (if event (window-buffer (posn-window (event-start event))) + (if event (calendar-event-buffer event) (current-buffer)) (message "Computing phases of the moon...") (let ((m1 displayed-month) diff --git a/lisp/doc-view.el b/lisp/doc-view.el index c7edbd6e150..e25e63a97ee 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -703,7 +703,7 @@ doc-view-tool-bar-map map doc-view-mode-map :vert-only t :enable '(< (doc-view-current-page) (doc-view-last-page-number)) - :help "Move to the next page.") + :help "Move to the last page.") map) "Like the default `tool-bar-map', but with additions for DocView.") commit 67f79fc8027150656bf39ba1910caa54490889b7 Author: Po Lu Date: Thu Aug 10 01:58:02 2023 +0000 ; * configure.ac: Fix typo. diff --git a/configure.ac b/configure.ac index b5f8a0d5416..0bc0de1bfac 100644 --- a/configure.ac +++ b/configure.ac @@ -2647,7 +2647,7 @@ AC_DEFUN AS_CASE([$emacs_cv_boot_time_file], [/*|*:*], [BOOT_TIME_FILE=\"$emacs_cv_boot_time_file\"], - ['not needed'], [BOOT_TIME_FILE=], + [not-needed], [BOOT_TIME_FILE=], [# Guess systemd if unknown. # If guess is wrong, Emacs falls back on something else. BOOT_TIME_FILE=\"/var/lib/systemd/random-seed\"]) commit c4e0b10f18255bc45a9e15c5bde9b11b95e9ad0f Author: Po Lu Date: Thu Aug 10 01:53:26 2023 +0000 Fix the MS-DOS, Haiku, USG, etc builds * configure.ac (emacs_cv_boot_time_file): Only compute this on GNU/Linux, the sole system with systemd. * nt/inc/ms-w32.h (BOOT_TIME_FILE): Remove now redundant #undef. * src/filelock.c (get_boot_time): Eschew BOOT_TIME_FILE if not defined. diff --git a/configure.ac b/configure.ac index 56c8cf1ae05..b5f8a0d5416 100644 --- a/configure.ac +++ b/configure.ac @@ -2625,11 +2625,11 @@ AC_DEFUN fi AC_SUBST([AUTO_DEPEND]) +BOOT_TIME_FILE= AC_CACHE_CHECK([for old but post-boot file], [emacs_cv_boot_time_file], [AS_CASE([$opsys], - [*bsd|darwin|dragonfly], - [emacs_cv_boot_time_file='not needed'], + [gnu-linux], [emacs_cv_boot_time_file=unknown AS_IF([test $cross_compiling = no], [# systemd puts it in /var/lib/systemd. @@ -2642,19 +2642,22 @@ AC_DEFUN /var/run/random-seed do test -f $file && { emacs_cv_boot_time_file=$file; break; } - done])])]) + done])], + [*], [emacs_cv_boot_time_file=not-needed])]) + AS_CASE([$emacs_cv_boot_time_file], [/*|*:*], [BOOT_TIME_FILE=\"$emacs_cv_boot_time_file\"], - [NULL|nullptr|0], [BOOT_TIME_FILE=$emacs_cv_boot_time_file], - ['not needed'], [BOOT_TIME_FILE=NULL], + ['not needed'], [BOOT_TIME_FILE=], [# Guess systemd if unknown. # If guess is wrong, Emacs falls back on something else. BOOT_TIME_FILE=\"/var/lib/systemd/random-seed\"]) -AC_DEFINE_UNQUOTED([BOOT_TIME_FILE], [$BOOT_TIME_FILE], - [Name of file that, if it exists, postdates boot and predates - the first Emacs invocation; or a null pointer if no such file is known. - This file is used only on GNU/Linux and other systems - that lack the FreeBSD-style sysctl with KERN_BOOTTIME.]) + +AS_IF([test -n "$BOOT_TIME_FILE"], + [AC_DEFINE_UNQUOTED([BOOT_TIME_FILE], [$BOOT_TIME_FILE], + [Name of file that, if it exists, postdates boot and predates + the first Emacs invocation; or a null pointer if no such file is known. + This file is used only on GNU/Linux and other systems + that lack the FreeBSD-style sysctl with KERN_BOOTTIME.])]) #### Choose a window system. diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index b23fd5030fa..58be1199345 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h @@ -121,7 +121,6 @@ #define HAVE_C99_STRTOLD 1 the output, but that's gross. So this should do; if the file is not there, the boot time will be returned as zero, and filelock.c already handles that. */ -#undef BOOT_TIME_FILE #define BOOT_TIME_FILE "C:/pagefile.sys" /* ============================================================ */ diff --git a/src/filelock.c b/src/filelock.c index 0ad130353f3..3b1ff8ad566 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -159,7 +159,7 @@ get_boot_time (void) } #endif /* defined (CTL_KERN) && defined (KERN_BOOTTIME) */ - if (BOOT_TIME_FILE) +#ifdef BOOT_TIME_FILE { struct stat st; if (stat (BOOT_TIME_FILE, &st) == 0) @@ -168,6 +168,7 @@ get_boot_time (void) return boot_time; } } +#endif /* BOOT_TIME_FILE */ #if defined (BOOT_TIME) /* The utmp routines maintain static state. Don't touch that state commit e1d08e9e11d2bd5e93c8ae4ea4a8e27129b316cb Author: Po Lu Date: Thu Aug 10 09:03:23 2023 +0800 Further improve android.texi * doc/emacs/android.texi (Android Environment): Improve sectioning by replacing subsections with simple entries in the concept index. diff --git a/doc/emacs/android.texi b/doc/emacs/android.texi index 619cf4a7fad..4dfe9098612 100644 --- a/doc/emacs/android.texi +++ b/doc/emacs/android.texi @@ -399,7 +399,7 @@ Android Environment $ adb shell "settings put global settings_enable_monitor_phantom_procs false" @end example -@subsection Running Emacs in the Background +@cindex running emacs in the background, android @cindex emacs killed, android @cindex emacs in the background, android @@ -429,7 +429,7 @@ Android Environment list of such troublesome manufacturers and sometimes workarounds at @url{https://dontkillmyapp.com/}. -@subsection Android Permissions +@cindex permissions under android @cindex external storage, android Android also defines a permissions system that determines what commit a5c79499e3ef9723504e36af3ba7b98435501166 Author: Po Lu Date: Thu Aug 10 08:58:04 2023 +0800 Fix crash when reading TTC font for glyph mapping table selection * src/sfnt.c (sfnt_read_cmap_table): Seek to the table directory if DESC->offset is provided. * src/sfntfont.c (sfntfont_read_cmap): Accurately verify cmap subtable header size. (bug#65185) diff --git a/src/sfnt.c b/src/sfnt.c index 876db70bcda..8ccb672c5d5 100644 --- a/src/sfnt.c +++ b/src/sfnt.c @@ -1006,7 +1006,7 @@ sfnt_read_cmap_table (int fd, struct sfnt_offset_subtable *subtable, /* Read the common part of the new subtable. */ rc = read (fd, &(*subtables)[i], sizeof (*subtables)[i]); - if (rc < sizeof (*subtables)) + if (rc < sizeof (*subtables)[i]) { xfree (cmap); xfree (*subtables); diff --git a/src/sfntfont.c b/src/sfntfont.c index 6927b185721..22e7f0e3832 100644 --- a/src/sfntfont.c +++ b/src/sfntfont.c @@ -1341,9 +1341,22 @@ sfntfont_read_cmap (struct sfnt_font_desc *desc, if (fd < 0) return; + /* Seek to the start of the font itself within its collection. */ + + if (desc->offset + && lseek (fd, desc->offset, SEEK_SET) != desc->offset) + { + emacs_close (fd); + return; + } + font = sfnt_read_table_directory (fd); - if (!font) + /* Return if FONT is a TrueType collection: the file pointer should + already have been moved to the start of the table directory if + so. */ + + if (!font || font == (struct sfnt_offset_subtable *) -1) { emacs_close (fd); return; commit e39e2fa716cf980cfccb68ab304ad94b2fe86201 Author: Po Lu Date: Thu Aug 10 08:42:23 2023 +0800 Make node-less sections subsections in android.texi * doc/emacs/android.texi (Android Environment): Change node-less sections into subsections. diff --git a/doc/emacs/android.texi b/doc/emacs/android.texi index 9d352f3a484..619cf4a7fad 100644 --- a/doc/emacs/android.texi +++ b/doc/emacs/android.texi @@ -399,7 +399,7 @@ Android Environment $ adb shell "settings put global settings_enable_monitor_phantom_procs false" @end example -@section Running Emacs in the Background +@subsection Running Emacs in the Background @cindex emacs killed, android @cindex emacs in the background, android @@ -429,7 +429,7 @@ Android Environment list of such troublesome manufacturers and sometimes workarounds at @url{https://dontkillmyapp.com/}. -@section Android Permissions +@subsection Android Permissions @cindex external storage, android Android also defines a permissions system that determines what commit cdb0b28474c6c577b9f7980187e6444b222016bc Author: Po Lu Date: Thu Aug 10 08:40:48 2023 +0800 Fix pinch gestures after toolkit menu * src/xmenu.c (leave_toolkit_menu): Restore gesture event mask. (bug#65129) diff --git a/src/xmenu.c b/src/xmenu.c index 6d32aa3e078..2d405d54deb 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1617,6 +1617,7 @@ popup_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data) #ifdef HAVE_XINPUT2 + static void prepare_for_entry_into_toolkit_menu (struct frame *f) { @@ -1680,6 +1681,19 @@ leave_toolkit_menu (void *data) XISetMask (m, XI_Enter); XISetMask (m, XI_Leave); +#ifdef HAVE_XINPUT2_4 + /* Select for gesture events. Emacs selects for gesture events from + all master devices on non-GTK3 builds, so that event mask is also + clobbered by prepare_for_entry_into_toolkit_menu. (bug#65129) */ + + if (dpyinfo->xi2_version >= 4) + { + XISetMask (m, XI_GesturePinchBegin); + XISetMask (m, XI_GesturePinchUpdate); + XISetMask (m, XI_GesturePinchEnd); + } +#endif /* HAVE_XINPUT2_4 */ + FOR_EACH_FRAME (tail, frame) { f = XFRAME (frame); @@ -1691,7 +1705,8 @@ leave_toolkit_menu (void *data) &mask, 1); } } -#endif + +#endif /* HAVE_XINPUT2 */ /* ID is the LWLIB ID of the dialog box. */ commit cc0a30a876adffa5ec110df9f4e0f21097f6d73e Author: Paul Eggert Date: Wed Aug 9 12:06:25 2023 -0700 Adjust to random-seed move For some time, GNU/Linux systems have put their random-seed file somewhere other than where src/filelock.c looks for it. Catch up to this by having 'configure' scout for it. * configure.ac (BOOT_TIME_FILE): Define this at configure-time. * nt/inc/ms-w32.h (BOOT_TIME_FILE): Override 'configure'. * src/filelock.c (BOOT_TIME_FILE): Remove default definition, since 'configure' defaults it now. diff --git a/configure.ac b/configure.ac index 6e080c1c666..56c8cf1ae05 100644 --- a/configure.ac +++ b/configure.ac @@ -2625,6 +2625,37 @@ AC_DEFUN fi AC_SUBST([AUTO_DEPEND]) +AC_CACHE_CHECK([for old but post-boot file], + [emacs_cv_boot_time_file], + [AS_CASE([$opsys], + [*bsd|darwin|dragonfly], + [emacs_cv_boot_time_file='not needed'], + [emacs_cv_boot_time_file=unknown + AS_IF([test $cross_compiling = no], + [# systemd puts it in /var/lib/systemd. + # initscripts puts it in /var/lib/urandom (previously /var/lib). + # Linux drivers/char/random.c before 2022-02-21 suggests /var/run. + for file in \ + /var/lib/systemd/random-seed \ + /var/lib/urandom/random-seed \ + /var/lib/random-seed \ + /var/run/random-seed + do + test -f $file && { emacs_cv_boot_time_file=$file; break; } + done])])]) +AS_CASE([$emacs_cv_boot_time_file], + [/*|*:*], [BOOT_TIME_FILE=\"$emacs_cv_boot_time_file\"], + [NULL|nullptr|0], [BOOT_TIME_FILE=$emacs_cv_boot_time_file], + ['not needed'], [BOOT_TIME_FILE=NULL], + [# Guess systemd if unknown. + # If guess is wrong, Emacs falls back on something else. + BOOT_TIME_FILE=\"/var/lib/systemd/random-seed\"]) +AC_DEFINE_UNQUOTED([BOOT_TIME_FILE], [$BOOT_TIME_FILE], + [Name of file that, if it exists, postdates boot and predates + the first Emacs invocation; or a null pointer if no such file is known. + This file is used only on GNU/Linux and other systems + that lack the FreeBSD-style sysctl with KERN_BOOTTIME.]) + #### Choose a window system. ## We leave window_system equal to none if diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index 58be1199345..b23fd5030fa 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h @@ -121,6 +121,7 @@ #define HAVE_C99_STRTOLD 1 the output, but that's gross. So this should do; if the file is not there, the boot time will be returned as zero, and filelock.c already handles that. */ +#undef BOOT_TIME_FILE #define BOOT_TIME_FILE "C:/pagefile.sys" /* ============================================================ */ diff --git a/src/filelock.c b/src/filelock.c index 66b8fd2ceac..0ad130353f3 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -59,12 +59,6 @@ Copyright (C) 1985-1987, 1993-1994, 1996, 1998-2023 Free Software #include #endif -/* A file whose last-modified time is just after the most recent boot. - Define this to be NULL to disable checking for this file. */ -#ifndef BOOT_TIME_FILE -#define BOOT_TIME_FILE "/var/run/random-seed" -#endif - /* Boot time is not available on Android. */ #if defined HAVE_ANDROID && !defined ANDROID_STUBIFY commit 020b5d7fefd255117ab4fca636146b5b59c8fb84 Author: Eli Zaretskii Date: Wed Aug 9 22:03:00 2023 +0300 ; Improve INSTALL files * INSTALL: * java/INSTALL: Improve and clarify instructions. diff --git a/INSTALL b/INSTALL index 605be366e92..d09216739f6 100644 --- a/INSTALL +++ b/INSTALL @@ -4,13 +4,16 @@ Inc. See the end of the file for license conditions. -This file contains general information on building GNU Emacs. For -more information specific to the MS-Windows, GNUstep/macOS, MS-DOS, -and Android ports, also read the files nt/INSTALL, nextstep/INSTALL, -msdos/INSTALL, and java/INSTALL. - -For information about building from a Git checkout (rather than an -Emacs release), read the INSTALL.REPO file first. +This file contains general information on building GNU Emacs. If you +are building an Emacs release tarball on a Unix or a GNU system, the +instructions in this file should be sufficient. For other +configurations, we have additional specialized files: + + . INSTALL.REPO if you build from a Git checkout + . nt/INSTALL if you build for MS-Windows + . nextstep/INSTALL if you build for GNUstep/macOS + . java/INSTALL if you build for Android + . msdos/INSTALL if you build for MS-DOS BASIC INSTALLATION diff --git a/java/INSTALL b/java/INSTALL index 0646db426e0..ef05b811989 100644 --- a/java/INSTALL +++ b/java/INSTALL @@ -5,8 +5,9 @@ See the end of the file for license conditions. Please read the entirety of this file before attempting to build Emacs as an application package which can run on Android devices. -When building from the source repository, make sure to read -INSTALL.REPO as well. +When building from the source repository (as opposed to from a release +tarball), make sure to read INSTALL.REPO in the top-level directory as +well. commit 164588b174774eba0c3bd6999633a39bed748195 Author: Eli Zaretskii Date: Wed Aug 9 16:15:25 2023 +0300 ; Fix whitespace in eglot.el * lisp/progmodes/eglot.el (eglot-server-programs): Fix whitespace. Reported by Allen Li . (Bug#65161) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 37875e3d7f1..113ff08e94e 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -219,7 +219,8 @@ eglot-server-programs . ("dart" "language-server" "--client-id" "emacs.eglot-dart")) ((elixir-mode elixir-ts-mode heex-ts-mode) - . ,(if (and (fboundp 'w32-shell-dos-semantics) (w32-shell-dos-semantics)) + . ,(if (and (fboundp 'w32-shell-dos-semantics) + (w32-shell-dos-semantics)) '("language_server.bat") '("language_server.sh"))) (ada-mode . ("ada_language_server")) commit 3065dfc6606e116c3dfca3a75a997c1a3a85fab5 Author: Mattias Engdegård Date: Wed Aug 9 14:57:07 2023 +0200 ; * test/lisp/net/tramp-tests.el: duck make-process bytecomp warning diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index a6c430fb1c0..b1d39c413dc 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -5370,7 +5370,7 @@ tramp-test30-make-process (let ((default-directory ert-remote-temporary-file-directory) (tmp-name (tramp--test-make-temp-name nil quoted)) kill-buffer-query-functions command proc) - (should-not (make-process)) + (should-not (apply #'make-process nil)) ; use `apply' to avoid warnings ;; Simple process. (unwind-protect commit caa3bc8aa8fd4c46268fef135936d2f1901888fc Author: Po Lu Date: Wed Aug 9 20:42:44 2023 +0800 Don't signal when I-search occurs within a kbd macro * lisp/isearch.el (isearch-mode): Check last-event-frame is not `macro' before providing it to `device-class'. (bug#65175) diff --git a/lisp/isearch.el b/lisp/isearch.el index daf884d3d53..a3c32e06004 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1342,10 +1342,14 @@ isearch-mode ;; If the keyboard is not up and the last event did not come from ;; a keyboard, bring it up so that the user can type. - (when (or (not last-event-frame) - (not (eq (device-class last-event-frame - last-event-device) - 'keyboard))) + ;; + ;; last-event-frame may be `macro', since people apparently make use + ;; of I-search in keyboard macros. (bug#65175) + (when (and (not (eq last-event-frame 'macro)) + (or (not last-event-frame) + (not (eq (device-class last-event-frame + last-event-device) + 'keyboard)))) (frame-toggle-on-screen-keyboard (selected-frame) nil)) ;; Disable text conversion so that isearch can behave correctly. commit 18a84922c5167c995f03c5c023c978f127d37dde Author: Alan Mackenzie Date: Wed Aug 9 11:27:28 2023 +0000 Remove harmful and redundant bindings from the byte compiler. This fixes bug#65017. Binding symbols-with-pos-enabled in two macro handling functions was harmful; one of these caused cl--labels-convert to fail. Binding print-symbols-bare in many places in the byte compiler was redundant. * lisp/emacs-lisp/bytecomp.el (byte-compile-recurse-toplevel) (byte-compile-initial-macro-environment) (byte-compile-output-file-form, byte-compile-output-docform) (byte-compile-preprocess): Remove bindings of print-symbols-bare. * lisp/emacs-lisp/macroexp.el (macroexp--compiler-macro) (internal-macroexpand-for-load): Remove bindings of symbols-with-pos-enabled. (internal-macroexpand-for-load): Remove binding of print-symbols-bare. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 4ee9922302b..c98d02b1ec1 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -489,8 +489,7 @@ byte-compile-recurse-toplevel ;; 3.2.3.1, "Processing of Top Level Forms". The semantics are very ;; subtle: see test/lisp/emacs-lisp/bytecomp-tests.el for interesting ;; cases. - (let ((print-symbols-bare t)) ; Possibly redundant binding. - (setf form (macroexp-macroexpand form byte-compile-macro-environment))) + (setf form (macroexp-macroexpand form byte-compile-macro-environment)) (if (eq (car-safe form) 'progn) (cons (car form) (mapcar (lambda (subform) @@ -568,11 +567,10 @@ byte-compile-initial-macro-environment ;; Don't compile here, since we don't know ;; whether to compile as byte-compile-form ;; or byte-compile-file-form. - (let* ((print-symbols-bare t) ; Possibly redundant binding. - (expanded - (macroexpand--all-toplevel - form - macroexpand-all-environment))) + (let ((expanded + (macroexpand--all-toplevel + form + macroexpand-all-environment))) (eval (byte-run-strip-symbol-positions (bytecomp--copy-tree expanded)) lexical-binding) @@ -2489,8 +2487,7 @@ byte-compile-output-file-form ;; Spill output for the native compiler here (push (make-byte-to-native-top-level :form form :lexical lexical-binding) byte-to-native-top-level-forms)) - (let ((print-symbols-bare t) ; Possibly redundant binding. - (print-escape-newlines t) + (let ((print-escape-newlines t) (print-length nil) (print-level nil) (print-quoted t) @@ -2524,8 +2521,7 @@ byte-compile-output-docform ;; in the input buffer (now current), not in the output buffer. (let ((dynamic-docstrings byte-compile-dynamic-docstrings)) (with-current-buffer byte-compile--outbuffer - (let (position - (print-symbols-bare t)) ; Possibly redundant binding. + (let (position) ;; 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 @@ -2621,8 +2617,7 @@ byte-compile-flush-pending byte-compile-jump-tables nil)))) (defun byte-compile-preprocess (form &optional _for-effect) - (let ((print-symbols-bare t)) ; Possibly redundant binding. - (setq form (macroexpand-all form byte-compile-macro-environment))) + (setq form (macroexpand-all form byte-compile-macro-environment)) ;; FIXME: We should run byte-optimize-form here, but it currently does not ;; recurse through all the code, so we'd have to fix this first. ;; Maybe a good fix would be to merge byte-optimize-form into diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 083a7f58f36..6d5cf8723f9 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -107,8 +107,7 @@ macroexp--all-clauses (defun macroexp--compiler-macro (handler form) (condition-case-unless-debug err - (let ((symbols-with-pos-enabled t)) - (apply handler form (cdr form))) + (apply handler form (cdr form)) (error (message "Warning: Optimization failure for %S: Handler: %S\n%S" (car form) handler err) @@ -760,40 +759,38 @@ macroexp--debug-eager (defun internal-macroexpand-for-load (form full-p) ;; Called from the eager-macroexpansion in readevalloop. - (let ((symbols-with-pos-enabled t) - (print-symbols-bare t)) - (cond - ;; Don't repeat the same warning for every top-level element. - ((eq 'skip (car macroexp--pending-eager-loads)) form) - ;; If we detect a cycle, skip macro-expansion for now, and output a warning - ;; with a trimmed backtrace. - ((and load-file-name (member load-file-name macroexp--pending-eager-loads)) - (let* ((bt (delq nil - (mapcar #'macroexp--trim-backtrace-frame - (macroexp--backtrace)))) - (elem `(load ,(file-name-nondirectory load-file-name))) - (tail (member elem (cdr (member elem bt))))) - (if tail (setcdr tail (list '…))) - (if (eq (car-safe (car bt)) 'macroexpand-all) (setq bt (cdr bt))) - (if macroexp--debug-eager - (debug 'eager-macroexp-cycle) - (error "Eager macro-expansion skipped due to cycle:\n %s" - (mapconcat #'prin1-to-string (nreverse bt) " => "))) - (push 'skip macroexp--pending-eager-loads) - form)) - (t - (condition-case err - (let ((macroexp--pending-eager-loads - (cons load-file-name macroexp--pending-eager-loads))) - (if full-p - (macroexpand--all-toplevel form) - (macroexpand form))) - (error - ;; Hopefully this shouldn't happen thanks to the cycle detection, - ;; but in case it does happen, let's catch the error and give the - ;; code a chance to macro-expand later. - (error "Eager macro-expansion failure: %S" err) - form)))))) + (cond + ;; Don't repeat the same warning for every top-level element. + ((eq 'skip (car macroexp--pending-eager-loads)) form) + ;; If we detect a cycle, skip macro-expansion for now, and output a warning + ;; with a trimmed backtrace. + ((and load-file-name (member load-file-name macroexp--pending-eager-loads)) + (let* ((bt (delq nil + (mapcar #'macroexp--trim-backtrace-frame + (macroexp--backtrace)))) + (elem `(load ,(file-name-nondirectory load-file-name))) + (tail (member elem (cdr (member elem bt))))) + (if tail (setcdr tail (list '…))) + (if (eq (car-safe (car bt)) 'macroexpand-all) (setq bt (cdr bt))) + (if macroexp--debug-eager + (debug 'eager-macroexp-cycle) + (error "Eager macro-expansion skipped due to cycle:\n %s" + (mapconcat #'prin1-to-string (nreverse bt) " => "))) + (push 'skip macroexp--pending-eager-loads) + form)) + (t + (condition-case err + (let ((macroexp--pending-eager-loads + (cons load-file-name macroexp--pending-eager-loads))) + (if full-p + (macroexpand--all-toplevel form) + (macroexpand form))) + (error + ;; Hopefully this shouldn't happen thanks to the cycle detection, + ;; but in case it does happen, let's catch the error and give the + ;; code a chance to macro-expand later. + (error "Eager macro-expansion failure: %S" err) + form))))) ;; ¡¡¡ Big Ugly Hack !!! ;; src/bootstrap-emacs is mostly used to compile .el files, so it needs commit 722b1ebc6e0ca23c018d5264e5c70b8f37bd9150 Author: Mattias Engdegård Date: Wed Aug 9 12:34:06 2023 +0200 Faster NSString to Lisp string conversion Since we know that the value from [NSString UTF8String] is valid UTF-8, using make_string is wastefully slow. * src/nsfns.m (count_utf8_chars): New function, at least twice as fast as parse_str_as_multibyte used by make_string for this purpose. ([NSString lispString]): Use count_utf8_chars. We now always make a multibyte string because there is no reason not to. diff --git a/src/nsfns.m b/src/nsfns.m index f962de02cb9..508568d90c3 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -3796,6 +3796,27 @@ - (NSString *)panel: (id)sender userEnteredFilename: (NSString *)filename return true; } +/* Count the number of characters in STR, NBYTES long. + The string is valid UTF-8 except that it may contain unpaired surrogates. */ +static ptrdiff_t +count_utf8_chars (const char *str, ptrdiff_t nbytes) +{ + /* This is faster than parse_str_as_multibyte, and much faster than + [NSString lengthOfBytesUsingEncoding: NSUTF32StringEncoding]. */ + const char *end = str + nbytes; + ptrdiff_t nc = 0; + while (str < end) + { + nc++; + unsigned char c = *str; + str += ( c <= 0x7f ? 1 // 0xxxxxxx + : c <= 0xdf ? 2 // 110xxxxx 10xxxxxx + : c <= 0xef ? 3 // 1110xxxx 10xxxxxx 10xxxxxx + : 4); // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + } + return nc; +} + @implementation NSString (EmacsString) /* Make an NSString from a Lisp string. STRING must not be in an encoded form (e.g. UTF-8). */ @@ -3840,9 +3861,9 @@ handled fairly well by the NS libraries (displayed with distinct /* Make a Lisp string from an NSString. */ - (Lisp_Object)lispString { - // make_string behaves predictably and correctly with UTF-8 input. - return make_string ([self UTF8String], - [self lengthOfBytesUsingEncoding: NSUTF8StringEncoding]); + const char *utf8 = [self UTF8String]; + ptrdiff_t bytes = [self lengthOfBytesUsingEncoding: NSUTF8StringEncoding]; + return make_multibyte_string (utf8, count_utf8_chars (utf8, bytes), bytes); } @end commit 08cc48e496ed98f16a014bf7ced69f527b72ab11 Author: Eric S. Raymond Date: Wed Aug 9 06:05:24 2023 -0400 Remove a DEFSYM that no longer needs to be in the C core. * src/fileio.c (syms_of_fileio): Remove Qmove_file_to_trash. diff --git a/src/fileio.c b/src/fileio.c index 14e39445efa..52bbaa61fc2 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -6802,9 +6802,6 @@ do (file-exists-p FILENAME) and FILENAME is handled by HANDLER, then /* Lisp function for interactive file delete with trashing */ DEFSYM (Qdelete_file, "delete-file"); - /* Lisp function for moving files to trash. */ - DEFSYM (Qmove_file_to_trash, "move-file-to-trash"); - /* Lisp function for recursively copying directories. */ DEFSYM (Qcopy_directory, "copy-directory");