emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/vc-hooks.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el
Date: Wed, 07 May 2003 13:22:28 -0400

Index: emacs/lisp/vc-hooks.el
diff -c emacs/lisp/vc-hooks.el:1.148 emacs/lisp/vc-hooks.el:1.149
*** emacs/lisp/vc-hooks.el:1.148        Wed May  7 13:20:29 2003
--- emacs/lisp/vc-hooks.el      Wed May  7 13:22:28 2003
***************
*** 5,11 ****
  ;; Author:     FSF (see vc.el for full credits)
  ;; Maintainer: Andre Spiegel <address@hidden>
  
! ;; $Id: vc-hooks.el,v 1.148 2003/05/07 17:20:29 monnier Exp $
  
  ;; This file is part of GNU Emacs.
  
--- 5,11 ----
  ;; Author:     FSF (see vc.el for full credits)
  ;; Maintainer: Andre Spiegel <address@hidden>
  
! ;; $Id: vc-hooks.el,v 1.149 2003/05/07 17:22:28 monnier Exp $
  
  ;; This file is part of GNU Emacs.
  
***************
*** 633,639 ****
        (kill-buffer this-buffer))))
  
  (defun vc-find-file-hook ()
!   "Function for `find-file-hooks' activating VC mode if appropriate."
    ;; Recompute whether file is version controlled,
    ;; if user has killed the buffer and revisited.
    (if vc-mode
--- 633,639 ----
        (kill-buffer this-buffer))))
  
  (defun vc-find-file-hook ()
!   "Function for `find-file-hook' activating VC mode if appropriate."
    ;; Recompute whether file is version controlled,
    ;; if user has killed the buffer and revisited.
    (if vc-mode
***************
*** 676,688 ****
          "Warning: editing through the link bypasses version control")
                       )))))))))
  
! (add-hook 'find-file-hooks 'vc-find-file-hook)
  
  ;; more hooks, this time for file-not-found
  (defun vc-file-not-found-hook ()
    "When file is not found, try to check it out from version control.
  Returns t if checkout was successful, nil otherwise.
! Used in `find-file-not-found-hooks'."
    ;; When a file does not exist, ignore cached info about it
    ;; from a previous visit.
    (vc-file-clearprops buffer-file-name)
--- 676,688 ----
          "Warning: editing through the link bypasses version control")
                       )))))))))
  
! (add-hook 'find-file-hook 'vc-find-file-hook)
  
  ;; more hooks, this time for file-not-found
  (defun vc-file-not-found-hook ()
    "When file is not found, try to check it out from version control.
  Returns t if checkout was successful, nil otherwise.
! Used in `find-file-not-found-hook'."
    ;; When a file does not exist, ignore cached info about it
    ;; from a previous visit.
    (vc-file-clearprops buffer-file-name)
***************
*** 695,701 ****
        (setq default-directory (file-name-directory buffer-file-name))
        (not (vc-error-occurred (vc-checkout buffer-file-name))))))
  
! (add-hook 'find-file-not-found-hooks 'vc-file-not-found-hook)
  
  (defun vc-kill-buffer-hook ()
    "Discard VC info about a file when we kill its buffer."
--- 695,701 ----
        (setq default-directory (file-name-directory buffer-file-name))
        (not (vc-error-occurred (vc-checkout buffer-file-name))))))
  
! (add-hook 'find-file-not-found-hook 'vc-file-not-found-hook)
  
  (defun vc-kill-buffer-hook ()
    "Discard VC info about a file when we kill its buffer."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]