[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Need help writing file-visiting macro
From: |
drkm |
Subject: |
Re: Need help writing file-visiting macro |
Date: |
Mon, 25 Jul 2005 19:44:36 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (windows-nt) |
Roy Smith writes:
> In article <7e7jfegat6.fsf@ada2.unipv.it>,
> Thien-Thi Nguyen <ttn@glug.org> wrote:
>>roy@panix.com (Roy Smith) writes:
>>> I want it to construct the corresponding _Impl.c filename and
>>> visit that file. Is that possible?
>>it is possible if the correspondance is at least heuristical.
> I'm not sure what you mean by "heuristical", but it certainly is
> deterministic. For a given file name X.mdl, the corresponding
> implementation file will be X_Impl.c.
So you just want the correspondance between the file *name*?
Ok:
(defun rs:get-impl-filename (mdl-name)
(unless (string-match "^\\(.+\\)\\.mdl$" mdl-name)
(error "Not a MDL file name" mdl-name))
(concat (match-string 1 mdl-name) "_Impl.c"))
--drkm
- Need help writing file-visiting macro, Roy Smith, 2005/07/25
- Re: Need help writing file-visiting macro, Thien-Thi Nguyen, 2005/07/25
- Re: Need help writing file-visiting macro, Sergei Organov, 2005/07/25
- Re: Need help writing file-visiting macro, rgb, 2005/07/25
- Re: Need help writing file-visiting macro, Kevin Rodgers, 2005/07/25
- Re: Need help writing file-visiting macro, Martin Slouf, 2005/07/25