]> git.eshelyaron.com Git - emacs.git/commitdiff
* simple.el (prog-mode): New (abstract) major mode.
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 14 May 2010 16:41:01 +0000 (12:41 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 14 May 2010 16:41:01 +0000 (12:41 -0400)
* emacs-lisp/lisp-mode.el (emacs-lisp-mode, lisp-mode): Use it.
* progmodes/sh-script.el (sh-mode): Remove redundant var assignment.

etc/NEWS
lisp/ChangeLog
lisp/emacs-lisp/lisp-mode.el
lisp/progmodes/sh-script.el
lisp/simple.el

index c4393a53efe14263e9e51903f20d11c2ba7203df..b2a213c8fa2faa808b4267fcc36e8c3b50409b38 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -221,6 +221,7 @@ Secret Service API requires D-Bus for communication.
 \f
 * Lisp changes in Emacs 24.1
 
+** prog-mode is a new major-mode meant to be the parent of programming mode.
 ** define-minor-mode accepts a new keyword :variable.
 
 ** delete-file now accepts an optional second arg, FORCE, which says
index 2c98f1ab4752a9d4cc1e0a1034d041471fcb8e80..a80859f1a8446c95ce863f9d2229573f7e1149c5 100644 (file)
@@ -1,3 +1,9 @@
+2010-05-14  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * simple.el (prog-mode): New (abstract) major mode.
+       * emacs-lisp/lisp-mode.el (emacs-lisp-mode, lisp-mode): Use it.
+       * progmodes/sh-script.el (sh-mode): Remove redundant var assignment.
+
 2010-05-14  Juanma Barranquero  <lekktu@gmail.com>
 
        * progmodes/sql.el (sql-oracle-program): Reflow docstring.
@@ -24,8 +30,8 @@
        only when the message would be displayed.  Handled nested calls.
        (tramp-handle-load, tramp-handle-file-local-copy)
        (tramp-handle-insert-file-contents, tramp-handle-write-region)
-       (tramp-maybe-send-script, tramp-find-shell): Use
-       `with-progress-reporter'.
+       (tramp-maybe-send-script, tramp-find-shell):
+       Use `with-progress-reporter'.
        (tramp-handle-dired-compress-file, tramp-maybe-open-connection):
        Fix message text.
 
index 4a7f59e26fbed5bc345d043e9fe87db95df04c36..02477baf74fe56feca85d9436a2cb403e9b6677e 100644 (file)
@@ -221,8 +221,6 @@ font-lock keywords will not be case sensitive."
   ;;(set (make-local-variable 'adaptive-fill-mode) nil)
   (make-local-variable 'indent-line-function)
   (setq indent-line-function 'lisp-indent-line)
-  (make-local-variable 'parse-sexp-ignore-comments)
-  (setq parse-sexp-ignore-comments t)
   (make-local-variable 'outline-regexp)
   (setq outline-regexp ";;;\\(;* [^ \t\n]\\|###autoload\\)\\|(")
   (make-local-variable 'outline-level)
@@ -431,7 +429,7 @@ All commands in `lisp-mode-shared-map' are inherited by this map.")
   :type 'hook
   :group 'lisp)
 
-(define-derived-mode emacs-lisp-mode nil "Emacs-Lisp"
+(define-derived-mode emacs-lisp-mode prog-mode "Emacs-Lisp"
   "Major mode for editing Lisp code to run in Emacs.
 Commands:
 Delete converts tabs to spaces as it moves back.
@@ -466,7 +464,7 @@ if that value is non-nil."
   "Keymap for ordinary Lisp mode.
 All commands in `lisp-mode-shared-map' are inherited by this map.")
 
-(define-derived-mode lisp-mode nil "Lisp"
+(define-derived-mode lisp-mode prog-mode "Lisp"
   "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
 Commands:
 Delete converts tabs to spaces as it moves back.
index eca6d5fbe7b7bed53410cddb29e802f06005069c..478b0e33431f8cad4086f19f10b852dc778367b5 100644 (file)
@@ -1583,7 +1583,6 @@ with your script for an edit-interpret-debug cycle."
        sh-indent-supported-here nil)
   (set (make-local-variable 'defun-prompt-regexp)
        (concat "^\\(function[ \t]\\|[[:alnum:]]+[ \t]+()[ \t]+\\)"))
-  (set (make-local-variable 'parse-sexp-ignore-comments) t)
   ;; Parse or insert magic number for exec, and set all variables depending
   ;; on the shell thus determined.
   (sh-set-shell
index 5948536262c5a43b876cf42ae603d331a01abaf8..f0c38093d8671810f2fda1ae27464f7c7cdcbb61 100644 (file)
@@ -422,6 +422,13 @@ Other major modes are defined by comparison with this one."
   "Parent major mode from which special major modes should inherit."
   (setq buffer-read-only t))
 
+;; Major mode meant to be the parent of programming modes.
+
+(define-derived-mode prog-mode fundamental-mode "Prog"
+  "Major mode for editing programming language source code."
+  (set (make-local-variable 'require-final-newline) mode-require-final-newline)
+  (set (make-local-variable 'parse-sexp-ignore-comments) t))
+
 ;; Making and deleting lines.
 
 (defvar hard-newline (propertize "\n" 'hard t 'rear-nonsticky '(hard))