From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: William Xu Newsgroups: gmane.emacs.bugs Subject: bug#15560: 24.3.50; [patch] * imenu.el (imenu--generic-function): Don't generate index for comments area. Date: Tue, 8 Oct 2013 16:17:04 +0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=bcaec53f346fe1ee6e04e8366486 X-Trace: ger.gmane.org 1381220298 16323 80.91.229.3 (8 Oct 2013 08:18:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Oct 2013 08:18:18 +0000 (UTC) To: 15560@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 08 10:18:21 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VTSUl-0006hg-1G for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Oct 2013 10:18:19 +0200 Original-Received: from localhost ([::1]:35182 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTSUg-00060d-3k for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Oct 2013 04:18:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTSUY-0005vm-Ki for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2013 04:18:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTSUX-0002w4-FM for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2013 04:18:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTSUX-0002w0-B4 for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2013 04:18:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VTSUU-0004xh-GQ for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2013 04:18:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: William Xu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Oct 2013 08:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15560 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.138122024019009 (code B ref -1); Tue, 08 Oct 2013 08:18:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Oct 2013 08:17:20 +0000 Original-Received: from localhost ([127.0.0.1]:33880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTSTn-0004wW-V0 for submit@debbugs.gnu.org; Tue, 08 Oct 2013 04:17:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33655) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTSTi-0004wK-Od for submit@debbugs.gnu.org; Tue, 08 Oct 2013 04:17:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTSTh-0002oh-BX for submit@debbugs.gnu.org; Tue, 08 Oct 2013 04:17:14 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:42141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTSTh-0002od-86 for submit@debbugs.gnu.org; Tue, 08 Oct 2013 04:17:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTSTc-0005tS-LD for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2013 04:17:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTSTa-0002ne-Ud for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2013 04:17:08 -0400 Original-Received: from mail-we0-x229.google.com ([2a00:1450:400c:c03::229]:47354) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTSTa-0002nQ-KN for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2013 04:17:06 -0400 Original-Received: by mail-we0-f169.google.com with SMTP id q58so3260031wes.14 for ; Tue, 08 Oct 2013 01:17:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=5TSr/uk64jj/08pNNaJoAY9OSV+KdGOWUFFICI5Bo54=; b=jxjCbV4ihl8AxkUdy+iW7kz6eIaPthFTWP6EQgN4jS8Y8CN4AeHfsNrCSBhS36zDHs snXt+j8pFgpB1X0XAeRcq0LhhPWcfI+0wsepVObKUFco723idHGxQldmOhAtJeBsf1Rv 3Dk/Xy0jflous3RHLGobX5Y0xEoMVREWxMo4ePOxY6a/YaJ9Ljre6avLgrxUCaFCUAT+ VfG3+OagopbxpSB4mBHw3TadueN2Iej3SK1E/00vlZkj1ECdJpHGzUdHs4Yfu/YaAIyi bxTFrrARUQ+dFxO9VbVo0IdpB6kqgPZOLMnzdS/RUX4bNz2D+M7Dj3XPvjqo+0ypksAa 9PCw== X-Received: by 10.180.20.77 with SMTP id l13mr374168wie.40.1381220225147; Tue, 08 Oct 2013 01:17:05 -0700 (PDT) Original-Received: by 10.217.91.72 with HTTP; Tue, 8 Oct 2013 01:17:04 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:79027 Archived-At: --bcaec53f346fe1ee6e04e8366486 Content-Type: multipart/alternative; boundary=bcaec53f346fe1ee6b04e8366484 --bcaec53f346fe1ee6b04e8366484 Content-Type: text/plain; charset=UTF-8 It is annoying when imenu generates index also for functions found in comments area. e.g., in c-mode: /* a : Modified filesys_init() : hello */ uint8 filesys_init( void ) { } imenu will generate two filesys_init, which makes imenu useless. This patch skips comment area completely. In this case, it will generate only one filesys_init. -William --bcaec53f346fe1ee6b04e8366484 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
It is annoying when imenu generates index also for fu= nctions found in
comments area.=C2=A0 e.g., in c-mode:

/*
a : = Modified filesys_init()
=C2=A0 : hello
*/

uint8 filesys_init( = void )
=C2=A0=C2=A0=C2=A0 {
=C2=A0=C2=A0=C2=A0 }

imenu will generate two= filesys_init, which makes imenu useless.

This patch skips comment a= rea completely.=C2=A0 In this case, it will
generate only one filesys_in= it.


