[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v
From: |
Dan Nicolaescu |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v |
Date: |
Mon, 21 Apr 2008 05:11:57 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Dan Nicolaescu <dann> 08/04/21 05:11:56
Index: vc-hooks.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-hooks.el,v
retrieving revision 1.239
retrieving revision 1.240
diff -u -b -r1.239 -r1.240
--- vc-hooks.el 19 Apr 2008 21:53:55 -0000 1.239
+++ vc-hooks.el 21 Apr 2008 05:11:55 -0000 1.240
@@ -309,14 +309,14 @@
(when (file-exists-p file)
(if (not limit)
(insert-file-contents file)
- (if (not blocksize) (setq blocksize 8192))
+ (unless blocksize (setq blocksize 8192))
(let ((filepos 0))
(while
(and (< 0 (cadr (insert-file-contents
file nil filepos (incf filepos blocksize))))
(progn (beginning-of-line)
(let ((pos (re-search-forward limit nil 'move)))
- (if pos (delete-region (match-beginning 0)
+ (when pos (delete-region (match-beginning 0)
(point-max)))
(not pos)))))))
(set-buffer-modified-p nil)
@@ -549,7 +549,7 @@
;; - `removed'
;; - `copied' and `moved' (might be handled by `removed' and `added')
(or (vc-file-getprop file 'vc-state)
- (if (and (> (length file) 0) (vc-backend file))
+ (when (and (> (length file) 0) (vc-backend file))
(vc-file-setprop file 'vc-state
(vc-call state-heuristic file)))))
@@ -604,9 +604,10 @@
"Return the repository version from which FILE was checked out.
If FILE is not registered, this function always returns nil."
(or (vc-file-getprop file 'vc-working-revision)
- (if (vc-backend file)
+ (when (vc-backend file)
(vc-file-setprop file 'vc-working-revision
(vc-call working-revision file)))))
+
;; Backward compatibility.
(define-obsolete-function-alias
'vc-workfile-version 'vc-working-revision "23.1")
@@ -668,7 +669,7 @@
(mapcar
(lambda (s)
(let ((trial (vc-possible-master s dirname basename)))
- (if (and trial (file-exists-p trial)
+ (when (and trial (file-exists-p trial)
;; Make sure the file we found with name
;; TRIAL is not the source file itself.
;; That can happen with RCS-style names if
@@ -960,7 +961,7 @@
;; from a previous visit.
(vc-file-clearprops buffer-file-name)
(let ((backend (vc-backend buffer-file-name)))
- (if backend (vc-call-backend backend 'find-file-not-found-hook))))
+ (when backend (vc-call-backend backend 'find-file-not-found-hook))))
(defun vc-default-find-file-not-found-hook (backend)
;; This used to do what vc-rcs-find-file-not-found-hook does, but it only
@@ -971,8 +972,7 @@
(defun vc-kill-buffer-hook ()
"Discard VC info about a file when we kill its buffer."
- (if buffer-file-name
- (vc-file-clearprops buffer-file-name)))
+ (when buffer-file-name (vc-file-clearprops buffer-file-name)))
(add-hook 'kill-buffer-hook 'vc-kill-buffer-hook)
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Stefan Monnier, 2008/04/09
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Dan Nicolaescu, 2008/04/10
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Stefan Monnier, 2008/04/15
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Juanma Barranquero, 2008/04/18
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Stefan Monnier, 2008/04/19
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v,
Dan Nicolaescu <=
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Stefan Monnier, 2008/04/29