Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

README.md

setup-compile.el

Commentary:

setup-compile.el provides a command that makes it easy to quickly set a sensible compile command for the given buffer. Essentially it checks to see if there's a Makefile in the directory and, if there isn't, it builds a command that should do the job.

A call to setup-compile is generally best done in a major mode's hook. These days I'm using it with use-package like this:

(use-package cc-mode
  :ensure t
  :config
  (add-hook 'c-mode-hook   #'setup-compile)
  (add-hook 'c++-mode-hook #'setup-compile)
  :bind
  (:map c-mode-map   ("RET" . newline-and-indent))
  (:map c++-mode-map ("RET" . newline-and-indent)))

About

Set up the compile command for an emacs buffer

Resources

You can’t perform that action at this time.