changeset 33339:385eed64743a

(uniquify-buffer-file-name): Wrap advice in eval-after-load.
author Dave Love <fx@gnu.org>
date Thu, 09 Nov 2000 12:07:39 +0000
parents dd1fe976d439
children 5192df3c8dd6
files lisp/pcvs.el
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/pcvs.el	Thu Nov 09 12:05:55 2000 +0000
+++ b/lisp/pcvs.el	Thu Nov 09 12:07:39 2000 +0000
@@ -14,7 +14,7 @@
 ;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu
 ;; Keywords: CVS, version control, release management
 ;; Version: $Name:  $
-;; Revision: $Id: pcvs.el,v 1.14 2000/11/03 22:34:26 monnier Exp $
+;; Revision: $Id: pcvs.el,v 1.15 2000/11/06 07:17:33 monnier Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -2112,12 +2112,14 @@
 ;; hook into uniquify
 ;;
 
-(defadvice uniquify-buffer-file-name (after pcl-cvs-uniquify activate)
-  (or ad-return-value
-      (save-excursion
-	(set-buffer (ad-get-arg 0))
-	(when (eq major-mode 'cvs-mode)
-	  (setq ad-return-value list-buffers-directory)))))
+;; Don't suck in advice.el unless necessary.
+(eval-after-load "uniquify"
+  '(defadvice uniquify-buffer-file-name (after pcl-cvs-uniquify activate)
+     (or ad-return-value
+	 (save-excursion
+	   (set-buffer (ad-get-arg 0))
+	   (when (eq major-mode 'cvs-mode)
+	     (setq ad-return-value list-buffers-directory))))))
 
 
 (provide 'pcvs)