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>maint
parent
f0f39bb4c4
commit
96df551cb8
|
@ -123,6 +123,7 @@
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun git-blame-mode (&optional arg)
|
(defun git-blame-mode (&optional arg)
|
||||||
|
"Minor mode for displaying Git blame"
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(if arg
|
(if arg
|
||||||
(setq git-blame-mode (eq arg 1))
|
(setq git-blame-mode (eq arg 1))
|
||||||
|
@ -170,20 +171,25 @@
|
||||||
(process-send-region git-blame-proc (point-min) (point-max))
|
(process-send-region git-blame-proc (point-min) (point-max))
|
||||||
(process-send-eof git-blame-proc))))
|
(process-send-eof git-blame-proc))))
|
||||||
|
|
||||||
|
(defun remove-git-blame-text-properties (start end)
|
||||||
|
(let ((modified (buffer-modified-p))
|
||||||
|
(inhibit-read-only t))
|
||||||
|
(remove-text-properties start end '(point-entered nil))
|
||||||
|
(set-buffer-modified-p modified)))
|
||||||
|
|
||||||
(defun git-blame-cleanup ()
|
(defun git-blame-cleanup ()
|
||||||
"Remove all blame properties"
|
"Remove all blame properties"
|
||||||
(mapcar 'delete-overlay git-blame-overlays)
|
(mapcar 'delete-overlay git-blame-overlays)
|
||||||
(setq git-blame-overlays nil)
|
(setq git-blame-overlays nil)
|
||||||
(let ((modified (buffer-modified-p)))
|
(remove-git-blame-text-properties (point-min) (point-max)))
|
||||||
(remove-text-properties (point-min) (point-max) '(point-entered nil))
|
|
||||||
(set-buffer-modified-p modified)))
|
|
||||||
|
|
||||||
(defun git-blame-sentinel (proc status)
|
(defun git-blame-sentinel (proc status)
|
||||||
(with-current-buffer (process-buffer proc)
|
(with-current-buffer (process-buffer proc)
|
||||||
(with-current-buffer git-blame-file
|
(with-current-buffer git-blame-file
|
||||||
(setq git-blame-proc nil)))
|
(setq git-blame-proc nil)))
|
||||||
;;(kill-buffer (process-buffer proc))
|
;;(kill-buffer (process-buffer proc))
|
||||||
(message "git blame finished"))
|
;;(message "git blame finished")
|
||||||
|
)
|
||||||
|
|
||||||
(defvar in-blame-filter nil)
|
(defvar in-blame-filter nil)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue