Subject: bug#60925: closed (Re: bug#60925: 29.0.60; [PATCH] Use proper types for Eshell warnings)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 18 Jan 2023 17:17:02 +0000

Your bug report

#60925: 29.0.60; [PATCH] Use proper types for Eshell warnings

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
60925: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60925
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#60925: 29.0.60; [PATCH] Use proper types for Eshell warnings
From: Jim Porter <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: [email-masked]
Date: Wed, 18 Jan 2023 09:16:45 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

On 1/18/2023 4:08 AM, Eli Zaretskii wrote:
> OK, thanks.

Thanks. Merged to Emacs 29 as dc3f85fd4b, and closing this bug.

Subject: 29.0.60; [PATCH] Use proper types for Eshell warnings
From: Jim Porter <[email-masked]>
To: [email-masked]
Date: Tue, 17 Jan 2023 20:56:51 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Looking over the 'display-warning' code, I realized that I had misread 
the docstring and wasn't calling it properly in Eshell. I gave these 
warnings a type of ':warning', but that's a warning *level*, not a 
warning *type*. Attached is a fix.

I'd like to merge this to the Emacs 29 branch. These are trivial fixes 
to a couple new features, and should make it easier for users to 
properly suppress these warnings if they choose to do so.

From d7f7ac190c69b5bb69543f3052394f4a471ecad7 Mon Sep 17 00:00:00 2001
From: Jim Porter <[email-masked]>
Date: Tue, 17 Jan 2023 20:51:15 -0800
Subject: [PATCH] Use proper types for Eshell warnings

* lisp/eshell/esh-var.el (eshell-get-variable):
* lisp/eshell/em-basic (eshell/echo): Don't use ':warning'; that's a
warning level, not a warning type.
---
 lisp/eshell/em-basic.el | 3 ++-
 lisp/eshell/esh-var.el  | 7 ++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/eshell/em-basic.el b/lisp/eshell/em-basic.el
index dfbe4db0896..bfff3bdf56e 100644
--- a/lisp/eshell/em-basic.el
+++ b/lisp/eshell/em-basic.el
@@ -132,7 +132,8 @@ eshell/echo
      ;; bug#27361.
      (when (equal output-newline '(nil))
        (display-warning
-        :warning "To terminate with a newline, you should use -N instead."))
+        '(eshell echo)
+        "To terminate with a newline, you should use -N instead."))
      (eshell-echo args output-newline))))
 
 (defun eshell/printnl (&rest args)
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el
index fd76a2c6f09..27e68138aa2 100644
--- a/lisp/eshell/esh-var.el
+++ b/lisp/eshell/esh-var.el
@@ -628,9 +628,10 @@ eshell-get-variable
               (if (or (eq max-arity 'many) (>= max-arity 2))
                   (funcall target indices quoted)
                 (display-warning
-                 :warning (concat "Function for `eshell-variable-aliases-list' "
-                                  "entry should accept two arguments: INDICES "
-                                  "and QUOTED.'"))
+                 '(eshell variable-alias)
+                 (concat "Function for `eshell-variable-aliases-list' "
+                         "entry should accept two arguments: INDICES "
+                         "and QUOTED.'"))
                 (funcall target indices)))))
          ((symbolp target)
           (eshell-apply-indices (symbol-value target) indices quoted))
-- 
2.25.1