Subject: bug#22069: 25.0.50; bogus %S in cl-no-applicable-method message

From: [email-masked]
Date: Tue, 01 Dec 2015 11:14:07 -0600

In emacs-25 branch, starting from emacs -Q, eval in *scratch*:

(progn
 (require 'xref)
 (setq xref-backend-functions (lambda () 'my-xref-backend))
 (xref-find-definitions "foo"))

The first time gives a *Backtrace* buffer; don't quit, run it again to
get the error message:

   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.

This comes from cl-generic.el line 803:

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

which is used on line 812:

(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)))

Apparently `signal' does not use the error-message string as a `format'
argument, but just a plain string.

In GNU Emacs 25.0.50.1 (x86_64-w64-mingw32)
 of 2015-11-30
Repository revision: ca6edca2429c01dd7905c0de835bbdb23754b754
Windowing system distributor 'Microsoft Corp.', version 6.3.9600
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: cp1252

Major mode: Emacs-Lisp

Minor modes in effect:
  diff-auto-refine-mode: t
  project-ml-xref-mode: t
  global-ede-mode: t
  ede-minor-mode: t
  other-frame-window-mode: t
  display-time-mode: t
  delete-selection-mode: t
  icomplete-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Mark set
Mark saved where search started
Mark set
Mark saved where search started
Mark set [2 times]
Mark saved where search started
Auto-saving...
Mark set [2 times]
Saving file c:/home/stephe/projects.text...
Wrote c:/home/stephe/projects.text

Load-path shadows:
c:/home/stephe/.emacs.d/elpa/ada-ref-man-2012.0/ada-ref-man hides /Projects/org.emacs.ada-mode/ada-ref-man
/Projects/org.emacs.ada-mode/ada-xref hides c:/Projects/emacs/scratch/stephe-25/lisp/progmodes/ada-xref
/Projects/org.emacs.ada-mode/ada-stmt hides c:/Projects/emacs/scratch/stephe-25/lisp/progmodes/ada-stmt
/Projects/org.emacs.ada-mode/ada-prj hides c:/Projects/emacs/scratch/stephe-25/lisp/progmodes/ada-prj
/Projects/org.emacs.ada-mode/ada-mode hides c:/Projects/emacs/scratch/stephe-25/lisp/progmodes/ada-mode

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mail-utils pp xmtn-dvc
xmtn-conflicts xmtn-ids dvc-persistence dvc-config xmtn-automate
xmtn-run xmtn-match xmtn-basic-io xmtn-base dvc-status dvc-diff
dvc-log-edit ediff-merg ediff-wind ediff-diff ediff-mult ediff-help
ediff-init ediff-util ediff add-log gpr-query make-mode rect debug
sh-script smie executable copyright character-fold misearch
multi-isearch pulse vc-git diff-mode map semantic/wisent/grammar
semantic/bovine semantic/grammar semantic/idle semantic/grammar-wy
semantic/format semantic/tag-ls semantic/find semantic/ctxt
semantic/lex-spp vc vc-dispatcher vc-mtn project-settings ede/generic
semantic/db ede/shell ede/config eieio-opt ada-project xref-ada ada-skel
ada-skeletons skeleton ada-compiler ada-gnat-compile ada-xref-tool
ada-gnat-xref gnat-core ada-indent-engine ada-wisi
ada-indent-user-options ada-grammar-wy wisi-compile wisi wisi-parse
wisi-compat-24.2 semantic/wisent semantic/wisent/wisent ada-fix-error
ada-build ada-mode-compat-24.2 ada-mode find-file align
project-multi-lang xref-patches semantic/symref semantic/util-modes
semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local
project-menu project-patches ede/emacs ede/speedbar ede/files ede
ede/detect ede/base ede/auto ede/source eieio-base eieio-speedbar
speedbar sb-image ezimage dframe eieio-custom cedet etags seq
org-element org-rmail org-mhe org-irc org-info org-gnus org-docview
doc-view jka-compr image-mode org-bibtex bibtex org-bbdb org-w3m
org-mode-keys org org-macro org-footnote org-pcomplete pcomplete
org-list org-faces org-entities org-version ob-emacs-lisp ob ob-tangle
ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval
org-compat org-macs org-loaddefs format-spec find-func cal-menu calendar
cal-loaddefs xgit-core xmtn-minimal dvc-autoloads dvc-unified ffap
thingatpt url-parse auth-source gnus-util mm-util help-fns mail-prsvr
password-cache url-vars dvc-fileinfo dvc-core dvc-buffers dvc-ui
dvc-register dvc-utils ewoc dvc-emacs dvc-defs other-frame-window time
delsel cus-start cus-load color-theme edmacro kmacro wid-edit cl
noutline outline easy-mmode xref cl-seq project eieio byte-opt bytecomp
byte-compile cl-extra help-mode cconv eieio-core whitespace dired-x
dired-aux dired compile comint ansi-color ring cl-macs gv uniquify-files
path-iterator cl-loaddefs pcase cl-lib icomplete finder-inf info package
easymenu epg-config time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table
w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote w32notify w32 multi-tty
make-network-process emacs)

Memory information:
((conses 16 488326 85520)
 (symbols 56 41558 0)
 (miscs 48 460 1287)
 (strings 32 107084 16234)
 (string-bytes 1 2782558)
 (vectors 16 44569)
 (vector-slots 8 1552193 152910)
 (floats 8 865 479)
 (intervals 56 7417 1456)
 (buffers 976 47))