From 38cc36a375344d2518eb8f9d3e0e6943199da529 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 2 Mar 2025 04:11:55 +0100 Subject: [PATCH 1/5] ; Improve docstring of cl-check-type * lisp/emacs-lisp/cl-macs.el (cl-check-type): Improve docstring. --- lisp/emacs-lisp/cl-macs.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 555b4f018ad..99c105c7559 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -3548,7 +3548,10 @@ Of course, we really can't know that for sure, so it's just a heuristic." ;;;###autoload (defmacro cl-check-type (form type &optional string) "Verify that FORM is of type TYPE; signal an error if not. -STRING is an optional description of the desired type." +STRING is an optional description of the desired type. + +Hint: To check the type of an object, use `cl-type-of'. +To define new types, see `cl-deftype'." (declare (debug (place cl-type-spec &optional stringp))) (and (or (not (macroexp-compiling-p)) (< cl--optimize-speed 3) (= cl--optimize-safety 3)) From 8091772767666f2c671a8ba481d50859388152db Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sun, 2 Mar 2025 05:13:14 +0200 Subject: [PATCH 2/5] completing-read-multiple: Fix support for ":" as separator * lisp/emacs-lisp/crm.el (completing-read-multiple): Do not search for separators inside the prompt (bug#76461). --- lisp/emacs-lisp/crm.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el index a371a8e14de..d442d74f030 100644 --- a/lisp/emacs-lisp/crm.el +++ b/lisp/emacs-lisp/crm.el @@ -253,7 +253,9 @@ with empty strings removed." (setq-local completion-list-insert-choice-function (lambda (_start _end choice) (let* ((beg (save-excursion - (if (search-backward-regexp crm-separator nil t) + (if (search-backward-regexp crm-separator + (field-beginning) + t) (1+ (point)) (minibuffer-prompt-end)))) (end (save-excursion From 625ed68aeaadce4df7bdfd8c08ddfc8ed4f9b01a Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sun, 2 Mar 2025 05:22:56 +0200 Subject: [PATCH 3/5] Fix the use of xref-window-local-history together with Xref buffer * lisp/progmodes/xref.el (xref--push-markers): Temporarily restore the selected window as well, using the value from the new argument (bug#76565). Update both callers. --- lisp/progmodes/xref.el | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index e5f583f0103..4c27aff06a4 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -1516,31 +1516,40 @@ The meanings of both arguments are the same as documented in xrefs (setq xrefs 'called-already))))))) (let ((cb (current-buffer)) - (pt (point))) + (pt (point)) + (win (selected-window))) (prog1 (funcall xref-show-xrefs-function fetcher - `((window . ,(selected-window)) + `((window . ,win) (display-action . ,display-action) (auto-jump . ,xref-auto-jump-to-first-xref))) - (xref--push-markers cb pt)))) + (xref--push-markers cb pt win)))) (defun xref--show-defs (xrefs display-action) (let ((cb (current-buffer)) - (pt (point))) + (pt (point)) + (win (selected-window))) (prog1 (funcall xref-show-definitions-function xrefs - `((window . ,(selected-window)) + `((window . ,win) (display-action . ,display-action) (auto-jump . ,xref-auto-jump-to-first-definition))) - (xref--push-markers cb pt)))) + (xref--push-markers cb pt win)))) -(defun xref--push-markers (buf pt) +(defun xref--push-markers (buf pt win) (when (buffer-live-p buf) - (save-excursion - (with-no-warnings (set-buffer buf)) - (goto-char pt) - (unless (region-active-p) (push-mark nil t)) - (xref-push-marker-stack)))) + ;; This was we support the `xref-history-storage' getter which + ;; depends on the selected window. This is getting pretty complex, + ;; though. The alternative approach to try would be to push early + ;; but undo the stack insertion and mark-pushing in error handler. + (save-window-excursion + (when (window-live-p win) + (select-window win)) + (save-excursion + (with-no-warnings (set-buffer buf)) + (goto-char pt) + (unless (region-active-p) (push-mark nil t)) + (xref-push-marker-stack))))) (defun xref--prompt-p (command) (or (eq xref-prompt-for-identifier t) From a5fd518d52418638813bdb1015ab0c63ac53ebfa Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 2 Mar 2025 04:34:27 +0100 Subject: [PATCH 4/5] ; Document spurious warnings on macOS 15 * etc/PROBLEMS: Document spurious warnings on macOS 15. (Bug#73382) --- etc/PROBLEMS | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 54e0c3ffd1e..748d712c843 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -3503,6 +3503,22 @@ for further discussion. * Runtime problems specific to macOS +** Spurious warnings on macOS 15. + +When starting Emacs from the terminal, the following warnings are +displayed: + +2024-09-20 14:24:58.583 emacs[23293:150402] +[IMKClient subclass]: chose IMKClient_Legacy +2024-09-20 14:24:58.583 emacs[23293:150402] +[IMKInputSession subclass]:chose IMKInputSession_Legacy + +As far as we can tell, this is harmless, and affects other software too. +Our understanding is that this is a bug in macOS 15, and should be +reported to and fixed by Apple. + +For more information, see: +https://discussions.apple.com/thread/255761734?sortBy=rank + + ** Error message about malicious software when opening Emacs on macOS When opening Emacs, you may see an error message saying something like From 7dcf9b71e6ffc0cc92d2d504b1428c3ab432a028 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 2 Mar 2025 05:09:37 +0100 Subject: [PATCH 5/5] ; Don't document package-x.el * doc/lispref/package.texi (Package Archives): Delete documentation on package-x.el, since it's obsolete in Emacs 31 and we want to discourage its use. --- doc/lispref/package.texi | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi index 6c9bfb85993..c96c2f5d234 100644 --- a/doc/lispref/package.texi +++ b/doc/lispref/package.texi @@ -314,12 +314,6 @@ and associated files, are stored. If you want the archive to be reachable via HTTP, this directory must be accessible to a web server; @xref{Archive Web Server}. - A convenient way to set up and update a package archive is via the -@code{package-x} library. This is included with Emacs, but not loaded -by default; type @kbd{M-x load-library @key{RET} package-x @key{RET}} to -load it, or add @code{(require 'package-x)} to your init file. -@xref{Lisp Libraries,, Lisp Libraries, emacs, The GNU Emacs Manual}. - @noindent After you create an archive, remember that it is not accessible in the Package Menu interface unless it is in @code{package-archives}. @@ -338,7 +332,7 @@ them using a cryptographic key. If you have generated a private/public gpg key pair, you can use gpg to sign the package like this: -@c FIXME EasyPG / package-x way to do this. +@c FIXME EasyPG way to do this. @example gpg -ba -o @var{file}.sig @var{file} @end example