* Martin Buchholz <martin(a)xemacs.org> writes:
This sort of simple thing is something for users to define in their
.emacs.
(add-hook
'c-mode-common-hook
(lambda ()
(local-set-key [(meta s)]
(lambda ()
(interactive)
(find-file-other-window
(replace-in-string buffer-file-name "\\.cpp" ".h"))))))
Should support for something like this be in cc-mode?
Probably not. Even a fairly small project would probably have two or
more header files included in each source file. They can't all have
the same name, and as you said, Martin, it's the sort of thing that a
user would put into their .emacs.
But perhaps something that prompted for a filename (sans extension)
with the name of the current filename as the default could be better?
--
|---<Regards, Steve Youngs>-----------[GnuPG KeyID: EFD82ED2]---|
| XEmacs - It's not just an editor... |
| It's a way of life. |
|----------------------------------<mailto:youngsï¼ xemacs.org>---|