From f610c00ada6bc95f77863da4bc0bda7c5d27bddb Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 25 Jul 1997 19:02:00 +0000 Subject: [PATCH] (compile-command): Doc fix. --- lisp/progmodes/compile.el | 12 +++++++----- 1 file 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. 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) -- 2.39.5