# HG changeset patch # User Richard M. Stallman # Date 1023144972 0 # Node ID 9d60ac21968fb476a927ba416fbb1a04e5e9e384 # Parent b01cd9b1ae081510a160e8cdf6507ae2f30d90d4 (c-postprocess-file-styles): Do nothing except in CC modes. diff -r b01cd9b1ae08 -r 9d60ac21968f lisp/progmodes/cc-mode.el --- a/lisp/progmodes/cc-mode.el Mon Jun 03 22:55:26 2002 +0000 +++ b/lisp/progmodes/cc-mode.el Mon Jun 03 22:56:12 2002 +0000 @@ -391,17 +391,18 @@ 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)