unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master 55cdebc: Make Tramp compatible to recent progress-reporter-update
       [not found] ` <20190615093822.02DC9209BF@vcs0.savannah.gnu.org>
@ 2019-06-15 10:47   ` Stefan Monnier
  2019-06-15 11:45     ` Michael Albinus
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2019-06-15 10:47 UTC (permalink / raw)
  To: emacs-devel; +Cc: Michael Albinus

> +  (if (equal (tramp-compat-funcall 'func-arity #'progress-reporter-update)
> +	     '(1 . 3))

This gives the wrong result if progress-reporter-update is advised
(e.g. for `debug-on-entry`, or `trace-function`, or ...)


        Stefan




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

* Re: [Emacs-diffs] master 55cdebc: Make Tramp compatible to recent progress-reporter-update
  2019-06-15 10:47   ` [Emacs-diffs] master 55cdebc: Make Tramp compatible to recent progress-reporter-update Stefan Monnier
@ 2019-06-15 11:45     ` Michael Albinus
  2019-06-15 16:28       ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Albinus @ 2019-06-15 11:45 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> +  (if (equal (tramp-compat-funcall 'func-arity #'progress-reporter-update)
>> +	     '(1 . 3))
>
> This gives the wrong result if progress-reporter-update is advised
> (e.g. for `debug-on-entry`, or `trace-function`, or ...)

Do you know a better test?

>         Stefan

Best regards, Michael.



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

* Re: [Emacs-diffs] master 55cdebc: Make Tramp compatible to recent progress-reporter-update
  2019-06-15 11:45     ` Michael Albinus
@ 2019-06-15 16:28       ` Stefan Monnier
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2019-06-15 16:28 UTC (permalink / raw)
  To: Michael Albinus; +Cc: emacs-devel

>>> +  (if (equal (tramp-compat-funcall 'func-arity #'progress-reporter-update)
>>> +	     '(1 . 3))
>> This gives the wrong result if progress-reporter-update is advised
>> (e.g. for `debug-on-entry`, or `trace-function`, or ...)
> Do you know a better test?

None is perfect.  Other than looking at the Emacs version number, you
can also do

    (condition-case (progress-reporter-update ...)
      (wrong-number-of-arguments (progress-reporter-update ...)))

I find this latter one less troublesome in practice than testing arity,


        Stefan




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

end of thread, other threads:[~2019-06-15 16:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20190615093820.29808.75496@vcs0.savannah.gnu.org>
     [not found] ` <20190615093822.02DC9209BF@vcs0.savannah.gnu.org>
2019-06-15 10:47   ` [Emacs-diffs] master 55cdebc: Make Tramp compatible to recent progress-reporter-update Stefan Monnier
2019-06-15 11:45     ` Michael Albinus
2019-06-15 16:28       ` Stefan Monnier

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