Created
          November 7, 2013 10:14 
        
      - 
      
 - 
        
Save ifree/7352272 to your computer and use it in GitHub Desktop.  
    setup emacs vc environment
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | (defun setup-cc-path() | |
| (let (pathes libpath) | |
| (if (eq system-type 'windows-nt) | |
| (progn | |
| (setq pathes `( | |
| "C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin" | |
| "C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE" | |
| "C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE" | |
| "C:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/Tools" | |
| "C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include" | |
| "C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/Include" | |
| "C:/Program Files/Microsoft SDKs/Windows/v7.0A/Include" | |
| ,(getenv "PATH"))) | |
| (setq libpath `( | |
| "C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/lib" | |
| "C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/Lib" | |
| "C:/Program Files/Microsoft SDKs/Windows/v7.0A/Lib" | |
| ,(getenv "LIBPATH"))) | |
| (setq include `( | |
| "C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include" | |
| "C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/Include" | |
| "C:/Program Files/Microsoft SDKs/Windows/v7.0A/Include" | |
| ,(getenv "INCLUDE"))) | |
| (setenv "PATH" (mapconcat 'identity pathes path-separator)) | |
| (setenv "INCLUDE" (mapconcat 'identity include path-separator)) | |
| (setenv "LIB" (mapconcat 'identity libpath path-separator)) | |
| (setenv "LIBPATH" (mapconcat 'identity libpath path-separator)))))) | |
| (defun vc-compile() | |
| (interactive) | |
| (setup-cc-path) | |
| (let (command) | |
| (setq command | |
| (concat "cl.exe " (buffer-file-name))) | |
| (compile command)) | |
| ) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment