From ce13eee5ab73e73ffd5d8e67a1dd21fc667ab7e1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 12 Jul 2024 09:39:39 +0300 Subject: [PATCH 1/9] ; * src/image.c (free_image_cache): Add assertion. (Bug#71929) --- src/image.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/image.c b/src/image.c index 2ee2f3245be..3d761bd48be 100644 --- a/src/image.c +++ b/src/image.c @@ -2306,6 +2306,9 @@ free_image_cache (struct frame *f) struct image_cache *c = FRAME_IMAGE_CACHE (f); ptrdiff_t i; + /* This function assumes the caller already verified that the frame's + image cache is non-NULL. */ + eassert (c); /* Cache should not be referenced by any frame when freed. */ eassert (c->refcount == 0); From 8b1a0f8695a43e74daa5275559267e96c14aba03 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 12 Jul 2024 09:58:53 +0300 Subject: [PATCH 2/9] Fix infloop in 'shell-resync-dirs' * lisp/shell.el (shell-eval-command): Fix detection of newline after last output line. (Bug#71896) (shell-resync-dirs): Make sure the inner loop never infloops. Suggested by Troy Hinckley . --- lisp/shell.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/shell.el b/lisp/shell.el index e1936ff1119..4d92fe71df4 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -1255,7 +1255,7 @@ line output and parses it to form the new directory stack." (while dlsl (let ((newelt "") tem1 tem2) - (while newelt + (while (and dlsl newelt) ;; We need tem1 because we don't want to prepend ;; `comint-file-name-prefix' repeatedly into newelt via tem2. (setq tem1 (pop dlsl) @@ -1629,10 +1629,14 @@ Returns t if successful." ;; a newline). This is far from fool-proof -- if something ;; outputs incomplete data and then sleeps, we'll think ;; we've received the prompt. - (while (not (let* ((lines (string-lines result)) - (last (car (last lines)))) + (while (not (let* ((lines (string-lines result nil t)) + (last (car (last lines))) + (last-end (if (equal last "") + last + (substring last -1)))) (and (length> lines 0) - (not (equal last "")) + (not (member last '("" "\n"))) + (not (equal last-end "\n")) (or (not prev) (not (equal last prev))) (setq prev last)))) From d68a4ea3ec69da0755d0a8ba70afe4b4ce379687 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sat, 6 Jul 2024 20:53:06 +0200 Subject: [PATCH 3/9] ; Fix 'ibuffer-do-isearch{-regexp}' * lisp/ibuf-ext.el (ibuffer-do-isearch) (ibuffer-do-isearch-regexp): Use 'defun' instead of 'define-ibuffer-op'. (Bug#71927) --- lisp/ibuf-ext.el | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index 95ff014aa5b..33b68b96ff2 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el @@ -594,22 +594,16 @@ To evaluate a form without viewing the buffer, see `ibuffer-do-eval'." :modifier-p :maybe) (revert-buffer t t)) -;;;###autoload (autoload 'ibuffer-do-isearch "ibuf-ext") -(define-ibuffer-op ibuffer-do-isearch () +;;;###autoload +(defun ibuffer-do-isearch () "Perform a `isearch-forward' in marked buffers." - (:interactive () - :opstring "searched in" - :complex t - :modifier-p :maybe) + (interactive "" ibuffer-mode) (multi-isearch-buffers (ibuffer-get-marked-buffers))) -;;;###autoload (autoload 'ibuffer-do-isearch-regexp "ibuf-ext") -(define-ibuffer-op ibuffer-do-isearch-regexp () +;;;###autoload +(defun ibuffer-do-isearch-regexp () "Perform a `isearch-forward-regexp' in marked buffers." - (:interactive () - :opstring "searched regexp in" - :complex t - :modifier-p :maybe) + (interactive "" ibuffer-mode) (multi-isearch-buffers-regexp (ibuffer-get-marked-buffers))) ;;;###autoload (autoload 'ibuffer-do-replace-regexp "ibuf-ext") From d77f8a347500da4c1ce7553332a481c5507412fc Mon Sep 17 00:00:00 2001 From: "F. Jason Park" Date: Fri, 12 Jul 2024 14:41:54 -0700 Subject: [PATCH 4/9] Fix invalid defcustom type for erc-buffers option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lisp/erc/erc.el (erc-ensure-target-buffer-on-privmsg): Change invalid inner `choice' to a `const' for the third-state `status' variant, which is new in ERC 5.6 and Emacs 30. Thanks to Mattias EngdegÄrd for catching this. --- lisp/erc/erc.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 7cc7bf56252..fd2a49c2504 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -6033,8 +6033,7 @@ manner implied above, which was lost sometime before ERC 5.4." :group 'erc-buffers :group 'erc-query :type '(choice boolean - (choice :tag "Create pseudo queries for STATUSMSGs" - status))) + (const :tag "Create pseudo queries for STATUSMSGs" status))) (defcustom erc-format-query-as-channel-p t "If non-nil, format text from others in a query buffer like in a channel. From 53291e3d46ee81b2b0fb7594496d938eab61bc0f Mon Sep 17 00:00:00 2001 From: Vincenzo Pupillo Date: Mon, 1 Jul 2024 11:52:18 +0200 Subject: [PATCH 5/9] Fontify destructor in c++-ts-mode * lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Add a rule for destructors. (Bug#71872) --- lisp/progmodes/c-ts-mode.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index e7f74fc53f2..2ac163d7a7e 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -674,7 +674,9 @@ MODE is either `c' or `cpp'." :language mode :feature 'definition ;; Highlights identifiers in declarations. - `((declaration + `(,@(when (eq mode 'cpp) + '((destructor_name (identifier) @font-lock-function-name-face))) + (declaration declarator: (_) @c-ts-mode--fontify-declarator) (field_declaration From bc154cba13024d2c159f6cadd324a8ef3f6dddcc Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 13 Jul 2024 13:22:01 +0300 Subject: [PATCH 6/9] ; * src/search.c (Fre_search_forward): Clarify doc string (bug#71879). --- src/search.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.c b/src/search.c index dd813eda913..2ff8b0599c4 100644 --- a/src/search.c +++ b/src/search.c @@ -2279,7 +2279,7 @@ The optional second argument BOUND is a buffer position that bounds value of nil means search to the end of the accessible portion of the buffer. The optional third argument NOERROR indicates how errors are handled - when the search fails. If it is nil or omitted, emit an error; if + when the search fails: if it is nil or omitted, emit an error; if it is t, simply return nil and do nothing; if it is neither nil nor t, move to the limit of search and return nil. The optional fourth argument COUNT is a number that indicates the From 846b79b6d02faf188f0131c57a49a60bb8f71d64 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Fri, 12 Jul 2024 10:52:23 +0100 Subject: [PATCH 7/9] Fix 'wdired-test-unfinished-edit-01' * test/lisp/wdired-tests.el (wdired-test-unfinished-edit-01): Don't modify the random directory name if, by chance, it happens to contain the substring "foo" anywhere but immediately after the slash. (Bug#72073) --- test/lisp/wdired-tests.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lisp/wdired-tests.el b/test/lisp/wdired-tests.el index f7bff743058..f6d2194e998 100644 --- a/test/lisp/wdired-tests.el +++ b/test/lisp/wdired-tests.el @@ -114,7 +114,7 @@ wdired-mode." (setq test-dir (file-truename test-dir)) (let* ((test-file (concat (file-name-as-directory test-dir) "foo.c")) (replace "bar") - (new-file (string-replace "foo" replace test-file))) + (new-file (string-replace "/foo" (concat "/" replace) test-file))) (write-region "" nil test-file nil 'silent) (let ((buf (find-file-noselect test-dir))) (unwind-protect From febafe37884823d5ac6a63a57c7500f4a0a8a792 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 13 Jul 2024 15:06:43 +0300 Subject: [PATCH 8/9] * test/lisp/wdired-tests.el (wdired-test-bug34915): Fix for MS-Windows. --- test/lisp/wdired-tests.el | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/test/lisp/wdired-tests.el b/test/lisp/wdired-tests.el index f6d2194e998..7c7026354b8 100644 --- a/test/lisp/wdired-tests.el +++ b/test/lisp/wdired-tests.el @@ -141,21 +141,27 @@ wdired-get-filename before and after editing." ;; FIXME: Add a test for a door (indicator ">") only under Solaris? (ert-with-temp-directory test-dir (let* ((dired-listing-switches "-Fl") - (dired-ls-F-marks-symlinks (eq system-type 'darwin)) + (dired-ls-F-marks-symlinks + (or (eq system-type 'darwin) + (featurep 'ls-lisp))) (buf (find-file-noselect test-dir)) proc) (unwind-protect (progn (with-current-buffer buf - (dired-create-empty-file "foo") - (set-file-modes "foo" (file-modes-symbolic-to-number "+x")) + ;; Create a .bat file so that MS-Windows, where the 'x' + ;; bit is not recorded in the filesystem, considers it an + ;; executable. + (dired-create-empty-file "foo.bat") + (set-file-modes "foo.bat" (file-modes-symbolic-to-number "+x")) (skip-unless ;; This check is for wdired, not symbolic links, so skip ;; it when make-symbolic-link fails for any reason (like ;; insufficient privileges). - (ignore-errors (make-symbolic-link "foo" "bar") t)) + (ignore-errors (make-symbolic-link "foo.bat" "bar") t)) (make-directory "foodir") - (dired-smart-shell-command "mkfifo foopipe") + (unless (memq system-type '(windows-nt ms-dos)) + (dired-smart-shell-command "mkfifo foopipe")) (when (featurep 'make-network-process '(:family local)) (setq proc (make-network-process :name "foo" From a6c78ccf5f297e612ff0f2159a7bed3a70637168 Mon Sep 17 00:00:00 2001 From: Raffael Stocker Date: Sat, 13 Jul 2024 13:26:23 +0200 Subject: [PATCH 9/9] ; * src/w32fns.c (Fw32_notification_close): Fix typo (bug#72091). --- src/w32fns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/w32fns.c b/src/w32fns.c index 7fc2f598b3e..e5798fdd84f 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -10472,7 +10472,7 @@ DEFUN ("w32-notification-close", { struct frame *f = SELECTED_FRAME (); - if (FIXNUMP (id) && !pfnShell_NotifyIconW) + if (FIXNUMP (id) && pfnShell_NotifyIconW) delete_tray_notification (f, XFIXNUM (id)); return Qnil;