Mercurial > emacs
changeset 45632:9d60ac21968f
(c-postprocess-file-styles): Do nothing except in CC modes.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 03 Jun 2002 22:56:12 +0000 |
parents | b01cd9b1ae08 |
children | 929f8c01b822 |
files | lisp/progmodes/cc-mode.el |
diffstat | 1 files changed, 12 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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)