[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 44ae4868d38: Merge from origin/emacs-30
From: |
Eli Zaretskii |
Subject: |
master 44ae4868d38: Merge from origin/emacs-30 |
Date: |
Sat, 13 Jul 2024 08:46:40 -0400 (EDT) |
branch: master
commit 44ae4868d38acf7d8173be39c052b7fc9a7aaefa
Merge: 3a26a51c69b a6c78ccf5f2
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Merge from origin/emacs-30
a6c78ccf5f2 ; * src/w32fns.c (Fw32_notification_close): Fix typo (bug...
febafe37884 * test/lisp/wdired-tests.el (wdired-test-bug34915): Fix f...
846b79b6d02 Fix 'wdired-test-unfinished-edit-01'
bc154cba130 ; * src/search.c (Fre_search_forward): Clarify doc string...
53291e3d46e Fontify destructor in c++-ts-mode
d77f8a34750 Fix invalid defcustom type for erc-buffers option
d68a4ea3ec6 ; Fix 'ibuffer-do-isearch{-regexp}'
8b1a0f8695a Fix infloop in 'shell-resync-dirs'
ce13eee5ab7 ; * src/image.c (free_image_cache): Add assertion. (Bug#...
---
lisp/erc/erc.el | 3 +--
lisp/ibuf-ext.el | 18 ++++++------------
lisp/progmodes/c-ts-mode.el | 4 +++-
lisp/shell.el | 12 ++++++++----
src/image.c | 3 +++
src/search.c | 2 +-
src/w32fns.c | 2 +-
test/lisp/wdired-tests.el | 18 ++++++++++++------
8 files changed, 35 insertions(+), 27 deletions(-)
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index e9a7aef0ba8..118adb803c9 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.
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")
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index 31dd49dd00c..abc5f19c849 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -681,7 +681,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
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))))
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);
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
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;
diff --git a/test/lisp/wdired-tests.el b/test/lisp/wdired-tests.el
index f7bff743058..7c7026354b8 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
@@ -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"