(defun vhdl-rename-signal (searchDir) "renames signal starting from searchDir" (interactive "DEnter top-level directory to search: ") ;; first do dired
(find-dired searchDir "-name \*.vhd -or -name \*.qsf") (dired-toggle-marks) ;; now fancy stuff over direded files (message (dired-get-marked-files)) )
Whatever I tried, it does dired, it finds correctly files I want, however the execution of this function stops after find-dired and no further functions
are called (starting from dired-toggle-marks). Why?
What I'm trying to do is to write a simple function, which replaces occurence of one signal name to another one within a particular project. Normally I do it by
hand by issuing dired mode to look for all *.vhd and *.qsf, replacing old signal name by new using dired-do-query-replace-regexp. Then I have to do this procedure once more with *.do files (modelsim), but this time convert the replaced signal completely to lowercase and replace by its lowercase variant. This permits to rename
a single signal of VHDL code within all the Quartus project.
The function above is just a start of generation of first dired buffer. But maybe someone else has better idea how to do...