home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / lisp / term / generic-win.el next >
Encoding:
Text File  |  1995-03-11  |  3.3 KB  |  89 lines

  1. ;;; generic-win.el --- generic window function initializtion
  2. ;; Copyright (C) 1990, 1993, 1994 Free Software Foundation, Inc.
  3.  
  4. ;; Author: FSF
  5. ;; Keywords: terminals
  6.  
  7. ;;; This file is part of XEmacs.
  8. ;;;
  9. ;;; XEmacs is free software; you can redistribute it and/or modify it
  10. ;;; under the terms of the GNU General Public License as published by
  11. ;;; the Free Software Foundation; either version 2, or (at your
  12. ;;; option) any later version.
  13. ;;;
  14. ;;; XEmacs is distributed in the hope that it will be useful, but
  15. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17. ;;; General Public License for more details.
  18. ;;;
  19. ;;; You should have received a copy of the GNU General Public License
  20. ;;; along with XEmacs; see the file COPYING.  If not, write to the
  21. ;;; Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  22.  
  23. (require 'frame)
  24.  
  25. ;; Keypad type things
  26.  
  27. ;; this is so that where-is says beginning-of-buffer is M-< instead of f27.
  28. (fset 'fkey-beginning-of-buffer 'beginning-of-buffer)
  29. (fset 'fkey-end-of-buffer    'end-of-buffer)
  30. (fset 'fkey-scroll-down        'scroll-down)
  31. (fset 'fkey-scroll-up        'scroll-up)
  32. (fset 'fkey-scroll-left        'scroll-left)
  33. (fset 'fkey-scroll-right    'scroll-right)
  34. (fset 'fkey-scroll-other-window 'scroll-other-window)
  35. (fset 'fkey-backward-char    'backward-char)
  36. (fset 'fkey-forward-char    'forward-char)
  37. (fset 'fkey-backward-word    'backward-word)
  38. (fset 'fkey-forward-word    'forward-word)
  39. (fset 'fkey-backward-paragraph    'backward-paragraph)
  40. (fset 'fkey-forward-paragraph    'forward-paragraph)
  41. (fset 'fkey-backward-sexp    'backward-sexp)
  42. (fset 'fkey-forward-sexp    'forward-sexp)
  43. (fset 'fkey-other-window    'other-window)
  44. (fset 'fkey-backward-other-window 'backward-other-window)
  45. (fset 'fkey-beginning-of-line    'beginning-of-line)
  46. (fset 'fkey-end-of-line        'end-of-line)
  47. (fset 'fkey-repeat-complex-command 'repeat-complex-command)
  48. (fset 'fkey-overwrite-mode    'overwrite-mode)
  49.  
  50. ;; these two have to be defined in this more complicated way to make
  51. ;; current-column-tracking work, sigh...
  52. (defun fkey-previous-line (p)
  53.   (interactive "_p")
  54.   (setq this-command 'previous-line)
  55.   (previous-line p))
  56. (defun fkey-next-line (p)
  57.   (interactive "_p")
  58.   (setq this-command 'next-line)
  59.   (next-line p))
  60.  
  61. ;;; These aren't bound to kbd macros like "\C-b" so that they have the
  62. ;; expected behavior even in, for example, vi-mode.
  63.  
  64. ;; We use here symbolic names, assuming that the corresponding keys will
  65. ;; generate these keysyms.  This is not true on Suns, but x-win-sun.el 
  66. ;; fixes that.  If it turns out that the semantics of these keys should
  67. ;; differ from server to server, this should be moved into server-specific
  68. ;; files, but these appear to be the standard Motif and PC bindings.
  69.  
  70. ;; movement by units
  71. (define-key global-map 'left        'fkey-backward-char)
  72. (define-key global-map 'up        'fkey-previous-line)
  73. (define-key global-map 'right        'fkey-forward-char)
  74. (define-key global-map 'down        'fkey-next-line)
  75.  
  76. ;; movement by pages
  77. (define-key global-map 'prior        'fkey-scroll-down)
  78. (define-key global-map 'next        'fkey-scroll-up)
  79.  
  80. ;; movement to the limits
  81. (define-key global-map 'home        'fkey-beginning-of-line)
  82. (define-key global-map 'end        'fkey-end-of-line)
  83.  
  84. ;;; Miscellaneous key bindings
  85. (define-key global-map 'again        'fkey-repeat-complex-command)
  86. (define-key global-map 'insert        'fkey-overwrite-mode)
  87.  
  88. ;;; generic-win.el ends here
  89.