From unknown Sat Jun 21 05:15:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7879: 24.0.50; Wish: Make c-defun-name recognize objc-methods. Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Jan 2011 09:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7879 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 7879@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.129560038510675 (code B ref -1); Fri, 21 Jan 2011 09:00:03 +0000 Received: (at submit) by debbugs.gnu.org; 21 Jan 2011 08:59:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PgCqO-0002m8-FF for submit@debbugs.gnu.org; Fri, 21 Jan 2011 03:59:45 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PgCqM-0002lv-4c for submit@debbugs.gnu.org; Fri, 21 Jan 2011 03:59:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgCxx-0003yQ-KQ for submit@debbugs.gnu.org; Fri, 21 Jan 2011 04:07:35 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RFC_ABUSE_POST autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:38722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgCxx-0003yM-Hb for submit@debbugs.gnu.org; Fri, 21 Jan 2011 04:07:33 -0500 Received: from [140.186.70.92] (port=59422 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgCxw-0007Js-GL for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 04:07:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgCxu-0003y2-Uj for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 04:07:32 -0500 Received: from smtprelay-b12.telenor.se ([62.127.194.21]:57216) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgCxu-0003xW-J5 for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 04:07:30 -0500 Received: from ipb2.telenor.se (ipb2.telenor.se [195.54.127.165]) by smtprelay-b12.telenor.se (Postfix) with ESMTP id 78E49E86EF for ; Fri, 21 Jan 2011 10:07:18 +0100 (CET) X-SENDER-IP: [85.225.45.100] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsIuAM/aOE1V4S1kPGdsb2JhbACkYwwBAQEBNS++H4VQBI5E X-IronPort-AV: E=Sophos;i="4.60,357,1291590000"; d="scan'208";a="166229319" Received: from c-642de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.100]) by ipb2.telenor.se with ESMTP; 21 Jan 2011 10:07:18 +0100 Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id 5E3F67FA05A for ; Fri, 21 Jan 2011 10:07:17 +0100 (CET) Message-ID: <4D394CC5.6010605@swipnet.se> Date: Fri, 21 Jan 2011 10:07:17 +0100 From: Jan =?UTF-8?Q?Dj=C3=A4rv?= User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Spam-Score: -4.3 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your report will be posted to the bug-gnu-emacs@gnu.org mailing list and the gnu.emacs.bug news group, and at http://debbugs.gnu.org. Please describe exactly what actions triggered the bug and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': Hello. bug-cc-mode seems to be dead, so I send here instead. It always annoyed me that add-log always put objc-methods as "-". Internally add-log uses c-defun-name, so I'd like that defun to be changed so it recognizes objc-names. I have run with this for a while, it handles all cases I've seen, but I'm sure some constructs make it fail. At least it is better than returning "-". === modified file 'lisp/progmodes/cc-cmds.el' --- lisp/progmodes/cc-cmds.el 2010-10-31 11:54:02 +0000 +++ lisp/progmodes/cc-cmds.el 2010-12-02 09:03:09 +0000 @@ -1724,6 +1724,14 @@ ;; DEFFLAGSET(syslog_opt_flags,LOG_PID ...) ==> syslog_opt_flags (match-string-no-properties 1)) + ((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) Jan D. If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /Users/jhd/src/emacs/current/nextstep/Emacs.app/Contents/Resources/etc/DEBUG. In GNU Emacs 24.0.50.1 (x86_64-apple-darwin10.6.0, NS apple-appkit-1038.35) of 2011-01-21 on zeplin Windowing system distributor `Apple', version 10.3.1038 configured using `configure '--verbose' '--enable-asserts' '--with-ns' '--without-x' 'CFLAGS=-g'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: C value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: sv_SE.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: desktop-save-mode: t delete-selection-mode: t icomplete-mode: t display-time-mode: t tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: n M-x r e p o r t - e m Recent messages: Loading /Users/jhd/lib/elisp/BAK-file.el (source)...done Loading /Users/jhd/lib/elisp/ccsetup.el (source)...done Loading icomplete...done Loading desktop...done Warning: desktop file appears to be in use by PID 29264. Using it may cause conflicts. Use it anyway? (y or n) n Desktop file in use; not loaded. For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader emacsbug desktop cus-start cus-load msb delsel advice help-fns advice-preload icomplete cc-mode cc-fonts easymenu cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt time tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 13 12:26:47 2012 Received: (at control) by debbugs.gnu.org; 13 Jul 2012 16:26:47 +0000 Received: from localhost ([127.0.0.1]:39625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Spiha-0003JM-T0 for submit@debbugs.gnu.org; Fri, 13 Jul 2012 12:26:47 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:44501) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SpihY-0003JF-MZ for control@debbugs.gnu.org; Fri, 13 Jul 2012 12:26:45 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Spic6-0003aq-4t for control@debbugs.gnu.org; Fri, 13 Jul 2012 12:21:06 -0400 Date: Fri, 13 Jul 2012 12:21:06 -0400 Message-Id: Subject: control message for bug 9032 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) forcemerge 7879 9032 From unknown Sat Jun 21 05:15:34 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Subject: bug#7879: closed (Re: 24.0.50; Wish: Make c-defun-name recognize objc-methods.) Message-ID: References: <2DAB7E76-4A60-46AF-84E7-2DCEC525528C@swipnet.se> <4D394CC5.6010605@swipnet.se> X-Gnu-PR-Message: they-closed 7879 X-Gnu-PR-Package: emacs,cc-mode X-Gnu-PR-Keywords: patch Reply-To: 7879@debbugs.gnu.org Date: Sat, 14 Jul 2012 09:17:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1342257422-27240-1" This is a multi-part message in MIME format... ------------=_1342257422-27240-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #7879: 24.0.50; Wish: Make c-defun-name recognize objc-methods. which was filed against the emacs,cc-mode package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 7879@debbugs.gnu.org. --=20 7879: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D7879 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1342257422-27240-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 7879-done) by debbugs.gnu.org; 14 Jul 2012 09:16:33 +0000 Received: from localhost ([127.0.0.1]:40248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SpySm-00074g-TT for submit@debbugs.gnu.org; Sat, 14 Jul 2012 05:16:33 -0400 Received: from mailout.melmac.se ([62.20.26.67]:44929) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SpySl-00074Z-JL for 7879-done@debbugs.gnu.org; Sat, 14 Jul 2012 05:16:32 -0400 Received: from mail01.melmac.se (mail01.melmac.se [62.20.26.80]) by mailout.melmac.se (Postfix) with ESMTP id 112169B61 for <7879-done@debbugs.gnu.org>; Sat, 14 Jul 2012 11:10:48 +0200 (CEST) Received: (qmail 23154 invoked by uid 89); 14 Jul 2012 09:10:43 -0000 Received: from h-46-59-42-18.na.cust.bahnhof.se (HELO coolsville.localdomain) (boel.djarv@bdtv.se@46.59.42.18) by mail01.melmac.se with ESMTPA; 14 Jul 2012 09:10:43 -0000 Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id A9A187FA06C for <7879-done@debbugs.gnu.org>; Sat, 14 Jul 2012 11:10:47 +0200 (CEST) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1278) Subject: Re: 24.0.50; Wish: Make c-defun-name recognize objc-methods. From: =?iso-8859-1?Q?Jan_Dj=E4rv?= In-Reply-To: <4B76BAA5-4F8B-4ABA-A9ED-88E127CBE6B5@smparkes.net> Date: Sat, 14 Jul 2012 11:10:49 +0200 Content-Transfer-Encoding: 7bit Message-Id: <2DAB7E76-4A60-46AF-84E7-2DCEC525528C@swipnet.se> References: <83txyy1itx.fsf@gnu.org> <90208527-4A88-4E92-B27B-1A48D8E3646B@smparkes.net> <83vcj8bg3m.fsf@gnu.org> <4B76BAA5-4F8B-4ABA-A9ED-88E127CBE6B5@smparkes.net> To: 7879-done@debbugs.gnu.org X-Mailer: Apple Mail (2.1278) X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 7879-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) Patch checked in. Jan D. ------------=_1342257422-27240-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 21 Jan 2011 08:59:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PgCqO-0002m8-FF for submit@debbugs.gnu.org; Fri, 21 Jan 2011 03:59:45 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PgCqM-0002lv-4c for submit@debbugs.gnu.org; Fri, 21 Jan 2011 03:59:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgCxx-0003yQ-KQ for submit@debbugs.gnu.org; Fri, 21 Jan 2011 04:07:35 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RFC_ABUSE_POST autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:38722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgCxx-0003yM-Hb for submit@debbugs.gnu.org; Fri, 21 Jan 2011 04:07:33 -0500 Received: from [140.186.70.92] (port=59422 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgCxw-0007Js-GL for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 04:07:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgCxu-0003y2-Uj for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 04:07:32 -0500 Received: from smtprelay-b12.telenor.se ([62.127.194.21]:57216) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgCxu-0003xW-J5 for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 04:07:30 -0500 Received: from ipb2.telenor.se (ipb2.telenor.se [195.54.127.165]) by smtprelay-b12.telenor.se (Postfix) with ESMTP id 78E49E86EF for ; Fri, 21 Jan 2011 10:07:18 +0100 (CET) X-SENDER-IP: [85.225.45.100] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsIuAM/aOE1V4S1kPGdsb2JhbACkYwwBAQEBNS++H4VQBI5E X-IronPort-AV: E=Sophos;i="4.60,357,1291590000"; d="scan'208";a="166229319" Received: from c-642de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.100]) by ipb2.telenor.se with ESMTP; 21 Jan 2011 10:07:18 +0100 Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id 5E3F67FA05A for ; Fri, 21 Jan 2011 10:07:17 +0100 (CET) Message-ID: <4D394CC5.6010605@swipnet.se> Date: Fri, 21 Jan 2011 10:07:17 +0100 From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: 24.0.50; Wish: Make c-defun-name recognize objc-methods. Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your report will be posted to the bug-gnu-emacs@gnu.org mailing list and the gnu.emacs.bug news group, and at http://debbugs.gnu.org. Please describe exactly what actions triggered the bug and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': Hello. bug-cc-mode seems to be dead, so I send here instead. It always annoyed me that add-log always put objc-methods as "-". Internally add-log uses c-defun-name, so I'd like that defun to be changed so it recognizes objc-names. I have run with this for a while, it handles all cases I've seen, but I'm sure some constructs make it fail. At least it is better than returning "-". === modified file 'lisp/progmodes/cc-cmds.el' --- lisp/progmodes/cc-cmds.el 2010-10-31 11:54:02 +0000 +++ lisp/progmodes/cc-cmds.el 2010-12-02 09:03:09 +0000 @@ -1724,6 +1724,14 @@ ;; DEFFLAGSET(syslog_opt_flags,LOG_PID ...) ==> syslog_opt_flags (match-string-no-properties 1)) + ((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) Jan D. If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /Users/jhd/src/emacs/current/nextstep/Emacs.app/Contents/Resources/etc/DEBUG. In GNU Emacs 24.0.50.1 (x86_64-apple-darwin10.6.0, NS apple-appkit-1038.35) of 2011-01-21 on zeplin Windowing system distributor `Apple', version 10.3.1038 configured using `configure '--verbose' '--enable-asserts' '--with-ns' '--without-x' 'CFLAGS=-g'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: C value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: sv_SE.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: desktop-save-mode: t delete-selection-mode: t icomplete-mode: t display-time-mode: t tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: n M-x r e p o r t - e m Recent messages: Loading /Users/jhd/lib/elisp/BAK-file.el (source)...done Loading /Users/jhd/lib/elisp/ccsetup.el (source)...done Loading icomplete...done Loading desktop...done Warning: desktop file appears to be in use by PID 29264. Using it may cause conflicts. Use it anyway? (y or n) n Desktop file in use; not loaded. For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader emacsbug desktop cus-start cus-load msb delsel advice help-fns advice-preload icomplete cc-mode cc-fonts easymenu cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt time tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs) ------------=_1342257422-27240-1-- From unknown Sat Jun 21 05:15:34 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Subject: bug#9032: closed (Re: 24.0.50; Wish: Make c-defun-name recognize objc-methods.) Message-ID: References: <2DAB7E76-4A60-46AF-84E7-2DCEC525528C@swipnet.se> <4E180CB5.2040304@swipnet.se> X-Gnu-PR-Message: they-closed 9032 X-Gnu-PR-Package: emacs,cc-mode X-Gnu-PR-Keywords: patch Reply-To: 9032@debbugs.gnu.org Date: Sat, 14 Jul 2012 09:17:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1342257422-27240-3" This is a multi-part message in MIME format... ------------=_1342257422-27240-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #7879: 24.0.50; Cc-mode does not recognize objective-C method names. which was filed against the emacs,cc-mode package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 9032@debbugs.gnu.org. --=20 7879: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D7879 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1342257422-27240-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 7879-done) by debbugs.gnu.org; 14 Jul 2012 09:16:33 +0000 Received: from localhost ([127.0.0.1]:40248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SpySm-00074g-TT for submit@debbugs.gnu.org; Sat, 14 Jul 2012 05:16:33 -0400 Received: from mailout.melmac.se ([62.20.26.67]:44929) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SpySl-00074Z-JL for 7879-done@debbugs.gnu.org; Sat, 14 Jul 2012 05:16:32 -0400 Received: from mail01.melmac.se (mail01.melmac.se [62.20.26.80]) by mailout.melmac.se (Postfix) with ESMTP id 112169B61 for <7879-done@debbugs.gnu.org>; Sat, 14 Jul 2012 11:10:48 +0200 (CEST) Received: (qmail 23154 invoked by uid 89); 14 Jul 2012 09:10:43 -0000 Received: from h-46-59-42-18.na.cust.bahnhof.se (HELO coolsville.localdomain) (boel.djarv@bdtv.se@46.59.42.18) by mail01.melmac.se with ESMTPA; 14 Jul 2012 09:10:43 -0000 Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id A9A187FA06C for <7879-done@debbugs.gnu.org>; Sat, 14 Jul 2012 11:10:47 +0200 (CEST) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1278) Subject: Re: 24.0.50; Wish: Make c-defun-name recognize objc-methods. From: =?iso-8859-1?Q?Jan_Dj=E4rv?= In-Reply-To: <4B76BAA5-4F8B-4ABA-A9ED-88E127CBE6B5@smparkes.net> Date: Sat, 14 Jul 2012 11:10:49 +0200 Content-Transfer-Encoding: 7bit Message-Id: <2DAB7E76-4A60-46AF-84E7-2DCEC525528C@swipnet.se> References: <83txyy1itx.fsf@gnu.org> <90208527-4A88-4E92-B27B-1A48D8E3646B@smparkes.net> <83vcj8bg3m.fsf@gnu.org> <4B76BAA5-4F8B-4ABA-A9ED-88E127CBE6B5@smparkes.net> To: 7879-done@debbugs.gnu.org X-Mailer: Apple Mail (2.1278) X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 7879-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) Patch checked in. Jan D. ------------=_1342257422-27240-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 9 Jul 2011 08:09:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QfSbb-0007zz-W3 for submit@debbugs.gnu.org; Sat, 09 Jul 2011 04:09:40 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QfSbZ-0007zm-Mn for submit@debbugs.gnu.org; Sat, 09 Jul 2011 04:09:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QfSbT-0001Iw-Ab for submit@debbugs.gnu.org; Sat, 09 Jul 2011 04:09:32 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:57905) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QfSbT-0001Is-9A for submit@debbugs.gnu.org; Sat, 09 Jul 2011 04:09:31 -0400 Received: from eggs.gnu.org ([140.186.70.92]:42762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QfSbR-0005Ch-Ib for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2011 04:09:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QfSbQ-0001Ig-DP for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2011 04:09:29 -0400 Received: from smtprelay-b11.telenor.se ([62.127.194.20]:33679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QfSbQ-0001Ic-3e for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2011 04:09:28 -0400 Received: from ipb2.telenor.se (ipb2.telenor.se [195.54.127.165]) by smtprelay-b11.telenor.se (Postfix) with ESMTP id DC318EB68A for ; Sat, 9 Jul 2011 10:09:26 +0200 (CEST) X-SENDER-IP: [85.225.45.100] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjReAMMLGE5V4S1kPGdsb2JhbABTiQqeQwsBAQEBHhkNJYh9ow6eXIY4BJdSi0o X-IronPort-AV: E=Sophos;i="4.65,503,1304287200"; d="scan'208";a="205059213" Received: from c-642de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.100]) by ipb2.telenor.se with ESMTP; 09 Jul 2011 10:09:26 +0200 Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id 4BD0B7FA05A for ; Sat, 9 Jul 2011 10:09:26 +0200 (CEST) Message-ID: <4E180CB5.2040304@swipnet.se> Date: Sat, 09 Jul 2011 10:09:25 +0200 From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: 24.0.50; Cc-mode does not recognize objective-C method names. Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) Hello. To reproduce: emacs -Q nsterm.m C-s (void)logNot C-n C-n C-x 4 a The text in the ChangeLog is: * nsterm.m (-): When using add-log for objective-C files, you always get the function "-" in the ChangeLog. add-log uses c-defun-name, which does not do a very good job. The patch below fixes this. I have run this locally for a while and it works well on Emacs sources at least. It is always better than the current "-". I sent a bug report to bug-cc-mode about 6 moths ago, but that seems to be dead. === modified file 'lisp/progmodes/cc-cmds.el' --- lisp/progmodes/cc-cmds.el 2010-10-31 11:54:02 +0000 +++ lisp/progmodes/cc-cmds.el 2010-12-02 09:03:09 +0000 @@ -1724,6 +1724,14 @@ ;; DEFFLAGSET(syslog_opt_flags,LOG_PID ...) ==> syslog_opt_flags (match-string-no-properties 1)) + ((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) Jan D. If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /Users/jhd/bin/Emacs.app/Contents/Resources/etc/DEBUG. In GNU Emacs 24.0.50.1 (x86_64-apple-darwin10.8.0, NS apple-appkit-1038.36) of 2011-07-08 on zeplin Windowing system distributor `Apple', version 10.3.1038 configured using `configure '--verbose' '--enable-asserts' '--without-x' '--with-ns' 'CFLAGS=-g'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: C value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: sv_SE.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: x e m a c s b u r e p o r t - e < return> Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader emacsbug help-mode easymenu view time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs) ------------=_1342257422-27240-3--