[ESS-bugs] ess-mode 5.3.8; after-change-functions; RET at end of file

Rodney Sparapani rsparapa at mcw.edu
Mon Nov 10 19:49:48 CET 2008


Markus Triska wrote:
>
> This should be:
>
>   (add-hook 'after-change-functions 'noweb-after-change-function nil t)
>
> to only affect the buffer-local value. This change should also be made
> for the other hooks.
>
> (By the way, this fixes a real problem: For example, with the current
> ESS version, after editing an Rnw file, you get errors if you display an
> image file that coincidentally contains code chunk markers.)
>
>   
>> (make-local-hook 'after-change-functions)
>>     
>
> As of Emacs 21.1, make-local-hook is obsolete, since add-hook does the
> same with non-nil `local' argument.
>
>   
>> Which would also require changing line 456 to:
>>
>> (remove-local-hook 'after-change-functions ...)
>>     
>
> This should accordingly be:
>
>    (remove-hook 'after-change-functions 'noweb-after-change-function t)
>
> to only affect the buffer-local value.
>
> Also, noweb-mode does not follow the Major Mode conventions, see:
>
>    (info "(Elisp)Major Mode Conventions")
>
> For example, (kill-all-local-variables) is missing.
>
> Thank you and all the best,
> Markus
>   
Hi Markus:

But we also support Emacs 20 and XEmacs... see
<http://ess.r-project.org/Manual/ess.html#Requirements> for details.

So, I encourage everybody to test the following:

(if (fboundp 'make-local-hook) (progn
(make-local-hook 'after-change-functions)
(add-local-hook 'after-change-functions 'noweb-after-change-function))
(add-hook 'after-change-functions 'noweb-after-change-function nil t))

...

(if (fboundp 'remove-local-hook)
(remove-local-hook 'after-change-functions 'noweb-after-change-function)
(remove-hook 'after-change-functions 'noweb-after-change-function t))

However, I'm not adding kill-all-... without some further guidance. I've
checked this in and it will appear in 5.3.9 RSN.

-- 
Rodney Sparapani      Center for Patient Care & Outcomes Research (PCOR)
Sr. Biostatistician              http://www.mcw.edu/pcor
4 wheels good, 2 wheels better!  Medical College of Wisconsin (MCW)
WWLD?:  What Would Lombardi Do?  Milwaukee, WI, USA



More information about the ESS-bugs mailing list