diff options
| author | Roland McGrath | 1996-02-21 07:29:19 +0000 |
|---|---|---|
| committer | Roland McGrath | 1996-02-21 07:29:19 +0000 |
| commit | f95f9d2b3302315423081bfbafd93231c3179b1c (patch) | |
| tree | 2070373195a9878765202b7e4a905fe8537111a3 | |
| parent | ada9a4fdf9936f50e38200a1a945d3e82f313e3e (diff) | |
| download | emacs-f95f9d2b3302315423081bfbafd93231c3179b1c.tar.gz emacs-f95f9d2b3302315423081bfbafd93231c3179b1c.zip | |
Added provide.
| -rw-r--r-- | lisp/progmodes/c-mode.el | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/lisp/progmodes/c-mode.el b/lisp/progmodes/c-mode.el index 22d598b0786..f3364457e18 100644 --- a/lisp/progmodes/c-mode.el +++ b/lisp/progmodes/c-mode.el | |||
| @@ -183,22 +183,22 @@ regardless of where in the line point is when the TAB command is used.") | |||
| 183 | 183 | ||
| 184 | ;; This is actually the expression for C++ mode, but it's used for C too. | 184 | ;; This is actually the expression for C++ mode, but it's used for C too. |
| 185 | (defvar c-imenu-generic-expression | 185 | (defvar c-imenu-generic-expression |
| 186 | (` | 186 | (` |
| 187 | ((nil | 187 | ((nil |
| 188 | (, | 188 | (, |
| 189 | (concat | 189 | (concat |
| 190 | "^" ; beginning of line is required | 190 | "^" ; beginning of line is required |
| 191 | "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>" | 191 | "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>" |
| 192 | "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no | 192 | "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no |
| 193 | "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right? | 193 | "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right? |
| 194 | 194 | ||
| 195 | "\\(" ; last type spec including */& | 195 | "\\(" ; last type spec including */& |
| 196 | "[a-zA-Z0-9_:]+" | 196 | "[a-zA-Z0-9_:]+" |
| 197 | "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace | 197 | "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace |
| 198 | "\\)?" ; if there is a last type spec | 198 | "\\)?" ; if there is a last type spec |
| 199 | "\\(" ; name; take that into the imenu entry | 199 | "\\(" ; name; take that into the imenu entry |
| 200 | "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor... | 200 | "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor... |
| 201 | ; (may not contain * because then | 201 | ; (may not contain * because then |
| 202 | ; "a::operator char*" would become "char*"!) | 202 | ; "a::operator char*" would become "char*"!) |
| 203 | "\\|" | 203 | "\\|" |
| 204 | "\\([a-zA-Z0-9_:~]*::\\)?operator" | 204 | "\\([a-zA-Z0-9_:~]*::\\)?operator" |
| @@ -209,10 +209,10 @@ regardless of where in the line point is when the TAB command is used.") | |||
| 209 | ; catch cases with () inside the parentheses | 209 | ; catch cases with () inside the parentheses |
| 210 | ; surrounding the parameters | 210 | ; surrounding the parameters |
| 211 | ; (like "int foo(int a=bar()) {...}" | 211 | ; (like "int foo(int a=bar()) {...}" |
| 212 | 212 | ||
| 213 | )) 6) | 213 | )) 6) |
| 214 | ("Class" | 214 | ("Class" |
| 215 | (, (concat | 215 | (, (concat |
| 216 | "^" ; beginning of line is required | 216 | "^" ; beginning of line is required |
| 217 | "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>" | 217 | "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>" |
| 218 | "class[ \t]+" | 218 | "class[ \t]+" |
| @@ -223,20 +223,20 @@ regardless of where in the line point is when the TAB command is used.") | |||
| 223 | ;; Uncomment if you want to find these too. It will be a bit slower gathering | 223 | ;; Uncomment if you want to find these too. It will be a bit slower gathering |
| 224 | ;; the indexes. | 224 | ;; the indexes. |
| 225 | ; ("Prototypes" | 225 | ; ("Prototypes" |
| 226 | ; (, | 226 | ; (, |
| 227 | ; (concat | 227 | ; (concat |
| 228 | ; "^" ; beginning of line is required | 228 | ; "^" ; beginning of line is required |
| 229 | ; "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>" | 229 | ; "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>" |
| 230 | ; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no | 230 | ; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no |
| 231 | ; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right? | 231 | ; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right? |
| 232 | 232 | ||
| 233 | ; "\\(" ; last type spec including */& | 233 | ; "\\(" ; last type spec including */& |
| 234 | ; "[a-zA-Z0-9_:]+" | 234 | ; "[a-zA-Z0-9_:]+" |
| 235 | ; "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace | 235 | ; "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace |
| 236 | ; "\\)?" ; if there is a last type spec | 236 | ; "\\)?" ; if there is a last type spec |
| 237 | ; "\\(" ; name; take that into the imenu entry | 237 | ; "\\(" ; name; take that into the imenu entry |
| 238 | ; "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor... | 238 | ; "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor... |
| 239 | ; ; (may not contain * because then | 239 | ; ; (may not contain * because then |
| 240 | ; ; "a::operator char*" would become "char*"!) | 240 | ; ; "a::operator char*" would become "char*"!) |
| 241 | ; "\\|" | 241 | ; "\\|" |
| 242 | ; "\\([a-zA-Z0-9_:~]*::\\)?operator" | 242 | ; "\\([a-zA-Z0-9_:~]*::\\)?operator" |
| @@ -246,8 +246,8 @@ regardless of where in the line point is when the TAB command is used.") | |||
| 246 | ; ; the (...) Can't | 246 | ; ; the (...) Can't |
| 247 | ; ; catch cases with () inside the parentheses | 247 | ; ; catch cases with () inside the parentheses |
| 248 | ; ; surrounding the parameters | 248 | ; ; surrounding the parameters |
| 249 | ; ; (like "int foo(int a=bar());" | 249 | ; ; (like "int foo(int a=bar());" |
| 250 | ; )) 6) | 250 | ; )) 6) |
| 251 | ; ("Struct" | 251 | ; ("Struct" |
| 252 | ; (, (concat | 252 | ; (, (concat |
| 253 | ; "^" ; beginning of line is required | 253 | ; "^" ; beginning of line is required |
| @@ -420,7 +420,7 @@ preserving the comment indentation or line-starting decorations." | |||
| 420 | (paragraph-start | 420 | (paragraph-start |
| 421 | ;; Lines containing just a comment start or just an end | 421 | ;; Lines containing just a comment start or just an end |
| 422 | ;; should not be filled into paragraphs they are next to. | 422 | ;; should not be filled into paragraphs they are next to. |
| 423 | (concat | 423 | (concat |
| 424 | paragraph-start | 424 | paragraph-start |
| 425 | "\\|[ \t]*/\\*[ \t]*$\\|[ \t]*\\*/[ \t]*$\\|[ \t/*]*$")) | 425 | "\\|[ \t]*/\\*[ \t]*$\\|[ \t]*\\*/[ \t]*$\\|[ \t/*]*$")) |
| 426 | (paragraph-separate | 426 | (paragraph-separate |
| @@ -531,7 +531,7 @@ preserving the comment indentation or line-starting decorations." | |||
| 531 | (paragraph-start | 531 | (paragraph-start |
| 532 | ;; Lines containing just a comment start or just an end | 532 | ;; Lines containing just a comment start or just an end |
| 533 | ;; should not be filled into paragraphs they are next to. | 533 | ;; should not be filled into paragraphs they are next to. |
| 534 | (concat | 534 | (concat |
| 535 | paragraph-start | 535 | paragraph-start |
| 536 | "\\|[ \t]*/\\*[ \t]*$\\|[ \t]*\\*/[ \t]*$\\|[ \t/*]*$")) | 536 | "\\|[ \t]*/\\*[ \t]*$\\|[ \t]*\\*/[ \t]*$\\|[ \t/*]*$")) |
| 537 | (paragraph-separate | 537 | (paragraph-separate |
| @@ -549,8 +549,8 @@ preserving the comment indentation or line-starting decorations." | |||
| 549 | (if comment-start-place | 549 | (if comment-start-place |
| 550 | (goto-char comment-start-place) | 550 | (goto-char comment-start-place) |
| 551 | (search-backward "/*")) | 551 | (search-backward "/*")) |
| 552 | ;; Protect text before the comment start | 552 | ;; Protect text before the comment start |
| 553 | ;; by excluding it. Add spaces to bring back | 553 | ;; by excluding it. Add spaces to bring back |
| 554 | ;; proper indentation of that point. | 554 | ;; proper indentation of that point. |
| 555 | (let ((column (current-column))) | 555 | (let ((column (current-column))) |
| 556 | (prog1 (point) | 556 | (prog1 (point) |
| @@ -971,7 +971,7 @@ Returns nil if line starts inside a string, t if in a comment." | |||
| 971 | ;; The first following code counts | 971 | ;; The first following code counts |
| 972 | ;; if it is before the line we want to indent. | 972 | ;; if it is before the line we want to indent. |
| 973 | (and (< (point) indent-point) | 973 | (and (< (point) indent-point) |
| 974 | (- | 974 | (- |
| 975 | (if (> colon-line-end (point)) | 975 | (if (> colon-line-end (point)) |
| 976 | (- (current-indentation) c-label-offset) | 976 | (- (current-indentation) c-label-offset) |
| 977 | (current-column)) | 977 | (current-column)) |
| @@ -1174,7 +1174,7 @@ If within a string or comment, move by sentences instead of statements." | |||
| 1174 | (not (re-search-forward "[;{}]" end t))))))) | 1174 | (not (re-search-forward "[;{}]" end t))))))) |
| 1175 | (re-search-backward "[;}]") | 1175 | (re-search-backward "[;}]") |
| 1176 | (forward-char 1)) | 1176 | (forward-char 1)) |
| 1177 | (error | 1177 | (error |
| 1178 | (let ((beg (point))) | 1178 | (let ((beg (point))) |
| 1179 | (backward-up-list -1) | 1179 | (backward-up-list -1) |
| 1180 | (let ((end (point))) | 1180 | (let ((end (point))) |
| @@ -1511,7 +1511,7 @@ Available styles are GNU, K&R, BSD and Whitesmith." | |||
| 1511 | With no argument, inserts backslashes and aligns existing backslashes. | 1511 | With no argument, inserts backslashes and aligns existing backslashes. |
| 1512 | With an argument, deletes the backslashes. | 1512 | With an argument, deletes the backslashes. |
| 1513 | 1513 | ||
| 1514 | This function does not modify the last line of the region if the region ends | 1514 | This function does not modify the last line of the region if the region ends |
| 1515 | right at the start of the following line; it does not modify blank lines | 1515 | right at the start of the following line; it does not modify blank lines |
| 1516 | at the start of the region. So you can put the region around an entire macro | 1516 | at the start of the region. So you can put the region around an entire macro |
| 1517 | definition and conveniently use this command." | 1517 | definition and conveniently use this command." |
| @@ -1644,5 +1644,7 @@ move backward across a preprocessor conditional." | |||
| 1644 | (setq count (+ count increment)))) | 1644 | (setq count (+ count increment)))) |
| 1645 | (push-mark) | 1645 | (push-mark) |
| 1646 | (goto-char new))) | 1646 | (goto-char new))) |
| 1647 | |||
| 1648 | (provide 'c-mode) | ||
| 1647 | 1649 | ||
| 1648 | ;;; c-mode.el ends here | 1650 | ;;; c-mode.el ends here |