From 61c4aaf86e54f3300e5b1ca9a71984ef390db53d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 27 Jul 1997 19:25:02 +0000 Subject: [PATCH] (compile-command): More doc fix. --- lisp/progmodes/compile.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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) -- 2.39.5