home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / cvs14p9b.zip / cvs / cvs-format.el < prev    next >
Lisp/Scheme  |  1994-11-05  |  2KB  |  76 lines

  1. ;; -*- lisp-interaction -*-
  2. ;; -*- emacs-lisp -*-
  3. ;;
  4. ;;
  5. ;; originally from...
  6. ;;    Rich's personal .emacs file.  feel free to copy.
  7. ;;
  8. ;; Last Mod Wed Feb 5 16:11:47 PST 1992, by rich@cygnus.com
  9. ;;
  10.  
  11. ;;
  12. ;;
  13. ;;    This section sets constants used by c-mode for formating
  14. ;;
  15. ;;
  16.  
  17.  
  18. ;;  If `c-auto-newline' is non-`nil', newlines are inserted both
  19. ;;before and after braces that you insert, and after colons and semicolons.
  20. ;;Correct C indentation is done on all the lines that are made this way.
  21.  
  22. (setq c-auto-newline nil)
  23.  
  24.  
  25. ;;*Non-nil means TAB in C mode should always reindent the current line,
  26. ;;regardless of where in the line point is when the TAB command is used.
  27. ;;It might be desirable to set this to nil for CVS, since unlike GNU
  28. ;; CVS often uses comments over to the right separated by TABs.
  29. ;; Depends some on whether you're in the habit of using TAB to
  30. ;; reindent.
  31. ;(setq c-tab-always-indent nil)
  32.  
  33. ;;  C does not have anything analogous to particular function names for which
  34. ;;special forms of indentation are desirable.  However, it has a different
  35. ;;need for customization facilities: many different styles of C indentation
  36. ;;are in common use.
  37. ;;
  38. ;;  There are six variables you can set to control the style that Emacs C
  39. ;;mode will use.
  40. ;;
  41. ;;`c-indent-level'     
  42. ;;     Indentation of C statements within surrounding block.  The surrounding
  43. ;;     block's indentation is the indentation of the line on which the
  44. ;;     open-brace appears.
  45.  
  46. (setq c-indent-level 4)
  47.  
  48. ;;`c-continued-statement-offset'     
  49. ;;     Extra indentation given to a substatement, such as the then-clause of
  50. ;;     an if or body of a while.
  51.  
  52. (setq c-continued-statement-offset 4)
  53.  
  54. ;;`c-brace-offset'     
  55. ;;     Extra indentation for line if it starts with an open brace.
  56.  
  57. (setq c-brace-offset -4)
  58.  
  59. ;;`c-brace-imaginary-offset'     
  60. ;;     An open brace following other text is treated as if it were this far
  61. ;;     to the right of the start of its line.
  62.  
  63. (setq c-brace-imaginary-offset 0)
  64.  
  65. ;;`c-argdecl-indent'     
  66. ;;     Indentation level of declarations of C function arguments.
  67.  
  68. (setq c-argdecl-indent 4)
  69.  
  70. ;;`c-label-offset'     
  71. ;;     Extra indentation for line that is a label, or case or default.
  72.  
  73. (setq c-label-offset -4)
  74.  
  75. ;;;; eof
  76.