Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
3646bcd6
Commit
3646bcd6
authored
Jul 21, 2012
by
Leo Liu
Browse files
* lisp/progmodes/cc-cmds.el (c-defun-name): Handle objc selectors properly.
Fixes: debbugs:7879
parent
fe1a523f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
lisp/ChangeLog
lisp/ChangeLog
+3
-0
lisp/progmodes/cc-cmds.el
lisp/progmodes/cc-cmds.el
+10
-8
No files found.
lisp/ChangeLog
View file @
3646bcd6
2012-07-20 Leo Liu <sdl.web@gmail.com>
* progmodes/cc-cmds.el (c-defun-name): Handle objc selectors properly.
(Bug#7879)
* progmodes/cc-langs.el (c-symbol-start): Include char _ (bug#11986).
2012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
...
...
lisp/progmodes/cc-cmds.el
View file @
3646bcd6
...
...
@@ -1826,14 +1826,16 @@ with a brace block."
;; DEFFLAGSET(syslog_opt_flags,LOG_PID ...) ==> syslog_opt_flags
(
match-string-no-properties
1
))
;; Objective-C method starting with + or -.
((
and
(
derived-mode-p
'objc-mode
)
(
looking-at
"[-+]\s*("
))
(
when
(
c-syntactic-re-search-forward
")\s*"
nil
t
)
(
c-forward-token-2
)
(
setq
name-end
(
point
))
(
c-backward-token-2
)
(
buffer-substring-no-properties
(
point
)
name-end
)))
;; Objc selectors.
((
assq
'objc-method-intro
(
c-guess-basic-syntax
))
(
let
((
bound
(
save-excursion
(
c-end-of-statement
)
(
point
)))
(
kw-re
(
concat
"\\(?:"
c-symbol-key
"\\)?:"
))
(
stretches
))
(
when
(
c-syntactic-re-search-forward
c-symbol-key
bound
t
t
t
)
(
push
(
match-string
0
)
stretches
)
(
while
(
c-syntactic-re-search-forward
kw-re
bound
t
t
t
)
(
push
(
match-string
0
)
stretches
)))
(
apply
'concat
(
nreverse
stretches
))))
(
t
;; Normal function or initializer.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment