Modularize add-log-current-defun.
commitba03d0d932888f687ae9c9fb12e20908c6b0620f
authorChong Yidong <cyd@gnu.org>
Sat, 1 Dec 2012 04:57:07 +0000 (1 12:57 +0800)
committerChong Yidong <cyd@gnu.org>
Sat, 1 Dec 2012 04:57:07 +0000 (1 12:57 +0800)
tree7acf98ce6c8fa50bbe21266b29ace526e19f13b2
parent92eadba57fe86a49d67a7e3d797e3180ca0f6ae7
Modularize add-log-current-defun.
Suggested by Jari Aalto.

* lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): New.
(lisp-mode-variables): Use it.

* lisp/progmodes/cc-mode.el (c-common-init):
* lisp/progmodes/cperl-mode.el (cperl-mode): Set a value for
add-log-current-defun-function.

* lisp/progmodes/m4-mode.el (m4-current-defun-name): New function.
(m4-mode): Use it.

* lisp/progmodes/perl-mode.el (perl-current-defun-name): New.
(perl-mode): Use it.

* lisp/progmodes/scheme.el (scheme-mode-variables, dsssl-mode): Use
lisp-current-defun-name.

* lisp/textmodes/tex-mode.el (tex-current-defun-name): New.
(tex-common-initialization): Use it.

* lisp/textmodes/texinfo.el (texinfo-current-defun-name): New.
(texinfo-mode): Use it.

* lisp/vc/add-log.el (add-log-current-defun-function): Doc fix.
(add-log-current-defun): Move mode-specific code to other files.
(add-log-lisp-like-modes, add-log-c-like-modes)
(add-log-tex-like-modes): Variables deleted.

Fixes: debbugs:2224
lisp/ChangeLog
lisp/emacs-lisp/lisp-mode.el
lisp/progmodes/cc-mode.el
lisp/progmodes/cperl-mode.el
lisp/progmodes/m4-mode.el
lisp/progmodes/perl-mode.el
lisp/progmodes/scheme.el
lisp/textmodes/tex-mode.el
lisp/textmodes/texinfo.el
lisp/vc/add-log.el