commit 0b2ba13c978544317d1df18e7fe701c055a6419f (HEAD, refs/remotes/origin/master) Author: Yuan Fu Date: Wed May 21 00:23:15 2025 -0700 Eglot: always call ElDoc callbacks in correct buffer (bug#78530) Some minor modes adds their own eldoc display function to 'eldoc-display-functions' hook buffer-locally. So when eldoc uses 'eldoc-display-functions' to display docs, it should use the buffer-local value of the hook. But that's not always the case. In 'eldoc--invoke-strategy', the code that runs 'eldoc-display-functions' hook is wrapped in a callback function that eventually gets passed to each documentation function in 'eldoc-documentation-functions'. So now it's the documentation functions' responsibility to call the eldoc callback in the original buffer. All the eglot documentation functions indeed do that, using 'eglot--when-buffer-window' to switch to the original buffer when calling the eldoc callback. But 'eglot-code-action-suggestion' is the exception, the callback is called outside of the 'eglot--when-buffer-window' form. This patch fixes that. This bug was originally reported on eldoc-box [1]. The user found that eldoc-box's display function are rarely called, even though the minor mode is turned on. This patch fixes the issue. [1] https://github.com/casouri/eldoc-box/issues/126#issuecomment-2896611278 * lisp/progmodes/eglot.el (eglot-code-action-suggestion): Move the funcall form into the eglot--when-buffer-window form. diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 6f6b05a393d..5bb825189f2 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -4168,8 +4168,8 @@ at point. With prefix argument, prompt for ACTION-KIND." 'display `((margin left-margin) ,tooltip))))) - (setq eglot--suggestion-overlay ov))))) - (when use-text-p (funcall cb blurb))) + (setq eglot--suggestion-overlay ov)))) + (when use-text-p (funcall cb blurb)))) :hint :textDocument/codeAction) (and use-text-p t)))) commit cb1b65f3923d5dcb88767f6736603ffbc4272557 Author: Lin Sun Date: Thu May 15 06:30:44 2025 +0000 * lisp/emacs-lisp/find-func.el: Fix Eager macro-expansion failure Bug#78446 diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 6bdfb4bc38b..f05bc5f5c2a 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -197,20 +197,9 @@ for completion." :version "29.1" :group 'find-function) -(defcustom find-function-mode-lower-precedence nil - "If non-nil, `find-function-mode' defines keys in the global map. -This is for compatibility with the historical behavior of -the old `find-function-setup-keys'." - :type 'boolean - :version "31.1" - :group 'find-function - :set (lambda (symbol value) - ;; Toggle the mode off before changing this setting in order to - ;; avoid getting into an inconsistent state. - (let ((already-on find-function-mode)) - (when already-on (find-function-mode -1)) - (set-default symbol value) - (when already-on (find-function-mode 1))))) +;; Compiler defvars. The variable will be defined later with +;; `defcustom' when everything used in the :set functions is defined. +(defvar find-function-mode-lower-precedence) ;;; Functions: @@ -891,6 +880,21 @@ See `find-function-on-key'." (find-function-mode 1)) (make-obsolete 'find-function-setup-keys 'find-function-mode "31.1") +;; Custom variables with :set requires everything be defined +(defcustom find-function-mode-lower-precedence nil + "If non-nil, `find-function-mode' defines keys in the global map. +This is for compatibility with the historical behavior of +the old `find-function-setup-keys'." + :type 'boolean + :version "31.1" + :set (lambda (symbol value) + ;; Toggle the mode off before changing this setting in order to + ;; avoid getting into an inconsistent state. + (let ((already-on find-function-mode)) + (when already-on (find-function-mode -1)) + (set-default symbol value) + (when already-on (find-function-mode 1))))) + (provide 'find-func) ;;; find-func.el ends here commit 9dfc605654bea7a1346da224cf7e1eec850e05c4 Author: Paul Eggert Date: Wed May 21 10:07:04 2025 -0700 Work around GCC bug 117423 Problem reported by Oliver Reiter and Pip Cet (Emacs bug#78473). It looks like GCC tree-sra is trouble in general with how Emacs uses unions, so disable tree-sra until the GCC bug is fixed. * configure.ac (C_SWITCH_MACHINE): Also work around GCC bug 117423. diff --git a/configure.ac b/configure.ac index fddb2b9be3c..bafbb748149 100644 --- a/configure.ac +++ b/configure.ac @@ -2209,49 +2209,50 @@ esac C_SWITCH_MACHINE= -AC_CACHE_CHECK([for flags to work around GCC bug 58416], - [emacs_cv_gcc_bug_58416_CFLAGS], - [emacs_cv_gcc_bug_58416_CFLAGS='none needed' - AS_CASE([$canonical], - [[i[3456]86-* | x86_64-*]], - [AS_IF([test "$GCC" = yes], - [old_CFLAGS=$CFLAGS - # If no flags are needed (e.g., not GCC 4+), don't use any. - # Otherwise, use -mfpmath=sse if already assuming SSE2. - # Otherwise, use -fno-tree-sra. - for emacs_cv_gcc_bug_58416_CFLAGS in \ - 'none needed' -mfpmath=sse -fno-tree-sra - do - AS_CASE([$emacs_cv_gcc_bug_58416_CFLAGS], - ['none needed'], [], - [-fno-tree-sra], [break], - [CFLAGS="$old_CFLAGS $emacs_cv_gcc_bug_58416_CFLAGS"]) - AC_COMPILE_IFELSE( - [AC_LANG_DEFINES_PROVIDED - [/* Work around GCC bug with double in unions on x86, - where the generated insns copy non-floating-point data - via fldl/fstpl instruction pairs. This can misbehave if - the data's bit pattern looks like a NaN. See, e.g.: - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58416#c10 - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93271 - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114659 - Problem observed with 'gcc -m32' with GCC 14.1.1 - 20240607 (Red Hat 14.1.1-5) on x86-64. */ - #include - #if \ - (4 <= __GNUC__ && __GNUC__ <= 14 && !defined __clang__ \ - && (defined __i386__ || defined __x86_64__) \ - && ! (0 <= FLT_EVAL_METHOD && FLT_EVAL_METHOD <= 1)) - # error "GCC bug 58416 is possibly present" - #endif - ]], - [break]) - done - CFLAGS=$old_CFLAGS])])]) -AS_CASE([$emacs_cv_gcc_bug_58416_CFLAGS], +AC_CACHE_CHECK([for flag to work around GCC bug 117423], + [emacs_cv_gcc_bug_117423_CFLAGS], + [emacs_cv_gcc_bug_117423_CFLAGS='none needed' + AS_IF([test "$GCC" = yes], + [old_CFLAGS=$CFLAGS + # If no flags are needed (e.g., not GCC 4+), don't use any. + # Otherwise, use -fno-tree-sra. + for emacs_cv_gcc_bug_117423_CFLAGS in \ + 'none needed' -fno-tree-sra + do + AS_CASE([$emacs_cv_gcc_bug_117423_CFLAGS], + ['none needed'], [], + [-fno-tree-sra], [break], + [CFLAGS="$old_CFLAGS $emacs_cv_gcc_bug_117423_CFLAGS"]) + AC_COMPILE_IFELSE( + [AC_LANG_DEFINES_PROVIDED + [/* Work around GCC bug 117423 with unions containing holes: + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117423 + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119085 + GCC bug 117423 is present even in GCC 15.1, + the current version as of this writing; for now, + assume it is present in all GCC versions starting with GCC 4. + + Working wround GCC bug 117423 also works around GCC bug 58416 + with double in unions on x86, where the generated insns + copy non-floating-point data via fldl/fstpl instruction pairs. + This can misbehave if the data's bit pattern looks like a NaN. + See, e.g.: + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58416#c10 + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460 + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93271 + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114659 + Although GCC bug 58416 is fixed in GCC 15.1, + GCC bug 117423 is still present there. */ + #if 4 <= __GNUC__ && !defined __clang__ + # error "GCC bug 117423 possibly present" + #endif + ]], + [break]) + done + CFLAGS=$old_CFLAGS])]) +AS_CASE([$emacs_cv_gcc_bug_117423_CFLAGS], [-*], - [C_SWITCH_MACHINE="$C_SWITCH_MACHINE $emacs_cv_gcc_bug_58416_CFLAGS"]) + [C_SWITCH_MACHINE="$C_SWITCH_MACHINE $emacs_cv_gcc_bug_117423_CFLAGS"]) AC_SUBST([C_SWITCH_MACHINE]) commit 8605221ef604d8f7663f1fb16e2f2ea872a7ce84 Author: Robert Pluim Date: Wed May 21 11:10:23 2025 +0200 ; * lisp/disp-table.el (standard-display-unicode-special-glyphs): Fix typo. diff --git a/lisp/disp-table.el b/lisp/disp-table.el index 23671da5107..f012f61ddda 100644 --- a/lisp/disp-table.el +++ b/lisp/disp-table.el @@ -177,7 +177,7 @@ Valid symbols are `truncation', `wrap', `escape', `control', ;;;###autoload (defun standard-display-unicode-special-glyphs () - "Display some glyps using Unicode characters. + "Display some glyphs using Unicode characters. The glyphs being changed by this function are `vertical-border', `box-vertical',`box-horizontal', `box-down-right', `box-down-left', `box-up-right', `box-up-left',`box-double-vertical',