[CEDET-devel] add-log-current-defun advice picks outermost defun
Brought to you by:
zappo
From: Alan S. <at...@ac...> - 2004-10-28 21:46:58
|
I noticed that in Java code the add-log-current-defun advice was picking the name of the class for the changelog entry, rather the name of the enclosing function. That's because it uses semantic-find-tag-by-overlay, which orders regions biggest to smallest. I'd suggest people usually want the most immediate enclosing region, so I'd recommend this change. 2004-10-28 Alan Shutko <as...@ex...> * senator.el (add-log-current-defun): Reverse the tags found to order them smallest to biggest. diff -u "u:/site-lisp/cedet-1.0beta3a/semantic/senator.el~" "u:/site-lisp/cedet-1.0beta3a/semantic/senator.el" --- u:/site-lisp/cedet-1.0beta3a/semantic/senator.el~ 2004-07-21 11:33:47.000000000 -0500 +++ u:/site-lisp/cedet-1.0beta3a/semantic/senator.el 2004-10-28 16:35:49.499982500 -0500 @@ -2277,7 +2277,7 @@ (defadvice add-log-current-defun (around senator activate) "Return name of function definition point is in, or nil." (if senator-minor-mode - (let ((cd (semantic-find-tag-by-overlay)) + (let ((cd (reverse (semantic-find-tag-by-overlay))) (name nil)) (while (and cd (not name)) (if (member (semantic-tag-class (car cd)) senator-add-log-tags) Diff finished. Thu Oct 28 16:35:56 2004 -- Alan Shutko <at...@ac...> - I am the rocks. You get a splinter in your finger every time you scratch your forehead |