home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / editors / demacs-5.arj / IBMPC.ELC < prev    next >
Text File  |  1991-12-13  |  4KB  |  104 lines

  1.  
  2. (defun ibmpc-assign-special-key nil (byte-code "└┴!ê└┬!ê└├!ê└─!ê└┼!ê└╞!ê└╟!ê└╚!ê└╔!ç" [send-string-to-terminal "1;\"<\"p" "2;\"\"p" "3;\"v\"p" "5;\"\"p" "7;\"\"p" "9;\">\"p" "0;\"\"p" "1;\"\"p" "3;\"\"p"] 10))
  3.  
  4. (defun ibmpc-cancel-special-key nil (byte-code "└┴!ê└┬!ê└├!ê└─!ê└┼!ê└╞!ê└╟!ê└╚!ê└╔!ç" [send-string-to-terminal "1;0;71p" "2;0;72p" "3;0;73p" "5;0;75p" "7;0;77p" "9;0;79p" "0;0;80p" "1;0;81p" "3;0;83p"] 10))
  5.  
  6. (defvar ibmpc-map (make-keymap) "\
  7. The ibmpc-map maps the function keys on the IBMPC keyboard.")
  8.  
  9. (define-key ibmpc-map ";" (quote help-for-help))
  10.  
  11. (define-key ibmpc-map "T" (quote describe-mode))
  12.  
  13. (define-key ibmpc-map "^" (quote describe-key))
  14.  
  15. (define-key ibmpc-map "<" (quote other-window))
  16.  
  17. (define-key ibmpc-map "U" (quote switch-to-buffer))
  18.  
  19. (define-key ibmpc-map "_" (quote list-buffers))
  20.  
  21. (define-key ibmpc-map "=" (quote delete-other-windows))
  22.  
  23. (define-key ibmpc-map "V" (quote delete-window))
  24.  
  25. (define-key ibmpc-map "`" (quote scroll-other-window))
  26.  
  27. (define-key ibmpc-map ">" (quote split-window-vertically))
  28.  
  29. (define-key ibmpc-map "W" (quote enlarge-window))
  30.  
  31. (define-key ibmpc-map "a" (quote shrink-window))
  32.  
  33. (define-key ibmpc-map "?" (quote split-window-horizontally))
  34.  
  35. (define-key ibmpc-map "X" (quote enlarge-window-horizontally))
  36.  
  37. (define-key ibmpc-map "b" (quote shrink-window-horizontally))
  38.  
  39. (define-key ibmpc-map "@" (quote copy-region-as-kill))
  40.  
  41. (define-key ibmpc-map "Y" (quote kill-region))
  42.  
  43. (define-key ibmpc-map "c" (quote yank))
  44.  
  45. (define-key ibmpc-map "A" (quote goto-line))
  46.  
  47. (define-key ibmpc-map "Z" (quote isearch-forward))
  48.  
  49. (define-key ibmpc-map "d" (quote query-replace))
  50.  
  51. (define-key ibmpc-map "B" (quote find-file))
  52.  
  53. (define-key ibmpc-map "[" (quote save-buffer))
  54.  
  55. (define-key ibmpc-map "e" (quote write-file))
  56.  
  57. (define-key ibmpc-map "C" (quote dired))
  58.  
  59. (define-key ibmpc-map "\\" (quote compile))
  60.  
  61. (define-key ibmpc-map "e" (quote repeat-complex-command))
  62.  
  63. (define-key ibmpc-map "D" (quote shell-command))
  64.  
  65. (define-key ibmpc-map "]" (quote suspend-emacs))
  66.  
  67. (define-key ibmpc-map "g" (quote save-buffers-kill-emacs))
  68.  
  69. (define-key ibmpc-map "R" (quote set-mark-command))
  70.  
  71. (define-key ibmpc-map "" (quote set-mark-command))
  72.  
  73. (define-key global-map "" ibmpc-map)
  74.  
  75. (defvar ibmpc-map-hooks nil "\
  76. List of forms to evaluate after setting ibmpc-map.")
  77.  
  78. (let ((hooks ibmpc-map-hooks)) (while hooks (eval (car hooks)) (setq hooks (cdr hooks))))
  79.  
  80. (defvar console-is-with-function-key-label nil "\
  81. If value is t, the console consists of emacs windows and function key label.")
  82.  
  83. (defun redraw-display-with-function-key-label nil (byte-code "└ ê┴ ç" [redraw-display put-function-key-label] 3))
  84.  
  85. (defun recenter-with-function-key-label (&optional arg) "\
  86.   recenter and display function key label." (interactive) (byte-code "┴ê┬!ê├ ç" [arg nil recenter put-function-key-label] 3))
  87.  
  88. (defun setup-console-with-function-key-label nil (byte-code "└ ê┴┬!ê├─!ê┼╞!ê╟ ê╚╔!ç" [delete-other-windows enlarge-window 100 shrink-window 4 message "" redraw-display-with-function-key-label send-string-to-terminal ""] 7))
  89.  
  90. (defun put-function-key-label nil (byte-code "è┴┬!ê├─┼╞ ╟Z\"!)ê└ç" [nil message "" send-string-to-terminal format "%d;1f | F.1 |  F.2  |  F.3  |  F.4   |  F.5   | F.6 |  F.7  | F.8  | F.9  | F.10   |
  91.  |help | nextW | delOW |splitWH |splitWV |copy | goto  | read |dired |command |
  92. s|mode |switchW| delW  |largeWH |largeWV |kill |search | save | make |suspend |
  93. c|key  |buffers|scrlOW |shrnkWH |shrnkWV |yank |replace|write |repeat| quit   |" screen-height 3] 7))
  94.  
  95. (defun erase-system-function-key-label nil "\
  96. Erase system function key label." (byte-code "└ç" [t] 1))
  97.  
  98. (defun appear-system-function-key-label nil "\
  99. Appear system function key label." (byte-code "└ç" [t] 1))
  100.  
  101. (if console-is-with-function-key-label (progn (global-set-key " " (quote recenter-with-function-key-label)) (setup-console-with-function-key-label)))
  102.  
  103. (ibmpc-assign-special-key)
  104.