-William
--bcaec53f346fe1ee6b04e8366484-- --bcaec53f346fe1ee6e04e8366486 Content-Type: application/octet-stream; name="0001-imenu.el-imenu-generic-function-Don-t-generate-index.patch" Content-Disposition: attachment; filename="0001-imenu.el-imenu-generic-function-Don-t-generate-index.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hmiuucg20 RnJvbSBlZDkyMzE1N2Q0MzI3M2E2ZDIxNDk4YjY0YTBjYTI4Njk4Mzg2NTFiIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBXaWxsaWFtIFh1IDx3a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0JCSAg OzsgSW5zZXJ0IHRoZSBpdGVtIHVubGVzcyBpdCBpcyBhbHJlYWR5IHByZXNlbnQuCi0JCSAgKHVu bGVzcyAobWVtYmVyIGl0ZW0gKGNkciBtZW51KSkKLQkJICAgIChzZXRjZHIgbWVudQotCQkJICAg IChjb25zIGl0ZW0gKGNkciBtZW51KSkpKSkKKyAgICAgICAgICAgICAgICA7OyBSZWNvcmQgdGhl IHN0YXJ0IG9mIHRoZSBsaW5lIGluIHdoaWNoIHRoZSBtYXRjaCBzdGFydHMuCisgICAgICAgICAg ICAgICAgOzsgVGhhdCdzIHRoZSBvZmZpY2lhbCBwb3NpdGlvbiBvZiB0aGlzIGRlZmluaXRpb24u CisgICAgICAgICAgICAgICAgKGdvdG8tY2hhciAobWF0Y2gtYmVnaW5uaW5nIGluZGV4KSkKKyAg ICAgICAgICAgICAgICAoYmVnaW5uaW5nLW9mLWxpbmUpCisgICAgICAgICAgICAgICAgKHNldHEg YmVnIChwb2ludCkpCisgICAgICAgICAgICAgICAgOzsgQWRkIHRoaXMgc29ydCBvZiBzdWJtZW51 IG9ubHkgd2hlbiB3ZSd2ZSBmb3VuZCBhbgorICAgICAgICAgICAgICAgIDs7IGl0ZW0gZm9yIGl0 LCBhdm9pZGluZyBlbXB0eSwgZHVmZiBtZW51cy4KKyAgICAgICAgICAgICAgICAodW5sZXNzIChh c3NvYyBtZW51LXRpdGxlIGluZGV4LWFsaXN0KQorICAgICAgICAgICAgICAgICAgKHB1c2ggKGxp c3QgbWVudS10aXRsZSkgaW5kZXgtYWxpc3QpKQorICAgICAgICAgICAgICAgIChpZiBpbWVudS11 c2UtbWFya2VycworICAgICAgICAgICAgICAgICAgICAoc2V0cSBiZWcgKGNvcHktbWFya2VyIGJl ZykpKQorICAgICAgICAgICAgICAgIChsZXQgKChpdGVtCisgICAgICAgICAgICAgICAgICAgICAg IChpZiBmdW5jdGlvbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgKG5jb25jIChsaXN0ICht YXRjaC1zdHJpbmctbm8tcHJvcGVydGllcyBpbmRleCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBiZWcgZnVuY3Rpb24pCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgcmVzdCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAoY29ucyAobWF0Y2gtc3Ry aW5nLW5vLXByb3BlcnRpZXMgaW5kZXgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg YmVnKSkpCisgICAgICAgICAgICAgICAgICAgICAgOzsgVGhpcyBpcyB0aGUgZGVzaXJlZCBzdWJt ZW51LAorICAgICAgICAgICAgICAgICAgICAgIDs7IHN0YXJ0aW5nIHdpdGggaXRzIHRpdGxlIChv ciBuaWwpLgorICAgICAgICAgICAgICAgICAgICAgIChtZW51IChhc3NvYyBtZW51LXRpdGxlIGlu ZGV4LWFsaXN0KSkpCisgICAgICAgICAgICAgICAgICAodW5sZXNzIChudGggOCAoc3ludGF4LXBw c3MpKSA7IGluc2lkZSBjb21tZW50IGJsb2NrPyAKKyAgICAgICAgICAgICAgICAgICAgOzsgSW5z ZXJ0IHRoZSBpdGVtIHVubGVzcyBpdCBpcyBhbHJlYWR5IHByZXNlbnQuCisgICAgICAgICAgICAg ICAgICAgICh1bmxlc3MgKG1lbWJlciBpdGVtIChjZHIgbWVudSkpCisgICAgICAgICAgICAgICAg ICAgICAgKHNldGNkciBtZW51CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY29ucyBp dGVtIChjZHIgbWVudSkpKSkpKQogCQk7OyBHbyB0byB0aGUgc3RhcnQgb2YgdGhlIG1hdGNoLCB0 byBtYWtlIHN1cmUgd2UKIAkJOzsga2VlcCBtYWtpbmcgcHJvZ3Jlc3MgYmFja3dhcmRzLgogCQko Z290by1jaGFyIHN0YXJ0KSkpKQotLSAKMS44LjEuMgoK --bcaec53f346fe1ee6e04e8366486--