Mercurial > hg > xemacs-beta
diff lisp/efs/efs-ovwrt.el @ 40:7e54bd776075 r19-15b103
Import from CVS: tag r19-15b103
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:54:25 +0200 |
parents | 8fc7fe29b841 |
children | 8b8b7f3559a2 |
line wrap: on
line diff
--- a/lisp/efs/efs-ovwrt.el Mon Aug 13 08:54:02 2007 +0200 +++ b/lisp/efs/efs-ovwrt.el Mon Aug 13 08:54:25 2007 +0200 @@ -3,11 +3,10 @@ ;; ;; File: efs-ovwrt.el ;; Release: $efs release: 1.15 $ -;; Version: $Revision: 1.1 $ +;; Version: $Revision: 1.2 $ ;; RCS: ;; Description: Utilities for overwriting functions with new definitions. ;; Author: Andy Norman <ange@hplb.hpl.hp.com> -;; Modified: Sun Nov 27 18:40:20 1994 by sandy on gandalf ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -20,7 +19,7 @@ (defconst efs-ovwrt-version (concat (substring "$efs release: 1.15 $" 14 -2) "/" - (substring "$Revision: 1.1 $" 11 -2))) + (substring "$Revision: 1.2 $" 11 -2))) (defvar efs-overwrite-fmt "Note: This function has been modified to work with %s.") @@ -66,9 +65,12 @@ ;; later after some other code has been loaded on top of our stuff. (or (fboundp saved) - (progn + (let ((advised-p (and (featurep 'advice) + (ad-is-advised fun)))) + (if advised-p (ad-deactivate fun)) (fset saved (symbol-function fun)) - (fset fun new))) + (fset fun new) + (if advised-p (ad-activate fun)))) ;; Rewrite the doc string on the new function. This should ;; be done every time the file is loaded (or a function is redefined),