bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#2224: [PATCH] add-log.el: Modularize add-log-current-defun, new type


From: Lars Magne Ingebrigtsen
Subject: bug#2224: [PATCH] add-log.el: Modularize add-log-current-defun, new types supported
Date: Thu, 12 Apr 2012 18:03:36 +0200
User-agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.1.50 (gnu/linux)

Stefan Monnier <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]