home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.emacs.help
- Path: sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!csn!cherokee!lookout.it.uswc.uswest.com!rray
- From: rray@lookout.it.uswc.uswest.com (Randy J. Ray)
- Subject: More intelligent default mode selection?
- Message-ID: <1992Jul21.182834.15608@advtech.uswest.com>
- Sender: rray@snakepit (Randy J. Ray)
- Nntp-Posting-Host: snakepit.it.uswc.uswest.com
- Organization: US WEST Communications, Inc. -- Denver, CO
- Date: Tue, 21 Jul 1992 18:28:34 GMT
- Lines: 18
-
- I spend most of my time editing Perl code. Unless I am writing a library, my
- files do not have a suffix, since they are destined to be executable scripts.
- My default editing mode is Text, over-ridden by the value of auto-mode-alist.
- I would like to be able to have an alternate default mode, say, on a per-
- directory basis. I would even agree to a file such as ".default_mode" or some
- such. Is there some way I can patch in before the find-file routine actually
- reads the file and creates the buffer? Or should I write a wrapper function to
- appear to behave like find-file, but determines the directory of the requested
- file, reads the mode, passes the name to find-file, then switches to that mode?
- I can do that, but I am hoping for a cleaner solution.
-
- Randy
- --
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Randy J. Ray -- U S WEST IT/CSD rray@{lookout,uswat}.it.uswc.uswest.com
- I'd rather talk religion with Charles Manson than discuss ethics with Congress.
- -me Phone: (303)595-2852
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-