openbsd-ports/editors/jed/patches/patch-lib_jed_rc
2004-01-11 05:14:08 +00:00

34 lines
1020 B
Plaintext

$OpenBSD: patch-lib_jed_rc,v 1.2 2004/01/11 05:14:08 brad Exp $
--- lib/jed.rc.orig 2002-10-20 02:55:30.000000000 -0400
+++ lib/jed.rc 2004-01-10 23:56:55.000000000 -0500
@@ -152,7 +152,7 @@ CASE_SEARCH = 0; % zero turns off cas
%---------------------------------------------------------------------------
% C-mode indentation style
%---------------------------------------------------------------------------
-c_set_style ("jed"); % or "linux", "gnu", "bsd", "k&r"
+c_set_style ("knf"); % or "jed" or "linux", "gnu", "bsd", "k&r"
#ifdef IBMPC_SYSTEM
% If non-zero, treat file names as case sensitive
@@ -241,3 +241,20 @@ define dired_hook ()
%local_unsetkey ("^K");
%local_setkey ("dired_kill_line", "^K");
}
+
+define c_set_style_hook (style)
+{
+ if (strlow(style) == "knf")
+ {
+ TAB_DEFAULT = 8;
+ USE_TABS = 1;
+ ADD_NEWLINE = 1;
+ C_INDENT = 8;
+ C_BRACE = 0;
+ C_BRA_NEWLINE = 0;
+ C_CONTINUED_OFFSET = 0;
+ C_Colon_Offset = 0;
+ C_Class_Offset = 0;
+ C_Comment_Column = 0;
+ }
+}