From: Martin S. <ma...@ly...> - 2004-12-04 17:26:59
|
Masatake YAMATO <je...@gy...> wrote: > c-forward-into-nomenclature and c-backward-into-nomenclature are > very useful. I'm surprised that there is no standard keybind for > them That's because there are no free bindings that are convenient enough. For functions like those, I think it's necessary that the bindings require no more than two keypresses, e.g. a modifier and some other key. Anything more complicated gets too clumsy. > and no minor mode for them in cc-mode. Now that's a very good idea I haven't thought of. ;) > I write the minor mode for thme with enhancements. Thanks, this is nice stuff. I'd like to include it. Only one thing is required first, and that is that you sign copyright assignment or disclaimer papers with the FSF. Are you prepared to do that, or do you have an applicable agreement already? Some other small stuff I noted are below. Consider them enhancement suggestions. o You use "word" instead of "nomenclature" in function names etc. I guess you think the latter is too long and clumsy. However, "word" already has a different meaning in Emacs lingo, so it's a bit confusing to reuse it this way. Coming up with a good alternative isn't easy, though. o The minor mode keymap installs the special functions on the standard keys. It'd be better to hook them in on the same keys that the user already has configured, in case (s)he has changed them in .emacs. CC Mode does the same for some functions; see the use of substitute-key-definition in cc-mode.el. o Your code doesn't work in Emacs 20 since it uses define-minor-mode. CC Mode as a whole is currently compatible with Emacs 20.1 and later, and XEmacs 21.4 and later. But I don't think it's necessary to adapt this to work in older emacsen; it's only necessary that it doesn't get in the way and cause load errors or something. o I don't understand the following example. Why does the capital "F" disappear? Is there a typo on the last line? ;; Experimental ineractive function `c-ispell-complete-word' is also provided. ;; e.g. Consider `|' is the place where the point is. ;; ;; SFTyp|Symbol ;; ;; When you type M-x c-ispell-complete-word, then string is completed to: ;; ;; StType|Symbol o The way you hook into dabbrev and isearch isn't very clean; consider what'd happen if other packages would do it this way. I suggest using defadvice instead. o Note that dabbrev might not be loaded. The dabbrev parts should only be installed if and when it gets loaded. Use eval-after-load. |