From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthew Persico Newsgroups: gmane.emacs.help Subject: Re: Modify shell-script-mode for imenu Date: Wed, 17 Feb 2016 15:56:35 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1455742851 24764 80.91.229.3 (17 Feb 2016 21:00:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Feb 2016 21:00:51 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 17 22:00:51 2016 Return-path: Envelope-to: geh-help-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 1aW9DL-0008Bw-OB for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Feb 2016 22:00:47 +0100 Original-Received: from localhost ([::1]:33456 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aW9DK-0006h3-Um for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Feb 2016 16:00:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aW99d-0004FX-6e for help-gnu-emacs@gnu.org; Wed, 17 Feb 2016 15:56:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aW99c-0003hn-4D for help-gnu-emacs@gnu.org; Wed, 17 Feb 2016 15:56:57 -0500 Original-Received: from mail-vk0-x235.google.com ([2607:f8b0:400c:c05::235]:35774) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aW99b-0003hd-Vp for help-gnu-emacs@gnu.org; Wed, 17 Feb 2016 15:56:56 -0500 Original-Received: by mail-vk0-x235.google.com with SMTP id e6so26214960vkh.2 for ; Wed, 17 Feb 2016 12:56:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=RpWChewzaHwPSDTfwGl8cjPMGYI6q/+Btm/Yp/6cbXQ=; b=wf3J3BSHbn/YJtoghzLxhJ8jhIoL0Eq4MsPw6TdNwvgwmXG31TM8Dr5Xmbimtm6uXd a9Ft315/ra8kMTvcQQSZgFIWFYPXOZfY2Jo40Y7dhhXQtWfpPqa3TtF3kwgaAPo4aatD gWBa2hsnBYA0gyeWWoFWfm66xxD536tUOUDZEw5YovC1cN5Bdf3o3fHZ5rg1NUzKXybV N8Ab+X3XuO2TBpUw/FAnyFbN6DCeFloBJ9vmIOLEJrbbOTIUlDy5EGSoapRh+0qVJKwG B7cvfcCbf6hZo9z/ZFo35w8bZqCCOv04+3VTfWyhPrHAmy8eA7oCk7FoMcu3gWQTJKn7 Ir/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=RpWChewzaHwPSDTfwGl8cjPMGYI6q/+Btm/Yp/6cbXQ=; b=W/3kaUBe4OzM2LtAOkgGjA6jevLMzXs3v5zoC15yPqttW8uisigoGpAD2bFF0GsB4a pASlkh2s/XdAQ+urtz8BHMq3sOkfK606Wpq28x44+pNuskNv3fpBKZ1ElbszZRuI5fPd IrRWalsGV5L3GsmDrdweTWtFCX9qevFA0xXnRTMBIxOeONyu5a7xcutTTofhZ7peyvG5 8cGqqakx3JBdaSqSjSFYLpvaQd/jYVzwO6tVS4FuXy3ufULMjeLG/N8LdabE2gy4gUg5 XbTYgJ7R+9HnNny1iCPnOo7Gh66JANhqd1+mEK10nPXSzC5n4aNNdEHZWovjOTIARojo 3icg== X-Gm-Message-State: AG10YORhowTL9aPp9kKGs0qdr1/uIiKIjHkH1OswzxA0r6+ewFyKzwygVivDtHYosKhxczWgmDNZTyl++XzE7Q== X-Received: by 10.31.12.3 with SMTP id 3mr2900627vkm.28.1455742615268; Wed, 17 Feb 2016 12:56:55 -0800 (PST) Original-Received: by 10.176.7.97 with HTTP; Wed, 17 Feb 2016 12:56:35 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400c:c05::235 X-Mailman-Approved-At: Wed, 17 Feb 2016 16:00:30 -0500 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:109203 Archived-At: On Wed, Feb 17, 2016 at 3:25 PM, Matthew Persico wrote: > Greetings. > > imenu does not recognize bash functions of the form > > foo-bar() > { > ... > } > > i.e, functions with dashes in them. shell-script-mode does recognize them, > as they are properly highlighted. > > Both modes recognise > > foo_bar() > { > ... > } > > i.e, functions with underbars. > > I've been trying to use defadvice to wrap sh-current-defun-name and > sh-imenu-generic-expression to get imenu to be happy. But it isn't working > and, given that shell-script-mode DOES recognize the forms, I'm wondering > if it's not something in imenu that has to be adjusted. > > Does anyone have any ideas as to how I should proceed? > > -- > Matthew O. Persico > Turns out cannot defadvise a defcustom variable such as sh-imenu-generic-expression. Duh! If anyone is interested in what I eventually did: http://hastebin.com/oxalibopar.lisp -- Matthew O. Persico