cri*_*ito 8 emacs version-control perforce
我正在设置emacs以允许我使用perforce而不必使用p4v.
我已经看过emacs wiki并在网站上搜索,但似乎只有两个选项 - 两者都很旧.第一个选项是p4.el,最后一次更新是在2004年.第二个选项是与emacs VC组件的集成,最后一次更新于2007年8月.
来自SO的第二个链接似乎建议使用p4.el. 这仍然是推荐的建议吗?有没有人可以分享任何提示或技巧?
任何帮助\建议非常感谢.
克里斯
是的,p4.el 仍然是将 perforce 集成到 emacs 的推荐方法。它实施得很好,这也解释了为什么它自 2004 年以来就没有更新过。
我定制了一些东西,主要是为了添加和禁用一些快捷方式。
我还添加了从 emacs 调用一些 p4v 命令的可能性
(defun invoke-p4v-cmd (cmd)
(let ((file (if (equal major-mode 'dired-mode)
(dired-get-file-for-visit)
(buffer-file-name))))
(when file
(shell-command (concat "\"c:/Program Files/Perforce/p4v.exe\" -cmd \"" cmd " " file "\" &")))))
(defun op:p4v-timelapse ()
"show revision tree"
(interactive)
(invoke-p4v-cmd "annotate"))
(define-key p4-prefix-map "T" 'op:p4v-timelapse)
(defun op:p4v-tree ()
"show revision tree"
(interactive)
(invoke-p4v-cmd "tree"))
(define-key p4-prefix-map "g" 'op:p4v-tree)
(defun op:p4v-history ()
"Show history"
(interactive)
(invoke-p4v-cmd "history"))
(define-key p4-prefix-map "x" 'op:p4v-history)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1060 次 |
| 最近记录: |