299 |
|
|
300 |
;; these variables should always be buffer local; they do not affect |
;; these variables should always be buffer local; they do not affect |
301 |
;; indentation style. |
;; indentation style. |
|
(make-local-variable 'require-final-newline) |
|
302 |
(make-local-variable 'parse-sexp-ignore-comments) |
(make-local-variable 'parse-sexp-ignore-comments) |
303 |
(make-local-variable 'indent-line-function) |
(make-local-variable 'indent-line-function) |
304 |
(make-local-variable 'indent-region-function) |
(make-local-variable 'indent-region-function) |
325 |
'c-indent-new-comment-line))) |
'c-indent-new-comment-line))) |
326 |
|
|
327 |
;; now set their values |
;; now set their values |
328 |
(setq require-final-newline t |
(setq parse-sexp-ignore-comments t |
|
parse-sexp-ignore-comments t |
|
329 |
indent-line-function 'c-indent-line |
indent-line-function 'c-indent-line |
330 |
indent-region-function 'c-indent-region |
indent-region-function 'c-indent-region |
331 |
outline-regexp "[^#\n\^M]" |
outline-regexp "[^#\n\^M]" |
335 |
comment-start-skip "/\\*+ *\\|//+ *" |
comment-start-skip "/\\*+ *\\|//+ *" |
336 |
comment-multi-line t) |
comment-multi-line t) |
337 |
|
|
338 |
|
;; Install `c-fill-paragraph' on `fill-paragraph-function' so that a |
339 |
|
;; direct call to `fill-paragraph' behaves better. This still |
340 |
|
;; doesn't work with filladapt but it's better than nothing. |
341 |
|
(make-local-variable 'fill-paragraph-function) |
342 |
|
(setq fill-paragraph-function 'c-fill-paragraph) |
343 |
|
|
344 |
|
;; Set `require-final-newline' only if we should. |
345 |
|
(let ((rfn (assq mode c-require-final-newline))) |
346 |
|
(when rfn |
347 |
|
(make-local-variable 'require-final-newline) |
348 |
|
(setq require-final-newline (cdr rfn)))) |
349 |
|
|
350 |
;; Fix keyword regexps. |
;; Fix keyword regexps. |
351 |
(c-init-language-vars) |
(c-init-language-vars) |
352 |
|
|