From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Camm Maguire <camm@debian.org>
Date: Mar, 03 2026 16:33:32 +0000
Subject: [PATCH] <short summary of the patch>

TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.

---
The information above should follow the Patch Tagging Guidelines, please
checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-<Vendor>: <vendor-bugtracker-url>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>

--- maxima-5.49.0+dsfg.orig/src/defmfun-check.lisp
+++ maxima-5.49.0+dsfg/src/defmfun-check.lisp
@@ -887,10 +887,10 @@
 ;;
 ;; Otherwise, EXPR must be a symbol and a generic message is printed.
 ;; (This is for backward compatibility for existing uses of WNA-ERR.)
-(defun wna-err (exprs &optional required-arg-count (pretty-name (caar exprs)))
+(defun wna-err (exprs &optional required-arg-count pretty-name)
   (if required-arg-count
-      (let ((op pretty-name)
-	    (actual-count (length (rest exprs))))
+      (let* ((op (or pretty-name (caar exprs)))
+	     (actual-count (length (rest exprs))))
 	(merror (intl:gettext "~M: expected exactly ~M arguments but got ~M: ~M")
 		op required-arg-count actual-count (list* '(mlist) (rest exprs))))
       (merror (intl:gettext "~:@M: wrong number of arguments.")
