Re: psychic emacs



On 7/31/06, Amadeus W. M. <amadeus84@xxxxxxxxxxxxxx> wrote:
Do this on FC5:

emacs foobar.spec

Can I configure emacs to do the same with other
file types, or is it compiled in? E.g. whenever I open a blank
foobar.cc automatically #include certain header files, and create
a usage() and main() stub.

That's done by the rpm-spec-initialize function, which is a hook in
the rpm-spec-mode-new-file-hook, which is called when you open a blank
file in RPM mode. By default, files ending in .spec are edited in RPM
mode.

No, I don't see a similar c-mode-new-file-hook -- which is what sent
me down the path of answering this for you -- not because I am
particularly adept at customizing Emacs, I was just intrigued by the
thought of adding my own c-mode-new-file-hook.

Hopefully somebody more expert than I will step in and say, "No --
it's right there!"

--wpd

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list



Relevant Pages

  • Re: psychic emacs
    ... Can I configure emacs to do the same with other ... file types, ... file in RPM mode. ... files ending in .spec are edited in RPM ...
    (Fedora)
  • Re: psychic emacs
    ... >> Can I configure emacs to do the same with other ... > file in RPM mode. ... files ending in .spec are edited in RPM ... $ sudo yum install emacs-el ...
    (Fedora)
  • Re: mapcar to convert octals to ascii
    ... If the file types are quite common, it might be useful that Emacs DTRT ... the Latin-1 language environment (corresponding to main european.el cvs ... There's nothing wrong with using the "UTF-8" language environment. ...
    (comp.emacs)
  • psychic emacs
    ... Do this on FC5: ... Can I configure emacs to do the same with other ... file types, ... should not be enabled by default, but a configuration option ...
    (Fedora)