From: Richard M. Stallman Date: Fri, 25 Jul 1997 19:02:00 +0000 (+0000) Subject: (compile-command): Doc fix. X-Git-Tag: emacs-20.1~959 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f610c00ada6bc95f77863da4bc0bda7c5d27bddb;p=emacs.git (compile-command): Doc fix. --- 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)