1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-20 18:17:20 +00:00

Backport: Recognize Objective-C methods also in c-defun-name

Fixes: debbugs:7879
This commit is contained in:
Jan Djärv 2012-07-21 03:59:49 +08:00 committed by Leo Liu
parent 542dfbde70
commit fe1a523fd9
2 changed files with 14 additions and 0 deletions

View File

@ -11,6 +11,11 @@
* progmodes/cperl-mode.el (cperl-unwind-to-safe): Don't inf-loop at end
of narrowed buffer (bug#11966).
2012-07-14 Jan Djärv <jan.h.d@swipnet.se>
* progmodes/cc-cmds.el (c-defun-name): Recognize Objective-C methods
also (Bug#7879).
2012-07-09 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/sh-script.el (sh-syntax-propertize-function): Fix last

View File

@ -1826,6 +1826,15 @@ 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)))
(t
;; Normal function or initializer.
(when (c-syntactic-re-search-forward "[{(]" nil t)