@matheusbsbs / matheus-bagliano / commits / 96df551cb8
Fork 0

git-blame.el: Doc fixes and cleanup

Signed-off-by: David Kågedal <davidk@lysator.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>

David Kågedal committed Feb 9, 2007 at 09:21 UTC 96df551cb89264ed88b717b9ace8ad3edc0e09a6
1 file changed +10 -4
contrib/emacs/git-blame.el
+10 -4
@@ -123,6 +123,7 @@
123
124 ;;;###autoload
125 (defun git-blame-mode (&optional arg)
126 + "Minor mode for displaying Git blame"
127 (interactive "P")
128 (if arg
129 (setq git-blame-mode (eq arg 1))
@@ -170,20 +171,25 @@
171 (process-send-region git-blame-proc (point-min) (point-max))
172 (process-send-eof git-blame-proc))))
173
174 +(defun remove-git-blame-text-properties (start end)
175 + (let ((modified (buffer-modified-p))
176 + (inhibit-read-only t))
177 + (remove-text-properties start end '(point-entered nil))
178 + (set-buffer-modified-p modified)))
179 +
180 (defun git-blame-cleanup ()
181 "Remove all blame properties"
182 (mapcar 'delete-overlay git-blame-overlays)
183 (setq git-blame-overlays nil)
177 - (let ((modified (buffer-modified-p)))
178 - (remove-text-properties (point-min) (point-max) '(point-entered nil))
179 - (set-buffer-modified-p modified)))
184 + (remove-git-blame-text-properties (point-min) (point-max)))
185
186 (defun git-blame-sentinel (proc status)
187 (with-current-buffer (process-buffer proc)
188 (with-current-buffer git-blame-file
189 (setq git-blame-proc nil)))
190 ;;(kill-buffer (process-buffer proc))
186 - (message "git blame finished"))
191 + ;;(message "git blame finished")
192 + )
193
194 (defvar in-blame-filter nil)
195