From 09f90d2ca8e34f8e7e091fcb1cbb50fe8a8efbe7 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 3 Jun 2002 22:56:12 +0000 Subject: [PATCH] (c-postprocess-file-styles): Do nothing except in CC modes. --- lisp/progmodes/cc-mode.el | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 435d5291322..40e5a3107a8 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -391,17 +391,18 @@ it finds in `c-file-offsets'. Note that the style variables are always made local to the buffer." ;; apply file styles and offsets - (if (or c-file-style c-file-offsets) - (c-make-styles-buffer-local t)) - (and c-file-style - (c-set-style c-file-style)) - (and c-file-offsets - (mapcar - (lambda (langentry) - (let ((langelem (car langentry)) - (offset (cdr langentry))) - (c-set-offset langelem offset))) - c-file-offsets))) + (when c-buffer-is-cc-mode + (if (or c-file-style c-file-offsets) + (c-make-styles-buffer-local t)) + (and c-file-style + (c-set-style c-file-style)) + (and c-file-offsets + (mapcar + (lambda (langentry) + (let ((langelem (car langentry)) + (offset (cdr langentry))) + (c-set-offset langelem offset))) + c-file-offsets)))) (add-hook 'hack-local-variables-hook 'c-postprocess-file-styles) -- 2.39.5