]> code.delx.au - gnu-emacs/blobdiff - lisp/vc-hooks.el
(end-of-defun): Don't skip to next line after
[gnu-emacs] / lisp / vc-hooks.el
index b4f92350ea16e718b9b2ce88812421da54dd74d3..aacb0daa1a42afca60b8d5d350b7ea0305552ecd 100644 (file)
@@ -1,7 +1,7 @@
 ;;; vc-hooks.el --- resident support for version-control
 
 ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-;;   2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;;   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
 ;; Author:     FSF (see vc.el for full credits)
 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
@@ -177,8 +177,7 @@ individually should stay local."
       (delq nil (mapcar 'vc-stay-local-p file))
     (let* ((backend (vc-backend file))
           (sym (vc-make-backend-sym backend 'stay-local))
-          (stay-local (if (boundp sym) (symbol-value sym) t)))
-      (if (eq stay-local t) (setq stay-local vc-stay-local))
+          (stay-local (if (boundp sym) (symbol-value sym) vc-stay-local)))
       (if (symbolp stay-local) stay-local
        (let ((dirname (if (file-directory-p file)
                           (directory-file-name file)
@@ -335,8 +334,6 @@ If WITNESS if not found, return nil, otherwise return the root."
          (or vc-ignore-dir-regexp locate-dominating-stop-dir-regexp)))
     (locate-dominating-file file witness)))
 
-(define-obsolete-function-alias 'vc-find-root 'locate-dominating-file "23.1")
-
 ;; Access functions to file properties
 ;; (Properties should be _set_ using vc-file-setprop, but
 ;; _retrieved_ only through these functions, which decide
@@ -422,7 +419,7 @@ If the file is not registered, or the master name is not known, return nil."
 If FILES are not registered, this function always returns nil.
 For registered files, the possible values are:
 
-  'implicit   FILES are always writeable, and checked out `implicitly'
+  'implicit   FILES are always writable, and checked out `implicitly'
               when the user saves the first changes to the file.
 
   'locking    FILES are read-only if up-to-date; user must type
@@ -852,11 +849,10 @@ This function assumes that the file is registered."
   "If current buffer visits a symbolic link, visit the real file.
 If the real file is already visited in another buffer, make that buffer
 current, and kill the buffer that visits the link."
-  (let* ((truename (abbreviate-file-name (file-chase-links buffer-file-name)))
-         (true-buffer (find-buffer-visiting truename))
+  (let* ((true-buffer (find-buffer-visiting buffer-file-truename))
         (this-buffer (current-buffer)))
     (if (eq true-buffer this-buffer)
-       (progn
+       (let ((truename buffer-file-truename))
          (kill-buffer this-buffer)
          ;; In principle, we could do something like set-visited-file-name.
          ;; However, it can't be exactly the same as set-visited-file-name.
@@ -887,8 +883,8 @@ current, and kill the buffer that visits the link."
        (set (make-local-variable 'backup-inhibited) t))
       ;; Let the backend setup any buffer-local things he needs.
       (vc-call-backend (vc-backend buffer-file-name) 'find-file-hook))
-     ((let ((link-type (and (file-symlink-p buffer-file-name)
-                           (vc-backend (file-chase-links buffer-file-name)))))
+     ((let ((link-type (and (not (equal buffer-file-name buffer-file-truename))
+                            (vc-backend buffer-file-truename))))
        (cond ((not link-type) nil)     ;Nothing to do.
              ((eq vc-follow-symlinks nil)
               (message