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: Stefan Monnier
Subject: bug#2224: [PATCH] add-log.el: Modularize add-log-current-defun, new types supported
Date: Wed, 11 Apr 2012 09:49:35 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux)

>> The following patch breaks down monolithic `add-log-current-defun' into
>> separate testing functions. Support for New buffer types is also
>> provided. The patch is against version control as of 2009-02-06.

> [...]

>> 2009-02-06  Jari Aalto  <jari.aalto@cante.net>
>> 
>> * add-log.el (add-log-current-defun): Split function into
>> separate parts: add-log-current-defun-type-*. Add support
>> for new types: python, ruby, Bourne Shell, Makefile,
>> X?HTML, CSS, PHP, Javascript, Asciidoc.
>> (add-log-current-defun-type-c-like): New function.
>> (add-log-current-defun-type-tex-like): New function.
>> (add-log-current-defun-type-texinfo-like): New function.
>> (add-log-current-defun-type-perl-like): New function.
>> (add-log-current-defun-type-python-like): New function.
>> (add-log-current-defun-type-shell-ruby-like): New function.
>> (add-log-current-defun-type-autoconf-like): New function.
>> (add-log-current-defun-type-html-like): New function.
>> (add-log-current-defun-type-css-like): New function.
>> (add-log-current-defun-type-php-like): New function.
>> (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.

> That's a lot of functions, but it does makes stuff clearer.  Does
> anybody have an opinion here?

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.


        Stefan "and they don't need `-like' in their name"





reply via email to

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