]> code.delx.au - gnu-emacs-elpa/commitdiff
Remove workaround for bug#11929
authorDmitry Gutov <dgutov@yandex.ru>
Tue, 17 Jul 2012 03:33:23 +0000 (07:33 +0400)
committerDmitry Gutov <dgutov@yandex.ru>
Tue, 17 Jul 2012 03:33:23 +0000 (07:33 +0400)
The initialization is already deferred anyway.

diff-hl.el

index 6ac0d24782cd3fc4b960b0b041092def9934fcb9..b733efe8508896e174c5222afa559b24505819fe 100644 (file)
 \r
 (defun diff-hl-changes ()\r
   (let* ((buf-name " *diff-hl* ")\r
-         (file (buffer-file-name))\r
+         (file buffer-file-name)\r
          (backend (vc-backend file))\r
          res)\r
     (when (and backend (not (eq (vc-state file backend) 'up-to-date)))\r
@@ -302,9 +302,7 @@ in the source file, or the last line of the hunk above it."
   "Turn on `diff-hl-mode' or `diff-hl-dir-mode' in a buffer if appropriate."\r
   (when (window-system) ;; No fringes in the console.\r
     (cond\r
-     ;; FIXME: Why is this called twice for each buffer?\r
-     ;; Isn't fundamental-mode supposed to not run any hooks?\r
-     ((and buffer-file-name (not (eq major-mode (default-value 'major-mode))))\r
+     (buffer-file-name\r
       (diff-hl-mode 1))\r
      ((eq major-mode 'vc-dir-mode)\r
       (diff-hl-dir-mode 1)))))\r