mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-24 07:20:37 +00:00
* lisp/vc-dispatcher.el: Rename mode-line-hook to vc-mode-line-hook;
declare it, make it buffer-local, and permanent-local. (vc-resynch-window): Adjust name. * lisp/vc-hooks.el (vc-find-file-hook): Adjust name. Fixes: debbugs:6324
This commit is contained in:
parent
373bf2b76c
commit
8c6eab5a27
@ -1,3 +1,10 @@
|
||||
2010-06-09 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* vc-dispatcher.el: Rename mode-line-hook to vc-mode-line-hook;
|
||||
declare it, make it buffer-local and permanent-local (bug#6324).
|
||||
(vc-resynch-window): Adjust name.
|
||||
* vc-hooks.el (vc-find-file-hook): Adjust name.
|
||||
|
||||
2010-06-07 Jonathan Rockway <jon@jrock.us>
|
||||
|
||||
* net/rcirc.el: Add support for password authentication.
|
||||
|
@ -101,7 +101,7 @@
|
||||
;; that on-disk files and the contents of their visiting Emacs buffers
|
||||
;; coincide.
|
||||
;;
|
||||
;; When the client mode adds a local mode-line-hook to a buffer, it
|
||||
;; When the client mode adds a local vc-mode-line-hook to a buffer, it
|
||||
;; will be called with the buffer file name as argument whenever the
|
||||
;; dispatcher resynchs the buffer.
|
||||
|
||||
@ -454,6 +454,10 @@ ARG and NO-CONFIRM are passed on to `revert-buffer'."
|
||||
(revert-buffer arg no-confirm t))
|
||||
(vc-restore-buffer-context context)))
|
||||
|
||||
(defvar vc-mode-line-hook nil)
|
||||
(make-variable-buffer-local 'vc-mode-line-hook)
|
||||
(put 'vc-mode-line-hook 'permanent-local t)
|
||||
|
||||
(defun vc-resynch-window (file &optional keep noquery)
|
||||
"If FILE is in the current buffer, either revert or unvisit it.
|
||||
The choice between revert (to see expanded keywords) and unvisit
|
||||
@ -479,7 +483,8 @@ editing!"
|
||||
(not (eq (get major-mode 'mode-class) 'special))
|
||||
(view-mode-enter))))
|
||||
|
||||
(run-hook-with-args 'mode-line-hook buffer-file-name))
|
||||
;; FIXME: Why use a hook? Why pass it buffer-file-name?
|
||||
(run-hook-with-args 'vc-mode-line-hook buffer-file-name))
|
||||
(kill-buffer (current-buffer)))))
|
||||
|
||||
(declare-function vc-dir-resynch-file "vc-dir" (&optional fname))
|
||||
|
@ -880,7 +880,8 @@ current, and kill the buffer that visits the link."
|
||||
(setq vc-mode nil))
|
||||
(when buffer-file-name
|
||||
(vc-file-clearprops buffer-file-name)
|
||||
(add-hook 'mode-line-hook 'vc-mode-line nil t)
|
||||
;; FIXME: Why use a hook? Why pass it buffer-file-name?
|
||||
(add-hook 'vc-mode-line-hook 'vc-mode-line nil t)
|
||||
(let (backend)
|
||||
(cond
|
||||
((setq backend (with-demoted-errors (vc-backend buffer-file-name)))
|
||||
|
Loading…
Reference in New Issue
Block a user