all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#21618: Warning (bytecomp): misplaced interactive spec
@ 2015-10-05 13:34 Philippe Vaucher
  2015-10-06  0:47 ` Glenn Morris
  0 siblings, 1 reply; 5+ messages in thread
From: Philippe Vaucher @ 2015-10-05 13:34 UTC (permalink / raw)
  To: 21618

[-- Attachment #1: Type: text/plain, Size: 1855 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 2670 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-06 12:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-05 13:34 bug#21618: Warning (bytecomp): misplaced interactive spec Philippe Vaucher
2015-10-06  0:47 ` Glenn Morris
2015-10-06  6:08   ` Glenn Morris
2015-10-06  7:11   ` Philippe Vaucher
2015-10-06 12:38   ` Philippe Vaucher

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.