comparison lisp/vc-hooks.el @ 110091:66a2fac996a4

merge emacs-23
author Kenichi Handa <handa@m17n.org>
date Fri, 27 Aug 2010 23:05:43 +0900
parents 04a1a4b18129
children d418516def73 8027e412df98
comparison
equal deleted inserted replaced
107913:4a06b9752df5 110091:66a2fac996a4
878 ;; if user has killed the buffer and revisited. 878 ;; if user has killed the buffer and revisited.
879 (when vc-mode 879 (when vc-mode
880 (setq vc-mode nil)) 880 (setq vc-mode nil))
881 (when buffer-file-name 881 (when buffer-file-name
882 (vc-file-clearprops buffer-file-name) 882 (vc-file-clearprops buffer-file-name)
883 (add-hook 'mode-line-hook 'vc-mode-line nil t) 883 ;; FIXME: Why use a hook? Why pass it buffer-file-name?
884 (add-hook 'vc-mode-line-hook 'vc-mode-line nil t)
884 (let (backend) 885 (let (backend)
885 (cond 886 (cond
886 ((setq backend (with-demoted-errors (vc-backend buffer-file-name))) 887 ((setq backend (with-demoted-errors (vc-backend buffer-file-name)))
887 ;; Compute the state and put it in the modeline. 888 ;; Compute the state and put it in the modeline.
888 (vc-mode-line buffer-file-name backend) 889 (vc-mode-line buffer-file-name backend)