Mercurial > emacs
comparison lisp/pcvs.el @ 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 | 39c359a5c419 |
children | 5ef2137ce754 |
comparison
equal
deleted
inserted
replaced
33338:dd1fe976d439 | 33339:385eed64743a |
---|---|
12 ;; (Greg Klanderman) greg@alphatech.com | 12 ;; (Greg Klanderman) greg@alphatech.com |
13 ;; (Jari Aalto+mail.emacs) jari.aalto@poboxes.com | 13 ;; (Jari Aalto+mail.emacs) jari.aalto@poboxes.com |
14 ;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu | 14 ;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu |
15 ;; Keywords: CVS, version control, release management | 15 ;; Keywords: CVS, version control, release management |
16 ;; Version: $Name: $ | 16 ;; Version: $Name: $ |
17 ;; Revision: $Id: pcvs.el,v 1.14 2000/11/03 22:34:26 monnier Exp $ | 17 ;; Revision: $Id: pcvs.el,v 1.15 2000/11/06 07:17:33 monnier Exp $ |
18 | 18 |
19 ;; This file is part of GNU Emacs. | 19 ;; This file is part of GNU Emacs. |
20 | 20 |
21 ;; GNU Emacs is free software; you can redistribute it and/or modify | 21 ;; GNU Emacs is free software; you can redistribute it and/or modify |
22 ;; it under the terms of the GNU General Public License as published by | 22 ;; it under the terms of the GNU General Public License as published by |
2110 | 2110 |
2111 ;; | 2111 ;; |
2112 ;; hook into uniquify | 2112 ;; hook into uniquify |
2113 ;; | 2113 ;; |
2114 | 2114 |
2115 (defadvice uniquify-buffer-file-name (after pcl-cvs-uniquify activate) | 2115 ;; Don't suck in advice.el unless necessary. |
2116 (or ad-return-value | 2116 (eval-after-load "uniquify" |
2117 (save-excursion | 2117 '(defadvice uniquify-buffer-file-name (after pcl-cvs-uniquify activate) |
2118 (set-buffer (ad-get-arg 0)) | 2118 (or ad-return-value |
2119 (when (eq major-mode 'cvs-mode) | 2119 (save-excursion |
2120 (setq ad-return-value list-buffers-directory))))) | 2120 (set-buffer (ad-get-arg 0)) |
2121 (when (eq major-mode 'cvs-mode) | |
2122 (setq ad-return-value list-buffers-directory)))))) | |
2121 | 2123 |
2122 | 2124 |
2123 (provide 'pcvs) | 2125 (provide 'pcvs) |
2124 | 2126 |
2125 ;;; pcvs.el ends here | 2127 ;;; pcvs.el ends here |