changeset 39734:32f917f3edf7

use defalias instead of fset for user-visible commands.
author Pavel Janík <Pavel@Janik.cz>
date Wed, 10 Oct 2001 05:57:24 +0000
parents 8ac87a0f3b3d
children 3af1ea0662e3
files lisp/emulation/tpu-edt.el
diffstat 1 files changed, 35 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emulation/tpu-edt.el	Tue Oct 09 12:15:09 2001 +0000
+++ b/lisp/emulation/tpu-edt.el	Wed Oct 10 05:57:24 2001 +0000
@@ -783,52 +783,56 @@
 ;;;  Command and Function Aliases
 ;;;
 ;;;###autoload
-(fset 'tpu-edt-mode 'tpu-edt-on)
-(fset 'TPU-EDT-MODE 'tpu-edt-on)
+(defalias 'tpu-edt-mode 'tpu-edt-on)
+(defalias 'TPU-EDT-MODE 'tpu-edt-on)
 
 ;;;###autoload
-(fset 'tpu-edt 'tpu-edt-on)
-(fset 'TPU-EDT 'tpu-edt-on)
+(defalias 'tpu-edt 'tpu-edt-on)
+(defalias 'TPU-EDT 'tpu-edt-on)
 
-(fset 'exit 'tpu-exit)
-(fset 'EXIT 'tpu-exit)
+;; Note:  The following functions have no `tpu-' prefix.  This is unavoidable.
+;;        The real TPU/edt editor has interactive commands with these names,
+;;        so tpu-edt.el users expect things like M-x exit RET and M-x help RET
+;;        to work.  Therefore it really is necessary to define these functions,
+;;        even in cases where they redefine existing Emacs functions.
 
-(fset 'Get 'tpu-get)
-(fset 'GET 'tpu-get)
+(defalias 'exit 'tpu-exit)
+(defalias 'EXIT 'tpu-exit)
+
+(defalias 'Get 'tpu-get)
+(defalias 'GET 'tpu-get)
 
-(fset 'include 'tpu-include)
-(fset 'INCLUDE 'tpu-include)
+(defalias 'include 'tpu-include)
+(defalias 'INCLUDE 'tpu-include)
+
+(defalias 'quit 'tpu-quit)
+(defalias 'QUIT 'tpu-quit)
 
-(fset 'quit 'tpu-quit)
-(fset 'QUIT 'tpu-quit)
+(defalias 'spell 'tpu-spell-check)
+(defalias 'SPELL 'tpu-spell-check)
 
-(fset 'spell 'tpu-spell-check)
-(fset 'SPELL 'tpu-spell-check)
+(defalias 'what\ line 'tpu-what-line)
+(defalias 'WHAT\ LINE 'tpu-what-line)
+
+(defalias 'replace 'tpu-lm-replace)
+(defalias 'REPLACE 'tpu-lm-replace)
 
-(fset 'what\ line 'tpu-what-line)
-(fset 'WHAT\ LINE 'tpu-what-line)
+(defalias 'help 'tpu-help)
+(defalias 'HELP 'tpu-help)
+
+(defalias 'set\ cursor\ free 'tpu-set-cursor-free)
+(defalias 'SET\ CURSOR\ FREE 'tpu-set-cursor-free)
 
-(fset 'replace 'tpu-lm-replace)
-(fset 'REPLACE 'tpu-lm-replace)
+(defalias 'set\ cursor\ bound 'tpu-set-cursor-bound)
+(defalias 'SET\ CURSOR\ BOUND 'tpu-set-cursor-bound)
 
-;; Apparently TPU users really expect to do M-x help RET to get help.
-;; So it is really necessary to redefine this.
-(fset 'help 'tpu-help)
-(fset 'HELP 'tpu-help)
+(defalias 'set\ scroll\ margins 'tpu-set-scroll-margins)
+(defalias 'SET\ SCROLL\ MARGINS 'tpu-set-scroll-margins)
 
 ;; Real TPU error messages end in periods.
 ;; Define this to avoid openly flouting Emacs coding standards.
 (defalias 'tpu-error 'error)
 
-(fset 'set\ cursor\ free 'tpu-set-cursor-free)
-(fset 'SET\ CURSOR\ FREE 'tpu-set-cursor-free)
-
-(fset 'set\ cursor\ bound 'tpu-set-cursor-bound)
-(fset 'SET\ CURSOR\ BOUND 'tpu-set-cursor-bound)
-
-(fset 'set\ scroll\ margins 'tpu-set-scroll-margins)
-(fset 'SET\ SCROLL\ MARGINS 'tpu-set-scroll-margins)
-
 
 ;; Around emacs version 18.57, function line-move was renamed to
 ;; next-line-internal.  If we're running under an older emacs,