# HG changeset patch # User Stefan Monnier # Date 974399291 0 # Node ID d8c822512b62a9d7fc857e78830f7647ce2ca7c1 # Parent 16f5454d8a3673b566028a922cc22be4537c5742 (vc-version-diff): Bind inhibit-read-only when inserting text. (vc-version-backup-file): Docstring fix. diff -r 16f5454d8a36 -r d8c822512b62 lisp/vc.el --- a/lisp/vc.el Thu Nov 16 18:18:46 2000 +0000 +++ b/lisp/vc.el Thu Nov 16 18:28:11 2000 +0000 @@ -1,11 +1,11 @@ -;; vc.el --- drive a version-control system from within Emacs +;;; vc.el --- drive a version-control system from within Emacs ;; Copyright (C) 1992,93,94,95,96,97,98,2000 Free Software Foundation, Inc. ;; Author: FSF (see below for full credits) ;; Maintainer: Andre Spiegel -;; $Id: vc.el,v 1.288 2000/11/16 16:40:59 spiegel Exp $ +;; $Id: vc.el,v 1.289 2000/11/16 18:17:26 spiegel Exp $ ;; This file is part of GNU Emacs. @@ -1585,10 +1585,11 @@ ;; Gnus-5.8.5 sets up an autoload for diff-mode, even if it's ;; not available. Work around that. (if (require 'diff-mode nil t) (diff-mode)) - (vc-exec-after '(progn (if (eq (buffer-size) 0) - (insert "No differences found.\n")) - (goto-char (point-min)) - (shrink-window-if-larger-than-buffer))) + (vc-exec-after '(let ((inhibit-read-only t)) + (if (eq (buffer-size) 0) + (insert "No differences found.\n")) + (goto-char (point-min)) + (shrink-window-if-larger-than-buffer))) t)) ;;;###autoload @@ -2243,9 +2244,10 @@ (message "Reverting %s...done" file))) (defun vc-version-backup-file (file &optional rev) - "If version backups should be used for FILE, and there exists + "Return name of backup file for revision REV of FILE. +If version backups should be used for FILE, and there exists such a backup for REV or the current workfile version of file, -return the name of it; otherwise return nil." +return its name; otherwise return nil." (when (vc-call make-version-backups-p file) (let ((backup-file (vc-version-backup-file-name file rev))) (if (file-exists-p backup-file)