unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to set a file major mode in elisp
@ 2007-11-02 12:42 Mirko
  2007-11-02 13:56 ` Eric Hanchrow
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Mirko @ 2007-11-02 12:42 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

In a piece of elisp, I would like to open an existing file and set its
major mode for later editing.  This is an example of the code that I
am using

(defun diary-entry ()
  (interactive)
  (find-file "~/diary")
  (goto-char (point-max))
  (open-line 1)
  (goto-char (point-max))
... )

I will be adding an entry to the diary file, and I would like the
buffer to be in the diary mode.  Is there some way of specifying it
explicitly instead of using auto-mode-alist?

Thank you,

Mirko

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-11-05 13:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-02 12:42 How to set a file major mode in elisp Mirko
2007-11-02 13:56 ` Eric Hanchrow
2007-11-02 13:58 ` Sebastian Tennant
2007-11-02 15:05 ` Bastien
     [not found] ` <mailman.2888.1194012501.18990.help-gnu-emacs@gnu.org>
2007-11-02 16:54   ` Mirko
2007-11-02 21:10     ` Peter Dyballa
     [not found]     ` <mailman.2912.1194037808.18990.help-gnu-emacs@gnu.org>
2007-11-05 13:40       ` Mirko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).