Created
November 29, 2013 01:32
-
-
Save vvuk/7700393 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
(require 'filecache) | |
(defun file-cache-add-from-file (file &optional prefix) | |
"Read filenames from FILE, one line per file, and add them to | |
the file cache. If prefix is given, stick that prefix at the | |
start of every line before adding to file cache." | |
(interactive "fAdd files from file: ") | |
(set-buffer (get-buffer-create file-cache-buffer)) | |
(erase-buffer) | |
(insert-file file) | |
(if (not (eq prefix nil)) | |
(progn (goto-char 0) | |
(replace-regexp "^" prefix))) | |
(file-cache-add-from-file-cache-buffer)) | |
(defun file-cache-file-for-dir (file dir) | |
(if (file-exists-p file) | |
(file-cache-add-from-file file dir))) | |
(file-cache-file-for-dir "c:/proj/moz/mozilla-central/.git/emacs-file-list" | |
"c:/proj/moz/mozilla-central/") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment