diff options
| author | Stephen Eglen | 1998-04-09 12:31:57 +0000 |
|---|---|---|
| committer | Stephen Eglen | 1998-04-09 12:31:57 +0000 |
| commit | e4df16d0071a611af7c2834a85c5256e85b9ee1f (patch) | |
| tree | 0c24528992d0685258383d4d3af13878e6ea987a /lisp | |
| parent | 1c36bac652a4d902810b1dac081123ebbaa7387d (diff) | |
| download | emacs-e4df16d0071a611af7c2834a85c5256e85b9ee1f.tar.gz emacs-e4df16d0071a611af7c2834a85c5256e85b9ee1f.zip | |
Customize
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/progmodes/c-mode.el | 65 | ||||
| -rw-r--r-- | lisp/progmodes/cplus-md.el | 35 | ||||
| -rw-r--r-- | lisp/progmodes/m4-mode.el | 23 |
3 files changed, 90 insertions, 33 deletions
diff --git a/lisp/progmodes/c-mode.el b/lisp/progmodes/c-mode.el index 5a19a42e134..ab9cf8dc992 100644 --- a/lisp/progmodes/c-mode.el +++ b/lisp/progmodes/c-mode.el | |||
| @@ -30,6 +30,11 @@ | |||
| 30 | ;; and do M-x describe-mode for details. | 30 | ;; and do M-x describe-mode for details. |
| 31 | 31 | ||
| 32 | ;;; Code: | 32 | ;;; Code: |
| 33 | (defgroup old-c nil | ||
| 34 | "Old C code editing commands for Emacs." | ||
| 35 | :prefix "c-" | ||
| 36 | :group 'languages) | ||
| 37 | |||
| 33 | 38 | ||
| 34 | (defvar c-mode-abbrev-table nil | 39 | (defvar c-mode-abbrev-table nil |
| 35 | "Abbrev table in use in C mode.") | 40 | "Abbrev table in use in C mode.") |
| @@ -114,21 +119,35 @@ The expansion is entirely correct because it uses the C preprocessor." | |||
| 114 | (modify-syntax-entry ?| "." c-mode-syntax-table) | 119 | (modify-syntax-entry ?| "." c-mode-syntax-table) |
| 115 | (modify-syntax-entry ?\' "\"" c-mode-syntax-table)) | 120 | (modify-syntax-entry ?\' "\"" c-mode-syntax-table)) |
| 116 | 121 | ||
| 117 | (defconst c-indent-level 2 | 122 | (defcustom c-indent-level 2 |
| 118 | "*Indentation of C statements with respect to containing block.") | 123 | "*Indentation of C statements with respect to containing block." |
| 119 | (defconst c-brace-imaginary-offset 0 | 124 | :type 'integer |
| 120 | "*Imagined indentation of a C open brace that actually follows a statement.") | 125 | :group 'old-c) |
| 121 | (defconst c-brace-offset 0 | 126 | (defcustom c-brace-imaginary-offset 0 |
| 122 | "*Extra indentation for braces, compared with other text in same context.") | 127 | "*Imagined indentation of a C open brace that actually follows a statement." |
| 123 | (defconst c-argdecl-indent 5 | 128 | :type 'integer |
| 124 | "*Indentation level of declarations of C function arguments.") | 129 | :group 'old-c) |
| 125 | (defconst c-label-offset -2 | 130 | (defcustom c-brace-offset 0 |
| 126 | "*Offset of C label lines and case statements relative to usual indentation.") | 131 | "*Extra indentation for braces, compared with other text in same context." |
| 127 | (defconst c-continued-statement-offset 2 | 132 | :type 'integer |
| 128 | "*Extra indent for lines not starting new statements.") | 133 | :group 'old-c) |
| 129 | (defconst c-continued-brace-offset 0 | 134 | (defcustom c-argdecl-indent 5 |
| 135 | "*Indentation level of declarations of C function arguments." | ||
| 136 | :type 'integer | ||
| 137 | :group 'old-c) | ||
| 138 | (defcustom c-label-offset -2 | ||
| 139 | "*Offset of C label lines and case statements relative to usual indentation." | ||
| 140 | :type 'integer | ||
| 141 | :group 'old-c) | ||
| 142 | (defcustom c-continued-statement-offset 2 | ||
| 143 | "*Extra indent for lines not starting new statements." | ||
| 144 | :type 'integer | ||
| 145 | :group 'old-c) | ||
| 146 | (defcustom c-continued-brace-offset 0 | ||
| 130 | "*Extra indent for substatements that start with open-braces. | 147 | "*Extra indent for substatements that start with open-braces. |
| 131 | This is in addition to `c-continued-statement-offset'.") | 148 | This is in addition to `c-continued-statement-offset'." |
| 149 | :type 'integer | ||
| 150 | :group 'old-c) | ||
| 132 | (defconst c-style-alist | 151 | (defconst c-style-alist |
| 133 | '(("GNU" | 152 | '(("GNU" |
| 134 | (c-indent-level . 2) | 153 | (c-indent-level . 2) |
| @@ -167,15 +186,19 @@ This is in addition to `c-continued-statement-offset'.") | |||
| 167 | (c-label-offset . -4) | 186 | (c-label-offset . -4) |
| 168 | (c-continued-statement-offset . 4)))) | 187 | (c-continued-statement-offset . 4)))) |
| 169 | 188 | ||
| 170 | (defconst c-auto-newline nil | 189 | (defcustom c-auto-newline nil |
| 171 | "*Non-nil means automatically newline before and after braces, | 190 | "*Non-nil means automatically newline before and after braces, |
| 172 | and after colons and semicolons, inserted in C code. | 191 | and after colons and semicolons, inserted in C code. |
| 173 | If you do not want a leading newline before braces then use: | 192 | If you do not want a leading newline before braces then use: |
| 174 | (define-key c-mode-map \"{\" 'electric-c-semi)") | 193 | (define-key c-mode-map \"{\" 'electric-c-semi)" |
| 194 | :type 'boolean | ||
| 195 | :group 'old-c) | ||
| 175 | 196 | ||
| 176 | (defconst c-tab-always-indent t | 197 | (defcustom c-tab-always-indent t |
| 177 | "*Non-nil means TAB in C mode should always reindent the current line, | 198 | "*Non-nil means TAB in C mode should always reindent the current line, |
| 178 | regardless of where in the line point is when the TAB command is used.") | 199 | regardless of where in the line point is when the TAB command is used." |
| 200 | :type 'boolean | ||
| 201 | :group 'old-c) | ||
| 179 | 202 | ||
| 180 | ;;; Regular expression used internally to recognize labels in switch | 203 | ;;; Regular expression used internally to recognize labels in switch |
| 181 | ;;; statements. | 204 | ;;; statements. |
| @@ -1504,8 +1527,10 @@ Available styles are GNU, K&R, BSD and Whitesmith." | |||
| 1504 | 1527 | ||
| 1505 | ;;; This page handles insertion and removal of backslashes for C macros. | 1528 | ;;; This page handles insertion and removal of backslashes for C macros. |
| 1506 | 1529 | ||
| 1507 | (defvar c-backslash-column 48 | 1530 | (defcustom c-backslash-column 48 |
| 1508 | "*Minimum column for end-of-line backslashes of macro definitions.") | 1531 | "*Minimum column for end-of-line backslashes of macro definitions." |
| 1532 | :type 'integer | ||
| 1533 | :group 'old-c) | ||
| 1509 | 1534 | ||
| 1510 | (defun c-backslash-region (from to delete-flag) | 1535 | (defun c-backslash-region (from to delete-flag) |
| 1511 | "Insert, align, or delete end-of-line backslashes on the lines in the region. | 1536 | "Insert, align, or delete end-of-line backslashes on the lines in the region. |
diff --git a/lisp/progmodes/cplus-md.el b/lisp/progmodes/cplus-md.el index dbbe19125c1..8eef19dba16 100644 --- a/lisp/progmodes/cplus-md.el +++ b/lisp/progmodes/cplus-md.el | |||
| @@ -97,6 +97,11 @@ | |||
| 97 | 97 | ||
| 98 | ;;; Code: | 98 | ;;; Code: |
| 99 | 99 | ||
| 100 | (defgroup old-c++ nil | ||
| 101 | "Old C++ code editing mode for Emacs." | ||
| 102 | :prefix "c-" | ||
| 103 | :group 'languages) | ||
| 104 | |||
| 100 | (defvar c++-mode-abbrev-table nil | 105 | (defvar c++-mode-abbrev-table nil |
| 101 | "Abbrev table used in C++ mode.") | 106 | "Abbrev table used in C++ mode.") |
| 102 | (define-abbrev-table 'c++-mode-abbrev-table ()) | 107 | (define-abbrev-table 'c++-mode-abbrev-table ()) |
| @@ -143,19 +148,29 @@ | |||
| 143 | (modify-syntax-entry ?\n ">" c++-mode-syntax-table) | 148 | (modify-syntax-entry ?\n ">" c++-mode-syntax-table) |
| 144 | (modify-syntax-entry ?\^m ">" c++-mode-syntax-table)) | 149 | (modify-syntax-entry ?\^m ">" c++-mode-syntax-table)) |
| 145 | 150 | ||
| 146 | (defvar c++-continued-member-init-offset nil | 151 | (defcustom c++-continued-member-init-offset nil |
| 147 | "*Extra indent for continuation lines of member inits; | 152 | "*Extra indent for continuation lines of member inits; |
| 148 | nil means to align with previous initializations rather than | 153 | nil means to align with previous initializations rather than |
| 149 | with the colon on the first line.") | 154 | with the colon on the first line." |
| 150 | (defvar c++-member-init-indent 0 | 155 | :type '(choice (const nil) integer) |
| 151 | "*Indentation level of member initializations in function declarations.") | 156 | :group 'old-c++) |
| 152 | (defvar c++-friend-offset -4 | 157 | (defcustom c++-member-init-indent 0 |
| 153 | "*Offset of C++ friend declarations relative to member declarations.") | 158 | "*Indentation level of member initializations in function declarations." |
| 154 | (defvar c++-electric-colon t | 159 | :type 'integer |
| 155 | "*If t, colon is an electric terminator.") | 160 | :group 'old-c++) |
| 156 | (defvar c++-empty-arglist-indent nil | 161 | (defcustom c++-friend-offset -4 |
| 162 | "*Offset of C++ friend declarations relative to member declarations." | ||
| 163 | :type 'integer | ||
| 164 | :group 'old-c++) | ||
| 165 | (defcustom c++-electric-colon t | ||
| 166 | "*If t, colon is an electric terminator." | ||
| 167 | :type 'boolean | ||
| 168 | :group 'old-c++) | ||
| 169 | (defcustom c++-empty-arglist-indent nil | ||
| 157 | "*Indicates how far to indent an line following an empty argument | 170 | "*Indicates how far to indent an line following an empty argument |
| 158 | list. Nil indicates to just after the paren.") | 171 | list. Nil indicates to just after the paren." |
| 172 | :type '(choice (const nil) integer) | ||
| 173 | :group 'old-c++) | ||
| 159 | 174 | ||
| 160 | (defvar c++-imenu-generic-expression | 175 | (defvar c++-imenu-generic-expression |
| 161 | (` | 176 | (` |
diff --git a/lisp/progmodes/m4-mode.el b/lisp/progmodes/m4-mode.el index ddf91a3742b..dc1aae1bff2 100644 --- a/lisp/progmodes/m4-mode.el +++ b/lisp/progmodes/m4-mode.el | |||
| @@ -41,17 +41,29 @@ | |||
| 41 | 41 | ||
| 42 | ;;; Code: | 42 | ;;; Code: |
| 43 | 43 | ||
| 44 | (defvar m4-program | 44 | (defgroup m4 nil |
| 45 | "m4 code editing commands for Emacs." | ||
| 46 | :prefix "m4-" | ||
| 47 | :group 'languages) | ||
| 48 | |||
| 49 | (defcustom m4-program | ||
| 45 | (cond | 50 | (cond |
| 46 | ((file-exists-p "/usr/local/bin/m4") "/usr/local/bin/m4") | 51 | ((file-exists-p "/usr/local/bin/m4") "/usr/local/bin/m4") |
| 47 | ((file-exists-p "/usr/bin/m4") "/usr/bin/m4") | 52 | ((file-exists-p "/usr/bin/m4") "/usr/bin/m4") |
| 48 | ((file-exists-p "/bin/m4") "/bin/m4") | 53 | ((file-exists-p "/bin/m4") "/bin/m4") |
| 49 | ((file-exists-p "/usr/ccs/bin/m4") "/usr/ccs/bin/m4") | 54 | ((file-exists-p "/usr/ccs/bin/m4") "/usr/ccs/bin/m4") |
| 55 | ( t "m4") | ||
| 50 | ) | 56 | ) |
| 51 | "File name of the m4 executable.") | 57 | "File name of the m4 executable." |
| 58 | :type 'file | ||
| 59 | :group 'm4) | ||
| 52 | 60 | ||
| 53 | ;;options to m4 | 61 | ;;options to m4 |
| 54 | (defconst m4-program-options nil) | 62 | (defcustom m4-program-options nil |
| 63 | "Options to pass to `m4-program'." | ||
| 64 | :type '(repeat string) | ||
| 65 | :group 'm4) | ||
| 66 | |||
| 55 | ;;to use --prefix-builtins, you can use | 67 | ;;to use --prefix-builtins, you can use |
| 56 | ;;(defconst m4-program-options '("-P")) | 68 | ;;(defconst m4-program-options '("-P")) |
| 57 | ;;or | 69 | ;;or |
| @@ -69,6 +81,11 @@ | |||
| 69 | "Default font-lock-keywords for m4 mode.") | 81 | "Default font-lock-keywords for m4 mode.") |
| 70 | ) | 82 | ) |
| 71 | 83 | ||
| 84 | (defcustom m4-mode-hook nil | ||
| 85 | "*Hook called by `m4-mode'." | ||
| 86 | :type 'hook | ||
| 87 | :group 'm4) | ||
| 88 | |||
| 72 | ;;this may still need some work | 89 | ;;this may still need some work |
| 73 | (defvar m4-mode-syntax-table nil | 90 | (defvar m4-mode-syntax-table nil |
| 74 | "syntax table used in m4 mode") | 91 | "syntax table used in m4 mode") |