No subject

Thomas Gerds gerds at paracelsus.fdm.uni-freiburg.de
Mon Nov 6 10:33:33 CET 2000


Mary Lindstrom <lindstro at biostat.wisc.edu>
Subject: Re: hooks for specific statistics packages
In-Reply-To: <14849.52505.183949.153025 at capella.biostat.wisc.edu>
References: <14849.52505.183949.153025 at capella.biostat.wisc.edu>
X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid

hi, 

here is a way to work around the problem until
the hooks are installed:

make a copy of the SAS-mode (S-mode, R-mode) defuns from the corresponding
essd-*.el file in your .emacs and add the line 
(run-hooks 'ess-sas(s,r)-mode-hook):

e.g. for SAS:  (ESS-version 5.1.16)

 (defun SAS-mode (&optional proc-name)
  "Major mode for editing SAS source.  See ess-mode for more help."
  (interactive)
  (setq ess-customize-alist SAS-customize-alist)
  (ess-mode SAS-customize-alist proc-name)

  ;; Local map settings, AFTER initialization (only if not yet defined)
  (if sas-mode-local-map
      nil
    (setq sas-mode-local-map (copy-keymap (current-local-map)))
    (ess-sas-edit-keys-toggle ess-sas-edit-keys-toggle)
    (if ess-sas-local-unix-keys (ess-sas-local-unix-keys))
    (if ess-sas-local-pc-keys (ess-sas-local-pc-keys))
    (if ess-sas-global-unix-keys (ess-sas-global-unix-keys))
    (if ess-sas-global-pc-keys (ess-sas-global-pc-keys)))
  (use-local-map sas-mode-local-map)
  (run-hooks 'SAS-mode-hook))

and then defvar the hook-variable and write your own code:

(defvar ess-sas-mode-hook nil "Hook  for customizing SAS mode.
  Called after `SAS-mode' is entered and variables have been initialised.")

(add-hook 'ess-sas-mode-hook
	    '(lambda ()
	       (setq comment-start "\/\*")
	       (setq comment-end "\*\/")
	       (local-set-key "\t" 'sas-indent-line)
			      .
			      .
			      .
))

of course, if you are installing a new ESS-version
you should update the SAS-mode, S-mode or R-mode defuns in your .emacs ...

tomy

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Thomas Gerds

Institut für Medizinische Biometrie und Medizinische Informatik
Stefan-Meier-Str. 26                           
79104 Freiburg

Freiburger Zentrum für Datenanalyse und Modellbildung (FDM)
Eckerstr 1
79104 Freiburg

Tel.:0761/203-7703
Fax:0761/203-7700

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
ess-help mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: ess-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the ESS-help mailing list