aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman2002-06-03 22:56:12 +0000
committerRichard M. Stallman2002-06-03 22:56:12 +0000
commit09f90d2ca8e34f8e7e091fcb1cbb50fe8a8efbe7 (patch)
tree68c34cdcaa209f4abeab809ce34c88ef58f12251 /lisp
parentefa2c6d77f75dd4722fe97bd7a9be7f17c0f3fa3 (diff)
downloademacs-09f90d2ca8e34f8e7e091fcb1cbb50fe8a8efbe7.tar.gz
emacs-09f90d2ca8e34f8e7e091fcb1cbb50fe8a8efbe7.zip
(c-postprocess-file-styles): Do nothing except in CC modes.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/cc-mode.el23
1 files 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'.
391 391
392Note that the style variables are always made local to the buffer." 392Note that the style variables are always made local to the buffer."
393 ;; apply file styles and offsets 393 ;; apply file styles and offsets
394 (if (or c-file-style c-file-offsets) 394 (when c-buffer-is-cc-mode
395 (c-make-styles-buffer-local t)) 395 (if (or c-file-style c-file-offsets)
396 (and c-file-style 396 (c-make-styles-buffer-local t))
397 (c-set-style c-file-style)) 397 (and c-file-style
398 (and c-file-offsets 398 (c-set-style c-file-style))
399 (mapcar 399 (and c-file-offsets
400 (lambda (langentry) 400 (mapcar
401 (let ((langelem (car langentry)) 401 (lambda (langentry)
402 (offset (cdr langentry))) 402 (let ((langelem (car langentry))
403 (c-set-offset langelem offset))) 403 (offset (cdr langentry)))
404 c-file-offsets))) 404 (c-set-offset langelem offset)))
405 c-file-offsets))))
405 406
406(add-hook 'hack-local-variables-hook 'c-postprocess-file-styles) 407(add-hook 'hack-local-variables-hook 'c-postprocess-file-styles)
407 408