]> git.eshelyaron.com Git - emacs.git/commitdiff
(compile-command): Doc fix.
authorRichard M. Stallman <rms@gnu.org>
Fri, 25 Jul 1997 19:02:00 +0000 (19:02 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 25 Jul 1997 19:02:00 +0000 (19:02 +0000)
lisp/progmodes/compile.el

index 1b42f43f751c48d707e5042e476d1579786b6f7f..01bbef5afea43724cc7082604c9804ad5d74cc87 100644 (file)
@@ -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)