# HG changeset patch # User Richard M. Stallman # Date 869857320 0 # Node ID 528cead9a6c35e81d41f87876114493a707406b1 # Parent d22331526e2db5c8dfc13a62182e29bf57a13d87 (compile-command): Doc fix. diff -r d22331526e2d -r 528cead9a6c3 lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Fri Jul 25 18:12:53 1997 +0000 +++ b/lisp/progmodes/compile.el Fri Jul 25 19:02:00 1997 +0000 @@ -423,11 +423,13 @@ You might also use mode hooks to specify it in certain modes, like this: (setq c-mode-hook - '(lambda () (or (file-exists-p \"makefile\") (file-exists-p \"Makefile\") - (progn (make-local-variable 'compile-command) - (setq compile-command - (concat \"make -k \" - buffer-file-name))))))" + (lambda () + (unless (or (file-exists-p \"makefile\") + (file-exists-p \"Makefile\")) + (make-local-variable 'compile-command) + (setq compile-command + (concat \"make -k \" + (file-name-sans-extension buffer-file-name))))))" :type 'string :group 'compilation)