diff options
| -rw-r--r-- | lisp/progmodes/compile.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 1b42f43f751..01bbef5afea 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -423,11 +423,13 @@ Sometimes it is useful for files to supply local values for this variable. | |||
| 423 | You might also use mode hooks to specify it in certain modes, like this: | 423 | You might also use mode hooks to specify it in certain modes, like this: |
| 424 | 424 | ||
| 425 | (setq c-mode-hook | 425 | (setq c-mode-hook |
| 426 | '(lambda () (or (file-exists-p \"makefile\") (file-exists-p \"Makefile\") | 426 | (lambda () |
| 427 | (progn (make-local-variable 'compile-command) | 427 | (unless (or (file-exists-p \"makefile\") |
| 428 | (setq compile-command | 428 | (file-exists-p \"Makefile\")) |
| 429 | (concat \"make -k \" | 429 | (make-local-variable 'compile-command) |
| 430 | buffer-file-name))))))" | 430 | (setq compile-command |
| 431 | (concat \"make -k \" | ||
| 432 | (file-name-sans-extension buffer-file-name))))))" | ||
| 431 | :type 'string | 433 | :type 'string |
| 432 | :group 'compilation) | 434 | :group 'compilation) |
| 433 | 435 | ||