emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r100283: * simple.el (prog-mode): New


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100283: * simple.el (prog-mode): New (abstract) major mode.
Date: Fri, 14 May 2010 12:41:01 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100283
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2010-05-14 12:41:01 -0400
message:
  * 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.
modified:
  etc/NEWS
  lisp/ChangeLog
  lisp/emacs-lisp/lisp-mode.el
  lisp/progmodes/sh-script.el
  lisp/simple.el
=== modified file 'etc/NEWS'
--- a/etc/NEWS  2010-05-12 00:39:46 +0000
+++ b/etc/NEWS  2010-05-14 16:41:01 +0000
@@ -221,6 +221,7 @@
 
 * 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

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-05-14 13:31:36 +0000
+++ b/lisp/ChangeLog    2010-05-14 16:41:01 +0000
@@ -1,3 +1,9 @@
+2010-05-14  Stefan Monnier  <address@hidden>
+
+       * 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  <address@hidden>
 
        * 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.
 

=== modified file 'lisp/emacs-lisp/lisp-mode.el'
--- a/lisp/emacs-lisp/lisp-mode.el      2010-05-01 01:29:12 +0000
+++ b/lisp/emacs-lisp/lisp-mode.el      2010-05-14 16:41:01 +0000
@@ -221,8 +221,6 @@
   ;;(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 @@
   :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 @@
   "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.

=== modified file 'lisp/progmodes/sh-script.el'
--- a/lisp/progmodes/sh-script.el       2010-05-13 00:44:22 +0000
+++ b/lisp/progmodes/sh-script.el       2010-05-14 16:41:01 +0000
@@ -1583,7 +1583,6 @@
        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

=== modified file 'lisp/simple.el'
--- a/lisp/simple.el    2010-05-07 12:49:14 +0000
+++ b/lisp/simple.el    2010-05-14 16:41:01 +0000
@@ -422,6 +422,13 @@
   "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))


reply via email to

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