From: Richard M. Stallman Date: Sun, 27 Jul 1997 19:25:02 +0000 (+0000) Subject: (compile-command): More doc fix. X-Git-Tag: emacs-20.1~939 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=61c4aaf86e54f3300e5b1ca9a71984ef390db53d;p=emacs.git (compile-command): More doc fix. --- diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 01bbef5afea..cca20639a0c 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -422,14 +422,15 @@ nil as an element means to try the default directory." 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 () - (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))))))" + (add-hook 'c-mode-hook + (function + (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)