Created
January 2, 2013 20:37
-
-
Save johnfredcee/4437748 to your computer and use it in GitHub Desktop.
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
| ;; a convienence function that lets us switch between source/header files in a project | |
| (defun buffer-other-eproject-files () | |
| (interactive) | |
| (let* | |
| ((buffer-file (file-name-nondirectory (buffer-file-name))) | |
| (other-buffer-files | |
| (delq nil | |
| (mapcar (lambda (x) (and | |
| (equal (file-name-nondirectory (file-name-sans-extension x)) (file-name-sans-extension buffer-file)) | |
| (not (equal (file-name-nondirectory x) buffer-file)) | |
| x)) (eproject-list-project-files))))) | |
| (when (> (length other-buffer-files) 0) | |
| ;; TO DO : Possibly prompt if there is more than one.. | |
| (find-file (car other-buffer-files))))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment