emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r100098: * emacs-lisp/lisp-mode.el (l


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100098: * emacs-lisp/lisp-mode.el (lisp-mode): Use define-derived-mode.
Date: Fri, 30 Apr 2010 21:29:12 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100098
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2010-04-30 21:29:12 -0400
message:
  * emacs-lisp/lisp-mode.el (lisp-mode): Use define-derived-mode.
  Set find-tag-default-function as a variable rather than a property.
modified:
  lisp/ChangeLog
  lisp/emacs-lisp/lisp-mode.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-05-01 01:08:43 +0000
+++ b/lisp/ChangeLog    2010-05-01 01:29:12 +0000
@@ -1,5 +1,8 @@
 2010-05-01  Stefan Monnier  <address@hidden>
 
+       * emacs-lisp/lisp-mode.el (lisp-mode): Use define-derived-mode.
+       Set find-tag-default-function as a variable rather than a property.
+
        * minibuffer.el (tags-completion-at-point-function): Move to etags.el.
        * progmodes/etags.el (tags-completion-at-point-function):
        Remove left over interactive spec.  Add autoloading stub.

=== modified file 'lisp/emacs-lisp/lisp-mode.el'
--- a/lisp/emacs-lisp/lisp-mode.el      2010-01-13 08:35:10 +0000
+++ b/lisp/emacs-lisp/lisp-mode.el      2010-05-01 01:29:12 +0000
@@ -466,7 +466,7 @@
   "Keymap for ordinary Lisp mode.
 All commands in `lisp-mode-shared-map' are inherited by this map.")
 
-(defun lisp-mode ()
+(define-derived-mode lisp-mode nil "Lisp"
   "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
 Commands:
 Delete converts tabs to spaces as it moves back.
@@ -478,19 +478,12 @@
 
 Entry to this mode calls the value of `lisp-mode-hook'
 if that value is non-nil."
-  (interactive)
-  (kill-all-local-variables)
-  (use-local-map lisp-mode-map)
-  (setq major-mode 'lisp-mode)
-  (setq mode-name "Lisp")
   (lisp-mode-variables nil t)
+  (set (make-local-variable 'find-tag-default-function) 'lisp-find-tag-default)
   (make-local-variable 'comment-start-skip)
   (setq comment-start-skip
        "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")
-  (setq imenu-case-fold-search t)
-  (set-syntax-table lisp-mode-syntax-table)
-  (run-mode-hooks 'lisp-mode-hook))
-(put 'lisp-mode 'find-tag-default-function 'lisp-find-tag-default)
+  (setq imenu-case-fold-search t))
 
 (defun lisp-find-tag-default ()
   (let ((default (find-tag-default)))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]