bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#3418: Issue with compile.el and compilation-parse-errors-filename-fu


From: Eli Zaretskii
Subject: bug#3418: Issue with compile.el and compilation-parse-errors-filename-function
Date: Fri, 11 Aug 2017 09:34:59 +0300

> From: npostavs@users.sourceforge.net
> Cc: Eli Zaretskii <eliz@gnu.org>,  3418@debbugs.gnu.org,  Andrew Hyatt 
> <ahyatt@gmail.com>
> Date: Thu, 10 Aug 2017 20:50:29 -0400
> 
> Gary Oberbrunner <garyo@genarts.com> writes:
> 
> > If a user (such as myself) has an implementation of this function in his 
> > .emacs today, like so:
> >
> > (defun process-error-filename (filename)
> >   ;;; do stuff with filename
> >   filename)
> > (setq compilation-parse-errors-filename-function 'process-error-filename)
> >
> > and we add a new argument that gets passed to that function, it'll throw an 
> > error. *Users* will have to add 
> >   &optional spec-dir 
> > to their implementations of it to avoid the error.
> 
> We could do something like
> 
>     (condition-case err
>         (funcall compilation-parse-errors-filename-function filename spec-dir)
>       (wrong-number-of-arguments
>        ;; Try again with single arg for backwards compatibility.
>        (funcall compilation-parse-errors-filename-function filename)))

Or use func-arity?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]