GNU bug report logs - #21618
Warning (bytecomp): misplaced interactive spec

Previous Next

Package: emacs;

Reported by: Philippe Vaucher <philippe.vaucher <at> gmail.com>

Date: Mon, 5 Oct 2015 13:36:02 UTC

Severity: normal

Tags: notabug

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Philippe Vaucher <philippe.vaucher <at> gmail.com>
To: 21618 <at> debbugs.gnu.org
Subject: bug#21618: Warning (bytecomp): misplaced interactive spec
Date: Mon, 5 Oct 2015 15:34:11 +0200
[Message part 1 (text/plain, inline)]
Hello,

I'm using Emacs snapshot from
https://launchpad.net/~ubuntu-elisp/+archive/ubuntu/ppa on ubuntu 15.04,
which at the moment is "GNU Emacs 25.0.50.2 (x86_64-pc-linux-gnu, GTK+
Version 3.14.13) of 2015-10-05."

Whenever I start emacs I get the following warning:

Warning (bytecomp): misplaced interactive spec: ‘(interactive (let ((args
(find-tag-interactive "[PCRE] Find tag regexp: " t))) (list
(rxt-pcre-to-elisp (nth 0 args)) (nth 1 args) (nth 2 args))))’

The function it refers to looks well defined:

(defadvice find-tag-regexp
  (before pcre-mode first (regexp &optional next-p other-window) disable)
  "Read regexp using PCRE syntax and convert to Elisp equivalent."
  "Perform `find-tag-regexp' using emulated PCRE regexp syntax."
  (interactive
   (let ((args (find-tag-interactive "[PCRE] Find tag regexp: " t)))
     (list (rxt-pcre-to-elisp (nth 0 args))
           (nth 1 args) (nth 2 args)))))

The code I'm refering to is
https://github.com/joddie/pcre2el/blob/master/pcre2el.el#L967

What is funny is that there is another `defadvice' that follows almost
exactly the same pattern right before this one and the other one doesn't
trigger the warning.

This made me do some research and basically I think the problem is in
`find-tag-regexp':

(defun find-tag-regexp (regexp &optional next-p other-window)
  "(snip doc)"
  (declare (obsolete xref-find-apropos "25.1"))
  (interactive (find-tag-interactive "Find tag regexp: " t))
  ;; We go through find-tag-other-window to do all the display hair there.
  (funcall (if other-window 'find-tag-other-window 'find-tag)
  regexp next-p t))


As you can see, it starts with a `declare' form instead of the
`interactive' form, and I think it confuses the `defadvice'.

Tell me if you need more information.

Thanks in advance,
Philippe
[Message part 2 (text/html, inline)]

This bug report was last modified 9 years and 281 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.