comparison lisp/vc-hooks.el @ 108948:c3f02c0c5924

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Wed, 09 Jun 2010 22:49:43 +0000
parents d418516def73
children
comparison
equal deleted inserted replaced
108928:f89344a6a461 108948:c3f02c0c5924
874 ;; if user has killed the buffer and revisited. 874 ;; if user has killed the buffer and revisited.
875 (when vc-mode 875 (when vc-mode
876 (setq vc-mode nil)) 876 (setq vc-mode nil))
877 (when buffer-file-name 877 (when buffer-file-name
878 (vc-file-clearprops buffer-file-name) 878 (vc-file-clearprops buffer-file-name)
879 (add-hook 'mode-line-hook 'vc-mode-line nil t) 879 ;; FIXME: Why use a hook? Why pass it buffer-file-name?
880 (add-hook 'vc-mode-line-hook 'vc-mode-line nil t)
880 (let (backend) 881 (let (backend)
881 (cond 882 (cond
882 ((setq backend (with-demoted-errors (vc-backend buffer-file-name))) 883 ((setq backend (with-demoted-errors (vc-backend buffer-file-name)))
883 ;; Compute the state and put it in the modeline. 884 ;; Compute the state and put it in the modeline.
884 (vc-mode-line buffer-file-name backend) 885 (vc-mode-line buffer-file-name backend)