help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creates a directory structure for C/C++


From: Kevin Rodgers
Subject: Re: Creates a directory structure for C/C++
Date: Wed, 11 Jul 2007 01:29:33 -0600
User-agent: Thunderbird 1.5.0.12 (Macintosh/20070509)

Pedro Sa da Costa wrote:
Exists any emacs mode that creates automatically a C/C++ directory
structure and the respective makefile?

(add-hook 'c-mode-common-hook
          (lambda ()
            (dolist (subdir '("include" "src" "lib" "bin"))
              (unless (file-exists-p subdir)
                (make-directory subdir)))
            (unless (file-exists-p "Makefile")
              (write-region 1 1 "Makefile"))))

:-)

--
Kevin Rodgers
Denver, Colorado, USA





reply via email to

[Prev in Thread] Current Thread [Next in Thread]