[AC21.5] [R21.4] Re: Preserve hooks locality

Didier Verna didier at xemacs.org
Fri Aug 31 04:37:09 EDT 2007


       I've committed this one. It's recommended for 21.4 also.


I wrote:

> 		Dear reviewers,
>
> 	This patch fixes the loss of locality that I have observed on
> write-file-hooks and friends (the 't in the local value was lost). It is
> also recommended for 21.4. I'll apply it by the end of the week if
> nobody objects.
>
>
> lisp/ChangeLog addition:
>
> 2007-08-29  Didier Verna  <didier at xemacs.org>
>
> 	* files.el (files-fetch-hook-value): Preserve locality of hooks by
> 	working on copies.
>
>
> XEmacs source patch:
> Diff command:   cvs -q diff -u -t -b -B -w
> Files affected: lisp/files.el
>
> Index: lisp/files.el
> ===================================================================
> RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/files.el,v
> retrieving revision 1.78
> diff -u -u -t -b -B -w -r1.78 files.el
> --- lisp/files.el	21 Jun 2007 23:27:16 -0000	1.78
> +++ lisp/files.el	29 Aug 2007 09:02:03 -0000
> @@ -2809,8 +2809,8 @@
>  (put 'save-buffer-coding-system 'permanent-local t)
>  
>  (defun files-fetch-hook-value (hook)
> -  (let ((localval (symbol-value hook))
> -        (globalval (default-value hook)))
> +  (let ((localval (copy-list (symbol-value hook)))
> +        (globalval (copy-list (default-value hook))))
>      (if (memq t localval)
>          (setq localval (append (delq t localval) (delq t globalval))))
>      localval))

-- 
MySpace: http://www.myspace.com/didierverna

Didier Verna, didier at lrde.epita.fr, http://www.lrde.epita.fr/~didier

EPITA / LRDE, 14-16 rue Voltaire   Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-Bicêtre, France   Fax.+33 (1) 53 14 59 22   didier at xemacs.org



More information about the XEmacs-Patches mailing list