emacs-devel
[Top][All Lists]
Advanced

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

Re: Multiple next-error sources


From: Alan Mackenzie
Subject: Re: Multiple next-error sources
Date: Fri, 7 Nov 2014 17:40:29 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Hello, Daniel.

On Fri, Nov 07, 2014 at 05:10:29PM +0000, Daniel Colascione wrote:
> On 11/07/2014 04:55 PM, Alan Mackenzie wrote:

> > It would seem that the use of single functions, with `add-function' is
> > inferior to the conventional hook mechanism in every way.  What am I
> > missing?  In addition to the things cited by Daniel, there's:

> > (i) the danger (near certainty) that somebody is going to use `setq'
> > rather than `add-function' to configure it;

> The same critique applies to regular hooks, doesn't it?

:-)  So it does!  What I was confused about is foo-function.  I think
this is going to be a defun in the future, whereas up to now it's always
been a defvar.  This is confusing.  So whereas you'd use "(setq
c-backspace-function 'foobar)", and use `funcall' to invoke it, you'd say
"(add-function 'foo-function 'foobar)" (or whatever), and just call
`foo-function' as a function.

> > (ii) the additional incompatibility with other Emacsen;

> I'm not sure that compatibility with other Emacsen is as important as it
> once was. AIUI, GNU Emacs is receiving the vast majority of development
> effort.

It may be less important than it was, but that's no reason for dismissing
it altogether.

> > (iii) the difficulty (or perhaps clumsiness) in looking at the contents
> > of an advised function.  There would seem to be nothing equivalent to
> > M-: after-change-functions.

> > So why are you changing from the conventional hook mechanism, which works
> > so well?  What is the advantage of the new scheme.

> > Incidentally, I had a look at the documentation for add-advice, and
> > there's a problem with it.  "Advice" in English has no plural - there's
> > no such word as "advices".  If it's necessary to emphasize the plurality,
> > then "pieces of advice" can be used.  There's no such thing as "an
> > advice", rather you'd say "some advice".  It's a bit like you wouldn't
> > refer to a lake as "a big water"; you'd say it contains "a lot of water".
> > I think there's a term in linguistics for such a word, but I don't know
> > it off hand.

> I think "advise" ...

"advice" ??

> ... works like "code" in the software sense and "furniture". The term
> is "mass noun".

Thanks!  "Furniture" is indeed a better example than "water".

> > Incidentally 2, the verb corresponding to the noun "advice" is "to
> > advise".

> Isn't English fun?

Indeed it is!  You get to appreciate it especially when you live in a
place where they don't speak your native language (much).

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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