From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#2224: [PATCH] add-log.el: Modularize add-log-current-defun, new types supported Date: Thu, 12 Apr 2012 18:03:36 +0200 Message-ID: References: <87bptf5upl.fsf@jondo.cante.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1334246707 31233 80.91.229.3 (12 Apr 2012 16:05:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 12 Apr 2012 16:05:07 +0000 (UTC) Cc: 2224@debbugs.gnu.org, Jari Aalto To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 12 18:05:06 2012 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 1SIMW7-0001dT-NZ for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Apr 2012 18:05:03 +0200 Original-Received: from localhost ([::1]:55007 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIMW7-0002Sb-2s for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Apr 2012 12:05:03 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIMVv-0002QG-9E for bug-gnu-emacs@gnu.org; Thu, 12 Apr 2012 12:05:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SIMVt-0003T0-4v for bug-gnu-emacs@gnu.org; Thu, 12 Apr 2012 12:04:50 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57976) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIMVt-0003Sv-1l for bug-gnu-emacs@gnu.org; Thu, 12 Apr 2012 12:04:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SIMX3-00019Q-Tj for bug-gnu-emacs@gnu.org; Thu, 12 Apr 2012 12:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Magne Ingebrigtsen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Apr 2012 16:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 2224 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 2224-submit@debbugs.gnu.org id=B2224.13342467084359 (code B ref 2224); Thu, 12 Apr 2012 16:06:01 +0000 Original-Received: (at 2224) by debbugs.gnu.org; 12 Apr 2012 16:05:08 +0000 Original-Received: from localhost ([127.0.0.1]:54514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIMWB-00018F-5M for submit@debbugs.gnu.org; Thu, 12 Apr 2012 12:05:07 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:37251) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIMW8-000187-Iq for 2224@debbugs.gnu.org; Thu, 12 Apr 2012 12:05:05 -0400 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1SIMUj-0004Uk-MK; Thu, 12 Apr 2012 18:03:37 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEWGRzs5EBcdCA/7zKr0 vZnprYnJiWxXHR/wi9pIAAACMElEQVQ4jW2ST4+bMBDFZ6uNfY25cK259APA7nklTM6VgunV6pbJ Fa/azNfvG0Noou0okeD9mH/PpvZThBBinAhPXdv2N7VvO4AhRnptzy9t+/4IRoA3fp/ivINuz+iG 9xDP/UOLAk4B4supD7cUBehOA/P8ymm46d2qRyofjMMYz2vzrdIGQuheznuHBxBO57XKJxACvu63 x0cQ/gsGJjmEvrsHQ+Rkq6ZpZL7vMa2ix7+5jrs+Ud3sUX+dw7jpvAN3FPo2xy0APiAeSYisOH+4 A9mQGEPWOVc9gCcMqqqrGu9NUWErwBdREV83O8BIM0C9AQxdwIj1kgFwXkHj3Q102PgKAL1RcMvA gaIt008Aj8Wdrr/QPOtJT3YFlRZCijfT9R54ba7be8O8lirAb60RACOu3JAWWOIbbVsy4A2pi5Ot CVNpDb/5SzZiDbYi9OT/+d7AS108WbhqtyqIj3pBqQFAkgJ3O5FGxBpcdKajFZJN9i47t9g/yOAn QQ+pSnfnRGpZ0u9xmJIrIMPYyrkaLwDPGPayAfUdwCoYnztskbOrCRXgCABZuxCbHkZVqKx3oMRC ljkZOgx20XRk5Fqyy7XV8zR8YKwgK8D3OV+/03giZpPEYKxM2lOTDj+of8XBcRL8dKoStfxiE94g xwsyxNoVIGNmHhKcSkR8ESYdt87YyEBIhCuYCkiENbJufSyjXmC8wGPNwCXByoQ3MrEUWTC1kCse kZ4MaTAvZdC/z+UL8cX/aVIAAAAASUVORK5CYII= X-Now-Playing: Bob Hund's _Sover Aldrig_: "Kvicksilver" In-Reply-To: (Stefan Monnier's message of "Wed, 11 Apr 2012 09:49:35 -0400") User-Agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.1.50 (gnu/linux) X-MailScanner-ID: 1SIMUj-0004Uk-MK MailScanner-NULL-Check: 1334851417.942@6jqfo4kiRCwxx23l7w/cSA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:58889 Archived-At: Stefan Monnier writes: >>> (add-log-current-defun-type-javascript-like): New function. >>> (add-log-current-defun-type-shell-bourne-like): New function. >>> (add-log-current-defun-type-makefile-like): New function. >>> (add-log-current-defun-type-text-asciidoc-like): New function. >>> (add-log-current-defun-type-default): New function. [...] > Having them be separate functions is indeed very good. But most of them > shouldn't be in add-log.el: they should be in their respective > major-mode instead. You mean just define `add-log-current-defun-type-javascript' in js.el, and stuff? Doesn't that seem kinda... I don't know. Error-prone? Because add-log (in the patch) has a major cond up there that will call the functions unconditionally if there's a match with the mode (and other things), so there's potential for things getting out of sync if people are using different versions of (say) js.el that doesn't define the function in question... > Stefan "and they don't need `-like' in their name" True. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/