Skip to content
Snippets Groups Projects
Commit e754a302 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Merge branch 'master' of gitlab.delpinux.fr:delpino/dot-emacs

parents b52ae6b7 43538eb5
Branches master
No related tags found
No related merge requests found
......@@ -1019,6 +1019,24 @@ checkout -p~)
:color blue))
#+END_SRC
Affiche les statistiques ~git~ dans la Modeline
#+BEGIN_SRC emacs-lisp
(defadvice vc-git-mode-line-string (after plus-minus (file) compile activate)
"Show the information of git diff on modeline."
(setq ad-return-value
(concat (propertize ad-return-value 'face '(:foreground "white" :weight bold))
" ["
(let ((plus-minus (vc-git--run-command-string
file "diff" "--numstat" "--")))
(if (and plus-minus
(string-match "^\\([0-9]+\\)\t\\([0-9]+\\)\t" plus-minus))
(concat
(propertize (format "+%s" (match-string 1 plus-minus)) 'face '(:foreground "green3"))
(propertize (format "-%s" (match-string 2 plus-minus)) 'face '(:inherit font-lock-warning-face)))
(propertize "✔" 'face '(:foreground "green3" :weight bold))))
"]")))
#+END_SRC
** FlySpell
Correcteur orthographique à la volée.
#+BEGIN_SRC emacs-lisp
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment