git-blame.el: Doc fixes and cleanup
PATCH 6/7 git-blame.el: Doc fixes and cleanup
--- contrib/emacs/git-blame.el | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-)
contrib/emacs/git-blame.el +10 -4
@@ -123,6 +123,7 @@ ;;;###autoload (defun git-blame-mode (&optional arg) + "Minor mode for displaying Git blame" (interactive "P") (if arg (setq git-blame-mode (eq arg 1))
@@ -170,20 +171,25 @@ (process-send-region git-blame-proc (point-min) (point-max)) (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 () "Remove all blame properties" (mapcar 'delete-overlay git-blame-overlays) (setq git-blame-overlays nil) - (let ((modified (buffer-modified-p))) - (remove-text-properties (point-min) (point-max) '(point-entered nil)) - (set-buffer-modified-p modified))) + (remove-git-blame-text-properties (point-min) (point-max))) (defun git-blame-sentinel (proc status) (with-current-buffer (process-buffer proc) (with-current-buffer git-blame-file (setq git-blame-proc nil))) ;;(kill-buffer (process-buffer proc)) - (message "git blame finished")) + ;;(message "git blame finished") + ) (defvar in-blame-filter nil)
Signature · 5 lines
1.5.0.rc3.204.g93c76 -- David Kågedal
[Cc: [email protected]]
Quoted 8 lines · David K?gedal
(quoted diff) +0
-0@@ -123,6 +123,7 @@
;;;###autoload
(defun git-blame-mode (&optional arg)
+ "Minor mode for displaying Git blame"
(interactive "P")
(if arg
(setq git-blame-mode (eq arg 1))
We should probably also change file description in header, and autoload instruction in Installation: section of commentary:
;;; git-blame.el --- Minor mode for displaying Git blame -*- coding: utf-8 -*- ;;
[...]
;; If you do not want to load this package before it is necessary, you ;; can make use of the `autoload' feature, e.g. by adding to your .emacs ;; the following lines
;;
;; (autoload 'git-blame-mode "git-blame"
;; "Minor mode for displaying Git blame" t)
(docstring is needed because INTERACTIVE is _fourth_ parameter).
Signature · 3 lines
Jakub Narebski Warsaw, Poland ShadeHawk on #git
Quoted 4 lines · Jakub Narebski
[Cc: [email protected]]
David K?gedal wrote:
Quoted 11 lines
Quoted 8 lines
(quoted diff) +0
-0@@ -123,6 +123,7 @@
;;;###autoload
(defun git-blame-mode (&optional arg)
+ "Minor mode for displaying Git blame"
(interactive "P")
(if arg
(setq git-blame-mode (eq arg 1))We should probably also change file description in header, and autoload instruction in Installation: section of commentary:
Agreed.
Quoted 5 lines
;;; git-blame.el --- Minor mode for displaying Git blame -*- coding: utf-8 -*- ;;
[...]
Quoted 8 lines
;; If you do not want to load this package before it is necessary, you ;; can make use of the `autoload' feature, e.g. by adding to your .emacs ;; the following lines
;;
;; (autoload 'git-blame-mode "git-blame"
;; "Minor mode for displaying Git blame" t)(docstring is needed because INTERACTIVE is _fourth_ parameter).
Yes? Of course you need the doc string here, since the file isn't loaded yet.
Signature · 1 line
David Kågedal