home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / msdos / demacs / _emacs next >
Encoding:
Text File  |  1991-12-12  |  5.0 KB  |  162 lines

  1. ;;; sample startup file
  2. ;;; semi-colon(s), beginning of line means that the line is commented out.
  3.  
  4. ;; load path
  5. ;(setq load-path (append (list (expand-file-name "~/emacs/lisp") 
  6. ;                              "a:/emacs/lisp/enhanced")
  7. ;                        load-path))
  8.  
  9. ;;
  10. ;; UNCOMMENT ONE OF THEM
  11. ;;
  12. ;;; if your machine is IBM PC or it's compatible
  13. ;(setq dos-machine-type 'ibmpc)
  14. ;;; if your machine is Toshiba J-3100
  15. ;(setq dos-machine-type 'j3100)
  16. ;;; if your machine is NEC PC-9801 or EPSON PC-386 series
  17. ;(setq dos-machine-type 'pc98)
  18.  
  19. ;(load-library "term/bobcat") ; swap BS (C-h) and DEL
  20.  
  21. ;;
  22. ;; PC9801 initialization
  23. ;;  function keys, cursor keys
  24. ;;  If you need META key, use hkey.exe (hkey is distributed within hterm2.6.0)
  25. ;;
  26. (if (eq dos-machine-type 'pc98)
  27.     (progn
  28.       (send-string-to-terminal "\e[>1h")     ;; erase function key label
  29.       (setq kill-emacs-hook                  ;; recover functin key label
  30.         '(lambda ()
  31.            (send-string-to-terminal "\e[>1l")
  32.            (pc98-cancel-special-key)))
  33.       (setq suspend-hook
  34.         '(lambda ()
  35.            (send-string-to-terminal "\e[>1l")
  36.            (pc98-cancel-special-key)))
  37.       (setq suspend-resume-hook
  38.         '(lambda ()
  39.            (send-string-to-terminal "\e[>1h")
  40.            (pc98-assign-special-key)
  41.            (if console-is-with-function-key-label
  42.            (redraw-display-with-function-key-label))))
  43.       ; uncomment if you wish to display function key label
  44.       ; (setq console-is-with-function-key-label t)
  45.       ; uncomment if your $TERM is not pc98 and you want function key
  46.       ; (load "term/pc98")
  47.       ))
  48.  
  49. ;;
  50. ;; J-3100 initialization
  51. ;;   function keys, cursor keys, meta key (by ALT)
  52. ;;   cursor shape, key click
  53. ;;
  54. (if (eq dos-machine-type 'j3100)
  55.     (progn
  56.       (setq startup-screen-mode (get-screen-mode))
  57.       (setq startup-cursor-mode (get-cursor-mode))
  58.       (set-cursor-mode 0 15 nil)
  59.       (set-keyclick t)
  60.       (setq kill-emacs-hook
  61.         '(lambda ()
  62.            (j3100-cancel-special-key)
  63.            (if startup-screen-mode
  64.            (set-screen-mode startup-screen-mode))
  65.            (if startup-cursor-mode
  66.            (apply 'set-cursor-mode startup-cursor-mode))
  67.            (set-keyclick nil)
  68.            ))
  69.       (setq suspend-hook
  70.         '(lambda ()
  71.            (j3100-cancel-special-key)
  72.            (setq old-screen-mode (get-screen-mode))
  73.            (setq old-cursor-mode (get-cursor-mode))
  74.            (if startup-screen-mode
  75.            (set-screen-mode startup-screen-mode))
  76.            (if startup-cursor-mode
  77.            (apply 'set-cursor-mode startup-cursor-mode))
  78.            ))
  79.       (setq suspend-resume-hook
  80.         '(lambda ()
  81.            (j3100-assign-special-key)
  82.            (if old-screen-mode
  83.            (set-screen-mode old-screen-mode))
  84.            (if old-cursor-mode
  85.            (apply 'set-cursor-mode old-cursor-mode))
  86.            (if console-is-with-function-key-label
  87.            (redraw-display-with-function-key-label))
  88.            ))
  89.       ; uncomment if you wish to display function key label
  90.       ; (setq console-is-with-function-key-label t)
  91.       ; uncomment if your $TERM is not j3100 but you want to use function key
  92.       ; (load "term/j3100")
  93.       ))
  94.  
  95. ;;
  96. ;; IBMPC initialization
  97. ;;   function keys, cursor keys, meta key (by ALT)
  98. ;;
  99. (if (eq dos-machine-type 'ibmpc)
  100.     (progn
  101.       (setq kill-emacs-hook
  102.         '(lambda ()
  103.            (ibmpc-cancel-special-key)))
  104.       (setq suspend-hook
  105.         '(lambda ()
  106.            (ibmpc-cancel-special-key)))
  107.       (setq suspend-resume-hook
  108.         '(lambda ()
  109.            (ibmpc-assign-special-key)
  110.            (if console-is-with-function-key-label
  111.            (redraw-display-with-function-key-label))))
  112.       ; uncomment if you wish to display function key label
  113.       ; (setq console-is-with-function-key-label t)
  114.       ; uncomment if your $TERM is not ibmpc but you want function key
  115.       ; (load "term/ibmpc")
  116.       ))
  117.  
  118. ;;; FEP Control support
  119. (if (boundp 'NEMACS)
  120.     (progn
  121.       (setq inhibit-fep-control nil)
  122.       (fep-init)
  123.       (global-set-key "\C-\\" 'toggle-fep-mode)
  124.       (global-set-key "\e " 'set-mark-command)
  125.       (setq suspend-hook (append (or suspend-hook '(lambda ()))
  126.                  '((fep-term))))
  127.       (setq kill-emacs-hook (append (or kill-emacs-hook '(lambda ()))
  128.                     '((fep-term))))
  129.       (setq suspend-resume-hook (append (or suspend-resume-hook '(lambda()))
  130.                     '((fep-init) (fep-sync))))
  131.       ))
  132.  
  133. ;;
  134. ;; enhanced dired
  135. ;;
  136. (setq dired-mode-map nil)
  137. (load "emacs-19")
  138. (autoload 'dired "dired" nil t)
  139. ; uncomment if you have unix like commands
  140. ;(setq dired-load-hook
  141. ;      '(lambda ()
  142. ;     (setq dired-ls-program "ls"
  143. ;           dired-chmod-program "chmod"
  144. ;           dired-chgrp-program "chgrp"
  145. ;           dired-chown-program "chown"
  146. ;           dired-compress-program "compress"
  147. ;           dired-uncompress-program "uncompress"
  148. ;           )))
  149.  
  150. ;;
  151. ;; add binary file type
  152. ;;
  153. (define-file-name-file-type "\\.lzh" 1)
  154. (define-file-name-file-type "\\.dvi" 1)
  155.  
  156. ;;
  157. ;; completion
  158. ;;
  159. (setq completion-ignored-extensions
  160.       (append completion-ignored-extensions
  161.           '(".obj" ".exe" ".bin" ".com")))
  162.