comparison lisp/emacs-lisp/lisp-mode.el @ 12035:c3747e64cff0

(emacs-lisp-mode-map): Add a menu. (emacs-lisp-byte-compile): New function.
author Karl Heuer <kwzh@gnu.org>
date Tue, 30 May 1995 23:07:27 +0000
parents bea3ee51b843
children a4f383dd5adb
comparison
equal deleted inserted replaced
12034:639cd125eddb 12035:c3747e64cff0
121 "Keymap for Emacs Lisp mode. 121 "Keymap for Emacs Lisp mode.
122 All commands in shared-lisp-mode-map are inherited by this map.") 122 All commands in shared-lisp-mode-map are inherited by this map.")
123 123
124 (if emacs-lisp-mode-map 124 (if emacs-lisp-mode-map
125 () 125 ()
126 (setq emacs-lisp-mode-map 126 (let ((map (make-sparse-keymap "Emacs-Lisp")))
127 (nconc (make-sparse-keymap) shared-lisp-mode-map)) 127 (setq emacs-lisp-mode-map
128 (define-key emacs-lisp-mode-map "\e\t" 'lisp-complete-symbol) 128 (nconc (make-sparse-keymap) shared-lisp-mode-map))
129 (define-key emacs-lisp-mode-map "\e\C-x" 'eval-defun)) 129 (define-key emacs-lisp-mode-map "\e\t" 'lisp-complete-symbol)
130 (define-key emacs-lisp-mode-map "\e\C-x" 'eval-defun)
131 (define-key emacs-lisp-mode-map [menu-bar] (make-sparse-keymap))
132 (define-key emacs-lisp-mode-map [menu-bar emacs-lisp]
133 (cons "Emacs-Lisp" map))
134 (define-key map [edebug-defun]
135 '("Instrument Function for Debugging" . edebug-defun))
136 (define-key map [byte-recompile]
137 '("Byte-recompile Directory..." . byte-recompile-directory))
138 (define-key map [byte-compile]
139 '("Byte-compile This File" . emacs-lisp-byte-compile))
140 (define-key map [separator-eval] '("--"))
141 (define-key map [eval-buffer] '("Evaluate Buffer" . eval-current-buffer))
142 (define-key map [eval-region] '("Evaluate Region" . eval-region))
143 (define-key map [eval-sexp] '("Evaluate Last S-expression" . eval-last-sexp))
144 (define-key map [separator-format] '("--"))
145 (define-key map [comment-region] '("Comment Out Region" . comment-region))
146 (define-key map [indent-region] '("Indent Region" . indent-region))
147 (define-key map [indent-line] '("Indent Line" . lisp-indent-line))))
148
149 (defun emacs-lisp-byte-compile ()
150 "Byte compile the file containing the current buffer."
151 (interactive)
152 (if buffer-file-name
153 (byte-compile-file buffer-file-name)
154 (error "The buffer must be saved in a file first.")))
130 155
131 (defun emacs-lisp-mode () 156 (defun emacs-lisp-mode ()
132 "Major mode for editing Lisp code to run in Emacs. 157 "Major mode for editing Lisp code to run in Emacs.
133 Commands: 158 Commands:
134 Delete converts tabs to spaces as it moves back. 159 Delete converts tabs to spaces as it moves back.