aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1995-05-30 23:07:27 +0000
committerKarl Heuer1995-05-30 23:07:27 +0000
commitb3a3cb637bdc30122533eaace593a05fa245d650 (patch)
tree4af318981c4ec0b8f8d4472ecfd0db7289d35c34
parent11b137a7435a62bc2c754cc87311aeb15eb8db0b (diff)
downloademacs-b3a3cb637bdc30122533eaace593a05fa245d650.tar.gz
emacs-b3a3cb637bdc30122533eaace593a05fa245d650.zip
(emacs-lisp-mode-map): Add a menu.
(emacs-lisp-byte-compile): New function.
-rw-r--r--lisp/emacs-lisp/lisp-mode.el33
1 files changed, 29 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 99b1d49f32f..c4e69d29dfe 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -123,10 +123,35 @@ 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.