From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 01 04:29:14 2013 Received: (at submit) by debbugs.gnu.org; 1 Apr 2013 08:29:14 +0000 Received: from localhost ([127.0.0.1]:55377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMa77-0004DG-8M for submit@debbugs.gnu.org; Mon, 01 Apr 2013 04:29:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51452) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMa6z-0004D0-0O for submit@debbugs.gnu.org; Mon, 01 Apr 2013 04:29:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMa49-0004ea-NL for submit@debbugs.gnu.org; Mon, 01 Apr 2013 04:26:13 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-109.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:42528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMa49-0004eU-KX for submit@debbugs.gnu.org; Mon, 01 Apr 2013 04:26:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMa46-00070u-Do for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2013 04:26:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMa41-0004cy-GJ for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2013 04:26:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41242) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMa41-0004ct-8x for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2013 04:26:01 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r318PxPw000512 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 1 Apr 2013 04:26:00 -0400 Received: from localhost (dhcp-193-94.nrt.redhat.com [10.64.193.94]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r318PwMS014320 for ; Mon, 1 Apr 2013 04:25:59 -0400 Date: Mon, 01 Apr 2013 17:25:58 +0900 (JST) Message-Id: <20130401.172558.1957612355855581733.yamato@redhat.com> To: bug-gnu-emacs@gnu.org Subject: [patch] add-log-current-defun-function for sh-mode From: Masatake YAMATO Organization: Red Hat Japan, Inc. Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit 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 (------) This is a feature request with a patch. Please, review the = patch and install it to the official source tree if appreciated. The patch comes from two parts: 1. definition of add-log-current-defun-function for sh-mode 2. Test case Mode own add-log-current-defun-function is not defined in sh-mode. So wc cannot pick up a function name with C-x 4 a. This patch implement it. ------------------------------------------------------------ revno: 112201 committer: Masatake YAMATO branch nick: emacs-sh-add-log timestamp: Mon 2013-04-01 17:22:03 +0900 message: * lisp/progmodes/sh-script.el (sh-current-defun-name): New function. * automated/add-log-tests.el: New file. diff: =3D=3D=3D modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-01 08:13:33 +0000 +++ lisp/ChangeLog 2013-04-01 08:22:03 +0000 @@ -1,5 +1,9 @@ 2013-04-01 Masatake YAMATO = + * progmodes/sh-script.el (sh-current-defun-name): New function. + +2013-04-01 Masatake YAMATO + * progmodes/sh-script.el (sh-imenu-generic-expression): Handle function names with a single character. = =3D=3D=3D modified file 'lisp/progmodes/sh-script.el' --- lisp/progmodes/sh-script.el 2013-04-01 08:13:33 +0000 +++ lisp/progmodes/sh-script.el 2013-04-01 08:22:03 +0000 @@ -353,6 +353,29 @@ :group 'sh-script :version "20.4") = + +(defun sh-current-defun-name () + "Find the name of function or variable at point. +For use in `add-log-current-defun-function'." + (save-excursion + (end-of-line) + (when (re-search-backward + (concat "\\(?:" + ;; function FOO + ;; function FOO() + "^\\s-*function\\s-+\\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*\\(?:()\= \)?" + "\\)\\|\\(?:" + ;; FOO() + "^\\s-*\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*()" + "\\)\\|\\(?:" + ;; FOO=3D + "^\\([[:alpha:]_][[:alnum:]_]*\\)=3D" + "\\)") + nil t) + (or (match-string-no-properties 1) + (match-string-no-properties 2) + (match-string-no-properties 3))))) + (defvar sh-shell-variables nil "Alist of shell variable names that should be included in completion= .= These are used for completion in addition to all the variables named @@ -1533,6 +1556,7 @@ (setq-local skeleton-newline-indent-rigidly t) (setq-local defun-prompt-regexp (concat "^\\(function[ \t]\\|[[:alnum:]]+[ \t]+()[ \t]+\\)")) + (setq-local add-log-current-defun-function #'sh-current-defun-name) ;; Parse or insert magic number for exec, and set all variables depe= nding ;; on the shell thus determined. (sh-set-shell =3D=3D=3D modified file 'test/ChangeLog' --- test/ChangeLog 2013-04-01 08:13:33 +0000 +++ test/ChangeLog 2013-04-01 08:22:03 +0000 @@ -1,5 +1,9 @@ 2013-04-01 Masatake YAMATO = + * automated/add-log-tests.el: New file. + +2013-04-01 Masatake YAMATO + * automated/imenu-tests.el: New file. = 2013-03-30 Fabi=E1n Ezequiel Gallina =3D=3D=3D added file 'test/automated/add-log-tests.el' --- test/automated/add-log-tests.el 1970-01-01 00:00:00 +0000 +++ test/automated/add-log-tests.el 2013-04-01 08:22:03 +0000 @@ -0,0 +1,84 @@ +;;; add-log-tests.el --- Test suite for add-log. + +;; Copyright (C) 2013 Free Software Foundation, Inc. + +;; Author: Masatake YAMATO +;; Keywords: vc tools + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published b= y +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Code: + +(require 'add-log) + +(defmacro add-log-current-defun-deftest (name doc major-mode + content marker expected-defun) + "Generate an ert test for mode-own `add-log-current-defun-function'.= +Run `add-log-current-defun' at the point where MARKER specifies in a +buffer which content is CONTENT under MAJOR-MODE. Then it compares the= +result with EXPECTED-DEFUN." + (let ((xname (intern (concat "add-log-current-defun-test-" + (symbol-name name) + )))) + `(ert-deftest ,xname () + ,doc + (with-temp-buffer + (insert ,content) + (goto-char (point-min)) + (funcall ',major-mode) + (should (equal (when (search-forward ,marker nil t) + (replace-match "" nil t) + (add-log-current-defun)) + ,expected-defun)))))) + +(add-log-current-defun-deftest + sh-func1 + "Test sh-current-defun-name can find function." + sh-mode " +function foo +{ + >< +}" "><" "foo") + +(add-log-current-defun-deftest + sh-func2 + "Test sh-current-defun-name can find function." + sh-mode " +foo() +{ + >< +}" "><" "foo") + +(add-log-current-defun-deftest + sh-func3 + "Test sh-current-defun-name can find function." + sh-mode " +function foo() +{ + >< +}" "><" "foo") + +(add-log-current-defun-deftest + sh-var + "Test sh-current-defun-name can find variabe definision." + sh-mode " +PATH=3Da:/ab:/usr/abc +DIR=3D/pr><" "DIR") + +(provide 'add-log-tests) + +;;; add-log-tests.el ends here From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 03 22:07:01 2013 Received: (at 14112) by debbugs.gnu.org; 4 Apr 2013 02:07:01 +0000 Received: from localhost ([127.0.0.1]:60896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNZZt-0005hY-3V for submit@debbugs.gnu.org; Wed, 03 Apr 2013 22:07:01 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:53635) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNZZr-0005hS-JU for 14112@debbugs.gnu.org; Wed, 03 Apr 2013 22:06:59 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFxLSu/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: Av4EABK/CFFFxLSu/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="6439133" Received: from 69-196-180-174.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([69.196.180.174]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 03 Apr 2013 22:03:49 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id CE8EFAE3CB; Wed, 3 Apr 2013 22:03:51 -0400 (EDT) From: Stefan Monnier To: Masatake YAMATO Subject: Re: bug#14112: [patch] add-log-current-defun-function for sh-mode Message-ID: References: <20130401.172558.1957612355855581733.yamato@redhat.com> Date: Wed, 03 Apr 2013 22:03:51 -0400 In-Reply-To: <20130401.172558.1957612355855581733.yamato@redhat.com> (Masatake YAMATO's message of "Mon, 01 Apr 2013 17:25:58 +0900 (JST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 14112 Cc: 14112@debbugs.gnu.org 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: -0.0 (/) > This is a feature request with a patch. Please, review the > patch and install it to the official source tree if appreciated. The patch looks good. I se you don't yet have write access. Do you want me to give you access so you can install those patches yourself? That would save me time, Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 05 07:00:09 2013 Received: (at 14112) by debbugs.gnu.org; 5 Apr 2013 11:00:09 +0000 Received: from localhost ([127.0.0.1]:34995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UO4NN-0008L8-3x for submit@debbugs.gnu.org; Fri, 05 Apr 2013 07:00:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60241) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UO4NJ-0008Ka-Up for 14112@debbugs.gnu.org; Fri, 05 Apr 2013 07:00:08 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r35Aum2X007647 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 5 Apr 2013 06:56:49 -0400 Received: from localhost (dhcp-193-94.nrt.redhat.com [10.64.193.94]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r35AukEh010680; Fri, 5 Apr 2013 06:56:47 -0400 Date: Fri, 05 Apr 2013 19:56:45 +0900 (JST) Message-Id: <20130405.195645.1966373013034618624.yamato@redhat.com> To: monnier@iro.umontreal.ca Subject: Re: bug#14112: [patch] add-log-current-defun-function for sh-mode From: Masatake YAMATO In-Reply-To: References: <20130401.172558.1957612355855581733.yamato@redhat.com> Organization: Red Hat Japan, Inc. Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 14112 Cc: 14112@debbugs.gnu.org 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: -9.2 (---------) >> This is a feature request with a patch. Please, review the >> patch and install it to the official source tree if appreciated. > > The patch looks good. Thank you for reviewing. > I se you don't yet have write access. > Do you want me to give you access so you can install those > patches yourself? That would save me time, I don't want take your time for installing my small patch. Please, re-give me write access to bzr repository. My account is "masatake". I must learn the usage of bzr. Masatake YAMATO From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 05 09:31:05 2013 Received: (at 14112) by debbugs.gnu.org; 5 Apr 2013 13:31:05 +0000 Received: from localhost ([127.0.0.1]:35145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UO6jP-0004Sx-Bg for submit@debbugs.gnu.org; Fri, 05 Apr 2013 09:31:05 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:23333) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UO6jG-0004Sc-Dg for 14112@debbugs.gnu.org; Fri, 05 Apr 2013 09:30:58 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFxLSu/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLLQcSFBgNJIgeBsEtjVWDNQOkeoFegxOBU4Ey X-IPAS-Result: Av4EABK/CFFFxLSu/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLLQcSFBgNJIgeBsEtjVWDNQOkeoFegxOBU4Ey X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="6556389" Received: from 69-196-180-174.dsl.teksavvy.com (HELO pastel.home) ([69.196.180.174]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 05 Apr 2013 09:27:35 -0400 Received: by pastel.home (Postfix, from userid 20848) id 0624167862; Fri, 5 Apr 2013 09:27:37 -0400 (EDT) From: Stefan Monnier To: Masatake YAMATO Subject: Re: bug#14112: [patch] add-log-current-defun-function for sh-mode Message-ID: References: <20130401.172558.1957612355855581733.yamato@redhat.com> <20130405.195645.1966373013034618624.yamato@redhat.com> Date: Fri, 05 Apr 2013 09:27:37 -0400 In-Reply-To: <20130405.195645.1966373013034618624.yamato@redhat.com> (Masatake YAMATO's message of "Fri, 05 Apr 2013 19:56:45 +0900 (JST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 14112 Cc: 14112@debbugs.gnu.org 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: -0.0 (/) > Please, re-give me write access to bzr repository. Great, thank you. Actually, I can't do that without you first requesting membership in the "emacs" group from your Savannah account. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 05 10:25:40 2013 Received: (at 14112) by debbugs.gnu.org; 5 Apr 2013 14:25:40 +0000 Received: from localhost ([127.0.0.1]:35633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UO7aF-0005rW-OJ for submit@debbugs.gnu.org; Fri, 05 Apr 2013 10:25:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44409) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UO7aA-0005rK-Kb for 14112@debbugs.gnu.org; Fri, 05 Apr 2013 10:25:38 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r35EMHtH008723 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 5 Apr 2013 10:22:17 -0400 Received: from localhost (dhcp-193-94.nrt.redhat.com [10.64.193.94]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r35EMFwZ028796; Fri, 5 Apr 2013 10:22:16 -0400 Date: Fri, 05 Apr 2013 23:22:15 +0900 (JST) Message-Id: <20130405.232215.2141545296391223530.yamato@redhat.com> To: monnier@iro.umontreal.ca Subject: Re: bug#14112: [patch] add-log-current-defun-function for sh-mode From: Masatake YAMATO In-Reply-To: References: <20130405.195645.1966373013034618624.yamato@redhat.com> Organization: Red Hat Japan, Inc. Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: 14112 Cc: 14112@debbugs.gnu.org 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: -9.3 (---------) >> Please, re-give me write access to bzr repository. > > Great, thank you. > Actually, I can't do that without you first requesting membership in the > "emacs" group from your Savannah account. > > > Stefan I've submitted the requesting. Regard, Masatake YAMATO From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 21 21:51:25 2013 Received: (at control) by debbugs.gnu.org; 22 Apr 2013 01:51:25 +0000 Received: from localhost ([127.0.0.1]:36071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UU5uf-0002CX-EQ for submit@debbugs.gnu.org; Sun, 21 Apr 2013 21:51:25 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:40508) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UU5ud-0002CM-Hl for control@debbugs.gnu.org; Sun, 21 Apr 2013 21:51:24 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1UU5py-0000LK-IH for control@debbugs.gnu.org; Sun, 21 Apr 2013 21:46:34 -0400 Date: Sun, 21 Apr 2013 21:46:34 -0400 Message-Id: Subject: control message for bug 14112 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -4.2 (----) 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: -5.0 (-----) close 14112 24.4 From unknown Mon Aug 18 02:31:32 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 20 May 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator