mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-27 07:37:33 +00:00
Added provide.
This commit is contained in:
parent
ada9a4fdf9
commit
f95f9d2b33
@ -183,22 +183,22 @@ regardless of where in the line point is when the TAB command is used.")
|
|||||||
|
|
||||||
;; This is actually the expression for C++ mode, but it's used for C too.
|
;; This is actually the expression for C++ mode, but it's used for C too.
|
||||||
(defvar c-imenu-generic-expression
|
(defvar c-imenu-generic-expression
|
||||||
(`
|
(`
|
||||||
((nil
|
((nil
|
||||||
(,
|
(,
|
||||||
(concat
|
(concat
|
||||||
"^" ; beginning of line is required
|
"^" ; beginning of line is required
|
||||||
"\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>"
|
"\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>"
|
||||||
"\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no
|
"\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no
|
||||||
"\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right?
|
"\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right?
|
||||||
|
|
||||||
"\\(" ; last type spec including */&
|
"\\(" ; last type spec including */&
|
||||||
"[a-zA-Z0-9_:]+"
|
"[a-zA-Z0-9_:]+"
|
||||||
"\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace
|
"\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace
|
||||||
"\\)?" ; if there is a last type spec
|
"\\)?" ; if there is a last type spec
|
||||||
"\\(" ; name; take that into the imenu entry
|
"\\(" ; name; take that into the imenu entry
|
||||||
"[a-zA-Z0-9_:~]+" ; member function, ctor or dtor...
|
"[a-zA-Z0-9_:~]+" ; member function, ctor or dtor...
|
||||||
; (may not contain * because then
|
; (may not contain * because then
|
||||||
; "a::operator char*" would become "char*"!)
|
; "a::operator char*" would become "char*"!)
|
||||||
"\\|"
|
"\\|"
|
||||||
"\\([a-zA-Z0-9_:~]*::\\)?operator"
|
"\\([a-zA-Z0-9_:~]*::\\)?operator"
|
||||||
@ -209,10 +209,10 @@ regardless of where in the line point is when the TAB command is used.")
|
|||||||
; catch cases with () inside the parentheses
|
; catch cases with () inside the parentheses
|
||||||
; surrounding the parameters
|
; surrounding the parameters
|
||||||
; (like "int foo(int a=bar()) {...}"
|
; (like "int foo(int a=bar()) {...}"
|
||||||
|
|
||||||
)) 6)
|
)) 6)
|
||||||
("Class"
|
("Class"
|
||||||
(, (concat
|
(, (concat
|
||||||
"^" ; beginning of line is required
|
"^" ; beginning of line is required
|
||||||
"\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>"
|
"\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>"
|
||||||
"class[ \t]+"
|
"class[ \t]+"
|
||||||
@ -223,20 +223,20 @@ regardless of where in the line point is when the TAB command is used.")
|
|||||||
;; Uncomment if you want to find these too. It will be a bit slower gathering
|
;; Uncomment if you want to find these too. It will be a bit slower gathering
|
||||||
;; the indexes.
|
;; the indexes.
|
||||||
; ("Prototypes"
|
; ("Prototypes"
|
||||||
; (,
|
; (,
|
||||||
; (concat
|
; (concat
|
||||||
; "^" ; beginning of line is required
|
; "^" ; beginning of line is required
|
||||||
; "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>"
|
; "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>"
|
||||||
; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no
|
; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no
|
||||||
; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right?
|
; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right?
|
||||||
|
|
||||||
; "\\(" ; last type spec including */&
|
; "\\(" ; last type spec including */&
|
||||||
; "[a-zA-Z0-9_:]+"
|
; "[a-zA-Z0-9_:]+"
|
||||||
; "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace
|
; "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace
|
||||||
; "\\)?" ; if there is a last type spec
|
; "\\)?" ; if there is a last type spec
|
||||||
; "\\(" ; name; take that into the imenu entry
|
; "\\(" ; name; take that into the imenu entry
|
||||||
; "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor...
|
; "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor...
|
||||||
; ; (may not contain * because then
|
; ; (may not contain * because then
|
||||||
; ; "a::operator char*" would become "char*"!)
|
; ; "a::operator char*" would become "char*"!)
|
||||||
; "\\|"
|
; "\\|"
|
||||||
; "\\([a-zA-Z0-9_:~]*::\\)?operator"
|
; "\\([a-zA-Z0-9_:~]*::\\)?operator"
|
||||||
@ -246,8 +246,8 @@ regardless of where in the line point is when the TAB command is used.")
|
|||||||
; ; the (...) Can't
|
; ; the (...) Can't
|
||||||
; ; catch cases with () inside the parentheses
|
; ; catch cases with () inside the parentheses
|
||||||
; ; surrounding the parameters
|
; ; surrounding the parameters
|
||||||
; ; (like "int foo(int a=bar());"
|
; ; (like "int foo(int a=bar());"
|
||||||
; )) 6)
|
; )) 6)
|
||||||
; ("Struct"
|
; ("Struct"
|
||||||
; (, (concat
|
; (, (concat
|
||||||
; "^" ; beginning of line is required
|
; "^" ; beginning of line is required
|
||||||
@ -420,7 +420,7 @@ preserving the comment indentation or line-starting decorations."
|
|||||||
(paragraph-start
|
(paragraph-start
|
||||||
;; Lines containing just a comment start or just an end
|
;; Lines containing just a comment start or just an end
|
||||||
;; should not be filled into paragraphs they are next to.
|
;; should not be filled into paragraphs they are next to.
|
||||||
(concat
|
(concat
|
||||||
paragraph-start
|
paragraph-start
|
||||||
"\\|[ \t]*/\\*[ \t]*$\\|[ \t]*\\*/[ \t]*$\\|[ \t/*]*$"))
|
"\\|[ \t]*/\\*[ \t]*$\\|[ \t]*\\*/[ \t]*$\\|[ \t/*]*$"))
|
||||||
(paragraph-separate
|
(paragraph-separate
|
||||||
@ -531,7 +531,7 @@ preserving the comment indentation or line-starting decorations."
|
|||||||
(paragraph-start
|
(paragraph-start
|
||||||
;; Lines containing just a comment start or just an end
|
;; Lines containing just a comment start or just an end
|
||||||
;; should not be filled into paragraphs they are next to.
|
;; should not be filled into paragraphs they are next to.
|
||||||
(concat
|
(concat
|
||||||
paragraph-start
|
paragraph-start
|
||||||
"\\|[ \t]*/\\*[ \t]*$\\|[ \t]*\\*/[ \t]*$\\|[ \t/*]*$"))
|
"\\|[ \t]*/\\*[ \t]*$\\|[ \t]*\\*/[ \t]*$\\|[ \t/*]*$"))
|
||||||
(paragraph-separate
|
(paragraph-separate
|
||||||
@ -549,8 +549,8 @@ preserving the comment indentation or line-starting decorations."
|
|||||||
(if comment-start-place
|
(if comment-start-place
|
||||||
(goto-char comment-start-place)
|
(goto-char comment-start-place)
|
||||||
(search-backward "/*"))
|
(search-backward "/*"))
|
||||||
;; Protect text before the comment start
|
;; Protect text before the comment start
|
||||||
;; by excluding it. Add spaces to bring back
|
;; by excluding it. Add spaces to bring back
|
||||||
;; proper indentation of that point.
|
;; proper indentation of that point.
|
||||||
(let ((column (current-column)))
|
(let ((column (current-column)))
|
||||||
(prog1 (point)
|
(prog1 (point)
|
||||||
@ -971,7 +971,7 @@ Returns nil if line starts inside a string, t if in a comment."
|
|||||||
;; The first following code counts
|
;; The first following code counts
|
||||||
;; if it is before the line we want to indent.
|
;; if it is before the line we want to indent.
|
||||||
(and (< (point) indent-point)
|
(and (< (point) indent-point)
|
||||||
(-
|
(-
|
||||||
(if (> colon-line-end (point))
|
(if (> colon-line-end (point))
|
||||||
(- (current-indentation) c-label-offset)
|
(- (current-indentation) c-label-offset)
|
||||||
(current-column))
|
(current-column))
|
||||||
@ -1174,7 +1174,7 @@ If within a string or comment, move by sentences instead of statements."
|
|||||||
(not (re-search-forward "[;{}]" end t)))))))
|
(not (re-search-forward "[;{}]" end t)))))))
|
||||||
(re-search-backward "[;}]")
|
(re-search-backward "[;}]")
|
||||||
(forward-char 1))
|
(forward-char 1))
|
||||||
(error
|
(error
|
||||||
(let ((beg (point)))
|
(let ((beg (point)))
|
||||||
(backward-up-list -1)
|
(backward-up-list -1)
|
||||||
(let ((end (point)))
|
(let ((end (point)))
|
||||||
@ -1511,7 +1511,7 @@ Available styles are GNU, K&R, BSD and Whitesmith."
|
|||||||
With no argument, inserts backslashes and aligns existing backslashes.
|
With no argument, inserts backslashes and aligns existing backslashes.
|
||||||
With an argument, deletes the backslashes.
|
With an argument, deletes the backslashes.
|
||||||
|
|
||||||
This function does not modify the last line of the region if the region ends
|
This function does not modify the last line of the region if the region ends
|
||||||
right at the start of the following line; it does not modify blank lines
|
right at the start of the following line; it does not modify blank lines
|
||||||
at the start of the region. So you can put the region around an entire macro
|
at the start of the region. So you can put the region around an entire macro
|
||||||
definition and conveniently use this command."
|
definition and conveniently use this command."
|
||||||
@ -1644,5 +1644,7 @@ move backward across a preprocessor conditional."
|
|||||||
(setq count (+ count increment))))
|
(setq count (+ count increment))))
|
||||||
(push-mark)
|
(push-mark)
|
||||||
(goto-char new)))
|
(goto-char new)))
|
||||||
|
|
||||||
|
(provide 'c-mode)
|
||||||
|
|
||||||
;;; c-mode.el ends here
|
;;; c-mode.el ends here
|
||||||
|
Loading…
Reference in New Issue
Block a user