unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: stephen_leake@stephe-leake.org
Cc: 22069@debbugs.gnu.org
Subject: bug#22069: 25.0.50; bogus %S in cl-no-applicable-method message
Date: Tue, 01 Dec 2015 16:25:07 -0500	[thread overview]
Message-ID: <jwvbna9uar6.fsf-monnier+bug#22069@gnu.org> (raw)
In-Reply-To: <8637vmrt0g.fsf@stephe-leake.org> (stephen leake's message of "Tue, 01 Dec 2015 11:14:07 -0600")

>    cl-no-applicable-method: No applicable method for %S: xref-backend-definitions, my-xref-backend, "foo"

> The %S is not used as a `format' argument.

Indeed, I was confused.

> (define-error 'cl-no-applicable-method "No applicable method for %S"
>   'cl-no-method)

This should just be 

  (define-error 'cl-no-applicable-method "No applicable method"
    'cl-no-method)

> -(define-error 'cl-no-method "No method for %S")
> -(define-error 'cl-no-next-method "No next method for %S" 'cl-no-method)
> -(define-error 'cl-no-primary-method "No primary method for %S" 'cl-no-method)
> -(define-error 'cl-no-applicable-method "No applicable method for %S"
> +(define-error 'cl-no-method "No method")
> +(define-error 'cl-no-next-method "No next method" 'cl-no-method)
> +(define-error 'cl-no-primary-method "No primary method" 'cl-no-method)
> +(define-error 'cl-no-applicable-method "No applicable method"
>    'cl-no-method)

Looks good.

>  (cl-defgeneric cl-no-next-method (generic method &rest args)
>    "Function called when `cl-call-next-method' finds no next method."
> -  (signal 'cl-no-next-method `(,(cl--generic-name generic) ,method ,@args)))
> +  (signal 'cl-no-next-method (append (list (format "%S" (cl--generic-name generic)) method) args)))
>
>  (cl-defgeneric cl-no-applicable-method (generic &rest args)
>    "Function called when a method call finds no applicable method."
> -  (signal 'cl-no-applicable-method `(,(cl--generic-name generic) ,@args)))
> +  (signal 'cl-no-applicable-method
> +          (append (list (format "%S" (cl--generic-name generic))) args)))
>
>  (cl-defgeneric cl-no-primary-method (generic &rest args)
>    "Function called when a method call finds no primary method."
> -  (signal 'cl-no-primary-method `(,(cl--generic-name generic) ,@args)))
> +  (signal 'cl-no-primary-method (append (list (format (cl--generic-name generic))) args)))
>
>  (defun cl-call-next-method (&rest _args)
>    "Function to call the next applicable method.

No, these should stay as they are, I think.


        Stefan





      parent reply	other threads:[~2015-12-01 21:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01 17:14 bug#22069: 25.0.50; bogus %S in cl-no-applicable-method message stephen_leake
2015-12-01 18:30 ` Stephen Leake
2015-12-01 21:25 ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='jwvbna9uar6.fsf-monnier+bug#22069@gnu.org' \
    --to=monnier@iro.umontreal.ca \
    --cc=22069@debbugs.gnu.org \
    --cc=stephen_leake@stephe-leake.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).