+- auto insert
+- run script
+
+Change the compile-command to set the default command run when call =compile=
+Mapping =s-r= (on Mac, it's =Command + R= to run the script. Here =current-prefix-arg= is set
+to call =compilation= interactively.
+
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+
+ (defun my-perl-hook ()
+ (progn
+ (set (make-local-variable 'compile-command)
+ (concat "/usr/bin/perl "
+ (if buffer-file-name
+ (shell-quote-argument buffer-file-name))))
+ (local-set-key (kbd "s-r")
+ (lambda ()
+ (interactive)
+ (setq current-prefix-arg '(4)) ; C-u
+ (call-interactively 'compile)))))
+
+ (add-hook 'cperl-mode-hook 'my-perl-hook)
+
+#+END_SRC
+
+**
+** C & C++
+
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+
+ (setq c-default-style "k&r"
+ c-basic-offset 4)
+
+#+END_SRC
+