unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 2224@debbugs.gnu.org, Jari Aalto <jari.aalto@cante.net>
Subject: bug#2224: [PATCH] add-log.el: Modularize add-log-current-defun, new types supported
Date: Thu, 12 Apr 2012 18:03:36 +0200	[thread overview]
Message-ID: <m3aa2haqef.fsf@stories.gnus.org> (raw)
In-Reply-To: <jwvr4vu9y7c.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 11 Apr 2012 09:49:35 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> 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/





  reply	other threads:[~2012-04-12 16:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-06 17:41 bug#2224: [PATCH] add-log.el: Modularize add-log-current-defun, new types supported Jari Aalto
2012-04-11 12:44 ` Lars Magne Ingebrigtsen
2012-04-11 13:49   ` Stefan Monnier
2012-04-12 16:03     ` Lars Magne Ingebrigtsen [this message]
2012-04-12 18:11       ` Stefan Monnier
2012-04-12 18:19         ` Lars Magne Ingebrigtsen
2012-04-12 20:38           ` Stefan Monnier
2012-12-01  5:54     ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3aa2haqef.fsf@stories.gnus.org \
    --to=larsi@gnus.org \
    --cc=2224@debbugs.gnu.org \
    --cc=jari.aalto@cante.net \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).