home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!agate!agate.berkeley.edu!dodd
- From: dodd@mycenae.cchem.berkeley.edu (Lawrence R. Dodd)
- Newsgroups: gnu.emacs.help
- Subject: elisp question regarding setq-default and major modes
- Date: 17 Dec 92 12:19:02
- Organization: Dept of Chemical Engineering, Polytechnic Univ, NY, USA
- Lines: 26
- Message-ID: <DODD.92Dec17121902@mycenae.cchem.berkeley.edu>
- NNTP-Posting-Host: mycenae.cchem.berkeley.edu
- Summary: regarding setq-default usage when starting major modes
- Keywords: elisp, setq-default, major modes, kill-all-local-variables
-
-
- I have some questions regarding using set-default to set buffer local
- variables when changing major modes.
-
- (1) when a major mode is started, I believe that kill-all-local-variables is
- called. Is it true that all buffer local variables then revert to their
- default values?
-
- (2) can one define a default value for a variable to be the result of a
- conditional? for example,
-
- (setq-default this-is-my-variable
- (if table-tennis (foobar) '("%b")))
-
- where `foobar' returns a string. does this set the value of
- `this-is-my-variable' to the string returned by `foobar' or to "%b" based
- on the value of `table-tennis'?
-
- (3) finally, would the above setq-default be evaluated each time a new major
- mode is started?
-
- thanks in advance. please respond via e-mail. if there is much interest I will
- post a summary.
-
- Larry
- dodd@roebling.poly.edu
-