[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r99843: * lisp/vc-dispatcher.el: R
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r99843: * lisp/vc-dispatcher.el: Rename mode-line-hook to vc-mode-line-hook; |
Date: |
Tue, 08 Jun 2010 21:12:53 -0400 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 99843
committer: Stefan Monnier <address@hidden>
branch nick: emacs-23
timestamp: Tue 2010-06-08 21:12:53 -0400
message:
* 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.
modified:
lisp/ChangeLog
lisp/vc-dispatcher.el
lisp/vc-hooks.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-06-07 21:20:44 +0000
+++ b/lisp/ChangeLog 2010-06-09 01:12:53 +0000
@@ -1,3 +1,10 @@
+2010-06-09 Stefan Monnier <address@hidden>
+
+ * 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 <address@hidden>
* net/rcirc.el: Add support for password authentication.
=== modified file 'lisp/vc-dispatcher.el'
--- a/lisp/vc-dispatcher.el 2010-01-16 21:37:46 +0000
+++ b/lisp/vc-dispatcher.el 2010-06-09 01:12:53 +0000
@@ -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 @@
(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 @@
(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))
=== modified file 'lisp/vc-hooks.el'
--- a/lisp/vc-hooks.el 2010-02-03 03:55:03 +0000
+++ b/lisp/vc-hooks.el 2010-06-09 01:12:53 +0000
@@ -880,7 +880,8 @@
(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)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-23 r99843: * lisp/vc-dispatcher.el: Rename mode-line-hook to vc-mode-line-hook;,
Stefan Monnier <=