From: Jan Djärv Date: Sat, 14 Jul 2012 09:08:36 +0000 (+0200) Subject: *** empty log message *** X-Git-Tag: emacs-24.2.90~1200 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=044080727ca76118afbd1cc35f85dbef7582030e;p=emacs.git *** empty log message *** --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 15ed6d89943..2915af65d15 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-07-14 Jan Djärv + + * progmodes/cc-cmds.el (c-defun-name): Recognize Objective-C methods + also (Bug#7879). + 2012-07-14 Chong Yidong * electric.el (electric-pair-post-self-insert-function): Fix pair diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 4a3577bb29b..94b296bf59e 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -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)