[ESS-bugs] ess-mode 5.3.8; after-change-functions; RET at end of file
Martin Maechler
maechler at stat.math.ethz.ch
Thu Nov 27 08:55:54 CET 2008
Hi Rodney,
>>>>> "RoSp" == Sparapani, Rodney <rsparapa at mcw.edu>
>>>>> on Wed, 26 Nov 2008 18:36:56 -0600 writes:
RoSp> Hi Gang:
RoSp> I don't have my natural access (I'm slumming with Windows for the
RoSp> holiday break :o( ). But, I managed some testing of the code with
RoSp> difficulty.
Thanks a lot!
RoSp> And, I don't think I agree with the current changes.
RoSp> Here's what you have:
RoSp> (if (and (>= emacs-major-version 21)
RoSp> (not (featurep 'xemacs)))
RoSp> (add-hook 'after-change-functions 'noweb-after-change-function nil t)
RoSp> ;; else Xemacs or very old GNU Emacs
RoSp> (make-local-hook 'after-change-functions)
RoSp> (add-hook 'after-change-functions 'noweb-after-change-function))
RoSp> I think you really want something like this:
RoSp> (if (featurep 'xemacs) (make-local-hook 'after-change-functions))
RoSp> (add-hook 'after-change-functions 'noweb-after-change-function nil t)
Well, "you really want" is really not quite true.
AFAICS Emacs 20. does additionally need the "make-local-hook"
but Emacs 21.x no longer needs that.
I.e., I did *mean* the code to be as it is now.
OTOH, I had thought that Emacs 20.x would not have the 4-th
argument of (add-hook . ) yet.
But now .. with some extra effort, I have been able to check
that it has.
So we can *simplify* the code a bit in the direction you
indicated:
(if (or (<= emacs-major-version 20)
(featurep 'xemacs)) ;; Xemacs or very old GNU Emacs
(make-local-hook 'after-change-functions))
(add-hook 'after-change-functions 'noweb-after-change-function nil t)
Martin
More information about the ESS-bugs
mailing list