.emacs-my
changeset 1162 aadda3d1653c
parent 1158 89f674f09ca3
child 1163 e7728b2522b2
equal deleted inserted replaced
1161:31aedac51dd2 1162:aadda3d1653c
  2107 (message "vc-mode, VCS, version control, cvs, svn, mercurial, hg, bazaar, bzr, git, fossil")
  2107 (message "vc-mode, VCS, version control, cvs, svn, mercurial, hg, bazaar, bzr, git, fossil")
  2108 
  2108 
  2109 ;; `-b' switch to ignore changes in whitespaces.
  2109 ;; `-b' switch to ignore changes in whitespaces.
  2110 ;; (setq vc-git-diff-switches "-b")
  2110 ;; (setq vc-git-diff-switches "-b")
  2111 ;; (setq vc-diff-switches "-b")
  2111 ;; (setq vc-diff-switches "-b")
       
  2112 
       
  2113 (defun my-vc-root-diff (prefix)
       
  2114   "Same as `vc-root-diff' but for Hg with C-u show latest MQ patch and
       
  2115 with C-u C-u show MQ patch and local changes."
       
  2116   (interactive "P")
       
  2117   (if (and prefix (eq (vc-deduce-backend) 'Hg) (eq (vc-hg-command nil t "." "log" "-r" "qparent") 0))
       
  2118       (let* ( (rootdir (vc-call-backend 'Hg 'root default-directory)) (default-directory rootdir) )
       
  2119         (cond
       
  2120          ((equal prefix '(4))
       
  2121           (vc-diff-internal t (list 'Hg (list rootdir)) "qparent" "qtip"))
       
  2122          ((equal prefix '(16))
       
  2123           (vc-diff-internal t (list 'Hg (list rootdir)) "qparent" nil)) ))
       
  2124     (call-interactively 'vc-root-diff nil)))
       
  2125 
       
  2126 (global-set-key (kbd "C-x v D") 'my-vc-root-diff)
  2112 
  2127 
  2113 (when (equal window-system 'w32)
  2128 (when (equal window-system 'w32)
  2114   (modify-coding-system-alist 'process "cvs" '(cp1251-dos . cp1251-dos))
  2129   (modify-coding-system-alist 'process "cvs" '(cp1251-dos . cp1251-dos))
  2115   (modify-coding-system-alist 'process "svn" '(cp1251 . cp1251))
  2130   (modify-coding-system-alist 'process "svn" '(cp1251 . cp1251))
  2116   (setq vc-svn-checkin-switches '("--encoding" "UTF-8"))
  2131   (setq vc-svn-checkin-switches '("--encoding" "UTF-8"))