diff options
| author | Richard M. Stallman | 2001-11-20 23:41:41 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-11-20 23:41:41 +0000 |
| commit | dda7c01036c240695aec25598ae582800184c8c7 (patch) | |
| tree | c97b8c53e87b69b32e2dfcfc4d33c05c29b573b6 | |
| parent | 1700f41d2005d62589a473df0bf44d4d81c7ec6e (diff) | |
| download | emacs-dda7c01036c240695aec25598ae582800184c8c7.tar.gz emacs-dda7c01036c240695aec25598ae582800184c8c7.zip | |
(lisp-mode, emacs-lisp-mode): Don't use define-derived-mode.
| -rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 38d607d3b25..95bfd0121f7 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el | |||
| @@ -297,7 +297,7 @@ All commands in `lisp-mode-shared-map' are inherited by this map.") | |||
| 297 | :type 'hook | 297 | :type 'hook |
| 298 | :group 'lisp) | 298 | :group 'lisp) |
| 299 | 299 | ||
| 300 | (define-derived-mode emacs-lisp-mode nil "Emacs-Lisp" | 300 | (defun emacs-lisp-mode () |
| 301 | "Major mode for editing Lisp code to run in Emacs. | 301 | "Major mode for editing Lisp code to run in Emacs. |
| 302 | Commands: | 302 | Commands: |
| 303 | Delete converts tabs to spaces as it moves back. | 303 | Delete converts tabs to spaces as it moves back. |
| @@ -305,8 +305,15 @@ Blank lines separate paragraphs. Semicolons start comments. | |||
| 305 | \\{emacs-lisp-mode-map} | 305 | \\{emacs-lisp-mode-map} |
| 306 | Entry to this mode calls the value of `emacs-lisp-mode-hook' | 306 | Entry to this mode calls the value of `emacs-lisp-mode-hook' |
| 307 | if that value is non-nil." | 307 | if that value is non-nil." |
| 308 | (interactive) | ||
| 309 | (kill-all-local-variables) | ||
| 310 | (use-local-map emacs-lisp-mode-map) | ||
| 311 | (set-syntax-table emacs-lisp-mode-syntax-table) | ||
| 312 | (setq major-mode 'emacs-lisp-mode) | ||
| 313 | (setq mode-name "Emacs-Lisp") | ||
| 308 | (lisp-mode-variables) | 314 | (lisp-mode-variables) |
| 309 | (setq imenu-case-fold-search nil)) | 315 | (setq imenu-case-fold-search nil) |
| 316 | (run-hooks 'emacs-lisp-mode-hook)) | ||
| 310 | 317 | ||
| 311 | (defvar lisp-mode-map | 318 | (defvar lisp-mode-map |
| 312 | (let ((map (make-sparse-keymap))) | 319 | (let ((map (make-sparse-keymap))) |
| @@ -317,7 +324,7 @@ if that value is non-nil." | |||
| 317 | "Keymap for ordinary Lisp mode. | 324 | "Keymap for ordinary Lisp mode. |
| 318 | All commands in `lisp-mode-shared-map' are inherited by this map.") | 325 | All commands in `lisp-mode-shared-map' are inherited by this map.") |
| 319 | 326 | ||
| 320 | (define-derived-mode lisp-mode nil "Lisp" | 327 | (defun lisp-mode () |
| 321 | "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp. | 328 | "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp. |
| 322 | Commands: | 329 | Commands: |
| 323 | Delete converts tabs to spaces as it moves back. | 330 | Delete converts tabs to spaces as it moves back. |
| @@ -328,11 +335,20 @@ or to switch back to an existing one. | |||
| 328 | 335 | ||
| 329 | Entry to this mode calls the value of `lisp-mode-hook' | 336 | Entry to this mode calls the value of `lisp-mode-hook' |
| 330 | if that value is non-nil." | 337 | if that value is non-nil." |
| 338 | (interactive) | ||
| 339 | (kill-all-local-variables) | ||
| 340 | (use-local-map lisp-mode-map) | ||
| 341 | (setq major-mode 'lisp-mode) | ||
| 342 | (setq mode-name "Lisp") | ||
| 331 | (lisp-mode-variables) | 343 | (lisp-mode-variables) |
| 332 | (set (make-local-variable 'comment-start-skip) | 344 | (make-local-variable 'comment-start-skip) |
| 345 | (setq comment-start-skip | ||
| 333 | "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *") | 346 | "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *") |
| 334 | (set (make-local-variable 'font-lock-keywords-case-fold-search) t) | 347 | (make-local-variable 'font-lock-keywords-case-fold-search) |
| 335 | (setq imenu-case-fold-search t)) | 348 | (setq font-lock-keywords-case-fold-search t) |
| 349 | (setq imenu-case-fold-search t) | ||
| 350 | (set-syntax-table lisp-mode-syntax-table) | ||
| 351 | (run-hooks 'lisp-mode-hook)) | ||
| 336 | 352 | ||
| 337 | ;; This will do unless inf-lisp.el is loaded. | 353 | ;; This will do unless inf-lisp.el is loaded. |
| 338 | (defun lisp-eval-defun (&optional and-go) | 354 | (defun lisp-eval-defun (&optional and-go) |